From cb079908a30328e46d42fe8cc77b9f7d38a15c2f Mon Sep 17 00:00:00 2001 From: Chef Snoopy <91462681+ChefSnoopy@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:44:26 +0800 Subject: [PATCH] feat: Add projects (#43) * feat: Add projects * feat: Format files --- projects/revenue-sharing-pool/v1/README.md | 6 + projects/revenue-sharing-pool/v1/config.ts | 26 + .../v1/contracts/RevenueSharingPool.sol | 454 ++++ .../contracts/RevenueSharingPoolFactory.sol | 67 + .../v1/contracts/VCake.sol | 689 ++++++ .../v1/contracts/interfaces/ICakePool.sol | 65 + .../v1/contracts/interfaces/IMasterChefV2.sol | 6 + .../interfaces/IRevenueSharingPool.sol | 10 + .../interfaces/IRevenueSharingPoolFactory.sol | 15 + .../v1/contracts/interfaces/IVCake.sol | 34 + .../keeper/RevenueSharingPoolKeeper.sol | 76 + .../v1/contracts/libraries/SafeCast.sol | 241 ++ .../v1/contracts/test/VCakeTest.sol | 763 +++++++ .../v1/contracts/utils/Math128.sol | 28 + .../revenue-sharing-pool/v1/hardhat.config.ts | 73 + projects/revenue-sharing-pool/v1/package.json | 26 + .../revenue-sharing-pool/v1/scripts/deploy.ts | 46 + .../v1/scripts/deployFactory.ts | 39 + .../v1/scripts/deployKeeper.ts | 39 + .../v1/test/RevenueSharingPool.test.ts | 716 ++++++ .../v1/test/VCake.test.ts | 189 ++ .../v1/test/VCakeLockedBalance.test.ts | 527 +++++ .../v1/test/artifactsFile/CakePool.json | 1551 +++++++++++++ .../v1/test/artifactsFile/CakeToken.json | 639 ++++++ .../v1/test/artifactsFile/ERC20Mock.json | 315 +++ .../v1/test/artifactsFile/MasterChef.json | 590 +++++ .../v1/test/artifactsFile/MasterChefV2.json | 1051 +++++++++ .../artifactsFile/RevenueSharingPool.json | 564 +++++ .../RevenueSharingPoolFactory.json | 238 ++ .../v1/test/artifactsFile/SyrupBar.json | 699 ++++++ .../v1/test/artifactsFile/VCake.json | 598 +++++ .../v1/test/artifactsFile/VCakeTest.json | 529 +++++ .../revenue-sharing-pool/v1/tsconfig.json | 12 + projects/revenue-sharing-pool/v2/README.md | 6 + projects/revenue-sharing-pool/v2/config.ts | 38 + .../v2/contracts/RevenueSharingPool.sol | 609 +++++ .../contracts/RevenueSharingPoolFactory.sol | 68 + .../contracts/RevenueSharingPoolGateway.sol | 23 + .../v2/contracts/interfaces/ICakePool.sol | 65 + .../v2/contracts/interfaces/IMasterChefV2.sol | 6 + .../interfaces/IProxyForCakePool.sol | 6 + .../interfaces/IRevenueSharingPool.sol | 16 + .../interfaces/IRevenueSharingPoolFactory.sol | 15 + .../v2/contracts/interfaces/IVECake.sol | 106 + .../keeper/RevenueSharingPoolKeeper.sol | 76 + .../v2/contracts/libraries/SafeCast.sol | 241 ++ .../v2/contracts/test/Delegator.sol | 67 + .../v2/contracts/utils/Math128.sol | 28 + .../revenue-sharing-pool/v2/hardhat.config.ts | 73 + projects/revenue-sharing-pool/v2/package.json | 24 + .../v2/scripts/deployFactory.ts | 39 + .../v2/scripts/deployKeeper.ts | 39 + .../v2/test/RevenueSharingPool.test.ts | 1185 ++++++++++ .../v2/test/artifactsFile/CakePool.json | 1551 +++++++++++++ .../v2/test/artifactsFile/CakeToken.json | 639 ++++++ .../v2/test/artifactsFile/Delegator.json | 446 ++++ .../v2/test/artifactsFile/ERC20Mock.json | 315 +++ .../v2/test/artifactsFile/MasterChef.json | 590 +++++ .../v2/test/artifactsFile/MasterChefV2.json | 1051 +++++++++ .../test/artifactsFile/ProxyForCakePool.json | 67 + .../ProxyForCakePoolFactory.json | 163 ++ .../artifactsFile/RevenueSharingPool.json | 788 +++++++ .../RevenueSharingPoolFactory.json | 225 ++ .../v2/test/artifactsFile/SyrupBar.json | 699 ++++++ .../v2/test/artifactsFile/VECake.json | 1955 ++++++++++++++++ .../revenue-sharing-pool/v2/tsconfig.json | 12 + projects/stable-swap/README.md | 5 + projects/stable-swap/config.ts | 53 + .../contracts/PancakeStableSwapFactory.sol | 211 ++ .../contracts/PancakeStableSwapLP.sol | 32 + .../contracts/PancakeStableSwapLPFactory.sol | 38 + .../contracts/PancakeStableSwapThreePool.sol | 774 +++++++ .../PancakeStableSwapThreePoolDeployer.sol | 84 + .../contracts/PancakeStableSwapTwoPool.sol | 774 +++++++ .../PancakeStableSwapTwoPoolDeployer.sol | 54 + .../interfaces/IPancakeStableSwap.sol | 39 + .../interfaces/IPancakeStableSwapDeployer.sol | 25 + .../interfaces/IPancakeStableSwapInfo.sol | 12 + .../interfaces/IPancakeStableSwapLP.sol | 15 + .../IPancakeStableSwapLPFactory.sol | 11 + .../contracts/interfaces/IWBNB.sol | 14 + .../stable-swap/contracts/mocks/MockToken.sol | 22 + projects/stable-swap/contracts/test/Token.sol | 28 + .../contracts/utils/PancakeStableSwapInfo.sol | 30 + .../utils/PancakeStableSwapThreePoolInfo.sol | 434 ++++ .../utils/PancakeStableSwapTwoPoolInfo.sol | 435 ++++ .../utils/PancakeStableSwapWBNBHelper.sol | 121 + projects/stable-swap/hardhat.config.ts | 82 + projects/stable-swap/package.json | 25 + projects/stable-swap/scripts/deploy.ts | 32 + .../stable-swap/scripts/deploy_LPFactory.ts | 27 + .../stable-swap/scripts/deploy_MockToken.ts | 27 + .../scripts/deploy_swapThreePoolDeployer.ts | 27 + .../scripts/deploy_swapTwoPoolDeployer.ts | 27 + .../test/PancakeStableSwapThreePool.test.ts | 420 ++++ .../test/PancakeStableSwapTwoPool.test.ts | 514 +++++ .../test/PancakeStableSwapWithBNB.test.ts | 521 +++++ projects/vecake-farm-booster/v3/README.md | 1 + projects/vecake-farm-booster/v3/config.ts | 22 + .../v3/contracts/FarmBooster.sol | 454 ++++ .../v3/contracts/MCV3MultiPositionUpdate.sol | 18 + .../v3/contracts/interfaces/IFarmBooster.sol | 20 + .../contracts/interfaces/IFarmBoosterV1.sol | 13 + .../v3/contracts/interfaces/IMasterChefV3.sol | 42 + .../INonfungiblePositionManager.sol | 41 + .../interfaces/IPancakeV3Factory.sol | 10 + .../contracts/interfaces/IPancakeV3Pool.sol | 8 + .../v3/contracts/interfaces/IVECake.sol | 48 + .../v3/contracts/libraries/IterateMapping.sol | 47 + .../vecake-farm-booster/v3/hardhat.config.ts | 73 + projects/vecake-farm-booster/v3/package.json | 24 + .../vecake-farm-booster/v3/scripts/deploy.ts | 33 + .../v3/test/FarmBooster.test.ts | 889 ++++++++ .../v3/test/artifactsFile/CakePool.json | 1551 +++++++++++++ .../v3/test/artifactsFile/CakeToken.json | 639 ++++++ .../v3/test/artifactsFile/ERC20Mock.json | 315 +++ .../v3/test/artifactsFile/FarmBooster.json | 797 +++++++ .../v3/test/artifactsFile/MasterChef.json | 590 +++++ .../v3/test/artifactsFile/MasterChefV2.json | 1051 +++++++++ .../v3/test/artifactsFile/MasterChefV3.json | 1584 +++++++++++++ .../v3/test/artifactsFile/MockBoost.json | 136 ++ .../NonfungiblePositionManager.json | 1248 ++++++++++ .../test/artifactsFile/PancakeV3Factory.json | 459 ++++ .../test/artifactsFile/PancakeV3LmPool.json | 273 +++ .../PancakeV3LmPoolDeployer.json | 91 + .../v3/test/artifactsFile/PancakeV3Pool.json | 1048 +++++++++ .../artifactsFile/PancakeV3PoolDeployer.json | 122 + .../test/artifactsFile/ProxyForCakePool.json | 67 + .../ProxyForCakePoolFactory.json | 163 ++ .../v3/test/artifactsFile/SwapRouter.json | 592 +++++ .../v3/test/artifactsFile/SyrupBar.json | 699 ++++++ .../v3/test/artifactsFile/VECake.json | 1955 ++++++++++++++++ projects/vecake-farm-booster/v3/tsconfig.json | 12 + projects/vecake/README.md | 5 + projects/vecake/config.ts | 26 + .../vecake/contracts/ProxyForCakePool.sol | 30 + .../contracts/ProxyForCakePoolFactory.sol | 49 + projects/vecake/contracts/VECake.sol | 1211 ++++++++++ .../vecake/contracts/interfaces/ICakePool.sol | 29 + .../contracts/interfaces/IDelegator.sol | 14 + .../contracts/interfaces/IFarmBooster.sol | 40 + .../interfaces/IProxyForCakePool.sol | 8 + .../interfaces/IProxyForCakePoolFactory.sol | 11 + .../vecake/contracts/interfaces/IVECake.sol | 92 + .../vecake/contracts/libraries/SafeCast.sol | 51 + projects/vecake/contracts/test/Delegator.sol | 62 + projects/vecake/contracts/test/VECakeTest.sol | 1216 ++++++++++ projects/vecake/docs/ProxyForCakePool.md | 42 + .../vecake/docs/ProxyForCakePoolFactory.md | 85 + projects/vecake/docs/VECake.md | 1058 +++++++++ projects/vecake/docs/interfaces/ICakePool.md | 40 + projects/vecake/docs/interfaces/IDelegator.md | 20 + .../vecake/docs/interfaces/IFarmBooster.md | 41 + .../vecake/docs/interfaces/IMasterChefV2.md | 10 + .../docs/interfaces/IProxyForCakePool.md | 16 + .../interfaces/IProxyForCakePoolFactory.md | 30 + projects/vecake/docs/interfaces/IVECake.md | 243 ++ projects/vecake/docs/libraries/SafeCast.md | 48 + projects/vecake/docs/test/Delegator.md | 83 + projects/vecake/docs/test/VECakeTest.md | 1058 +++++++++ projects/vecake/hardhat.config.ts | 88 + projects/vecake/package.json | 16 + projects/vecake/scripts/deploy.ts | 47 + .../scripts/deployProxyForCakePoolFactory.ts | 34 + projects/vecake/test/VECake.test.ts | 1223 ++++++++++ .../vecake/test/VECake_totalSupply.test.ts | 220 ++ .../vecake/test/artifactsFile/CakePool.json | 1551 +++++++++++++ .../vecake/test/artifactsFile/CakeToken.json | 639 ++++++ .../vecake/test/artifactsFile/Delegator.json | 421 ++++ .../vecake/test/artifactsFile/ERC20Mock.json | 315 +++ .../vecake/test/artifactsFile/MasterChef.json | 590 +++++ .../test/artifactsFile/MasterChefV2.json | 1051 +++++++++ .../test/artifactsFile/ProxyForCakePool.json | 67 + .../ProxyForCakePoolFactory.json | 163 ++ .../vecake/test/artifactsFile/SyrupBar.json | 699 ++++++ .../vecake/test/artifactsFile/VECake.json | 1998 +++++++++++++++++ .../vecake/test/artifactsFile/VECakeTest.json | 1998 +++++++++++++++++ projects/vecake/tsconfig.json | 12 + 178 files changed, 58950 insertions(+) create mode 100644 projects/revenue-sharing-pool/v1/README.md create mode 100644 projects/revenue-sharing-pool/v1/config.ts create mode 100644 projects/revenue-sharing-pool/v1/contracts/RevenueSharingPool.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/RevenueSharingPoolFactory.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/VCake.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/interfaces/ICakePool.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/interfaces/IMasterChefV2.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/interfaces/IRevenueSharingPool.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/interfaces/IRevenueSharingPoolFactory.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/interfaces/IVCake.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/keeper/RevenueSharingPoolKeeper.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/libraries/SafeCast.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/test/VCakeTest.sol create mode 100644 projects/revenue-sharing-pool/v1/contracts/utils/Math128.sol create mode 100644 projects/revenue-sharing-pool/v1/hardhat.config.ts create mode 100644 projects/revenue-sharing-pool/v1/package.json create mode 100644 projects/revenue-sharing-pool/v1/scripts/deploy.ts create mode 100644 projects/revenue-sharing-pool/v1/scripts/deployFactory.ts create mode 100644 projects/revenue-sharing-pool/v1/scripts/deployKeeper.ts create mode 100644 projects/revenue-sharing-pool/v1/test/RevenueSharingPool.test.ts create mode 100644 projects/revenue-sharing-pool/v1/test/VCake.test.ts create mode 100644 projects/revenue-sharing-pool/v1/test/VCakeLockedBalance.test.ts create mode 100644 projects/revenue-sharing-pool/v1/test/artifactsFile/CakePool.json create mode 100644 projects/revenue-sharing-pool/v1/test/artifactsFile/CakeToken.json create mode 100644 projects/revenue-sharing-pool/v1/test/artifactsFile/ERC20Mock.json create mode 100644 projects/revenue-sharing-pool/v1/test/artifactsFile/MasterChef.json create mode 100644 projects/revenue-sharing-pool/v1/test/artifactsFile/MasterChefV2.json create mode 100644 projects/revenue-sharing-pool/v1/test/artifactsFile/RevenueSharingPool.json create mode 100644 projects/revenue-sharing-pool/v1/test/artifactsFile/RevenueSharingPoolFactory.json create mode 100644 projects/revenue-sharing-pool/v1/test/artifactsFile/SyrupBar.json create mode 100644 projects/revenue-sharing-pool/v1/test/artifactsFile/VCake.json create mode 100644 projects/revenue-sharing-pool/v1/test/artifactsFile/VCakeTest.json create mode 100644 projects/revenue-sharing-pool/v1/tsconfig.json create mode 100644 projects/revenue-sharing-pool/v2/README.md create mode 100644 projects/revenue-sharing-pool/v2/config.ts create mode 100644 projects/revenue-sharing-pool/v2/contracts/RevenueSharingPool.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/RevenueSharingPoolFactory.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/RevenueSharingPoolGateway.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/interfaces/ICakePool.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/interfaces/IMasterChefV2.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/interfaces/IProxyForCakePool.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/interfaces/IRevenueSharingPool.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/interfaces/IRevenueSharingPoolFactory.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/interfaces/IVECake.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/keeper/RevenueSharingPoolKeeper.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/libraries/SafeCast.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/test/Delegator.sol create mode 100644 projects/revenue-sharing-pool/v2/contracts/utils/Math128.sol create mode 100644 projects/revenue-sharing-pool/v2/hardhat.config.ts create mode 100644 projects/revenue-sharing-pool/v2/package.json create mode 100644 projects/revenue-sharing-pool/v2/scripts/deployFactory.ts create mode 100644 projects/revenue-sharing-pool/v2/scripts/deployKeeper.ts create mode 100644 projects/revenue-sharing-pool/v2/test/RevenueSharingPool.test.ts create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/CakePool.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/CakeToken.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/Delegator.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/ERC20Mock.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/MasterChef.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/MasterChefV2.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/ProxyForCakePool.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/ProxyForCakePoolFactory.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/RevenueSharingPool.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/RevenueSharingPoolFactory.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/SyrupBar.json create mode 100644 projects/revenue-sharing-pool/v2/test/artifactsFile/VECake.json create mode 100644 projects/revenue-sharing-pool/v2/tsconfig.json create mode 100644 projects/stable-swap/README.md create mode 100644 projects/stable-swap/config.ts create mode 100644 projects/stable-swap/contracts/PancakeStableSwapFactory.sol create mode 100644 projects/stable-swap/contracts/PancakeStableSwapLP.sol create mode 100644 projects/stable-swap/contracts/PancakeStableSwapLPFactory.sol create mode 100644 projects/stable-swap/contracts/PancakeStableSwapThreePool.sol create mode 100644 projects/stable-swap/contracts/PancakeStableSwapThreePoolDeployer.sol create mode 100644 projects/stable-swap/contracts/PancakeStableSwapTwoPool.sol create mode 100644 projects/stable-swap/contracts/PancakeStableSwapTwoPoolDeployer.sol create mode 100644 projects/stable-swap/contracts/interfaces/IPancakeStableSwap.sol create mode 100644 projects/stable-swap/contracts/interfaces/IPancakeStableSwapDeployer.sol create mode 100644 projects/stable-swap/contracts/interfaces/IPancakeStableSwapInfo.sol create mode 100644 projects/stable-swap/contracts/interfaces/IPancakeStableSwapLP.sol create mode 100644 projects/stable-swap/contracts/interfaces/IPancakeStableSwapLPFactory.sol create mode 100644 projects/stable-swap/contracts/interfaces/IWBNB.sol create mode 100644 projects/stable-swap/contracts/mocks/MockToken.sol create mode 100644 projects/stable-swap/contracts/test/Token.sol create mode 100644 projects/stable-swap/contracts/utils/PancakeStableSwapInfo.sol create mode 100644 projects/stable-swap/contracts/utils/PancakeStableSwapThreePoolInfo.sol create mode 100644 projects/stable-swap/contracts/utils/PancakeStableSwapTwoPoolInfo.sol create mode 100644 projects/stable-swap/contracts/utils/PancakeStableSwapWBNBHelper.sol create mode 100644 projects/stable-swap/hardhat.config.ts create mode 100644 projects/stable-swap/package.json create mode 100644 projects/stable-swap/scripts/deploy.ts create mode 100644 projects/stable-swap/scripts/deploy_LPFactory.ts create mode 100644 projects/stable-swap/scripts/deploy_MockToken.ts create mode 100644 projects/stable-swap/scripts/deploy_swapThreePoolDeployer.ts create mode 100644 projects/stable-swap/scripts/deploy_swapTwoPoolDeployer.ts create mode 100644 projects/stable-swap/test/PancakeStableSwapThreePool.test.ts create mode 100644 projects/stable-swap/test/PancakeStableSwapTwoPool.test.ts create mode 100644 projects/stable-swap/test/PancakeStableSwapWithBNB.test.ts create mode 100644 projects/vecake-farm-booster/v3/README.md create mode 100644 projects/vecake-farm-booster/v3/config.ts create mode 100644 projects/vecake-farm-booster/v3/contracts/FarmBooster.sol create mode 100644 projects/vecake-farm-booster/v3/contracts/MCV3MultiPositionUpdate.sol create mode 100644 projects/vecake-farm-booster/v3/contracts/interfaces/IFarmBooster.sol create mode 100644 projects/vecake-farm-booster/v3/contracts/interfaces/IFarmBoosterV1.sol create mode 100644 projects/vecake-farm-booster/v3/contracts/interfaces/IMasterChefV3.sol create mode 100644 projects/vecake-farm-booster/v3/contracts/interfaces/INonfungiblePositionManager.sol create mode 100644 projects/vecake-farm-booster/v3/contracts/interfaces/IPancakeV3Factory.sol create mode 100644 projects/vecake-farm-booster/v3/contracts/interfaces/IPancakeV3Pool.sol create mode 100644 projects/vecake-farm-booster/v3/contracts/interfaces/IVECake.sol create mode 100644 projects/vecake-farm-booster/v3/contracts/libraries/IterateMapping.sol create mode 100644 projects/vecake-farm-booster/v3/hardhat.config.ts create mode 100644 projects/vecake-farm-booster/v3/package.json create mode 100644 projects/vecake-farm-booster/v3/scripts/deploy.ts create mode 100644 projects/vecake-farm-booster/v3/test/FarmBooster.test.ts create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/CakePool.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/CakeToken.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/ERC20Mock.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/FarmBooster.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/MasterChef.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/MasterChefV2.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/MasterChefV3.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/MockBoost.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/NonfungiblePositionManager.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3Factory.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3LmPool.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3LmPoolDeployer.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3Pool.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3PoolDeployer.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/ProxyForCakePool.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/ProxyForCakePoolFactory.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/SwapRouter.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/SyrupBar.json create mode 100644 projects/vecake-farm-booster/v3/test/artifactsFile/VECake.json create mode 100644 projects/vecake-farm-booster/v3/tsconfig.json create mode 100644 projects/vecake/README.md create mode 100644 projects/vecake/config.ts create mode 100644 projects/vecake/contracts/ProxyForCakePool.sol create mode 100644 projects/vecake/contracts/ProxyForCakePoolFactory.sol create mode 100644 projects/vecake/contracts/VECake.sol create mode 100644 projects/vecake/contracts/interfaces/ICakePool.sol create mode 100644 projects/vecake/contracts/interfaces/IDelegator.sol create mode 100644 projects/vecake/contracts/interfaces/IFarmBooster.sol create mode 100644 projects/vecake/contracts/interfaces/IProxyForCakePool.sol create mode 100644 projects/vecake/contracts/interfaces/IProxyForCakePoolFactory.sol create mode 100644 projects/vecake/contracts/interfaces/IVECake.sol create mode 100644 projects/vecake/contracts/libraries/SafeCast.sol create mode 100644 projects/vecake/contracts/test/Delegator.sol create mode 100644 projects/vecake/contracts/test/VECakeTest.sol create mode 100644 projects/vecake/docs/ProxyForCakePool.md create mode 100644 projects/vecake/docs/ProxyForCakePoolFactory.md create mode 100644 projects/vecake/docs/VECake.md create mode 100644 projects/vecake/docs/interfaces/ICakePool.md create mode 100644 projects/vecake/docs/interfaces/IDelegator.md create mode 100644 projects/vecake/docs/interfaces/IFarmBooster.md create mode 100644 projects/vecake/docs/interfaces/IMasterChefV2.md create mode 100644 projects/vecake/docs/interfaces/IProxyForCakePool.md create mode 100644 projects/vecake/docs/interfaces/IProxyForCakePoolFactory.md create mode 100644 projects/vecake/docs/interfaces/IVECake.md create mode 100644 projects/vecake/docs/libraries/SafeCast.md create mode 100644 projects/vecake/docs/test/Delegator.md create mode 100644 projects/vecake/docs/test/VECakeTest.md create mode 100644 projects/vecake/hardhat.config.ts create mode 100644 projects/vecake/package.json create mode 100644 projects/vecake/scripts/deploy.ts create mode 100644 projects/vecake/scripts/deployProxyForCakePoolFactory.ts create mode 100644 projects/vecake/test/VECake.test.ts create mode 100644 projects/vecake/test/VECake_totalSupply.test.ts create mode 100644 projects/vecake/test/artifactsFile/CakePool.json create mode 100644 projects/vecake/test/artifactsFile/CakeToken.json create mode 100644 projects/vecake/test/artifactsFile/Delegator.json create mode 100644 projects/vecake/test/artifactsFile/ERC20Mock.json create mode 100644 projects/vecake/test/artifactsFile/MasterChef.json create mode 100644 projects/vecake/test/artifactsFile/MasterChefV2.json create mode 100644 projects/vecake/test/artifactsFile/ProxyForCakePool.json create mode 100644 projects/vecake/test/artifactsFile/ProxyForCakePoolFactory.json create mode 100644 projects/vecake/test/artifactsFile/SyrupBar.json create mode 100644 projects/vecake/test/artifactsFile/VECake.json create mode 100644 projects/vecake/test/artifactsFile/VECakeTest.json create mode 100644 projects/vecake/tsconfig.json diff --git a/projects/revenue-sharing-pool/v1/README.md b/projects/revenue-sharing-pool/v1/README.md new file mode 100644 index 00000000..993af3b2 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/README.md @@ -0,0 +1,6 @@ +# Pancake Revenue Sharing Pool V1 + +## Description + +Pancake Revenue Sharing Pool V1. + diff --git a/projects/revenue-sharing-pool/v1/config.ts b/projects/revenue-sharing-pool/v1/config.ts new file mode 100644 index 00000000..fa7b1e33 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/config.ts @@ -0,0 +1,26 @@ +export default { + CakePool: { + mainnet: "0x45c54210128a065de780C4B0Df3d16664f7f859e", + testnet: "0x1088Fb24053F03802F673b84d16AE1A7023E400b", + }, + MasterChef: { + mainnet: "0xa5f8C5Dbd5F286960b9d90548680aE5ebFf07652", + testnet: "0xf6B427A2Df6E24600e3e3c62634B7c478826619D", + }, + cakePoolPID: { + mainnet: 0, + testnet: 2, + }, + VCake: { + mainnet: "0xa3b8321173Cf3DdF37Ce3e7548203Fc25d86402F", + testnet: "0x5DD37E97716A8b358BCbc731516F36FFff978454", + }, + RevenueSharingPoolFactory: { + mainnet: "0xbBC86F201c14A4062Ee0dE8c580dA38c6E38cD2e", + testnet: "0xB8c7535f2b099b30fa07FcDdFCCA9808826b297e", + }, + RevenueSharingPoolForCake: { + mainnet: "0xCD5d1935e9bfa4905f9f007C97aB1f1763dC1607", + testnet: "0x0000000000000000000000000000000000000000", + }, +}; diff --git a/projects/revenue-sharing-pool/v1/contracts/RevenueSharingPool.sol b/projects/revenue-sharing-pool/v1/contracts/RevenueSharingPool.sol new file mode 100644 index 00000000..609fa85b --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/RevenueSharingPool.sol @@ -0,0 +1,454 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin-4.5.0/contracts/security/ReentrancyGuard.sol"; +import "./libraries/SafeCast.sol"; +import "./utils/Math128.sol"; +import "./interfaces/IVCake.sol"; +import "./interfaces/IRevenueSharingPoolFactory.sol"; + +contract RevenueSharingPool is Ownable, ReentrancyGuard { + using SafeERC20 for IERC20; + + /// @dev Events + event LogSetCanCheckpointToken(bool _toggleFlag); + event LogFeed(uint256 _amount); + event LogCheckpointToken(uint256 _timestamp, uint256 _tokens); + event LogClaimed(address indexed _recipient, uint256 _amount, uint256 _claimEpoch, uint256 _maxEpoch); + event LogKilled(); + event LogSetWhitelistedCheckpointCallers(address indexed _caller, address indexed _address, bool _ok); + + /// @dev Time-related constants + uint256 public constant WEEK = 1 weeks; + uint256 public constant TOKEN_CHECKPOINT_DEADLINE = 1 days; + + uint256 public startWeekCursor; + uint256 public weekCursor; + mapping(address => uint256) public weekCursorOf; + mapping(address => uint256) public userEpochOf; + + uint256 public lastTokenTimestamp; + mapping(uint256 => uint256) public tokensPerWeek; + + address public VCake; + IERC20 public rewardToken; + uint256 public lastTokenBalance; + + /// @dev VCake supply at week bounds + mapping(uint256 => uint256) public totalSupplyAt; + + bool public canCheckpointToken; + + /// @dev address to get token when contract is emergency stop + bool public isKilled; + address public emergencyReturn; + + /// @dev list of whitelist checkpoint callers + mapping(address => bool) public whitelistedCheckpointCallers; + + /// @notice constructor + constructor() { + ( + address _VCake, + uint256 _startTime, + address _rewardToken, + address _emergencyReturn, + address owner + ) = IRevenueSharingPoolFactory(msg.sender).parameters(); + uint256 _startTimeFloorWeek = _timestampToFloorWeek(_startTime); + startWeekCursor = _startTimeFloorWeek; + lastTokenTimestamp = _startTimeFloorWeek; + weekCursor = _startTimeFloorWeek; + rewardToken = IERC20(_rewardToken); + VCake = _VCake; + emergencyReturn = _emergencyReturn; + + _transferOwnership(owner); + } + + modifier onlyLive() { + require(!isKilled, "killed"); + _; + } + + /// @notice Get VCake balance of "_user" at "_timstamp" + /// @param _user The user address + /// @param _timestamp The timestamp to get user's balance + function balanceOfAt(address _user, uint256 _timestamp) external view returns (uint256) { + uint256 _maxUserEpoch = IVCake(VCake).userPointEpoch(_user); + if (_maxUserEpoch == 0) { + return 0; + } + + uint256 _epoch = _findTimestampUserEpoch(_user, _timestamp, _maxUserEpoch); + Point memory _point = IVCake(VCake).userPointHistory(_user, _epoch); + int128 _bias = _point.bias - _point.slope * SafeCast.toInt128(int256(_timestamp - _point.timestamp)); + if (_bias < 0) { + return 0; + } + return SafeCast.toUint256(_bias); + } + + /// @notice Record token distribution checkpoint + function _checkpointToken() internal { + // Find out how many tokens to be distributed + uint256 _rewardTokenBalance = rewardToken.balanceOf(address(this)); + uint256 _toDistribute = _rewardTokenBalance - lastTokenBalance; + lastTokenBalance = _rewardTokenBalance; + + // Prepare and update time-related variables + // 1. Setup _timeCursor to be the "lastTokenTimestamp" + // 2. Find out how long from previous checkpoint + // 3. Setup iterable cursor + // 4. Update lastTokenTimestamp to be block.timestamp + uint256 _timeCursor = lastTokenTimestamp; + uint256 _deltaSinceLastTimestamp = block.timestamp - _timeCursor; + uint256 _thisWeekCursor = _timestampToFloorWeek(_timeCursor); + uint256 _nextWeekCursor = 0; + lastTokenTimestamp = block.timestamp; + + // Iterate through weeks to filled out missing tokensPerWeek (if any) + for (uint256 _i = 0; _i < 52; _i++) { + _nextWeekCursor = _thisWeekCursor + WEEK; + + // if block.timestamp < _nextWeekCursor, means _nextWeekCursor goes + // beyond the actual block.timestamp, hence it is the last iteration + // to fill out tokensPerWeek + if (block.timestamp < _nextWeekCursor) { + if (_deltaSinceLastTimestamp == 0 && block.timestamp == _timeCursor) { + tokensPerWeek[_thisWeekCursor] = tokensPerWeek[_thisWeekCursor] + _toDistribute; + } else { + tokensPerWeek[_thisWeekCursor] = + tokensPerWeek[_thisWeekCursor] + + ((_toDistribute * (block.timestamp - _timeCursor)) / _deltaSinceLastTimestamp); + } + break; + } else { + if (_deltaSinceLastTimestamp == 0 && _nextWeekCursor == _timeCursor) { + tokensPerWeek[_thisWeekCursor] = tokensPerWeek[_thisWeekCursor] + _toDistribute; + } else { + tokensPerWeek[_thisWeekCursor] = + tokensPerWeek[_thisWeekCursor] + + ((_toDistribute * (_nextWeekCursor - _timeCursor)) / _deltaSinceLastTimestamp); + } + } + _timeCursor = _nextWeekCursor; + _thisWeekCursor = _nextWeekCursor; + } + + emit LogCheckpointToken(block.timestamp, _toDistribute); + } + + /// @notice Update token checkpoint + /// @dev Calculate the total token to be distributed in a given week. + /// At launch can only be called by owner, after launch can be called + /// by anyone if block.timestamp > lastTokenTime + TOKEN_CHECKPOINT_DEADLINE + function checkpointToken() external nonReentrant { + require( + msg.sender == owner() || + whitelistedCheckpointCallers[msg.sender] || + (canCheckpointToken && (block.timestamp > lastTokenTimestamp + TOKEN_CHECKPOINT_DEADLINE)), + "!allow" + ); + _checkpointToken(); + } + + /// @notice Record VCake total supply for each week + function _checkpointTotalSupply() internal { + uint256 _weekCursor = weekCursor; + uint256 _roundedTimestamp = _timestampToFloorWeek(block.timestamp); + + IVCake(VCake).checkpoint(); + + for (uint256 _i = 0; _i < 52; _i++) { + if (_weekCursor > _roundedTimestamp) { + break; + } else { + uint256 _epoch = _findTimestampEpoch(_weekCursor); + Point memory _point = IVCake(VCake).pointHistory(_epoch); + int128 _timeDelta = 0; + if (_weekCursor > _point.timestamp) { + _timeDelta = SafeCast.toInt128(int256(_weekCursor - _point.timestamp)); + } + int128 _bias = _point.bias - _point.slope * _timeDelta; + if (_bias < 0) { + totalSupplyAt[_weekCursor] = 0; + } else { + totalSupplyAt[_weekCursor] = SafeCast.toUint256(_bias); + } + } + _weekCursor = _weekCursor + WEEK; + } + + weekCursor = _weekCursor; + } + + /// @notice Update VCake total supply checkpoint + /// @dev This function can be called independently or at the first claim of + /// the new epoch week. + function checkpointTotalSupply() external nonReentrant { + _checkpointTotalSupply(); + } + + /// @notice Claim rewardToken + /// @dev Perform claim rewardToken + function _claim(address _user, uint256 _maxClaimTimestamp) internal returns (uint256) { + uint256 _userEpoch = 0; + uint256 _toDistribute = 0; + + uint256 _maxUserEpoch = IVCake(VCake).userPointEpoch(_user); + uint256 _startWeekCursor = startWeekCursor; + + // _maxUserEpoch = 0, meaning no lock. + // Hence, no yield for _user + if (_maxUserEpoch == 0) { + return 0; + } + + uint256 _userWeekCursor = weekCursorOf[_user]; + if (_userWeekCursor == 0) { + // if _user has no _userWeekCursor with GrassHouse yet + // then we need to perform binary search + _userEpoch = _findTimestampUserEpoch(_user, _startWeekCursor, _maxUserEpoch); + } else { + // else, _user must has epoch with GrassHouse already + _userEpoch = userEpochOf[_user]; + } + + if (_userEpoch == 0) { + _userEpoch = 1; + } + + Point memory _userPoint = IVCake(VCake).userPointHistory(_user, _userEpoch); + + if (_userWeekCursor == 0) { + _userWeekCursor = ((_userPoint.timestamp + WEEK - 1) / WEEK) * WEEK; + } + + // _userWeekCursor is already at/beyond _maxClaimTimestamp + // meaning nothing to be claimed for this user. + // This can be: + // 1) User just lock their ALPACA less than 1 week + // 2) User already claimed their rewards + if (_userWeekCursor >= _maxClaimTimestamp) { + return 0; + } + + // Handle when user lock ALPACA before Grasshouse started + // by assign _userWeekCursor to Grasshouse's _startWeekCursor + if (_userWeekCursor < _startWeekCursor) { + _userWeekCursor = _startWeekCursor; + } + + Point memory _prevUserPoint = Point({bias: 0, slope: 0, timestamp: 0, blockNumber: 0}); + + // Go through weeks + for (uint256 _i = 0; _i < 52; _i++) { + // If _userWeekCursor is iterated to be at/beyond _maxClaimTimestamp + // This means we went through all weeks that user subject to claim rewards already + if (_userWeekCursor >= _maxClaimTimestamp) { + break; + } + // Move to the new epoch if need to, + // else calculate rewards that user should get. + if (_userWeekCursor >= _userPoint.timestamp && _userEpoch <= _maxUserEpoch) { + _userEpoch = _userEpoch + 1; + _prevUserPoint = Point({ + bias: _userPoint.bias, + slope: _userPoint.slope, + timestamp: _userPoint.timestamp, + blockNumber: _userPoint.blockNumber + }); + // When _userEpoch goes beyond _maxUserEpoch then there is no more Point, + // else take _userEpoch as a new Point + if (_userEpoch > _maxUserEpoch) { + _userPoint = Point({bias: 0, slope: 0, timestamp: 0, blockNumber: 0}); + } else { + _userPoint = IVCake(VCake).userPointHistory(_user, _userEpoch); + } + } else { + int128 _timeDelta = SafeCast.toInt128(int256(_userWeekCursor - _prevUserPoint.timestamp)); + uint256 _balanceOf = SafeCast.toUint256( + Math128.max(_prevUserPoint.bias - _timeDelta * _prevUserPoint.slope, 0) + ); + if (_balanceOf == 0 && _userEpoch > _maxUserEpoch) { + break; + } + if (_balanceOf > 0) { + _toDistribute = + _toDistribute + + (_balanceOf * tokensPerWeek[_userWeekCursor]) / + totalSupplyAt[_userWeekCursor]; + } + _userWeekCursor = _userWeekCursor + WEEK; + } + } + + _userEpoch = Math128.min(_maxUserEpoch, _userEpoch - 1); + userEpochOf[_user] = _userEpoch; + weekCursorOf[_user] = _userWeekCursor; + + emit LogClaimed(_user, _toDistribute, _userEpoch, _maxUserEpoch); + + return _toDistribute; + } + + /// @notice Claim rewardToken for "_user" + /// @param _user The address to claim rewards for + function claim(address _user) external nonReentrant onlyLive returns (uint256) { + if (block.timestamp >= weekCursor) _checkpointTotalSupply(); + uint256 _lastTokenTimestamp = lastTokenTimestamp; + + if (canCheckpointToken && (block.timestamp > _lastTokenTimestamp + TOKEN_CHECKPOINT_DEADLINE)) { + _checkpointToken(); + _lastTokenTimestamp = block.timestamp; + } + + _lastTokenTimestamp = _timestampToFloorWeek(_lastTokenTimestamp); + + uint256 _amount = _claim(_user, _lastTokenTimestamp); + if (_amount != 0) { + lastTokenBalance = lastTokenBalance - _amount; + rewardToken.safeTransfer(_user, _amount); + } + + return _amount; + } + + /// @notice Claim rewardToken for multiple users + /// @param _users The array of addresses to claim reward for + function claimMany(address[] calldata _users) external nonReentrant onlyLive returns (bool) { + require(_users.length <= 20, "!over 20 users"); + + if (block.timestamp >= weekCursor) _checkpointTotalSupply(); + + uint256 _lastTokenTimestamp = lastTokenTimestamp; + + if (canCheckpointToken && (block.timestamp > _lastTokenTimestamp + TOKEN_CHECKPOINT_DEADLINE)) { + _checkpointToken(); + _lastTokenTimestamp = block.timestamp; + } + + _lastTokenTimestamp = _timestampToFloorWeek(_lastTokenTimestamp); + uint256 _total = 0; + + for (uint256 i = 0; i < _users.length; i++) { + require(_users[i] != address(0), "bad user"); + + uint256 _amount = _claim(_users[i], _lastTokenTimestamp); + if (_amount != 0) { + rewardToken.safeTransfer(_users[i], _amount); + _total = _total + _amount; + } + } + + if (_total != 0) { + lastTokenBalance = lastTokenBalance - _total; + } + + return true; + } + + /// @notice Receive rewardTokens into the contract and trigger token checkpoint + function feed(uint256 _amount) external nonReentrant onlyLive returns (bool) { + rewardToken.safeTransferFrom(msg.sender, address(this), _amount); + + if (canCheckpointToken && (block.timestamp > lastTokenTimestamp + TOKEN_CHECKPOINT_DEADLINE)) { + _checkpointToken(); + } + + emit LogFeed(_amount); + + return true; + } + + /// @notice Do Binary Search to find out epoch from timestamp + /// @param _timestamp Timestamp to find epoch + function _findTimestampEpoch(uint256 _timestamp) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = IVCake(VCake).epoch(); + // Loop for 128 times -> enough for 128-bit numbers + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + Point memory _point = IVCake(VCake).pointHistory(_mid); + if (_point.timestamp <= _timestamp) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + /// @notice Perform binary search to find out user's epoch from the given timestamp + /// @param _user The user address + /// @param _timestamp The timestamp that you wish to find out epoch + /// @param _maxUserEpoch Max epoch to find out the timestamp + function _findTimestampUserEpoch( + address _user, + uint256 _timestamp, + uint256 _maxUserEpoch + ) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = _maxUserEpoch; + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + Point memory _point = IVCake(VCake).userPointHistory(_user, _mid); + if (_point.timestamp <= _timestamp) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + function kill() external onlyOwner { + isKilled = true; + rewardToken.safeTransfer(emergencyReturn, rewardToken.balanceOf(address(this))); + + emit LogKilled(); + } + + /// @notice Set canCheckpointToken to allow random callers to call checkpointToken + /// @param _newCanCheckpointToken The new canCheckpointToken flag + function setCanCheckpointToken(bool _newCanCheckpointToken) external onlyOwner { + canCheckpointToken = _newCanCheckpointToken; + emit LogSetCanCheckpointToken(_newCanCheckpointToken); + } + + /// @notice Round off random timestamp to week + /// @param _timestamp The timestamp to be rounded off + function _timestampToFloorWeek(uint256 _timestamp) internal pure returns (uint256) { + return (_timestamp / WEEK) * WEEK; + } + + /// @notice Inject rewardToken into the contract + /// @param _timestamp The timestamp of the rewardToken to be distributed + /// @param _amount The amount of rewardToken to be distributed + function injectReward(uint256 _timestamp, uint256 _amount) external onlyOwner { + rewardToken.safeTransferFrom(msg.sender, address(this), _amount); + lastTokenBalance += _amount; + tokensPerWeek[_timestampToFloorWeek(_timestamp)] = _amount; + } + + /// @notice Set whitelisted checkpoint callers. + /// @dev Must only be called by owner. + /// @param _callers addresses to be whitelisted. + /// @param _ok The new ok flag for callers. + function setWhitelistedCheckpointCallers(address[] calldata _callers, bool _ok) external onlyOwner { + for (uint256 _idx = 0; _idx < _callers.length; _idx++) { + whitelistedCheckpointCallers[_callers[_idx]] = _ok; + emit LogSetWhitelistedCheckpointCallers(msg.sender, _callers[_idx], _ok); + } + } +} diff --git a/projects/revenue-sharing-pool/v1/contracts/RevenueSharingPoolFactory.sol b/projects/revenue-sharing-pool/v1/contracts/RevenueSharingPoolFactory.sol new file mode 100644 index 00000000..26a0c0dd --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/RevenueSharingPoolFactory.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "./RevenueSharingPool.sol"; + +contract RevenueSharingPoolFactory is Ownable { + struct Parameters { + address VCake; + uint256 startTime; + address rewardToken; + address emergencyReturn; + address owner; + } + + Parameters public parameters; + + address public VCake; + + uint256 public poolLength; + + mapping(uint256 => address) public pools; + + mapping(address => address) public rewardTokenPools; + + uint256 public constant MAX_STARTTIME_DURATION = 4 weeks; + + event NewRevenueSharingPool(address indexed pool, address indexed rewardToken, uint256 startTime); + + constructor(address _VCake) { + VCake = _VCake; + } + + /// @dev Deploys a RevenueSharingPool + /// @param _startTime Time to be started + /// @param _rewardToken The token to be distributed + /// @param _emergencyReturn The address to return token when emergency stop + function deploy( + uint256 _startTime, + address _rewardToken, + address _emergencyReturn + ) external onlyOwner returns (address pool) { + require(rewardTokenPools[_rewardToken] == address(0), "Already created pool"); + require(_startTime <= block.timestamp + MAX_STARTTIME_DURATION, "Invalid startTime"); + parameters = Parameters({ + VCake: VCake, + startTime: _startTime, + rewardToken: _rewardToken, + emergencyReturn: _emergencyReturn, + owner: msg.sender + }); + + pool = address( + new RevenueSharingPool{ + salt: keccak256(abi.encode(_rewardToken, _emergencyReturn, _startTime, block.timestamp)) + }() + ); + + delete parameters; + + pools[poolLength] = pool; + poolLength++; + rewardTokenPools[_rewardToken] = pool; + + emit NewRevenueSharingPool(pool, _rewardToken, _startTime); + } +} diff --git a/projects/revenue-sharing-pool/v1/contracts/VCake.sol b/projects/revenue-sharing-pool/v1/contracts/VCake.sol new file mode 100644 index 00000000..544529a6 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/VCake.sol @@ -0,0 +1,689 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "./libraries/SafeCast.sol"; +import "./interfaces/ICakePool.sol"; +import "./interfaces/IMasterChefV2.sol"; + +contract VCake is Ownable { + using SafeERC20 for IERC20; + + struct Point { + int128 bias; // Voting weight + int128 slope; // Multiplier factor to get voting weight at a given time + uint256 timestamp; + uint256 blockNumber; + } + + struct LockedBalance { + int128 amount; + uint256 end; + } + + uint256 public constant WEEK = 7 days; + uint256 public constant MULTIPLIER = 10**18; + uint256 public UNLOCK_FREE_DURATION = 1 weeks; // 1 week + uint256 public DURATION_FACTOR_OVERDUE = 180 days; // 180 days, in order to calculate overdue fee. + uint256 public constant PRECISION_FACTOR = 1e12; // precision factor. + + uint256 public MAX_LOCK = 365 days; // 365 days , set default same with cake pool. + + ICakePool public immutable CakePool; + IMasterChefV2 public immutable MasterchefV2; + uint256 public immutable CakePoolPID; + + // A global point of time. + uint256 public epoch; + // An array of points (global). + Point[] public pointHistory; + // Mapping (user => Point) to keep track of user point of a given epoch (index of Point is epoch) + mapping(address => Point[]) public userPointHistory; + // Mapping (user => epoch) to keep track which epoch user at + mapping(address => uint256) public userPointEpoch; + // Mapping (round off timestamp to week => slopeDelta) to keep track slope changes over epoch + mapping(uint256 => int128) public slopeChanges; + // Mapping (user => bool) to keep track whether user had initialized + mapping(address => bool) public initialization; + // Mapping (user => bool) to keep track of user previous locked amount + mapping(address => uint256) public userPrevLockedAmount; + + // --- BEP20 compatible variables --- + string public name; + string public symbol; + uint8 public decimals; + + event Sync(address indexed user, uint256 lockedAmount); + event RemoveUserInitialization(address indexed _user); + event NewMaxLock(uint256 maxLock); + + modifier onlyCakePool() { + require(msg.sender == address(CakePool), "Not cake pool"); + _; + } + + modifier onlyNotInitialized() { + require(!initialization[msg.sender], "Already initialized"); + _; + } + + /** + * @notice Constructor + * @param _cakePool: Cake Pool contract + * @param _masterchefV2: MasterChefV2 contract + * @param _pid: cake pool ID in MasterChefV2 + */ + constructor( + ICakePool _cakePool, + IMasterChefV2 _masterchefV2, + uint256 _pid + ) { + CakePool = _cakePool; + MasterchefV2 = _masterchefV2; + CakePoolPID = _pid; + + pointHistory.push(Point({bias: 0, slope: 0, timestamp: block.timestamp, blockNumber: block.number})); + + decimals = 18; + + name = "VCake"; + symbol = "VCake"; + } + + /// @notice Return the balance of VCake at a given "_blockNumber" + /// @param _user The address to get a balance of VCake + /// @param _blockNumber The speicific block number that you want to check the balance of VCake + function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256) { + require(_blockNumber <= block.number, "bad _blockNumber"); + + // Get most recent user Point to block + uint256 _userEpoch = _findUserBlockEpoch(_user, _blockNumber); + if (_userEpoch == 0) { + return 0; + } + Point memory _userPoint = userPointHistory[_user][_userEpoch]; + + // Get most recent global point to block + uint256 _maxEpoch = epoch; + uint256 _epoch = _findBlockEpoch(_blockNumber, _maxEpoch); + Point memory _point0 = pointHistory[_epoch]; + + uint256 _blockDelta = 0; + uint256 _timeDelta = 0; + if (_epoch < _maxEpoch) { + Point memory _point1 = pointHistory[_epoch + 1]; + _blockDelta = _point1.blockNumber - _point0.blockNumber; + _timeDelta = _point1.timestamp - _point0.timestamp; + } else { + _blockDelta = block.number - _point0.blockNumber; + _timeDelta = block.timestamp - _point0.timestamp; + } + uint256 _blockTime = _point0.timestamp; + if (_blockDelta != 0) { + _blockTime += (_timeDelta * (_blockNumber - _point0.blockNumber)) / _blockDelta; + } + + _userPoint.bias -= (_userPoint.slope * SafeCast.toInt128(int256(_blockTime - _userPoint.timestamp))); + + if (_userPoint.bias < 0) { + return 0; + } + + return SafeCast.toUint256(_userPoint.bias); + } + + /// @notice Return the voting weight of a givne user + /// @param _user The address of a user + function balanceOf(address _user) external view returns (uint256) { + uint256 _epoch = userPointEpoch[_user]; + if (_epoch == 0) { + return 0; + } + Point memory _lastPoint = userPointHistory[_user][_epoch]; + _lastPoint.bias = + _lastPoint.bias - + (_lastPoint.slope * SafeCast.toInt128(int256(block.timestamp - _lastPoint.timestamp))); + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + return SafeCast.toUint256(_lastPoint.bias); + } + + /// @notice Record global and per-user slope to checkpoint + /// @param _address User's wallet address. Only global if 0x0 + /// @param _prevLocked User's previous locked balance and end lock time + /// @param _newLocked User's new locked balance and end lock time + function _checkpoint( + address _address, + LockedBalance memory _prevLocked, + LockedBalance memory _newLocked + ) internal { + Point memory _userPrevPoint = Point({slope: 0, bias: 0, timestamp: 0, blockNumber: 0}); + Point memory _userNewPoint = Point({slope: 0, bias: 0, timestamp: 0, blockNumber: 0}); + + int128 _prevSlopeDelta = 0; + int128 _newSlopeDelta = 0; + uint256 _epoch = epoch; + + // if not 0x0, then update user's point + if (_address != address(0)) { + // Calculate slopes and biases according to linear decay graph + // slope = lockedAmount / MAX_LOCK => Get the slope of a linear decay graph + // bias = slope * (lockedEnd - currentTimestamp) => Get the voting weight at a given time + // Kept at zero when they have to + if (_prevLocked.end > block.timestamp && _prevLocked.amount > 0) { + // Calculate slope and bias for the prev point + _userPrevPoint.slope = _prevLocked.amount / SafeCast.toInt128(int256(MAX_LOCK)); + _userPrevPoint.bias = + _userPrevPoint.slope * + SafeCast.toInt128(int256(_prevLocked.end - block.timestamp)); + } + if (_newLocked.end > block.timestamp && _newLocked.amount > 0) { + // Calculate slope and bias for the new point + _userNewPoint.slope = _newLocked.amount / SafeCast.toInt128(int256(MAX_LOCK)); + _userNewPoint.bias = _userNewPoint.slope * SafeCast.toInt128(int256(_newLocked.end - block.timestamp)); + } + + // Handle user history here + // Do it here to prevent stack overflow + uint256 _userEpoch = userPointEpoch[_address]; + // If user never ever has any point history, push it here for him. + if (_userEpoch == 0) { + userPointHistory[_address].push(_userPrevPoint); + } + + // Shift user's epoch by 1 as we are writing a new point for a user + userPointEpoch[_address] = _userEpoch + 1; + + // Update timestamp & block number then push new point to user's history + _userNewPoint.timestamp = block.timestamp; + _userNewPoint.blockNumber = block.number; + userPointHistory[_address].push(_userNewPoint); + + // Read values of scheduled changes in the slope + // _prevLocked.end can be in the past and in the future + // _newLocked.end can ONLY be in the FUTURE unless everything expired (anything more than zeros) + _prevSlopeDelta = slopeChanges[_prevLocked.end]; + if (_newLocked.end != 0) { + // Handle when _newLocked.end != 0 + if (_newLocked.end == _prevLocked.end) { + // This will happen when user adjust lock but end remains the same + // Possibly when user deposited more Cake to his locker + _newSlopeDelta = _prevSlopeDelta; + } else { + // This will happen when user increase lock + _newSlopeDelta = slopeChanges[_newLocked.end]; + } + } + } + + // Handle global states here + Point memory _lastPoint = Point({bias: 0, slope: 0, timestamp: block.timestamp, blockNumber: block.number}); + if (_epoch > 0) { + // If _epoch > 0, then there is some history written + // Hence, _lastPoint should be pointHistory[_epoch] + // else _lastPoint should an empty point + _lastPoint = pointHistory[_epoch]; + } + // _lastCheckpoint => timestamp of the latest point + // if no history, _lastCheckpoint should be block.timestamp + // else _lastCheckpoint should be the timestamp of latest pointHistory + uint256 _lastCheckpoint = _lastPoint.timestamp; + + // initialLastPoint is used for extrapolation to calculate block number + // (approximately, for xxxAt methods) and save them + // as we cannot figure that out exactly from inside contract + Point memory _initialLastPoint = Point({ + bias: 0, + slope: 0, + timestamp: _lastPoint.timestamp, + blockNumber: _lastPoint.blockNumber + }); + + // If last point is already recorded in this block, _blockSlope=0 + // That is ok because we know the block in such case + uint256 _blockSlope = 0; + if (block.timestamp > _lastPoint.timestamp) { + // Recalculate _blockSlope if _lastPoint.timestamp < block.timestamp + // Possiblity when epoch = 0 or _blockSlope hasn't get updated in this block + _blockSlope = + (MULTIPLIER * (block.number - _lastPoint.blockNumber)) / + (block.timestamp - _lastPoint.timestamp); + } + + // Go over weeks to fill history and calculate what the current point is + uint256 _weekCursor = _timestampToFloorWeek(_lastCheckpoint); + for (uint256 i = 0; i < 255; i++) { + // This logic will works for 5 years, if more than that vote power will be broken 😟 + // Bump _weekCursor a week + _weekCursor = _weekCursor + WEEK; + int128 _slopeDelta = 0; + if (_weekCursor > block.timestamp) { + // If the given _weekCursor go beyond block.timestamp, + // We take block.timestamp as the cursor + _weekCursor = block.timestamp; + } else { + // If the given _weekCursor is behind block.timestamp + // We take _slopeDelta from the recorded slopeChanges + // We can use _weekCursor directly because key of slopeChanges is timestamp round off to week + _slopeDelta = slopeChanges[_weekCursor]; + } + // Calculate _biasDelta = _lastPoint.slope * (_weekCursor - _lastCheckpoint) + int128 _biasDelta = _lastPoint.slope * SafeCast.toInt128(int256((_weekCursor - _lastCheckpoint))); + _lastPoint.bias = _lastPoint.bias - _biasDelta; + _lastPoint.slope = _lastPoint.slope + _slopeDelta; + if (_lastPoint.bias < 0) { + // This can happen + _lastPoint.bias = 0; + } + if (_lastPoint.slope < 0) { + // This cannot happen, just make sure + _lastPoint.slope = 0; + } + // Update _lastPoint to the new one + _lastCheckpoint = _weekCursor; + _lastPoint.timestamp = _weekCursor; + // As we cannot figure that out block timestamp -> block number exactly + // when query states from xxxAt methods, we need to calculate block number + // based on _initalLastPoint + _lastPoint.blockNumber = + _initialLastPoint.blockNumber + + ((_blockSlope * ((_weekCursor - _initialLastPoint.timestamp))) / MULTIPLIER); + _epoch = _epoch + 1; + if (_weekCursor == block.timestamp) { + // Hard to be happened, but better handling this case too + _lastPoint.blockNumber = block.number; + break; + } else { + pointHistory.push(_lastPoint); + } + } + // Now, each week pointHistory has been filled until current timestamp (round off by week) + // Update epoch to be the latest state + epoch = _epoch; + + if (_address != address(0)) { + // If the last point was in the block, the slope change should have been applied already + // But in such case slope shall be 0 + _lastPoint.slope = _lastPoint.slope + _userNewPoint.slope - _userPrevPoint.slope; + _lastPoint.bias = _lastPoint.bias + _userNewPoint.bias - _userPrevPoint.bias; + if (_lastPoint.slope < 0) { + _lastPoint.slope = 0; + } + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + } + + // Record the new point to pointHistory + // This would be the latest point for global epoch + pointHistory.push(_lastPoint); + + if (_address != address(0)) { + // Schedule the slope changes (slope is going downward) + // We substract _newSlopeDelta from `_newLocked.end` + // and add _prevSlopeDelta to `_prevLocked.end` + if (_prevLocked.end > block.timestamp) { + // _prevSlopeDelta was - _userPrevPoint.slope, so we offset that first + _prevSlopeDelta = _prevSlopeDelta + _userPrevPoint.slope; + if (_newLocked.end == _prevLocked.end) { + // Handle the new deposit. Not increasing lock. + _prevSlopeDelta = _prevSlopeDelta - _userNewPoint.slope; + } + slopeChanges[_prevLocked.end] = _prevSlopeDelta; + } + if (_newLocked.end > block.timestamp) { + if (_newLocked.end > _prevLocked.end) { + // At this line, the old slope should gone + _newSlopeDelta = _newSlopeDelta - _userNewPoint.slope; + slopeChanges[_newLocked.end] = _newSlopeDelta; + } + } + } + } + + /// @notice Trigger global checkpoint + function checkpoint() external { + LockedBalance memory empty = LockedBalance({amount: 0, end: 0}); + _checkpoint(address(0), empty, empty); + } + + function syncFromCakePool() external onlyNotInitialized { + initialization[msg.sender] = true; + (, , , , , uint256 lockEndTime, , , uint256 lockedAmount) = CakePool.userInfo(msg.sender); + + if (lockedAmount > 0 && lockEndTime > block.timestamp) { + userPrevLockedAmount[msg.sender] = lockedAmount; + LockedBalance memory prevLocked = LockedBalance({amount: 0, end: 0}); + + LockedBalance memory newLocked = LockedBalance({ + amount: SafeCast.toInt128(int256(lockedAmount)), + end: _timestampToFloorWeek(lockEndTime) + }); + + _checkpoint(msg.sender, prevLocked, newLocked); + } + + emit Sync(msg.sender, lockedAmount); + } + + struct DepositCache { + uint256 shares; + uint256 cakeAtLastUserAction; + uint256 lockStartTime; + uint256 lockEndTime; + uint256 userBoostedShare; + bool locked; + uint256 lockedAmount; + uint256 cakePoolAvailable; + } + + /// @notice Deposit in cake pool + /// @param _user user address + /// @param _amount: number of tokens to deposit (in CAKE) + /// @param _lockDuration: Token lock duration + function deposit( + address _user, + uint256 _amount, + uint256 _lockDuration + ) external onlyCakePool { + if (initialization[_user]) { + DepositCache memory cache; + ( + cache.shares, + , + cache.cakeAtLastUserAction, + , + cache.lockStartTime, + cache.lockEndTime, + cache.userBoostedShare, + cache.locked, + cache.lockedAmount + ) = CakePool.userInfo(_user); + LockedBalance memory prevLocked = LockedBalance({ + amount: SafeCast.toInt128(int256(userPrevLockedAmount[_user])), + end: _timestampToFloorWeek(cache.lockEndTime) + }); + + uint256 totalShares = CakePool.totalShares(); + uint256 totalBoostDebt = CakePool.totalBoostDebt(); + cache.cakePoolAvailable = CakePool.available(); + + // need to calculate pendding cake when harvest + uint256 pendingCake = MasterchefV2.pendingCake(CakePoolPID, address(CakePool)); + if (pendingCake > 0) { + cache.cakePoolAvailable += pendingCake; + } + + // simulate CakePool.updateUserShare() function + if (cache.shares > 0) { + if (cache.locked) { + // Calculate the user's current token amount and update related parameters. + uint256 currentAmount = ((cache.cakePoolAvailable + totalBoostDebt) * (cache.shares)) / + totalShares - + cache.userBoostedShare; + totalBoostDebt -= cache.userBoostedShare; + cache.userBoostedShare = 0; + totalShares -= cache.shares; + //Charge a overdue fee after the free duration has expired. + if ( + !CakePool.freeOverdueFeeUsers(_user) && + ((cache.lockEndTime + UNLOCK_FREE_DURATION) < block.timestamp) + ) { + uint256 earnAmount = currentAmount - cache.lockedAmount; + uint256 overdueDuration = block.timestamp - cache.lockEndTime - UNLOCK_FREE_DURATION; + if (overdueDuration > DURATION_FACTOR_OVERDUE) { + overdueDuration = DURATION_FACTOR_OVERDUE; + } + // Rates are calculated based on the user's overdue duration. + uint256 overdueWeight = (overdueDuration * CakePool.overdueFee()) / DURATION_FACTOR_OVERDUE; + uint256 currentOverdueFee = (earnAmount * overdueWeight) / PRECISION_FACTOR; + cache.cakePoolAvailable -= currentOverdueFee; + + currentAmount -= currentOverdueFee; + } + // Recalculate the user's share. + uint256 currentShares; + if (totalShares != 0) { + currentShares = + (currentAmount * totalShares) / + ((cache.cakePoolAvailable + totalBoostDebt) - currentAmount); + } else { + currentShares = currentAmount; + } + cache.shares = currentShares; + totalShares += currentShares; + // After the lock duration, update related parameters. + if (cache.lockEndTime < block.timestamp) { + cache.locked = false; + cache.lockStartTime = 0; + cache.lockEndTime = 0; + cache.lockedAmount = 0; + } + } else if (!CakePool.freePerformanceFeeUsers(_user)) { + // Calculate Performance fee. + uint256 totalAmount = (cache.shares * (cache.cakePoolAvailable + totalBoostDebt)) / totalShares; + totalShares -= cache.shares; + cache.shares = 0; + uint256 earnAmount = totalAmount - cache.cakeAtLastUserAction; + uint256 feeRate = CakePool.performanceFee(); + if (_isContract(_user)) { + feeRate = CakePool.performanceFeeContract(); + } + uint256 currentPerformanceFee = (earnAmount * feeRate) / 10000; + if (currentPerformanceFee > 0) { + cache.cakePoolAvailable -= currentPerformanceFee; + + totalAmount -= currentPerformanceFee; + } + // Recalculate the user's share. + uint256 newShares; + if (totalShares != 0) { + newShares = + (totalAmount * totalShares) / + ((cache.cakePoolAvailable + totalBoostDebt) - totalAmount); + } else { + newShares = totalAmount; + } + cache.shares = newShares; + totalShares += newShares; + } + } + + // Update lock duration. + if (_lockDuration > 0) { + if (cache.lockEndTime < block.timestamp) { + cache.lockStartTime = block.timestamp; + cache.lockEndTime = block.timestamp + _lockDuration; + } else { + cache.lockEndTime += _lockDuration; + } + cache.locked = true; + } + + // Calculate lock funds + if (cache.shares > 0 && cache.locked) { + // Update lock amount + if (cache.lockStartTime == block.timestamp) { + cache.lockedAmount = ((cache.cakePoolAvailable + totalBoostDebt) * cache.shares) / totalShares; + } + } + + // Calculate the boost weight share. + if (cache.lockEndTime > cache.lockStartTime) { + cache.lockedAmount += _amount; + } + + LockedBalance memory newLocked = LockedBalance({ + amount: SafeCast.toInt128(int256(cache.lockedAmount)), + end: _timestampToFloorWeek(cache.lockEndTime) + }); + userPrevLockedAmount[_user] = cache.lockedAmount; + _checkpoint(_user, prevLocked, newLocked); + } + } + + /// @notice Withdraw in cake pool + /// @param _user user address + function withdraw(address _user) external onlyCakePool { + if (initialization[_user]) { + (, , , , , uint256 lockEndTime, , , uint256 lockedAmount) = CakePool.userInfo(_user); + LockedBalance memory prevLocked = LockedBalance({ + amount: SafeCast.toInt128(int256(lockedAmount)), + end: _timestampToFloorWeek(lockEndTime) + }); + + LockedBalance memory newLocked = LockedBalance({amount: 0, end: 0}); + userPrevLockedAmount[_user] = 0; + + _checkpoint(_user, prevLocked, newLocked); + } + } + + /// @notice Do Binary Search to find out block timestamp for block number + /// @param _blockNumber The block number to find timestamp + /// @param _maxEpoch No beyond this timestamp + function _findBlockEpoch(uint256 _blockNumber, uint256 _maxEpoch) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = _maxEpoch; + // Loop for 128 times -> enough for 128-bit numbers + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + if (pointHistory[_mid].blockNumber <= _blockNumber) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + /// @notice Do Binary Search to find the most recent user point history preceeding block + /// @param _user The address of user to find + /// @param _blockNumber Find the most recent point history before this block number + function _findUserBlockEpoch(address _user, uint256 _blockNumber) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = userPointEpoch[_user]; + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + if (userPointHistory[_user][_mid].blockNumber <= _blockNumber) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + /// @notice Round off random timestamp to week + /// @param _timestamp The timestamp to be rounded off + function _timestampToFloorWeek(uint256 _timestamp) internal pure returns (uint256) { + return (_timestamp / WEEK) * WEEK; + } + + /// @notice Calculate total supply of VCake (voting power) + function totalSupply() external view returns (uint256) { + return _totalSupplyAt(pointHistory[epoch], block.timestamp); + } + + /// @notice Calculate total supply of VCake at specific block + /// @param _blockNumber The specific block number to calculate totalSupply + function totalSupplyAt(uint256 _blockNumber) external view returns (uint256) { + require(_blockNumber <= block.number, "bad _blockNumber"); + uint256 _epoch = epoch; + uint256 _targetEpoch = _findBlockEpoch(_blockNumber, _epoch); + + Point memory _point = pointHistory[_targetEpoch]; + uint256 _timeDelta = 0; + if (_targetEpoch < _epoch) { + Point memory _nextPoint = pointHistory[_targetEpoch + 1]; + if (_point.blockNumber != _nextPoint.blockNumber) { + _timeDelta = + ((_blockNumber - _point.blockNumber) * (_nextPoint.timestamp - _point.timestamp)) / + (_nextPoint.blockNumber - _point.blockNumber); + } + } else { + if (_point.blockNumber != block.number) { + _timeDelta = + ((_blockNumber - _point.blockNumber) * (block.timestamp - _point.timestamp)) / + (block.number - _point.blockNumber); + } + } + + return _totalSupplyAt(_point, _point.timestamp + _timeDelta); + } + + /// @notice Calculate total supply of VCake (voting power) at some point in the past + /// @param _point The point to start to search from + /// @param _timestamp The timestamp to calculate the total voting power at + function _totalSupplyAt(Point memory _point, uint256 _timestamp) internal view returns (uint256) { + Point memory _lastPoint = _point; + uint256 _weekCursor = _timestampToFloorWeek(_point.timestamp); + // Iterate through weeks to take slopChanges into the account + for (uint256 i = 0; i < 255; i++) { + _weekCursor = _weekCursor + WEEK; + int128 _slopeDelta = 0; + if (_weekCursor > _timestamp) { + // If _weekCursor goes beyond _timestamp -> leave _slopeDelta + // to be 0 as there is no more slopeChanges + _weekCursor = _timestamp; + } else { + // If _weekCursor still behind _timestamp, then _slopeDelta + // should be taken into the account. + _slopeDelta = slopeChanges[_weekCursor]; + } + // Update bias at _weekCursor + _lastPoint.bias = + _lastPoint.bias - + (_lastPoint.slope * SafeCast.toInt128(int256(_weekCursor - _lastPoint.timestamp))); + if (_weekCursor == _timestamp) { + break; + } + // Update slope and timestamp + _lastPoint.slope = _lastPoint.slope + _slopeDelta; + _lastPoint.timestamp = _weekCursor; + } + + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + + return SafeCast.toUint256(_lastPoint.bias); + } + + /** + * @notice Checks if address is a contract + */ + function _isContract(address addr) internal view returns (bool) { + uint256 size; + assembly { + size := extcodesize(addr) + } + return size > 0; + } + + /// @notice Remove user initialization status. + /// @dev Avoid issues caused by _checkpoint, causing user assets to be stuck. + /// @param _users The array of addresses. + function removeUserInitialization(address[] calldata _users) external onlyOwner { + for (uint256 i = 0; i < _users.length; i++) { + initialization[_users[i]] = false; + emit RemoveUserInitialization(_users[i]); + } + } + + /// @notice Set MAX_LOCK + /// @dev Only callable by the contract admin. + /// @param _maxLock Max lock duration. + function setMaxLock(uint256 _maxLock) external onlyOwner { + MAX_LOCK = _maxLock; + emit NewMaxLock(_maxLock); + } +} diff --git a/projects/revenue-sharing-pool/v1/contracts/interfaces/ICakePool.sol b/projects/revenue-sharing-pool/v1/contracts/interfaces/ICakePool.sol new file mode 100644 index 00000000..bf34a250 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/interfaces/ICakePool.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface ICakePool { + struct UserInfo { + uint256 shares; // number of shares for a user. + uint256 lastDepositedTime; // keep track of deposited time for potential penalty. + uint256 cakeAtLastUserAction; // keep track of cake deposited at the last user action. + uint256 lastUserActionTime; // keep track of the last user action time. + uint256 lockStartTime; // lock start time. + uint256 lockEndTime; // lock end time. + uint256 userBoostedShare; // boost share, in order to give the user higher reward. The user only enjoys the reward, so the principal needs to be recorded as a debt. + bool locked; //lock status. + uint256 lockedAmount; // amount deposited during lock period. + } + + function userInfo(address user) + external + view + returns ( + uint256, + uint256, + uint256, + uint256, + uint256, + uint256, + uint256, + bool, + uint256 + ); + + function freePerformanceFeeUsers(address user) external view returns (bool); + + function freeWithdrawFeeUsers(address user) external view returns (bool); + + function freeOverdueFeeUsers(address user) external view returns (bool); + + function getPricePerFullShare() external view returns (uint256); + + function overdueFee() external view returns (uint256); + + function performanceFee() external view returns (uint256); + + function performanceFeeContract() external view returns (uint256); + + function totalShares() external view returns (uint256); + + function totalBoostDebt() external view returns (uint256); + + function balanceOf() external view returns (uint256); + + function available() external view returns (uint256); + + function BOOST_WEIGHT() external view returns (uint256); + + function MAX_LOCK_DURATION() external view returns (uint256); + + function deposit(uint256 _amount, uint256 _lockDuration) external; + + function withdrawByAmount(uint256 _amount) external; + + function withdraw(uint256 _shares) external; + + function withdrawAll() external; +} diff --git a/projects/revenue-sharing-pool/v1/contracts/interfaces/IMasterChefV2.sol b/projects/revenue-sharing-pool/v1/contracts/interfaces/IMasterChefV2.sol new file mode 100644 index 00000000..c5e9b24a --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/interfaces/IMasterChefV2.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IMasterChefV2 { + function pendingCake(uint256 _pid, address _user) external view returns (uint256); +} diff --git a/projects/revenue-sharing-pool/v1/contracts/interfaces/IRevenueSharingPool.sol b/projects/revenue-sharing-pool/v1/contracts/interfaces/IRevenueSharingPool.sol new file mode 100644 index 00000000..289c8c25 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/interfaces/IRevenueSharingPool.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IRevenueSharingPool { + function lastTokenTimestamp() external view returns (uint256); + + function checkpointToken() external; + + function checkpointTotalSupply() external; +} diff --git a/projects/revenue-sharing-pool/v1/contracts/interfaces/IRevenueSharingPoolFactory.sol b/projects/revenue-sharing-pool/v1/contracts/interfaces/IRevenueSharingPoolFactory.sol new file mode 100644 index 00000000..980beea3 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/interfaces/IRevenueSharingPoolFactory.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IRevenueSharingPoolFactory { + function parameters() + external + view + returns ( + address VCake, + uint256 startTime, + address rewardToken, + address emergencyReturn, + address owner + ); +} diff --git a/projects/revenue-sharing-pool/v1/contracts/interfaces/IVCake.sol b/projects/revenue-sharing-pool/v1/contracts/interfaces/IVCake.sol new file mode 100644 index 00000000..918c2be0 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/interfaces/IVCake.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +struct Point { + int128 bias; // Voting weight + int128 slope; // Multiplier factor to get voting weight at a given time + uint256 timestamp; + uint256 blockNumber; +} + +interface IVCake { + function deposit( + address _user, + uint256 _amount, + uint256 _lockDuration + ) external; + + function withdraw(address _user) external; + + /// @dev Return the max epoch of the given "_user" + function userPointEpoch(address _user) external view returns (uint256); + + /// @dev Return the max global epoch + function epoch() external view returns (uint256); + + /// @dev Return the recorded point for _user at specific _epoch + function userPointHistory(address _user, uint256 _epoch) external view returns (Point memory); + + /// @dev Return the recorded global point at specific _epoch + function pointHistory(uint256 _epoch) external view returns (Point memory); + + /// @dev Trigger global check point + function checkpoint() external; +} diff --git a/projects/revenue-sharing-pool/v1/contracts/keeper/RevenueSharingPoolKeeper.sol b/projects/revenue-sharing-pool/v1/contracts/keeper/RevenueSharingPoolKeeper.sol new file mode 100644 index 00000000..f0263c0a --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/keeper/RevenueSharingPoolKeeper.sol @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "@openzeppelin-4.5.0/contracts/security/Pausable.sol"; +import "@chainlink/contracts/src/v0.8/KeeperCompatible.sol"; +import "../interfaces/IRevenueSharingPool.sol"; + +/** + * @dev RevenueSharingPoolKeeper was designed to execute checkpointToken. + */ +contract RevenueSharingPoolKeeper is KeeperCompatibleInterface, Ownable, Pausable { + address public register; + IRevenueSharingPool public immutable RevenueSharingPool; + + uint256 public constant WEEK = 1 weeks; + + mapping(uint256 => bool) public checkpointTokenFlag; + + event NewRegister(address indexed register); + + /// @notice constructor. + /// @param _RevenueSharingPool RevenueSharingPool address. + constructor(IRevenueSharingPool _RevenueSharingPool) { + RevenueSharingPool = _RevenueSharingPool; + } + + modifier onlyRegister() { + require(msg.sender == register, "Not register"); + _; + } + + /// @notice Round off random timestamp to week + /// @param _timestamp The timestamp to be rounded off + function _timestampToFloorWeek(uint256 _timestamp) internal pure returns (uint256) { + return (_timestamp / WEEK) * WEEK; + } + + //The logic is consistent with the following performUpkeep function, in order to make the code logic clearer. + function checkUpkeep(bytes calldata) external view override returns (bool upkeepNeeded, bytes memory) { + if (!paused()) { + uint256 lastTokenTimestamp = RevenueSharingPool.lastTokenTimestamp(); + uint256 weekCursor = _timestampToFloorWeek(block.timestamp); + if (lastTokenTimestamp < weekCursor && !checkpointTokenFlag[weekCursor]) { + upkeepNeeded = true; + } + } + } + + function performUpkeep(bytes calldata) external override onlyRegister whenNotPaused { + uint256 lastTokenTimestamp = RevenueSharingPool.lastTokenTimestamp(); + uint256 weekCursor = _timestampToFloorWeek(block.timestamp); + if (lastTokenTimestamp < weekCursor && !checkpointTokenFlag[weekCursor]) { + checkpointTokenFlag[weekCursor] = true; + RevenueSharingPool.checkpointToken(); + RevenueSharingPool.checkpointTotalSupply(); + } + } + + /// @notice Set register. + /// @dev Callable by owner + /// @param _register New register. + function setRegister(address _register) external onlyOwner { + require(_register != address(0), "Can not be zero address"); + register = _register; + emit NewRegister(_register); + } + + function pause() external onlyOwner { + _pause(); + } + + function unpause() external onlyOwner { + _unpause(); + } +} diff --git a/projects/revenue-sharing-pool/v1/contracts/libraries/SafeCast.sol b/projects/revenue-sharing-pool/v1/contracts/libraries/SafeCast.sol new file mode 100644 index 00000000..3cd64735 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/libraries/SafeCast.sol @@ -0,0 +1,241 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow + * checks. + * + * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can + * easily result in undesired exploitation or bugs, since developers usually + * assume that overflows raise errors. `SafeCast` restores this intuition by + * reverting the transaction when such 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. + * + * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing + * all math on `uint256` and `int256` and then downcasting. + */ +library SafeCast { + /** + * @dev Returns the downcasted uint224 from uint256, reverting on + * overflow (when the input is greater than largest uint224). + * + * Counterpart to Solidity's `uint224` operator. + * + * Requirements: + * + * - input must fit into 224 bits + */ + function toUint224(uint256 value) internal pure returns (uint224) { + require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); + return uint224(value); + } + + /** + * @dev Returns the downcasted uint128 from uint256, reverting on + * overflow (when the input is greater than largest uint128). + * + * Counterpart to Solidity's `uint128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + */ + function toUint128(uint256 value) internal pure returns (uint128) { + require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); + return uint128(value); + } + + /** + * @dev Returns the downcasted uint96 from uint256, reverting on + * overflow (when the input is greater than largest uint96). + * + * Counterpart to Solidity's `uint96` operator. + * + * Requirements: + * + * - input must fit into 96 bits + */ + function toUint96(uint256 value) internal pure returns (uint96) { + require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); + return uint96(value); + } + + /** + * @dev Returns the downcasted uint64 from uint256, reverting on + * overflow (when the input is greater than largest uint64). + * + * Counterpart to Solidity's `uint64` operator. + * + * Requirements: + * + * - input must fit into 64 bits + */ + function toUint64(uint256 value) internal pure returns (uint64) { + require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); + return uint64(value); + } + + /** + * @dev Returns the downcasted uint32 from uint256, reverting on + * overflow (when the input is greater than largest uint32). + * + * Counterpart to Solidity's `uint32` operator. + * + * Requirements: + * + * - input must fit into 32 bits + */ + function toUint32(uint256 value) internal pure returns (uint32) { + require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); + return uint32(value); + } + + /** + * @dev Returns the downcasted uint16 from uint256, reverting on + * overflow (when the input is greater than largest uint16). + * + * Counterpart to Solidity's `uint16` operator. + * + * Requirements: + * + * - input must fit into 16 bits + */ + function toUint16(uint256 value) internal pure returns (uint16) { + require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); + return uint16(value); + } + + /** + * @dev Returns the downcasted uint8 from uint256, reverting on + * overflow (when the input is greater than largest uint8). + * + * Counterpart to Solidity's `uint8` operator. + * + * Requirements: + * + * - input must fit into 8 bits. + */ + function toUint8(uint256 value) internal pure returns (uint8) { + require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); + return uint8(value); + } + + /** + * @dev Converts a signed int256 into an unsigned uint256. + * + * Requirements: + * + * - input must be greater than or equal to 0. + */ + function toUint256(int256 value) internal pure returns (uint256) { + require(value >= 0, "SafeCast: value must be positive"); + return uint256(value); + } + + /** + * @dev Returns the downcasted int128 from int256, reverting on + * overflow (when the input is less than smallest int128 or + * greater than largest int128). + * + * Counterpart to Solidity's `int128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + * + * _Available since v3.1._ + */ + function toInt128(int256 value) internal pure returns (int128) { + require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits"); + return int128(value); + } + + /** + * @dev Returns the downcasted int64 from int256, reverting on + * overflow (when the input is less than smallest int64 or + * greater than largest int64). + * + * Counterpart to Solidity's `int64` operator. + * + * Requirements: + * + * - input must fit into 64 bits + * + * _Available since v3.1._ + */ + function toInt64(int256 value) internal pure returns (int64) { + require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits"); + return int64(value); + } + + /** + * @dev Returns the downcasted int32 from int256, reverting on + * overflow (when the input is less than smallest int32 or + * greater than largest int32). + * + * Counterpart to Solidity's `int32` operator. + * + * Requirements: + * + * - input must fit into 32 bits + * + * _Available since v3.1._ + */ + function toInt32(int256 value) internal pure returns (int32) { + require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits"); + return int32(value); + } + + /** + * @dev Returns the downcasted int16 from int256, reverting on + * overflow (when the input is less than smallest int16 or + * greater than largest int16). + * + * Counterpart to Solidity's `int16` operator. + * + * Requirements: + * + * - input must fit into 16 bits + * + * _Available since v3.1._ + */ + function toInt16(int256 value) internal pure returns (int16) { + require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits"); + return int16(value); + } + + /** + * @dev Returns the downcasted int8 from int256, reverting on + * overflow (when the input is less than smallest int8 or + * greater than largest int8). + * + * Counterpart to Solidity's `int8` operator. + * + * Requirements: + * + * - input must fit into 8 bits. + * + * _Available since v3.1._ + */ + function toInt8(int256 value) internal pure returns (int8) { + require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits"); + return int8(value); + } + + /** + * @dev Converts an unsigned uint256 into a signed int256. + * + * Requirements: + * + * - input must be less than or equal to maxInt256. + */ + function toInt256(uint256 value) internal pure returns (int256) { + // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive + require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); + return int256(value); + } +} diff --git a/projects/revenue-sharing-pool/v1/contracts/test/VCakeTest.sol b/projects/revenue-sharing-pool/v1/contracts/test/VCakeTest.sol new file mode 100644 index 00000000..a711b919 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/test/VCakeTest.sol @@ -0,0 +1,763 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "../libraries/SafeCast.sol"; +import "../interfaces/ICakePool.sol"; +import "../interfaces/IMasterChefV2.sol"; +import "hardhat/console.sol"; + +/// This contract was used to check whether the formula for calculating the locked amount in the pool is correct. +contract VCakeTest { + using SafeERC20 for IERC20; + + struct Point { + int128 bias; // Voting weight + int128 slope; // Multiplier factor to get voting weight at a given time + uint256 timestamp; + uint256 blockNumber; + } + + struct LockedBalance { + int128 amount; + uint256 end; + } + + uint256 public constant WEEK = 7 days; + uint256 public constant MULTIPLIER = 10**18; + uint256 public UNLOCK_FREE_DURATION = 1 weeks; // 1 week + uint256 public DURATION_FACTOR_OVERDUE = 180 days; // 180 days, in order to calculate overdue fee. + uint256 public constant PRECISION_FACTOR = 1e12; // precision factor. + + ICakePool public immutable CakePool; + IMasterChefV2 public immutable MasterchefV2; + uint256 public immutable CakePoolPID; + + // Mapping (user => LockedBalance) to keep locking information for each user + mapping(address => LockedBalance) public locks; + + // For test + mapping(address => LockedBalance) public prevLocks; + + // A global point of time. + uint256 public epoch; + // An array of points (global). + Point[] public pointHistory; + // Mapping (user => Point) to keep track of user point of a given epoch (index of Point is epoch) + mapping(address => Point[]) public userPointHistory; + // Mapping (user => epoch) to keep track which epoch user at + mapping(address => uint256) public userPointEpoch; + // Mapping (round off timestamp to week => slopeDelta) to keep track slope changes over epoch + mapping(uint256 => int128) public slopeChanges; + // Mapping (user => bool) to keep track whether user had initialized + mapping(address => bool) public initialization; + // Mapping (user => bool) to keep track of user previous locked amount + mapping(address => uint256) public userPrevLockedAmount; + + // --- BEP20 compatible variables --- + string public name; + string public symbol; + uint8 public decimals; + + event Sync(address indexed user, uint256 lockedAmount); + + modifier onlyCakePool() { + require(msg.sender == address(CakePool), "Not cake pool"); + _; + } + + modifier onlyNotInitialized() { + require(!initialization[msg.sender], "Already initialized"); + _; + } + + /** + * @notice Constructor + * @param _cakePool: Cake Pool contract + * @param _masterchefV2: MasterChefV2 contract + * @param _pid: cake pool ID in MasterChefV2 + */ + constructor( + ICakePool _cakePool, + IMasterChefV2 _masterchefV2, + uint256 _pid + ) { + CakePool = _cakePool; + MasterchefV2 = _masterchefV2; + CakePoolPID = _pid; + + pointHistory.push(Point({bias: 0, slope: 0, timestamp: block.timestamp, blockNumber: block.number})); + + decimals = 18; + + name = "VCake"; + symbol = "VCake"; + } + + /// @notice Return the balance of VCake at a given "_blockNumber" + /// @param _user The address to get a balance of VCake + /// @param _blockNumber The speicific block number that you want to check the balance of VCake + function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256) { + require(_blockNumber <= block.number, "bad _blockNumber"); + + // Get most recent user Point to block + uint256 _userEpoch = _findUserBlockEpoch(_user, _blockNumber); + if (_userEpoch == 0) { + return 0; + } + Point memory _userPoint = userPointHistory[_user][_userEpoch]; + + // Get most recent global point to block + uint256 _maxEpoch = epoch; + uint256 _epoch = _findBlockEpoch(_blockNumber, _maxEpoch); + Point memory _point0 = pointHistory[_epoch]; + + uint256 _blockDelta = 0; + uint256 _timeDelta = 0; + if (_epoch < _maxEpoch) { + Point memory _point1 = pointHistory[_epoch + 1]; + _blockDelta = _point1.blockNumber - _point0.blockNumber; + _timeDelta = _point1.timestamp - _point0.timestamp; + } else { + _blockDelta = block.number - _point0.blockNumber; + _timeDelta = block.timestamp - _point0.timestamp; + } + uint256 _blockTime = _point0.timestamp; + if (_blockDelta != 0) { + _blockTime += (_timeDelta * (_blockNumber - _point0.blockNumber)) / _blockDelta; + } + + _userPoint.bias -= (_userPoint.slope * SafeCast.toInt128(int256(_blockTime - _userPoint.timestamp))); + + if (_userPoint.bias < 0) { + return 0; + } + + return SafeCast.toUint256(_userPoint.bias); + } + + /// @notice Return the voting weight of a givne user + /// @param _user The address of a user + function balanceOf(address _user) external view returns (uint256) { + uint256 _epoch = userPointEpoch[_user]; + if (_epoch == 0) { + return 0; + } + Point memory _lastPoint = userPointHistory[_user][_epoch]; + _lastPoint.bias = + _lastPoint.bias - + (_lastPoint.slope * SafeCast.toInt128(int256(block.timestamp - _lastPoint.timestamp))); + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + return SafeCast.toUint256(_lastPoint.bias); + } + + /// @notice Record global and per-user slope to checkpoint + /// @param _address User's wallet address. Only global if 0x0 + /// @param _prevLocked User's previous locked balance and end lock time + /// @param _newLocked User's new locked balance and end lock time + function _checkpoint( + address _address, + LockedBalance memory _prevLocked, + LockedBalance memory _newLocked + ) internal { + Point memory _userPrevPoint = Point({slope: 0, bias: 0, timestamp: 0, blockNumber: 0}); + Point memory _userNewPoint = Point({slope: 0, bias: 0, timestamp: 0, blockNumber: 0}); + + int128 _prevSlopeDelta = 0; + int128 _newSlopeDelta = 0; + uint256 _epoch = epoch; + + uint256 MAX_LOCK = CakePool.MAX_LOCK_DURATION(); + + // if not 0x0, then update user's point + if (_address != address(0)) { + // Calculate slopes and biases according to linear decay graph + // slope = lockedAmount / MAX_LOCK => Get the slope of a linear decay graph + // bias = slope * (lockedEnd - currentTimestamp) => Get the voting weight at a given time + // Kept at zero when they have to + if (_prevLocked.end > block.timestamp && _prevLocked.amount > 0) { + // Calculate slope and bias for the prev point + _userPrevPoint.slope = _prevLocked.amount / SafeCast.toInt128(int256(MAX_LOCK)); + _userPrevPoint.bias = + _userPrevPoint.slope * + SafeCast.toInt128(int256(_prevLocked.end - block.timestamp)); + } + if (_newLocked.end > block.timestamp && _newLocked.amount > 0) { + // Calculate slope and bias for the new point + _userNewPoint.slope = _newLocked.amount / SafeCast.toInt128(int256(MAX_LOCK)); + _userNewPoint.bias = _userNewPoint.slope * SafeCast.toInt128(int256(_newLocked.end - block.timestamp)); + } + + // Handle user history here + // Do it here to prevent stack overflow + uint256 _userEpoch = userPointEpoch[_address]; + // If user never ever has any point history, push it here for him. + if (_userEpoch == 0) { + userPointHistory[_address].push(_userPrevPoint); + } + + // Shift user's epoch by 1 as we are writing a new point for a user + userPointEpoch[_address] = _userEpoch + 1; + + // Update timestamp & block number then push new point to user's history + _userNewPoint.timestamp = block.timestamp; + _userNewPoint.blockNumber = block.number; + userPointHistory[_address].push(_userNewPoint); + + // Read values of scheduled changes in the slope + // _prevLocked.end can be in the past and in the future + // _newLocked.end can ONLY be in the FUTURE unless everything expired (anything more than zeros) + _prevSlopeDelta = slopeChanges[_prevLocked.end]; + if (_newLocked.end != 0) { + // Handle when _newLocked.end != 0 + if (_newLocked.end == _prevLocked.end) { + // This will happen when user adjust lock but end remains the same + // Possibly when user deposited more Cake to his locker + _newSlopeDelta = _prevSlopeDelta; + } else { + // This will happen when user increase lock + _newSlopeDelta = slopeChanges[_newLocked.end]; + } + } + } + + // Handle global states here + Point memory _lastPoint = Point({bias: 0, slope: 0, timestamp: block.timestamp, blockNumber: block.number}); + if (_epoch > 0) { + // If _epoch > 0, then there is some history written + // Hence, _lastPoint should be pointHistory[_epoch] + // else _lastPoint should an empty point + _lastPoint = pointHistory[_epoch]; + } + // _lastCheckpoint => timestamp of the latest point + // if no history, _lastCheckpoint should be block.timestamp + // else _lastCheckpoint should be the timestamp of latest pointHistory + uint256 _lastCheckpoint = _lastPoint.timestamp; + + // initialLastPoint is used for extrapolation to calculate block number + // (approximately, for xxxAt methods) and save them + // as we cannot figure that out exactly from inside contract + Point memory _initialLastPoint = Point({ + bias: 0, + slope: 0, + timestamp: _lastPoint.timestamp, + blockNumber: _lastPoint.blockNumber + }); + + // If last point is already recorded in this block, _blockSlope=0 + // That is ok because we know the block in such case + uint256 _blockSlope = 0; + if (block.timestamp > _lastPoint.timestamp) { + // Recalculate _blockSlope if _lastPoint.timestamp < block.timestamp + // Possiblity when epoch = 0 or _blockSlope hasn't get updated in this block + _blockSlope = + (MULTIPLIER * (block.number - _lastPoint.blockNumber)) / + (block.timestamp - _lastPoint.timestamp); + } + + // Go over weeks to fill history and calculate what the current point is + uint256 _weekCursor = _timestampToFloorWeek(_lastCheckpoint); + for (uint256 i = 0; i < 255; i++) { + // This logic will works for 5 years, if more than that vote power will be broken 😟 + // Bump _weekCursor a week + _weekCursor = _weekCursor + WEEK; + int128 _slopeDelta = 0; + if (_weekCursor > block.timestamp) { + // If the given _weekCursor go beyond block.timestamp, + // We take block.timestamp as the cursor + _weekCursor = block.timestamp; + } else { + // If the given _weekCursor is behind block.timestamp + // We take _slopeDelta from the recorded slopeChanges + // We can use _weekCursor directly because key of slopeChanges is timestamp round off to week + _slopeDelta = slopeChanges[_weekCursor]; + } + // Calculate _biasDelta = _lastPoint.slope * (_weekCursor - _lastCheckpoint) + int128 _biasDelta = _lastPoint.slope * SafeCast.toInt128(int256((_weekCursor - _lastCheckpoint))); + _lastPoint.bias = _lastPoint.bias - _biasDelta; + _lastPoint.slope = _lastPoint.slope + _slopeDelta; + if (_lastPoint.bias < 0) { + // This can happen + _lastPoint.bias = 0; + } + if (_lastPoint.slope < 0) { + // This cannot happen, just make sure + _lastPoint.slope = 0; + } + // Update _lastPoint to the new one + _lastCheckpoint = _weekCursor; + _lastPoint.timestamp = _weekCursor; + // As we cannot figure that out block timestamp -> block number exactly + // when query states from xxxAt methods, we need to calculate block number + // based on _initalLastPoint + _lastPoint.blockNumber = + _initialLastPoint.blockNumber + + ((_blockSlope * ((_weekCursor - _initialLastPoint.timestamp))) / MULTIPLIER); + _epoch = _epoch + 1; + if (_weekCursor == block.timestamp) { + // Hard to be happened, but better handling this case too + _lastPoint.blockNumber = block.number; + break; + } else { + pointHistory.push(_lastPoint); + } + } + // Now, each week pointHistory has been filled until current timestamp (round off by week) + // Update epoch to be the latest state + epoch = _epoch; + + if (_address != address(0)) { + // If the last point was in the block, the slope change should have been applied already + // But in such case slope shall be 0 + _lastPoint.slope = _lastPoint.slope + _userNewPoint.slope - _userPrevPoint.slope; + _lastPoint.bias = _lastPoint.bias + _userNewPoint.bias - _userPrevPoint.bias; + if (_lastPoint.slope < 0) { + _lastPoint.slope = 0; + } + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + } + + // Record the new point to pointHistory + // This would be the latest point for global epoch + pointHistory.push(_lastPoint); + + if (_address != address(0)) { + // Schedule the slope changes (slope is going downward) + // We substract _newSlopeDelta from `_newLocked.end` + // and add _prevSlopeDelta to `_prevLocked.end` + if (_prevLocked.end > block.timestamp) { + // _prevSlopeDelta was - _userPrevPoint.slope, so we offset that first + _prevSlopeDelta = _prevSlopeDelta + _userPrevPoint.slope; + if (_newLocked.end == _prevLocked.end) { + // Handle the new deposit. Not increasing lock. + _prevSlopeDelta = _prevSlopeDelta - _userNewPoint.slope; + } + slopeChanges[_prevLocked.end] = _prevSlopeDelta; + } + if (_newLocked.end > block.timestamp) { + if (_newLocked.end > _prevLocked.end) { + // At this line, the old slope should gone + _newSlopeDelta = _newSlopeDelta - _userNewPoint.slope; + slopeChanges[_newLocked.end] = _newSlopeDelta; + } + } + } + } + + /// @notice Trigger global checkpoint + function checkpoint() external { + LockedBalance memory empty = LockedBalance({amount: 0, end: 0}); + _checkpoint(address(0), empty, empty); + } + + function syncFromCakePool() external onlyNotInitialized { + initialization[msg.sender] = true; + (, , , , , uint256 lockEndTime, , , uint256 lockedAmount) = CakePool.userInfo(msg.sender); + + if (lockedAmount > 0) { + userPrevLockedAmount[msg.sender] = lockedAmount; + LockedBalance memory prevLocked = LockedBalance({amount: 0, end: 0}); + + LockedBalance memory newLocked = LockedBalance({ + amount: SafeCast.toInt128(int256(lockedAmount)), + end: _timestampToFloorWeek(lockEndTime) + }); + + userPrevLockedAmount[msg.sender] = lockedAmount; + + prevLocks[msg.sender] = LockedBalance({amount: 0, end: 0}); + locks[msg.sender] = LockedBalance({amount: newLocked.amount, end: newLocked.end}); + + _checkpoint(msg.sender, prevLocked, newLocked); + } + emit Sync(msg.sender, lockedAmount); + } + + struct DepositCache { + uint256 shares; + uint256 cakeAtLastUserAction; + uint256 lockStartTime; + uint256 lockEndTime; + uint256 userBoostedShare; + bool locked; + uint256 lockedAmount; + uint256 cakePoolAvaliable; + } + + /// @notice Deposit in cake pool + /// @param _user user address + /// @param _amount: number of tokens to deposit (in CAKE) + /// @param _lockDuration: Token lock duration + function deposit( + address _user, + uint256 _amount, + uint256 _lockDuration + ) external onlyCakePool { + if (initialization[_user]) { + DepositCache memory cache; + ( + cache.shares, + , + cache.cakeAtLastUserAction, + , + cache.lockStartTime, + cache.lockEndTime, + cache.userBoostedShare, + cache.locked, + cache.lockedAmount + ) = CakePool.userInfo(_user); + // will check whether need to process the endTime later + // cache.lockEndTime = _timestampToFloorWeek(cache.lockEndTime); + LockedBalance memory prevLocked = LockedBalance({ + amount: SafeCast.toInt128(int256(userPrevLockedAmount[_user])), + end: _timestampToFloorWeek(cache.lockEndTime) + }); + console.log("deposit log"); + console.log(_user, _amount, _lockDuration); + console.log("prevLocked", userPrevLockedAmount[_user], cache.lockEndTime); + // if (cache.shares == 0) { + // // user try to lock with clean address + // newLocked.amount = _amount; + // newLocked.end = _lockDuration + block.timestamp; + // } else + + // if (cache.lockEndTime >= block.timestamp) { + // // Adding funds during the lock duration is equivalent to re-locking the position, needs to update some variables. + // if (_amount > 0) { + // cache.lockStartTime = block.timestamp; + // // totalLockedAmount -= user.lockedAmount; + // cache.lockedAmount = 0; + // } + // // totalLockDuration += user.lockEndTime - user.lockStartTime; + // } + + uint256 totalShares = CakePool.totalShares(); + uint256 totalBoostDebt = CakePool.totalBoostDebt(); + cache.cakePoolAvaliable = CakePool.available(); + + // need to calculate pendding cake when harvest + uint256 pendingCake = MasterchefV2.pendingCake(CakePoolPID, address(CakePool)); + if (pendingCake > 0) { + cache.cakePoolAvaliable += pendingCake; + } + + // simulate CakePool.updateUserShare() function + if (cache.shares > 0) { + if (cache.locked) { + // Calculate the user's current token amount and update related parameters. + uint256 currentAmount = ((cache.cakePoolAvaliable + totalBoostDebt) * (cache.shares)) / + totalShares - + cache.userBoostedShare; + totalBoostDebt -= cache.userBoostedShare; + cache.userBoostedShare = 0; + totalShares -= cache.shares; + //Charge a overdue fee after the free duration has expired. + if ( + !CakePool.freeOverdueFeeUsers(_user) && + ((cache.lockEndTime + UNLOCK_FREE_DURATION) < block.timestamp) + ) { + uint256 earnAmount = currentAmount - cache.lockedAmount; + uint256 overdueDuration = block.timestamp - cache.lockEndTime - UNLOCK_FREE_DURATION; + if (overdueDuration > DURATION_FACTOR_OVERDUE) { + overdueDuration = DURATION_FACTOR_OVERDUE; + } + // Rates are calculated based on the user's overdue duration. + uint256 overdueWeight = (overdueDuration * CakePool.overdueFee()) / DURATION_FACTOR_OVERDUE; + uint256 currentOverdueFee = (earnAmount * overdueWeight) / PRECISION_FACTOR; + // token.safeTransfer(treasury, currentOverdueFee); need to reduce cake balance in cake pool + cache.cakePoolAvaliable -= currentOverdueFee; + + currentAmount -= currentOverdueFee; + + console.log("Charge overdue fee", currentOverdueFee); + } + // Recalculate the user's share. + // uint256 pool = CakePool.balanceOf(); + uint256 currentShares; + if (totalShares != 0) { + currentShares = + (currentAmount * totalShares) / + ((cache.cakePoolAvaliable + totalBoostDebt) - currentAmount); + } else { + currentShares = currentAmount; + } + cache.shares = currentShares; + totalShares += currentShares; + // After the lock duration, update related parameters. + if (cache.lockEndTime < block.timestamp) { + cache.locked = false; + cache.lockStartTime = 0; + cache.lockEndTime = 0; + // totalLockedAmount -= cache.lockedAmount; + cache.lockedAmount = 0; + } + } else if (!CakePool.freePerformanceFeeUsers(_user)) { + // Calculate Performance fee. + uint256 totalAmount = (cache.shares * (cache.cakePoolAvaliable + totalBoostDebt)) / totalShares; + totalShares -= cache.shares; + cache.shares = 0; + uint256 earnAmount = totalAmount - cache.cakeAtLastUserAction; + uint256 feeRate = CakePool.performanceFee(); + if (_isContract(_user)) { + feeRate = CakePool.performanceFeeContract(); + } + uint256 currentPerformanceFee = (earnAmount * feeRate) / 10000; + if (currentPerformanceFee > 0) { + // token.safeTransfer(treasury, currentPerformanceFee); need to reduce cake balance in cake pool + cache.cakePoolAvaliable -= currentPerformanceFee; + + totalAmount -= currentPerformanceFee; + } + // Recalculate the user's share. + // uint256 pool = CakePool.balanceOf(); + uint256 newShares; + if (totalShares != 0) { + newShares = + (totalAmount * totalShares) / + ((cache.cakePoolAvaliable + totalBoostDebt) - totalAmount); + } else { + newShares = totalAmount; + } + cache.shares = newShares; + totalShares += newShares; + } + } + + // Update lock duration. + if (_lockDuration > 0) { + if (cache.lockEndTime < block.timestamp) { + cache.lockStartTime = block.timestamp; + cache.lockEndTime = block.timestamp + _lockDuration; + } else { + cache.lockEndTime += _lockDuration; + } + cache.locked = true; + } + + // uint256 userCurrentShares; + // uint256 userCurrentAmount; + uint256 userCurrentLockedBalance; + // uint256 pool = CakePool.balanceOf(); + // if (_amount > 0) { + // // token.safeTransferFrom(_user, address(this), _amount); + // // cache.cakePoolAvaliable += _amount; + // userCurrentAmount = _amount; + // } + + // Calculate lock funds + if (cache.shares > 0 && cache.locked) { + userCurrentLockedBalance = ((cache.cakePoolAvaliable + totalBoostDebt) * cache.shares) / totalShares; + // userCurrentAmount += userCurrentLockedBalance; + // totalShares -= cache.shares; + // cache.shares = 0; + + // Update lock amount + if (cache.lockStartTime == block.timestamp) { + cache.lockedAmount = userCurrentLockedBalance; + // totalLockedAmount += user.cache.lockedAmount; + } + } + // if (totalShares != 0) { + // userCurrentShares = + // (userCurrentAmount * totalShares) / + // ((cache.cakePoolAvaliable + totalBoostDebt) - userCurrentLockedBalance); + // } else { + // userCurrentShares = userCurrentAmount; + // } + + // Calculate the boost weight share. + if (cache.lockEndTime > cache.lockStartTime) { + // Calculate boost share. + // uint256 boostWeight = ((cache.lockEndTime - cache.lockStartTime) * CakePool.BOOST_WEIGHT()) / + // DURATION_FACTOR; + // uint256 boostShares = (boostWeight * userCurrentShares) / PRECISION_FACTOR; + // userCurrentShares += boostShares; + // cache.shares += userCurrentShares; + + // // Calculate boost share , the user only enjoys the reward, so the principal needs to be recorded as a debt. + // uint256 boostedShare = (boostWeight * userCurrentAmount) / PRECISION_FACTOR; + // cache.userBoostedShare += boostedShare; + // totalBoostDebt += boostedShare; + + // Update lock amount. + cache.lockedAmount += _amount; + // totalLockedAmount += _amount; + } else { + // cache.shares += userCurrentShares; + } + + // if (_amount > 0 || _lockDuration > 0) { + // user.lastDepositedTime = block.timestamp; + // } + // totalShares += userCurrentShares; + + // user.cache.cakeAtLastUserAction = (user.cache.shares * balanceOf()) / totalShares - user.cache.userBoostedShare; + // user.lastUserActionTime = block.timestamp; + + // Update user info in Boost Contract. + // updateBoostContractInfo(_user); + LockedBalance memory newLocked = LockedBalance({ + amount: SafeCast.toInt128(int256(cache.lockedAmount)), + end: _timestampToFloorWeek(cache.lockEndTime) + }); + userPrevLockedAmount[_user] = cache.lockedAmount; + + prevLocks[_user] = LockedBalance({amount: prevLocked.amount, end: prevLocked.end}); + locks[_user] = LockedBalance({amount: newLocked.amount, end: newLocked.end}); + + _checkpoint(_user, prevLocked, newLocked); + } + } + + /// @notice Withdraw in cake pool + /// @param _user user address + function withdraw(address _user) external onlyCakePool { + if (initialization[_user]) { + (, , , , , uint256 lockEndTime, , , uint256 lockedAmount) = CakePool.userInfo(_user); + LockedBalance memory prevLocked = LockedBalance({ + amount: SafeCast.toInt128(int256(lockedAmount)), + end: _timestampToFloorWeek(lockEndTime) + }); + + LockedBalance memory newLocked = LockedBalance({amount: 0, end: 0}); + + prevLocks[_user] = LockedBalance({amount: prevLocked.amount, end: prevLocked.end}); + locks[_user] = LockedBalance({amount: newLocked.amount, end: newLocked.end}); + userPrevLockedAmount[_user] = 0; + + _checkpoint(_user, prevLocked, newLocked); + } + } + + /// @notice Do Binary Search to find out block timestamp for block number + /// @param _blockNumber The block number to find timestamp + /// @param _maxEpoch No beyond this timestamp + function _findBlockEpoch(uint256 _blockNumber, uint256 _maxEpoch) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = _maxEpoch; + // Loop for 128 times -> enough for 128-bit numbers + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + if (pointHistory[_mid].blockNumber <= _blockNumber) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + /// @notice Do Binary Search to find the most recent user point history preceeding block + /// @param _user The address of user to find + /// @param _blockNumber Find the most recent point history before this block number + function _findUserBlockEpoch(address _user, uint256 _blockNumber) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = userPointEpoch[_user]; + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + if (userPointHistory[_user][_mid].blockNumber <= _blockNumber) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + /// @notice Round off random timestamp to week + /// @param _timestamp The timestamp to be rounded off + function _timestampToFloorWeek(uint256 _timestamp) internal pure returns (uint256) { + return (_timestamp / WEEK) * WEEK; + } + + /// @notice Calculate total supply of VCake (voting power) + function totalSupply() external view returns (uint256) { + return _totalSupplyAt(pointHistory[epoch], block.timestamp); + } + + /// @notice Calculate total supply of VCake at specific block + /// @param _blockNumber The specific block number to calculate totalSupply + function totalSupplyAt(uint256 _blockNumber) external view returns (uint256) { + require(_blockNumber <= block.number, "bad _blockNumber"); + uint256 _epoch = epoch; + uint256 _targetEpoch = _findBlockEpoch(_blockNumber, _epoch); + + Point memory _point = pointHistory[_targetEpoch]; + uint256 _timeDelta = 0; + if (_targetEpoch < _epoch) { + Point memory _nextPoint = pointHistory[_targetEpoch + 1]; + if (_point.blockNumber != _nextPoint.blockNumber) { + _timeDelta = + ((_blockNumber - _point.blockNumber) * (_nextPoint.timestamp - _point.timestamp)) / + (_nextPoint.blockNumber - _point.blockNumber); + } + } else { + if (_point.blockNumber != block.number) { + _timeDelta = + ((_blockNumber - _point.blockNumber) * (block.timestamp - _point.timestamp)) / + (block.number - _point.blockNumber); + } + } + + return _totalSupplyAt(_point, _point.timestamp + _timeDelta); + } + + /// @notice Calculate total supply of VCake (voting power) at some point in the past + /// @param _point The point to start to search from + /// @param _timestamp The timestamp to calculate the total voting power at + function _totalSupplyAt(Point memory _point, uint256 _timestamp) internal view returns (uint256) { + Point memory _lastPoint = _point; + uint256 _weekCursor = _timestampToFloorWeek(_point.timestamp); + // Iterate through weeks to take slopChanges into the account + for (uint256 i = 0; i < 255; i++) { + _weekCursor = _weekCursor + WEEK; + int128 _slopeDelta = 0; + if (_weekCursor > _timestamp) { + // If _weekCursor goes beyond _timestamp -> leave _slopeDelta + // to be 0 as there is no more slopeChanges + _weekCursor = _timestamp; + } else { + // If _weekCursor still behind _timestamp, then _slopeDelta + // should be taken into the account. + _slopeDelta = slopeChanges[_weekCursor]; + } + // Update bias at _weekCursor + _lastPoint.bias = + _lastPoint.bias - + (_lastPoint.slope * SafeCast.toInt128(int256(_weekCursor - _lastPoint.timestamp))); + if (_weekCursor == _timestamp) { + break; + } + // Update slope and timestamp + _lastPoint.slope = _lastPoint.slope + _slopeDelta; + _lastPoint.timestamp = _weekCursor; + } + + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + + return SafeCast.toUint256(_lastPoint.bias); + } + + /** + * @notice Checks if address is a contract + */ + function _isContract(address addr) internal view returns (bool) { + uint256 size; + assembly { + size := extcodesize(addr) + } + return size > 0; + } +} diff --git a/projects/revenue-sharing-pool/v1/contracts/utils/Math128.sol b/projects/revenue-sharing-pool/v1/contracts/utils/Math128.sol new file mode 100644 index 00000000..aaf71ac6 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/contracts/utils/Math128.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/** + * @dev Standard math utilities missing in the Solidity language. + */ +library Math128 { + /** + * @dev Returns the largest of two numbers. + */ + function max(int128 a, int128 b) internal pure returns (int128) { + return a >= b ? a : b; + } + + /** + * @dev Returns the smallest of two numbers. + */ + function min(int128 a, int128 b) internal pure returns (int128) { + return a < b ? a : b; + } + + /** + * @dev Returns the smallest of two numbers. + */ + function min(uint256 a, uint256 b) internal pure returns (uint256) { + return a < b ? a : b; + } +} diff --git a/projects/revenue-sharing-pool/v1/hardhat.config.ts b/projects/revenue-sharing-pool/v1/hardhat.config.ts new file mode 100644 index 00000000..895e2b63 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/hardhat.config.ts @@ -0,0 +1,73 @@ +import type { HardhatUserConfig, NetworkUserConfig } from "hardhat/types"; +import "@nomiclabs-2.2.2/hardhat-ethers"; +import "@nomiclabs/hardhat-web3"; +import "@nomiclabs/hardhat-truffle5"; +import "hardhat-abi-exporter"; +import "hardhat-contract-sizer"; +import "solidity-coverage"; +import "dotenv/config"; + +const bscTestnet: NetworkUserConfig = { + url: "https://data-seed-prebsc-1-s1.binance.org:8545/", + chainId: 97, + accounts: [process.env.KEY_TESTNET!], +}; + +const bscMainnet: NetworkUserConfig = { + url: "https://bsc-dataseed.binance.org/", + chainId: 56, + accounts: [process.env.KEY_MAINNET!], +}; + +const config = { + defaultNetwork: "hardhat", + networks: { + hardhat: {}, + // testnet: bscTestnet, + // mainnet: bscMainnet, + }, + solidity: { + compilers: [ + { + version: "0.8.10", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + { + version: "0.8.0", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + { + version: "0.6.12", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + ], + }, + paths: { + sources: "./contracts/", + tests: "./test", + cache: "./cache", + artifacts: "./artifacts", + }, + // abiExporter: { + // path: "./data/abi", + // clear: true, + // flat: false, + // }, +}; + +export default config; diff --git a/projects/revenue-sharing-pool/v1/package.json b/projects/revenue-sharing-pool/v1/package.json new file mode 100644 index 00000000..7a064d0d --- /dev/null +++ b/projects/revenue-sharing-pool/v1/package.json @@ -0,0 +1,26 @@ +{ + "name": "pancake-revenue-sharing-pool-v1", + "description": "Pancake Revenue Sharing Pool V1", + "main": "index.js", + "version": "1.0.0", + "license": "MIT", + "private": true, + "scripts": { + "compile": "npx hardhat compile", + "deploy:testnet": "npx hardhat run --network testnet scripts/deploy.ts", + "deploy_factory:testnet": "npx hardhat run --network testnet scripts/deployFactory.ts", + "deploy:mainnet": "npx hardhat run --network mainnet scripts/deploy.ts", + "deploy_factory:mainnet": "npx hardhat run --network mainnet scripts/deployFactory.ts", + "deploy_keeper:mainnet": "npx hardhat run --network mainnet scripts/deployKeeper.ts", + "test": "npx hardhat test", + "test:coverage": "npx hardhat coverage", + "test:size-contracts": "npx hardhat size-contracts" + }, + "devDependencies": { + "@chainlink/contracts": "^0.6.1" + }, + "dependencies": { + "@openzeppelin-4.5.0/contracts": "npm:@openzeppelin/contracts@4.5.0", + "@nomiclabs-2.2.2/hardhat-ethers": "npm:@nomiclabs/hardhat-ethers@^2.2.2" + } +} \ No newline at end of file diff --git a/projects/revenue-sharing-pool/v1/scripts/deploy.ts b/projects/revenue-sharing-pool/v1/scripts/deploy.ts new file mode 100644 index 00000000..89cc5a95 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/scripts/deploy.ts @@ -0,0 +1,46 @@ +import { parseEther } from "ethers/lib/utils"; +import { ethers, network, run } from "hardhat"; +import config from "../config"; + +const main = async () => { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Check if the addresses in the config are set. + if ( + config.CakePool[networkName] === ethers.constants.AddressZero || + config.MasterChef[networkName] === ethers.constants.AddressZero + ) { + throw new Error("Missing addresses"); + } + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + // Deploy contracts. + const VCakeContract = await ethers.getContractFactory("VCake"); + const contract = await VCakeContract.deploy( + config.CakePool[networkName], + config.MasterChef[networkName], + config.cakePoolPID[networkName] + ); + + // Wait for the contract to be deployed before exiting the script. + await contract.deployed(); + console.log(`Deployed to ${contract.address}`); + } else { + console.log(`Deploying to ${networkName} network is not supported...`); + } +}; + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/revenue-sharing-pool/v1/scripts/deployFactory.ts b/projects/revenue-sharing-pool/v1/scripts/deployFactory.ts new file mode 100644 index 00000000..d69bead2 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/scripts/deployFactory.ts @@ -0,0 +1,39 @@ +import { parseEther } from "ethers/lib/utils"; +import { ethers, network, run } from "hardhat"; +import config from "../config"; + +const main = async () => { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Check if the addresses in the config are set. + if (config.VCake[networkName] === ethers.constants.AddressZero) { + throw new Error("Missing addresses"); + } + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + // Deploy contracts. + const RevenueSharingPoolFactoryContract = await ethers.getContractFactory("RevenueSharingPoolFactory"); + const contract = await RevenueSharingPoolFactoryContract.deploy(config.VCake[networkName]); + + // Wait for the contract to be deployed before exiting the script. + await contract.deployed(); + console.log(`Deployed to ${contract.address}`); + } else { + console.log(`Deploying to ${networkName} network is not supported...`); + } +}; + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/revenue-sharing-pool/v1/scripts/deployKeeper.ts b/projects/revenue-sharing-pool/v1/scripts/deployKeeper.ts new file mode 100644 index 00000000..48b34783 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/scripts/deployKeeper.ts @@ -0,0 +1,39 @@ +import { parseEther } from "ethers/lib/utils"; +import { ethers, network, run } from "hardhat"; +import config from "../config"; + +const main = async () => { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Check if the addresses in the config are set. + if (config.RevenueSharingPoolForCake[networkName] === ethers.constants.AddressZero) { + throw new Error("Missing addresses"); + } + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + // Deploy contracts. + const VCakeContract = await ethers.getContractFactory("RevenueSharingPoolKeeper"); + const contract = await VCakeContract.deploy(config.RevenueSharingPoolForCake[networkName]); + + // Wait for the contract to be deployed before exiting the script. + await contract.deployed(); + console.log(`Deployed to ${contract.address}`); + } else { + console.log(`Deploying to ${networkName} network is not supported...`); + } +}; + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/revenue-sharing-pool/v1/test/RevenueSharingPool.test.ts b/projects/revenue-sharing-pool/v1/test/RevenueSharingPool.test.ts new file mode 100644 index 00000000..5002b2ef --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/RevenueSharingPool.test.ts @@ -0,0 +1,716 @@ +import { artifacts, contract, ethers, network } from "hardhat"; +import { time, BN, expectEvent } from "@openzeppelin/test-helpers"; +import { parseEther, formatEther } from "ethers/lib/utils"; +import { expect } from "chai"; +import { beforeEach } from "mocha"; +import { BigNumber } from "ethers"; + +import ERC20MockArtifact from "./artifactsFile/ERC20Mock.json"; +import CakeTokenArtifact from "./artifactsFile/CakeToken.json"; +import SyrupBarArtifact from "./artifactsFile/SyrupBar.json"; +import MasterChefArtifact from "./artifactsFile/MasterChef.json"; +import MasterChefV2Artifact from "./artifactsFile/MasterChefV2.json"; +import CakePoolArtifact from "./artifactsFile/CakePool.json"; +import VCakeArtifact from "./artifactsFile/VCake.json"; +import RevenueSharingPoolFactoryArtifact from "./artifactsFile/RevenueSharingPoolFactory.json"; +import RevenueSharingPoolArtifact from "./artifactsFile/RevenueSharingPool.json"; + +const ZERO = BigNumber.from(0); +const TOLERANCE = "0.04"; // 0.04% +const HOUR = BigNumber.from(3600); +const DAY = BigNumber.from(86400); +const WEEK = DAY.mul(7); +const YEAR = DAY.mul(365); +const MAX_LOCK = BigNumber.from(32054399); // seconds in 53 weeks - 1 second (60 * 60 * 24 * 7 * 53) - 1 +const TOKEN_CHECKPOINT_DEADLINE = DAY; +const PRECISION = BigNumber.from(10).pow(17); +const tolerancePercent = 9990; // 99.9% + +describe("Revenue Sharing Pool", () => { + let CakePoolSC; + let VCakeSC; + let CakeTokenSC; + let RevenueSharingPoolSC; + let RevenueToken; + let RevenueSharingPoolFactorySC; + let admin; + let user1; + let user2; + let user3; + let user4; + before(async function () { + [admin, user1, user2, user3, user4] = await ethers.getSigners(); + }); + + beforeEach(async () => { + const ERC20Mock = await ethers.getContractFactoryFromArtifact(ERC20MockArtifact); + + // Prepare for master chef v3 + + const CakeToken = await ethers.getContractFactoryFromArtifact(CakeTokenArtifact); + CakeTokenSC = await CakeToken.deploy(); + await CakeTokenSC["mint(address,uint256)"](admin.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user1.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user2.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user3.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user4.address, ethers.utils.parseUnits("100000000")); + + const SyrupBar = await ethers.getContractFactoryFromArtifact(SyrupBarArtifact); + const syrupBar = await SyrupBar.deploy(CakeTokenSC.address); + + const lpTokenV1 = await ERC20Mock.deploy("LP Token V1", "LPV1"); + const dummyTokenV2 = await ERC20Mock.deploy("Dummy Token V2", "DTV2"); + + const MasterChef = await ethers.getContractFactoryFromArtifact(MasterChefArtifact); + const masterChef = await MasterChef.deploy( + CakeTokenSC.address, + syrupBar.address, + admin.address, + ethers.utils.parseUnits("40"), + ethers.constants.Zero + ); + + await CakeTokenSC.transferOwnership(masterChef.address); + await syrupBar.transferOwnership(masterChef.address); + + await masterChef.add(0, lpTokenV1.address, true); // farm with pid 1 and 0 allocPoint + await masterChef.add(1, dummyTokenV2.address, true); // farm with pid 2 and 1 allocPoint + + const MasterChefV2 = await ethers.getContractFactoryFromArtifact(MasterChefV2Artifact); + const masterChefV2 = await MasterChefV2.deploy(masterChef.address, CakeTokenSC.address, 2, admin.address); + + await dummyTokenV2.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenV2.approve(masterChefV2.address, ethers.constants.MaxUint256); + await masterChefV2.init(dummyTokenV2.address); + + const lpTokenV2 = await ERC20Mock.deploy("LP Token V2", "LPV2"); + const dummyTokenV3 = await ERC20Mock.deploy("Dummy Token V3", "DTV3"); + const dummyTokenForCakePool = await ERC20Mock.deploy("Dummy Token Cake Pool", "DTCP"); + + await masterChefV2.add(0, lpTokenV2.address, true, true); // regular farm with pid 0 and 1 allocPoint + await masterChefV2.add(1, dummyTokenV3.address, true, true); // regular farm with pid 1 and 1 allocPoint + await masterChefV2.add(1, dummyTokenForCakePool.address, false, true); // special farm with pid 2 and 1 allocPoint + + // set cake pool + const CakePool = await ethers.getContractFactoryFromArtifact(CakePoolArtifact); + CakePoolSC = await CakePool.deploy( + CakeTokenSC.address, + masterChefV2.address, + admin.address, + admin.address, + admin.address, + 2 + ); + await masterChefV2.updateWhiteList(CakePoolSC.address, true); + await dummyTokenForCakePool.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenForCakePool.approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakePoolSC.init(dummyTokenForCakePool.address); + + await CakeTokenSC.connect(admin).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user1).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user2).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user3).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user4).approve(CakePoolSC.address, ethers.constants.MaxUint256); + + const VCakeTest = await ethers.getContractFactoryFromArtifact(VCakeArtifact); + VCakeSC = await VCakeTest.deploy(CakePoolSC.address, masterChefV2.address, 2); + + await CakePoolSC.setVCakeContract(VCakeSC.address); + + const RevenueSharingPoolFactory = await ethers.getContractFactoryFromArtifact(RevenueSharingPoolFactoryArtifact); + RevenueSharingPoolFactorySC = await RevenueSharingPoolFactory.deploy(VCakeSC.address); + + RevenueToken = await ERC20Mock.deploy("Revenue Token", "RT"); + await RevenueToken.mint(admin.address, ethers.utils.parseUnits("10000000000")); + + const currentTime = (await time.latest()).toString(); + let tx = await RevenueSharingPoolFactorySC.deploy(currentTime, RevenueToken.address, admin.address); + let receipt = await tx.wait(); + const newPoolAddress = receipt.events[2].args.pool; + RevenueSharingPoolSC = await ethers.getContractAt(RevenueSharingPoolArtifact.abi, newPoolAddress, admin); + + await RevenueToken.connect(admin).approve(RevenueSharingPoolSC.address, ethers.constants.MaxUint256); + }); + + afterEach(async () => { + await network.provider.send("hardhat_reset"); + }); + + describe("initialized", async () => { + it("should initialized correctly", async () => { + let latestTimestamp = (await time.latest()).toString(); + const startWeekCursor = BigNumber.from(latestTimestamp).div(WEEK).mul(WEEK); + expect(await RevenueSharingPoolSC.startWeekCursor()).to.deep.eq(startWeekCursor); + expect(await RevenueSharingPoolSC.lastTokenTimestamp()).deep.eq(startWeekCursor); + expect(await RevenueSharingPoolSC.weekCursor()).to.deep.eq(startWeekCursor); + expect(await RevenueSharingPoolSC.rewardToken()).to.deep.eq(RevenueToken.address); + expect(await RevenueSharingPoolSC.VCake()).to.deep.eq(VCakeSC.address); + expect(await RevenueSharingPoolSC.emergencyReturn()).to.deep.eq(admin.address); + expect(await RevenueSharingPoolSC.canCheckpointToken()).deep.eq(false); + }); + }); + + describe("checkpointToken", () => { + beforeEach(async function () { + await VCakeSC.connect(user1).syncFromCakePool(); + await VCakeSC.connect(user2).syncFromCakePool(); + await VCakeSC.connect(user3).syncFromCakePool(); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 30); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + }); + + context("when owner call checkpointToken", async () => { + it("should work", async () => { + let latestTimestamp = (await time.latest()).toString(); + await RevenueToken.transfer(RevenueSharingPoolSC.address, ethers.utils.parseEther("888")); + await RevenueSharingPoolSC.connect(admin).checkpointToken(); + + expect(await RevenueSharingPoolSC.lastTokenBalance()).to.deep.eq(ethers.utils.parseEther("888")); + const lastTokenTimestamp = (await RevenueSharingPoolSC.lastTokenTimestamp()).toNumber(); + expect(lastTokenTimestamp).to.be.gt(Number(latestTimestamp)); + + const weekTimeStamp = BigNumber.from(latestTimestamp).div(WEEK).mul(WEEK); + const tokensPerWeek = await RevenueSharingPoolSC.tokensPerWeek(weekTimeStamp); + expect(tokensPerWeek).to.deep.eq(ethers.utils.parseEther("888")); + }); + }); + }); + + describe("totalSupplyAt and balanceOfAt", () => { + beforeEach(async function () {}); + + context("One user", async () => { + it("The user's balanceOfAt is equal to the totalSupplyAt at specific week cursor when have only one user", async () => { + await VCakeSC.connect(user1).syncFromCakePool(); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + + let weekCursor = latestTimestamp.div(WEEK).mul(WEEK); + let totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(weekCursor); + + let user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, weekCursor); + + expect(user1BalanceOfAt).to.deep.eq(ZERO); + expect(totalSupplyAt).to.deep.eq(ZERO); + + let nextWeekCursor = latestTimestamp.div(WEEK).add(1).mul(WEEK); + totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(nextWeekCursor); + + user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, nextWeekCursor); + + expect(user1BalanceOfAt.gt(ZERO)).to.deep.eq(true); + expect(totalSupplyAt).to.deep.eq(ZERO); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(nextWeekCursor); + + user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, nextWeekCursor); + + expect(user1BalanceOfAt.gt(ZERO)).to.deep.eq(true); + expect(totalSupplyAt).to.deep.eq(ZERO); + + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const weekBlock = await time.latestBlock(); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(nextWeekCursor); + + user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, nextWeekCursor); + + const totalSupplyAtInVCake = await VCakeSC.totalSupplyAt(weekBlock.toNumber()); + + expect(user1BalanceOfAt).to.deep.eq(totalSupplyAt); + expect(totalSupplyAtInVCake).to.deep.eq(totalSupplyAt); + }); + }); + + context("Three users", async () => { + it("The total balanceOfAt of all users is equal to the totalSupplyAt at specific week cursor", async () => { + await VCakeSC.connect(user1).syncFromCakePool(); + await VCakeSC.connect(user2).syncFromCakePool(); + await VCakeSC.connect(user3).syncFromCakePool(); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 30); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + const weekCursor = lastTokenTimestamp.div(WEEK).mul(WEEK); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + const totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(weekCursor); + + const user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, weekCursor); + const user2BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user2.address, weekCursor); + const user3BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user3.address, weekCursor); + + const userTotalBalanceOfAt = user1BalanceOfAt.add(user2BalanceOfAt).add(user3BalanceOfAt); + expect(userTotalBalanceOfAt).to.deep.eq(totalSupplyAt); + }); + }); + }); + + describe("claim", () => { + beforeEach(async function () { + await VCakeSC.connect(user1).syncFromCakePool(); + await VCakeSC.connect(user2).syncFromCakePool(); + await VCakeSC.connect(user3).syncFromCakePool(); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 30); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + }); + + it("should return 0 when user with no lock try to claim", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), ethers.utils.parseUnits("88888")); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + let lastTokenBalance = await RevenueSharingPoolSC.lastTokenBalance(); + + expect(lastTokenBalance).to.deep.eq(ethers.utils.parseUnits("88888")); + + const user4BalanceBefore = await RevenueToken.balanceOf(user4.address); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + + const user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceBefore).to.deep.eq(user4BalanceAfter); + }); + + it("All users claim reward amount should be equal with inject reward amount", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + const weekCursor = lastTokenTimestamp.div(WEEK).mul(WEEK); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + const totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(weekCursor); + const totalRewardBalance = await RevenueToken.balanceOf(RevenueSharingPoolSC.address); + + const user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, weekCursor); + const user2BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user2.address, weekCursor); + const user3BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user3.address, weekCursor); + + const userTotalBalanceOfAt = user1BalanceOfAt.add(user2BalanceOfAt).add(user3BalanceOfAt); + let user1ClaimAmount = user1BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + let user2ClaimAmount = user2BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + let user3ClaimAmount = user3BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + const user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + const user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1ClaimAmount).to.deep.eq(user1BalanceAfter); + expect(user2ClaimAmount).to.deep.eq(user2BalanceAfter); + expect(user3ClaimAmount).to.deep.eq(user3BalanceAfter); + + const totalBalance = user1BalanceAfter.add(user2BalanceAfter).add(user3BalanceAfter); + + //The result is not completely consistent due to the loss of precision of the calculation + expect(totalBalance.mul(10000).div(injectAmount).gt(tolerancePercent)).to.deep.eq(true); + }); + + it("user claim 0 when lock after checkpointToken ", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekTimeStamp = latestTimestamp.div(WEEK).add(1).mul(WEEK); + await time.increaseTo(nextWeekTimeStamp.sub(1).toNumber()); + + await VCakeSC.connect(user4).syncFromCakePool(); + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + const user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + }); + + it("user claim 0 at this week when lock at this week", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekTimeStamp = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + await time.increaseTo(nextWeekTimeStamp.sub(DAY).toNumber()); + + await VCakeSC.connect(user4).syncFromCakePool(); + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.sub(DAY).toNumber(), injectAmount); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + const user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + }); + + it("user claim 0 at next week when lock at this week", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekTimeStamp = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + await time.increaseTo(nextWeekTimeStamp.sub(DAY).toNumber()); + + await VCakeSC.connect(user4).syncFromCakePool(); + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.sub(DAY).toNumber(), injectAmount); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + let user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + + await time.increaseTo(nextWeekTimeStamp.add(3600).toNumber()); + + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.add(3600).toNumber(), ethers.utils.parseUnits("88888")); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + }); + + it("user can claim reward after next week when lock at this week", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekTimeStamp = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + await time.increaseTo(nextWeekTimeStamp.sub(DAY).toNumber()); + + await VCakeSC.connect(user4).syncFromCakePool(); + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.sub(DAY).toNumber(), injectAmount); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + let user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + + await time.increaseTo(nextWeekTimeStamp.add(3600).toNumber()); + + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.add(3600).toNumber(), ethers.utils.parseUnits("88888")); + await RevenueSharingPoolSC.checkpointToken(); + + await time.increaseTo(nextWeekTimeStamp.add(WEEK).add(3600).toNumber()); + + await RevenueSharingPoolSC.injectReward( + nextWeekTimeStamp.add(WEEK).add(3600).toNumber(), + ethers.utils.parseUnits("88888") + ); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + expect(user4BalanceAfter.gt(ZERO)).to.deep.eq(true); + }); + }); + + describe("CanCheckpointToken", () => { + beforeEach(async function () { + await RevenueSharingPoolSC.setCanCheckpointToken(true); + + await VCakeSC.connect(user1).syncFromCakePool(); + await VCakeSC.connect(user2).syncFromCakePool(); + await VCakeSC.connect(user3).syncFromCakePool(); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 30); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + }); + it("All users claim reward amount should be equal with inject reward amount", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + const weekCursor = lastTokenTimestamp.div(WEEK).mul(WEEK); + + const totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(weekCursor); + const totalRewardBalance = await RevenueToken.balanceOf(RevenueSharingPoolSC.address); + + const user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, weekCursor); + const user2BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user2.address, weekCursor); + const user3BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user3.address, weekCursor); + + const userTotalBalanceOfAt = user1BalanceOfAt.add(user2BalanceOfAt).add(user3BalanceOfAt); + let user1ClaimAmount = user1BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + let user2ClaimAmount = user2BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + let user3ClaimAmount = user3BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + const user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + const user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1ClaimAmount).to.deep.eq(user1BalanceAfter); + expect(user2ClaimAmount).to.deep.eq(user2BalanceAfter); + expect(user3ClaimAmount).to.deep.eq(user3BalanceAfter); + + const totalBalance = user1BalanceAfter.add(user2BalanceAfter).add(user3BalanceAfter); + + //The result is not completely consistent due to the loss of precision of the calculation + expect(totalBalance.mul(10000).div(injectAmount).gt(tolerancePercent)).to.deep.eq(true); + }); + + it("User will get reward by claim without checkpointToken", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + const user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + const user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1BalanceAfter.gt(ZERO)).to.deep.eq(true); + expect(user2BalanceAfter.gt(ZERO)).to.deep.eq(true); + expect(user3BalanceAfter.gt(ZERO)).to.deep.eq(true); + }); + + it("User will not get reward by claim before TOKEN_CHECKPOINT_DEADLINE", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekCursor = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + // increase time to nextWeekCursor - 1 hours + await time.increaseTo(nextWeekCursor.sub(BigNumber.from(3600)).toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.injectReward(targetTime, injectAmount); + + // await time.increase(WEEK.toNumber()); + + await time.increaseTo(nextWeekCursor.add(BigNumber.from(1)).toNumber()); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + const user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + const user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1BalanceAfter).to.deep.eq(ZERO); + expect(user2BalanceAfter).to.deep.eq(ZERO); + expect(user3BalanceAfter).to.deep.eq(ZERO); + }); + + it("User will get reward by claim after TOKEN_CHECKPOINT_DEADLINE", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekCursor = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + // increase time to nextWeekCursor - 1 hours + await time.increaseTo(nextWeekCursor.sub(BigNumber.from(3600)).toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.injectReward(targetTime, injectAmount); + + await time.increaseTo(nextWeekCursor.add(1).toNumber()); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + let user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + let user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + let user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1BalanceAfter).to.deep.eq(ZERO); + expect(user2BalanceAfter).to.deep.eq(ZERO); + expect(user3BalanceAfter).to.deep.eq(ZERO); + + await time.increase(DAY.toNumber()); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + latestTimestamp = BigNumber.from((await time.latest()).toString()); + + expect(latestTimestamp.gt(lastTokenTimestamp.add(DAY))).to.deep.eq(true); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1BalanceAfter.gt(ZERO)).to.deep.eq(true); + expect(user2BalanceAfter.gt(ZERO)).to.deep.eq(true); + expect(user3BalanceAfter.gt(ZERO)).to.deep.eq(true); + }); + }); + + describe("Inject Reward", () => { + let Week1, Week2, Week3, Week4, Week5; + beforeEach(async function () { + await VCakeSC.connect(user1).syncFromCakePool(); + await VCakeSC.connect(user2).syncFromCakePool(); + await VCakeSC.connect(user3).syncFromCakePool(); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 60); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 60); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 60); + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + + Week1 = latestTimestamp.div(WEEK).add(1).mul(WEEK); + Week2 = Week1.add(WEEK); + Week3 = Week2.add(WEEK); + Week4 = Week3.add(WEEK); + Week5 = Week4.add(WEEK); + // Inject reward in Week3 + await RevenueSharingPoolSC.injectReward(Week3.toNumber(), ethers.utils.parseEther("888")); + }); + + context("Can claim reward after inject reward timestamp", async () => { + it("No reward in week one", async () => { + await time.increaseTo(Week1.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + + expect(user1Balance).to.deep.eq(ZERO); + }); + + it("No reward in week two", async () => { + await time.increaseTo(Week2.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + + expect(user1Balance).to.deep.eq(ZERO); + }); + + it("No reward in week three", async () => { + await time.increaseTo(Week3.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + + expect(user1Balance).to.deep.eq(ZERO); + }); + + it("Get reward in week four", async () => { + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + expect(user1Balance.gt(ZERO)).to.deep.eq(true); + }); + + it("No reward in week five after claim in week four", async () => { + // claim in week four + await time.increaseTo(Week4.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + + await time.increaseTo(Week5.toNumber()); + const user1BalanceBefore = await RevenueToken.balanceOf(user1.address); + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + expect(user1BalanceAfter.sub(user1BalanceBefore)).to.deep.eq(ZERO); + }); + + it("Get reward even after lock expired", async () => { + const Year = Week1.add(YEAR); + await time.increaseTo(Year.toNumber()); + const user1BalanceBefore = await RevenueToken.balanceOf(user1.address); + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + expect(user1BalanceAfter.sub(user1BalanceBefore).gt(ZERO)).to.deep.eq(true); + }); + }); + }); +}); diff --git a/projects/revenue-sharing-pool/v1/test/VCake.test.ts b/projects/revenue-sharing-pool/v1/test/VCake.test.ts new file mode 100644 index 00000000..94be1bda --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/VCake.test.ts @@ -0,0 +1,189 @@ +import { artifacts, contract, ethers, network } from "hardhat"; +import { time, BN, expectEvent } from "@openzeppelin/test-helpers"; +import { parseEther, formatEther } from "ethers/lib/utils"; +import { expect } from "chai"; +import { beforeEach } from "mocha"; +import { BigNumber } from "ethers"; + +import ERC20MockArtifact from "./artifactsFile/ERC20Mock.json"; +import CakeTokenArtifact from "./artifactsFile/CakeToken.json"; +import SyrupBarArtifact from "./artifactsFile/SyrupBar.json"; +import MasterChefArtifact from "./artifactsFile/MasterChef.json"; +import MasterChefV2Artifact from "./artifactsFile/MasterChefV2.json"; +import CakePoolArtifact from "./artifactsFile/CakePool.json"; +import VCakeArtifact from "./artifactsFile/VCake.json"; + +const ZERO = BigNumber.from(0); + +describe("VCake", () => { + let CakePoolSC; + let VCakeSC; + let CakeTokenSC; + let admin; + let user1; + let user2; + let user3; + before(async function () { + [admin, user1, user2, user3] = await ethers.getSigners(); + }); + + beforeEach(async () => { + const ERC20Mock = await ethers.getContractFactoryFromArtifact(ERC20MockArtifact); + + // Prepare for master chef v3 + + const CakeToken = await ethers.getContractFactoryFromArtifact(CakeTokenArtifact); + CakeTokenSC = await CakeToken.deploy(); + await CakeTokenSC["mint(address,uint256)"](admin.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user1.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user2.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user3.address, ethers.utils.parseUnits("100000000")); + + const SyrupBar = await ethers.getContractFactoryFromArtifact(SyrupBarArtifact); + const syrupBar = await SyrupBar.deploy(CakeTokenSC.address); + + const lpTokenV1 = await ERC20Mock.deploy("LP Token V1", "LPV1"); + const dummyTokenV2 = await ERC20Mock.deploy("Dummy Token V2", "DTV2"); + + const MasterChef = await ethers.getContractFactoryFromArtifact(MasterChefArtifact); + const masterChef = await MasterChef.deploy( + CakeTokenSC.address, + syrupBar.address, + admin.address, + ethers.utils.parseUnits("40"), + ethers.constants.Zero + ); + + await CakeTokenSC.transferOwnership(masterChef.address); + await syrupBar.transferOwnership(masterChef.address); + + await masterChef.add(0, lpTokenV1.address, true); // farm with pid 1 and 0 allocPoint + await masterChef.add(1, dummyTokenV2.address, true); // farm with pid 2 and 1 allocPoint + + const MasterChefV2 = await ethers.getContractFactoryFromArtifact(MasterChefV2Artifact); + const masterChefV2 = await MasterChefV2.deploy(masterChef.address, CakeTokenSC.address, 2, admin.address); + + await dummyTokenV2.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenV2.approve(masterChefV2.address, ethers.constants.MaxUint256); + await masterChefV2.init(dummyTokenV2.address); + + const lpTokenV2 = await ERC20Mock.deploy("LP Token V2", "LPV2"); + const dummyTokenV3 = await ERC20Mock.deploy("Dummy Token V3", "DTV3"); + const dummyTokenForCakePool = await ERC20Mock.deploy("Dummy Token Cake Pool", "DTCP"); + + await masterChefV2.add(0, lpTokenV2.address, true, true); // regular farm with pid 0 and 1 allocPoint + await masterChefV2.add(1, dummyTokenV3.address, true, true); // regular farm with pid 1 and 1 allocPoint + await masterChefV2.add(1, dummyTokenForCakePool.address, false, true); // special farm with pid 2 and 1 allocPoint + + // set cake pool + const CakePool = await ethers.getContractFactoryFromArtifact(CakePoolArtifact); + CakePoolSC = await CakePool.deploy( + CakeTokenSC.address, + masterChefV2.address, + admin.address, + admin.address, + admin.address, + 2 + ); + await masterChefV2.updateWhiteList(CakePoolSC.address, true); + await dummyTokenForCakePool.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenForCakePool.approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakePoolSC.init(dummyTokenForCakePool.address); + + await CakeTokenSC.connect(admin).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user1).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user2).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user3).approve(CakePoolSC.address, ethers.constants.MaxUint256); + + const VCakeTest = await ethers.getContractFactoryFromArtifact(VCakeArtifact); + VCakeSC = await VCakeTest.deploy(CakePoolSC.address, masterChefV2.address, 2); + + await CakePoolSC.setVCakeContract(VCakeSC.address); + }); + + afterEach(async () => { + await network.provider.send("hardhat_reset"); + }); + + describe("Check VCake balance", () => { + beforeEach(async function () { + await VCakeSC.connect(user1).syncFromCakePool(); + await VCakeSC.connect(user2).syncFromCakePool(); + await VCakeSC.connect(user3).syncFromCakePool(); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 30); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + }); + + it("The total balance of all users is equal to the totalSupply", async function () { + const user1Balance = await VCakeSC.balanceOf(user1.address); + const user2Balance = await VCakeSC.balanceOf(user2.address); + const user3Balance = await VCakeSC.balanceOf(user3.address); + + const totalSupply = await VCakeSC.totalSupply(); + + const usersBalance = user1Balance.add(user2Balance).add(user3Balance); + + expect(usersBalance).to.deep.eq(totalSupply); + }); + + it("The total balance of all users is equal to the totalSupply at specific block number", async function () { + let user1Info = await CakePoolSC.userInfo(user1.address); + console.log(user1Info.lockEndTime); + + let user1Balance = await VCakeSC.balanceOf(user1.address); + let user2Balance = await VCakeSC.balanceOf(user2.address); + let user3Balance = await VCakeSC.balanceOf(user3.address); + + let totalSupply = await VCakeSC.totalSupply(); + + let usersBalance = user1Balance.add(user2Balance).add(user3Balance); + expect(usersBalance).to.deep.eq(totalSupply); + + console.log(user1Balance, user2Balance, user3Balance, totalSupply); + + await time.increaseTo(user1Info.lockEndTime - 3600); + + user1Balance = await VCakeSC.balanceOf(user1.address); + user2Balance = await VCakeSC.balanceOf(user2.address); + user3Balance = await VCakeSC.balanceOf(user3.address); + + totalSupply = await VCakeSC.totalSupply(); + + usersBalance = user1Balance.add(user2Balance).add(user3Balance); + expect(usersBalance).to.deep.eq(totalSupply); + + console.log(user1Balance, user2Balance, user3Balance, totalSupply); + + await time.increaseTo(user1Info.lockEndTime + 3600); + + user1Balance = await VCakeSC.balanceOf(user1.address); + user2Balance = await VCakeSC.balanceOf(user2.address); + user3Balance = await VCakeSC.balanceOf(user3.address); + + totalSupply = await VCakeSC.totalSupply(); + + usersBalance = user1Balance.add(user2Balance).add(user3Balance); + expect(usersBalance).to.deep.eq(totalSupply); + + console.log(user1Balance, user2Balance, user3Balance, totalSupply); + }); + + it("Should return 0 when balanceOfAt(user, expiredBlock)", async function () { + let user1Info = await CakePoolSC.userInfo(user1.address); + + await time.increaseTo(user1Info.lockEndTime - 100); + let latestBN = (await time.latestBlock()).toString(10); + let user1Balance = await VCakeSC.balanceOfAt(user1.address, latestBN); + + expect(user1Balance).to.not.eq(0); + + await time.increaseTo(user1Info.lockEndTime + 100); + + latestBN = (await time.latestBlock()).toString(10); + user1Balance = await VCakeSC.balanceOfAt(user1.address, latestBN); + expect(user1Balance).to.deep.eq(ZERO); + }); + }); +}); diff --git a/projects/revenue-sharing-pool/v1/test/VCakeLockedBalance.test.ts b/projects/revenue-sharing-pool/v1/test/VCakeLockedBalance.test.ts new file mode 100644 index 00000000..84ba7cf5 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/VCakeLockedBalance.test.ts @@ -0,0 +1,527 @@ +import { artifacts, contract, ethers, network } from "hardhat"; +import { time, BN, expectEvent } from "@openzeppelin/test-helpers"; +import { parseEther, formatEther } from "ethers/lib/utils"; +import { expect } from "chai"; +import { beforeEach } from "mocha"; +import { BigNumber } from "ethers"; + +import ERC20MockArtifact from "./artifactsFile/ERC20Mock.json"; +import CakeTokenArtifact from "./artifactsFile/CakeToken.json"; +import SyrupBarArtifact from "./artifactsFile/SyrupBar.json"; +import MasterChefArtifact from "./artifactsFile/MasterChef.json"; +import MasterChefV2Artifact from "./artifactsFile/MasterChefV2.json"; +import CakePoolArtifact from "./artifactsFile/CakePool.json"; +import VCakeTestArtifact from "./artifactsFile/VCakeTest.json"; + +const ZERO = BigNumber.from(0); +const DAY = BigNumber.from(86400); +const WEEK = DAY.mul(7); + +describe("VCake LockedBalance", () => { + let CakePoolSC; + let VCakeTestSC; + let CakeTokenSC; + let admin; + let user1; + let user2; + let user3; + before(async function () { + [admin, user1, user2, user3] = await ethers.getSigners(); + }); + + beforeEach(async () => { + const ERC20Mock = await ethers.getContractFactoryFromArtifact(ERC20MockArtifact); + + // Prepare for master chef v3 + + const CakeToken = await ethers.getContractFactoryFromArtifact(CakeTokenArtifact); + CakeTokenSC = await CakeToken.deploy(); + await CakeTokenSC["mint(address,uint256)"](admin.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user1.address, ethers.utils.parseUnits("100000000")); + // await CakeTokenSC["mint(address,uint256)"](user2, ethers.utils.parseUnits("100000000")); + // await CakeTokenSC["mint(address,uint256)"](user3, ethers.utils.parseUnits("100000000")); + + const SyrupBar = await ethers.getContractFactoryFromArtifact(SyrupBarArtifact); + const syrupBar = await SyrupBar.deploy(CakeTokenSC.address); + + const lpTokenV1 = await ERC20Mock.deploy("LP Token V1", "LPV1"); + const dummyTokenV2 = await ERC20Mock.deploy("Dummy Token V2", "DTV2"); + + const MasterChef = await ethers.getContractFactoryFromArtifact(MasterChefArtifact); + const masterChef = await MasterChef.deploy( + CakeTokenSC.address, + syrupBar.address, + admin.address, + ethers.utils.parseUnits("40"), + ethers.constants.Zero + ); + + await CakeTokenSC.transferOwnership(masterChef.address); + await syrupBar.transferOwnership(masterChef.address); + + await masterChef.add(0, lpTokenV1.address, true); // farm with pid 1 and 0 allocPoint + await masterChef.add(1, dummyTokenV2.address, true); // farm with pid 2 and 1 allocPoint + + const MasterChefV2 = await ethers.getContractFactoryFromArtifact(MasterChefV2Artifact); + const masterChefV2 = await MasterChefV2.deploy(masterChef.address, CakeTokenSC.address, 2, admin.address); + + await dummyTokenV2.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenV2.approve(masterChefV2.address, ethers.constants.MaxUint256); + await masterChefV2.init(dummyTokenV2.address); + + const lpTokenV2 = await ERC20Mock.deploy("LP Token V2", "LPV2"); + const dummyTokenV3 = await ERC20Mock.deploy("Dummy Token V3", "DTV3"); + const dummyTokenForCakePool = await ERC20Mock.deploy("Dummy Token Cake Pool", "DTCP"); + + await masterChefV2.add(0, lpTokenV2.address, true, true); // regular farm with pid 0 and 1 allocPoint + await masterChefV2.add(1, dummyTokenV3.address, true, true); // regular farm with pid 1 and 1 allocPoint + await masterChefV2.add(1, dummyTokenForCakePool.address, false, true); // special farm with pid 2 and 1 allocPoint + + // set cake pool + const CakePool = await ethers.getContractFactoryFromArtifact(CakePoolArtifact); + CakePoolSC = await CakePool.deploy( + CakeTokenSC.address, + masterChefV2.address, + admin.address, + admin.address, + admin.address, + 2 + ); + await masterChefV2.updateWhiteList(CakePoolSC.address, true); + await dummyTokenForCakePool.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenForCakePool.approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakePoolSC.init(dummyTokenForCakePool.address); + + await CakeTokenSC.connect(admin).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user1).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user2).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user3).approve(CakePoolSC.address, ethers.constants.MaxUint256); + + const VCakeTest = await ethers.getContractFactoryFromArtifact(VCakeTestArtifact); + VCakeTestSC = await VCakeTest.deploy(CakePoolSC.address, masterChefV2.address, 2); + + await CakePoolSC.setVCakeContract(VCakeTestSC.address); + }); + + afterEach(async () => { + await network.provider.send("hardhat_reset"); + }); + + describe("Check whether the formula for calculating the locked amount in the pool is correct when executing syncFromCakePool at first", () => { + beforeEach(async function () { + await VCakeTestSC.connect(user1).syncFromCakePool(); + }); + + it("Deposit flexible for the first time in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 0); + await time.advanceBlockTo((await time.latestBlock()).toNumber() + 100); + const user1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(ZERO); + expect(prevLockedBalance.end).to.deep.eq(ZERO); + + expect(user1Info.lockedAmount).to.deep.eq(ZERO); + expect(user1Info.lockEndTime).to.deep.eq(ZERO); + + expect(currentLockedBalance.amount).to.deep.eq(ZERO); + expect(currentLockedBalance.end).to.deep.eq(ZERO); + }); + + it("Lock for the first time in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + const currentTime = (await time.latest()).toNumber(); + + await time.advanceBlockTo((await time.latestBlock()).toNumber() + 100); + const user1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(ZERO); + expect(prevLockedBalance.end).to.deep.eq(ZERO); + + expect(user1Info.lockedAmount).to.deep.eq(ethers.utils.parseUnits("100000")); + expect(user1Info.lockEndTime).to.deep.eq(BigNumber.from(currentTime + 3600 * 24 * 30)); + + expect(currentLockedBalance.amount).to.deep.eq(user1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(user1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Extend lock duration for locked account in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + const currentTime = (await time.latest()).toNumber(); + + await time.advanceBlockTo((await time.latestBlock()).toNumber() + 100); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + expect(prevUser1Info.lockEndTime).to.deep.eq(BigNumber.from(currentTime + 3600 * 24 * 30)); + + await CakePoolSC.connect(user1).deposit(0, 3600 * 24 * 30); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + expect(currentUser1Info.lockEndTime).to.deep.eq(BigNumber.from(currentTime + 3600 * 24 * 30 + 3600 * 24 * 30)); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Deposit more cake for locked account in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.advanceBlockTo((await time.latestBlock()).toNumber() + 100); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 0); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Deposit more cake and extend duration for locked account in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.advanceBlockTo((await time.latestBlock()).toNumber() + 100); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 60); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Lock again after expired in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.increase(3600 * 24 * 31); + + await CakePoolSC.connect(user1).deposit(0, 3600 * 24 * 30); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Unlock for locked account without overdue fee in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.increase(3600 * 24 * 31); + + await CakePoolSC.connect(user1).unlock(user1.address); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Unlock for locked account with overdue fee in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.increase(3600 * 24 * 40); + + await CakePoolSC.connect(user1).unlock(user1.address); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Withdraw part in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.increase(3600 * 24 * 40); + + await CakePoolSC.connect(user1).withdraw(prevUser1Info.shares.div(BigNumber.from(2))); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Withdraw all in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.increase(3600 * 24 * 40); + + await CakePoolSC.connect(user1).withdraw(prevUser1Info.shares); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Lock again after Withdraw part in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + let prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.increase(3600 * 24 * 32); + + await CakePoolSC.connect(user1).withdraw(prevUser1Info.shares.div(BigNumber.from(2))); + + prevUser1Info = await CakePoolSC.userInfo(user1.address); + + expect(prevUser1Info.shares.gt(ZERO)).to.deep.eq(true); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Lock again with overdue fee before DURATION_FACTOR_OVERDUE in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + let prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.increase(3600 * 24 * 60); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Lock again with overdue fee after DURATION_FACTOR_OVERDUE in CakePool", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + let prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.increase(3600 * 24 * (30 + 200)); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + }); + + describe("Check whether the formula for calculating the locked amount in the pool is correct when executing syncFromCakePool at any time", () => { + beforeEach(async function () {}); + + it("Lock for the first time in CakePool , executing syncFromCakePool after this", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + await VCakeTestSC.connect(user1).syncFromCakePool(); + + await time.advanceBlockTo((await time.latestBlock()).toNumber() + 100); + const user1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(ZERO); + expect(prevLockedBalance.end).to.deep.eq(ZERO); + + expect(currentLockedBalance.amount).to.deep.eq(user1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(user1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Extend lock duration for locked account in CakePool, executing syncFromCakePool after the first lock", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + await VCakeTestSC.connect(user1).syncFromCakePool(); + await time.advanceBlockTo((await time.latestBlock()).toNumber() + 100); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await CakePoolSC.connect(user1).deposit(0, 3600 * 24 * 30); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Deposit more cake for locked account in CakePool, executing syncFromCakePool after the first lock", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + await VCakeTestSC.connect(user1).syncFromCakePool(); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.advanceBlockTo((await time.latestBlock()).toNumber() + 100); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 0); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Deposit more cake and extend duration for locked account in CakePool, executing syncFromCakePool after the first lock", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + await VCakeTestSC.connect(user1).syncFromCakePool(); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.advanceBlockTo((await time.latestBlock()).toNumber() + 100); + + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 60); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Lock again after expired in CakePool,executing syncFromCakePool after expired", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.increase(3600 * 24 * 31); + + await VCakeTestSC.connect(user1).syncFromCakePool(); + + await CakePoolSC.connect(user1).deposit(0, 3600 * 24 * 30); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + + it("Unlock for locked account without overdue fee in CakePool, executing syncFromCakePool after expired", async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + const prevUser1Info = await CakePoolSC.userInfo(user1.address); + + await time.increase(3600 * 24 * 31); + + await VCakeTestSC.connect(user1).syncFromCakePool(); + + await CakePoolSC.connect(user1).unlock(user1.address); + + const currentUser1Info = await CakePoolSC.userInfo(user1.address); + + const prevLockedBalance = await VCakeTestSC.prevLocks(user1.address); + const currentLockedBalance = await VCakeTestSC.locks(user1.address); + + expect(prevLockedBalance.amount).to.deep.eq(prevUser1Info.lockedAmount); + expect(prevLockedBalance.end).to.deep.eq(prevUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + + expect(currentLockedBalance.amount).to.deep.eq(currentUser1Info.lockedAmount); + expect(currentLockedBalance.end).to.deep.eq(currentUser1Info.lockEndTime.div(WEEK).mul(WEEK)); + }); + }); +}); diff --git a/projects/revenue-sharing-pool/v1/test/artifactsFile/CakePool.json b/projects/revenue-sharing-pool/v1/test/artifactsFile/CakePool.json new file mode 100644 index 00000000..50a59266 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/artifactsFile/CakePool.json @@ -0,0 +1,1551 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CakePool", + "sourceName": "contracts/CakePool.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IMasterChefV2", + "name": "_masterchefV2", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastDepositedTime", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "free", + "type": "bool" + } + ], + "name": "FreeFeeUser", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Harvest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Init", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedDuration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockTimestamp", + "type": "uint256" + } + ], + "name": "Lock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "boostContract", + "type": "address" + } + ], + "name": "NewBoostContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "boostWeight", + "type": "uint256" + } + ], + "name": "NewBoostWeight", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "durationFactor", + "type": "uint256" + } + ], + "name": "NewDurationFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "durationFactorOverdue", + "type": "uint256" + } + ], + "name": "NewDurationFactorOverdue", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxLockDuration", + "type": "uint256" + } + ], + "name": "NewMaxLockDuration", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "NewOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "overdueFee", + "type": "uint256" + } + ], + "name": "NewOverdueFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "performanceFee", + "type": "uint256" + } + ], + "name": "NewPerformanceFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "performanceFeeContract", + "type": "uint256" + } + ], + "name": "NewPerformanceFeeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "treasury", + "type": "address" + } + ], + "name": "NewTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unlockFreeDuration", + "type": "uint256" + } + ], + "name": "NewUnlockFreeDuration", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "VCake", + "type": "address" + } + ], + "name": "NewVCakeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFee", + "type": "uint256" + } + ], + "name": "NewWithdrawFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFeeContract", + "type": "uint256" + } + ], + "name": "NewWithdrawFeeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFeePeriod", + "type": "uint256" + } + ], + "name": "NewWithdrawFeePeriod", + "type": "event" + }, + { + "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": [], + "name": "Pause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockTimestamp", + "type": "uint256" + } + ], + "name": "Unlock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Unpause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BOOST_WEIGHT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BOOST_WEIGHT_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION_FACTOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION_FACTOR_OVERDUE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK_DURATION_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_OVERDUE_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_PERFORMANCE_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_WITHDRAW_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_WITHDRAW_FEE_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_DEPOSIT_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_LOCK_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_WITHDRAW_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION_FACTOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION_FACTOR_SHARE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNLOCK_FREE_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VCake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "available", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "boostContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePoolPID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "calculateOverdueFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "calculatePerformanceFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "calculateTotalPendingCakeRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "calculateWithdrawFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockDuration", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freeOverdueFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freePerformanceFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freeWithdrawFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPricePerFullShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "inCaseTokensGetStuck", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "dummyToken", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "masterchefV2", + "outputs": [ + { + "internalType": "contract IMasterChefV2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "overdueFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "performanceFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "performanceFeeContract", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_boostContract", + "type": "address" + } + ], + "name": "setBoostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_boostWeight", + "type": "uint256" + } + ], + "name": "setBoostWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_durationFactor", + "type": "uint256" + } + ], + "name": "setDurationFactor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_durationFactorOverdue", + "type": "uint256" + } + ], + "name": "setDurationFactorOverdue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setFreePerformanceFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxLockDuration", + "type": "uint256" + } + ], + "name": "setMaxLockDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_overdueFee", + "type": "uint256" + } + ], + "name": "setOverdueFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setOverdueFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_performanceFee", + "type": "uint256" + } + ], + "name": "setPerformanceFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_performanceFeeContract", + "type": "uint256" + } + ], + "name": "setPerformanceFeeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasury", + "type": "address" + } + ], + "name": "setTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_unlockFreeDuration", + "type": "uint256" + } + ], + "name": "setUnlockFreeDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_VCake", + "type": "address" + } + ], + "name": "setVCakeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFee", + "type": "uint256" + } + ], + "name": "setWithdrawFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFeeContract", + "type": "uint256" + } + ], + "name": "setWithdrawFeeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFeePeriod", + "type": "uint256" + } + ], + "name": "setWithdrawFeePeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setWithdrawFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalBoostDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalLockedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "unlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastDepositedTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cakeAtLastUserAction", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUserActionTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockStartTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockEndTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "locked", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "lockedAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawByAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFeeContract", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFeePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60c060405262093a80600e556301e13380600f556301e1338060105562ed4e0060115564e8d4a5100060125560c860135560c8601455600a601555600a60165564e8d4a510006017556203f4806018553480156200005c57600080fd5b5060405162003e5838038062003e588339810160408190526200007f9162000152565b6200008a33620000e9565b6000805460ff60a01b191690556001600160a01b0395861660805293851660a052600880549386166001600160a01b03199485161790556009805492861692841692909217909155600a805491909416911617909155600b55620001da565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200014f57600080fd5b50565b60008060008060008060c087890312156200016c57600080fd5b8651620001798162000139565b60208801519096506200018c8162000139565b60408801519095506200019f8162000139565b6060880151909450620001b28162000139565b6080880151909350620001c58162000139565b8092505060a087015190509295509295509295565b60805160a051613bf6620002626000396000818161082e01528181610bd301528181610c710152818161146c0152818161304801526130f10152600081816109360152818161128c0152818161164b01528181611f46015281816126ae015281816126f3015281816129fd01528181612aad0152818161331501526134fe0152613bf66000f3fe608060405234801561001057600080fd5b50600436106104145760003560e01c80638778878211610221578063cb528b521161012b578063e464c623116100c3578063f2fde38b11610087578063f2fde38b146108f8578063f786b9581461090b578063f851a4401461091e578063fc0c546a14610931578063fd253b641461095857600080fd5b8063e464c623146108c1578063e4b37ef5146108ca578063e73008bc146108d3578063e941fa78146108dc578063f0f44260146108e557600080fd5b8063cb528b5214610829578063ccd34cd514610758578063d4b0de2f14610850578063d826ed0614610859578063def68a9c1461086c578063def7869d1461087f578063df10b4e614610892578063dfcedeee1461089b578063e2bbb158146108ae57600080fd5b8063acaf88cd116101b9578063bc75f4b81161017d578063bc75f4b8146107de578063bdca9165146107e7578063beba0fa0146107f0578063c54d349c14610803578063c6ed51be1461081657600080fd5b8063acaf88cd1461079c578063b3ab15fb146107a5578063b685784414610521578063b6ac642a146107b8578063bb9f408d146107cb57600080fd5b8063877887821461071157806387d4bda91461071a5780638da5cb5b1461073d57806393c99e6a14610745578063948a03f21461075857806395dc14e114610764578063a3639b3914610777578063a5834e061461078a578063aaada5da1461079357600080fd5b806348a0d754116103225780636d4710b9116102ba578063731ff24a1161027e578063731ff24a146106e657806377c7b8fc146106f957806378b4330f146105545780638456cb5914610701578063853828b61461070957600080fd5b80636d4710b9146106a7578063704b6c02146106b057806370897b23146106c3578063715018a6146106d6578063722713f7146106de57600080fd5b806348a0d754146106175780634e4de1e91461061f5780634f1bfc9e146106325780635521e9bf1461063b578063570ca7351461064e57806358ebceb6146106615780635c975abb1461066957806361d027b314610671578063668679ba1461068457600080fd5b80632cfc5f01116103b05780633a98ef39116103745780633a98ef39146105b75780633eb78874146105c05780633f4ba83a146105c95780633fec4e32146105d1578063423b93ed1461060457600080fd5b80632cfc5f01146105545780632d19b9821461055e5780632e1a7d4d1461057e5780632f6c493c1461059157806335981921146105a457600080fd5b806301e813261461041957806305a9f274146104375780630c59696b1461044057806314ff3039146104555780631959a0021461046857806319ab453c1461050e5780631ea30fef146105215780631efac1b81461052e57806329a5cfd614610541575b600080fd5b6104246305265c0081565b6040519081526020015b60405180910390f35b610424600d5481565b61045361044e3660046137ed565b610965565b005b6104536104633660046137ed565b610a40565b6104c861047636600461381b565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460068601546007870154600890970154959794969495939492939192909160ff9091169089565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200161042e565b61045361051c36600461381b565b610ac1565b6104246509184e72a00081565b61045361053c3660046137ed565b610d02565b61042461054f366004613838565b610dda565b61042462093a8081565b600254610571906001600160a01b031681565b60405161042e9190613864565b61045361058c3660046137ed565b610f15565b61045361059f36600461381b565b610f8e565b6104536105b23660046137ed565b6110a1565b61042460075481565b61042460145481565b61045361115f565b6105f46105df36600461381b565b60046020526000908152604090205460ff1681565b604051901515815260200161042e565b610453610612366004613886565b6111e0565b610424611272565b61045361062d366004613886565b611307565b610424600f5481565b6104536106493660046137ed565b611399565b600a54610571906001600160a01b031681565b61042461143f565b6105f46114d7565b600954610571906001600160a01b031681565b6105f461069236600461381b565b60066020526000908152604090205460ff1681565b610424600b5481565b6104536106be36600461381b565b6114e7565b6104536106d13660046137ed565b611588565b610453611609565b610424611644565b6104246b204fce5e3e2502611000000081565b6104246116e0565b610453611732565b6104536117b4565b61042460135481565b6105f461072836600461381b565b60056020526000908152604090205460ff1681565b6105716117cd565b6104536107533660046137ed565b6117dc565b61042464e8d4a5100081565b61042461077236600461381b565b6118ad565b6104536107853660046137ed565b611a00565b61042460175481565b610424600e5481565b61042460115481565b6104536107b336600461381b565b611aaf565b6104536107c63660046137ed565b611b50565b6104536107d93660046137ed565b611bd1565b61042460125481565b6104246107d081565b6104536107fe366004613886565b611c52565b6104536108113660046137ed565b611ce4565b61042461082436600461381b565b611d9f565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b6104246101f481565b61045361086736600461381b565b611e7e565b61045361087a36600461381b565b611f1a565b61045361088d36600461381b565b61205e565b61042460185481565b600154610571906001600160a01b031681565b6104536108bc3660046138bf565b6120fa565b61042460105481565b61042460165481565b610424600c5481565b61042460155481565b6104536108f336600461381b565b61217a565b61045361090636600461381b565b61221b565b6104536109193660046137ed565b6122b8565b600854610571906001600160a01b031681565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b610424652d79883d200081565b6008546001600160a01b031633146109985760405162461bcd60e51b815260040161098f906138e1565b60405180910390fd5b64e8d4a51000811115610a045760405162461bcd60e51b815260206004820152602e60248201527f6f7665726475654665652063616e6e6f74206265206d6f7265207468616e204d60448201526d41585f4f5645524455455f46454560901b606482015260840161098f565b60178190556040518181527ff4bd1c5978320077e792afbb3911e8cab1325ce28a6b3e67f9067a1d80692961906020015b60405180910390a150565b6008546001600160a01b03163314610a6a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115610a8c5760405162461bcd60e51b815260040161098f90613906565b60168190556040518181527fcab352e118188b8a2f20a2e8c4ce1241ce2c1740aac4f17c5b0831e65824d8ef90602001610a35565b33610aca6117cd565b6001600160a01b031614610af05760405162461bcd60e51b815260040161098f90613956565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610b1f903390600401613864565b602060405180830381865afa158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b60919061398b565b905080610ba75760405162461bcd60e51b8152602060048201526015602482015274042616c616e6365206d75737420657863656564203605c1b604482015260640161098f565b610bbc6001600160a01b038316333084612391565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820183905283169063095ea7b3906044016020604051808303816000875af1158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f91906139a4565b50600b54604051631c57762b60e31b81526004810191909152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b50506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc14925060009150a15050565b6008546001600160a01b03163314610d2c5760405162461bcd60e51b815260040161098f906138e1565b62093a80811115610da55760405162461bcd60e51b815260206004820152603d60248201527f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560448201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000606482015260840161098f565b60188190556040518181527fb89ddaddb7435be26824cb48d2d0186c9525a2e1ec057abcb502704cdc0686cc90602001610a35565b6001600160a01b03821660009081526003602052604081208054831115610e0057805492505b3360009081526005602052604090205460ff16158015610e3057506018548160010154610e2d91906139d7565b42105b15610f09576000610e3f61143f565b610e47611644565b610e5191906139d7565b8254909150600090610e6864e8d4a51000876139ef565b610e729190613a0e565b90506000610e7f87612402565b60068501546007548654610e9390876139ef565b610e9d9190613a0e565b610ea79190613a30565b610eb19190613a30565b9050600064e8d4a51000610ec584846139ef565b610ecf9190613a0e565b601554909150333b15610ee157506016545b6000612710610ef083856139ef565b610efa9190613a0e565b9750610f0f9650505050505050565b60009150505b92915050565b610f1d6114d7565b15610f3a5760405162461bcd60e51b815260040161098f90613a47565b60008111610f805760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161098f565b610f8b816000612420565b50565b80336001600160a01b0382161480610fb05750600a546001600160a01b031633145b610ffc5760405162461bcd60e51b815260206004820152601a60248201527f4e6f74206f70657261746f72206f722063616b65206f776e6572000000000000604482015260640161098f565b6110046114d7565b156110215760405162461bcd60e51b815260040161098f90613a47565b6001600160a01b0382166000908152600360205260409020600781015460ff1680156110505750428160050154105b6110905760405162461bcd60e51b815260206004820152601160248201527010d85b9b9bdd081d5b9b1bd8dac81e595d607a1b604482015260640161098f565b61109c600080856127a6565b505050565b6008546001600160a01b031633146110cb5760405162461bcd60e51b815260040161098f906138e1565b6000811161112a5760405162461bcd60e51b815260206004820152602660248201527f4455524154494f4e5f464143544f525f4f5645524455452063616e6e6f74206260448201526565207a65726f60d01b606482015260840161098f565b60118190556040518181527f18b6d179114082d7eda9837e15a39eb30032d5f3df00487a67541398f48fabfe90602001610a35565b6008546001600160a01b031633146111895760405162461bcd60e51b815260040161098f906138e1565b6111916114d7565b6111ad5760405162461bcd60e51b815260040161098f90613a71565b6111b5612e08565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6008546001600160a01b0316331461120a5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166112305760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260046020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906112c1903090600401613864565b602060405180830381865afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611302919061398b565b905090565b6008546001600160a01b031633146113315760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166113575760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260066020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6113a16114d7565b156113be5760405162461bcd60e51b815260040161098f90613a47565b6509184e72a00081116114345760405162461bcd60e51b815260206004820152603860248201527f576974686472617720616d6f756e74206d7573742062652067726561746572206044820152771d1a185b8813525397d5d2551211149055d7d05353d5539560421b606482015260840161098f565b610f8b600082612420565b600b54604051631175a1dd60e01b8152600481019190915230602482015260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631175a1dd90604401602060405180830381865afa1580156114b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f919061398b565b600054600160a01b900460ff1690565b336114f06117cd565b6001600160a01b0316146115165760405162461bcd60e51b815260040161098f90613956565b6001600160a01b03811661153c5760405162461bcd60e51b815260040161098f90613a9f565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91610a3591613864565b6008546001600160a01b031633146115b25760405162461bcd60e51b815260040161098f906138e1565b6107d08111156115d45760405162461bcd60e51b815260040161098f90613acf565b60138190556040518181527fefeafcf03e479a9566d7ef321b4816de0ba19cfa3cd0fae2f8c5f4a0afb342c490602001610a35565b336116126117cd565b6001600160a01b0316146116385760405162461bcd60e51b815260040161098f90613956565b6116426000612e73565b565b6000600c547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016116959190613864565b602060405180830381865afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d6919061398b565b61130291906139d7565b6000600754600014611725576007546116f761143f565b6116ff611644565b61170991906139d7565b61171b90670de0b6b3a76400006139ef565b6113029190613a0e565b50670de0b6b3a764000090565b6008546001600160a01b0316331461175c5760405162461bcd60e51b815260040161098f906138e1565b6117646114d7565b156117815760405162461bcd60e51b815260040161098f90613a47565b611789612ec3565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b3360009081526003602052604090205461164290610f15565b6000546001600160a01b031690565b6008546001600160a01b031633146118065760405162461bcd60e51b815260040161098f906138e1565b652d79883d20008111156118785760405162461bcd60e51b815260206004820152603360248201527f424f4f53545f5745494748542063616e6e6f74206265206d6f7265207468616e604482015272081093d3d4d517d5d15251d21517d312535255606a1b606482015260840161098f565b60128190556040518181527f7666dfff8c3377938e522b4eed3aff079973a976f95969db60a406d49f40da4e90602001610a35565b6001600160a01b03811660009081526003602052604081208054158015906118d95750600781015460ff165b80156118fe57506001600160a01b03831660009081526006602052604090205460ff16155b801561191a575042600e54826005015461191891906139d7565b105b156119f757600061192961143f565b611931611644565b61193b91906139d7565b6006830154600754845492935060009261195590856139ef565b61195f9190613a0e565b6119699190613a30565b9050600083600801548261197d9190613a30565b90506000600e548560050154426119949190613a30565b61199e9190613a30565b90506011548111156119af57506011545b6000601154601754836119c291906139ef565b6119cc9190613a0e565b9050600064e8d4a510006119e083866139ef565b6119ea9190613a0e565b9998505050505050505050565b50600092915050565b6008546001600160a01b03163314611a2a5760405162461bcd60e51b815260040161098f906138e1565b60008111611a7a5760405162461bcd60e51b815260206004820152601e60248201527f4455524154494f4e5f464143544f522063616e6e6f74206265207a65726f0000604482015260640161098f565b60108190556040518181527f9478eb023aac0a7d58a4e935377056bf27cf5b72a2300725f831817a8f62fbde90602001610a35565b33611ab86117cd565b6001600160a01b031614611ade5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b038116611b045760405162461bcd60e51b815260040161098f90613a9f565b600a80546001600160a01b0319166001600160a01b0383169081179091556040517fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a91610a3591613864565b6008546001600160a01b03163314611b7a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115611b9c5760405162461bcd60e51b815260040161098f90613906565b60158190556040518181527fd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d90602001610a35565b6008546001600160a01b03163314611bfb5760405162461bcd60e51b815260040161098f906138e1565b6107d0811115611c1d5760405162461bcd60e51b815260040161098f90613acf565b60148190556040518181527fc5d25457b67b87678c987375af13f6e50beb3ad7bfd009da26766ae986eaa20d90602001610a35565b6008546001600160a01b03163314611c7c5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038216611ca25760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260056020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6008546001600160a01b03163314611d0e5760405162461bcd60e51b815260040161098f906138e1565b60008111611d6a5760405162461bcd60e51b815260206004820152602360248201527f554e4c4f434b5f465245455f4455524154494f4e2063616e6e6f74206265207a60448201526265726f60e81b606482015260840161098f565b600e8190556040518181527ff84bf2b901cfc02956d4e69556d7448cef4ea13587e7714dba7c6d697091e7ad90602001610a35565b6001600160a01b0381166000908152600360205260408120805415801590611dcc5750600781015460ff16155b8015611df157506001600160a01b03831660009081526004602052604090205460ff16155b156119f7576000611e0061143f565b611e08611644565b611e1291906139d7565b90506000600754828460000154611e2991906139ef565b611e339190613a0e565b90506000836002015482611e479190613a30565b601354909150863b15611e5957506014545b6000612710611e6883856139ef565b611e729190613a0e565b98975050505050505050565b6008546001600160a01b03163314611ea85760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038116611ece5760405162461bcd60e51b815260040161098f90613a9f565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5352e27b0414343d9438a1c6e9d04c65c7cb4d91f44920afee588f91717893f191610a3591613864565b6008546001600160a01b03163314611f445760405162461bcd60e51b815260040161098f906138e1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611fd45760405162461bcd60e51b815260206004820152602560248201527f546f6b656e2063616e6e6f742062652073616d65206173206465706f736974206044820152643a37b5b2b760d91b606482015260840161098f565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190612003903090600401613864565b602060405180830381865afa158015612020573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612044919061398b565b905061205a6001600160a01b0383163383612f23565b5050565b6008546001600160a01b031633146120885760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0381166120ae5760405162461bcd60e51b815260040161098f90613a9f565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f8f49a182922022d9119a1a6aeeca151b4a5665e86bd61c1ff32e152d459558b291610a3591613864565b6121026114d7565b1561211f5760405162461bcd60e51b815260040161098f90613a47565b600082118061212e5750600081115b61216f5760405162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015260640161098f565b61205a8282336127a6565b336121836117cd565b6001600160a01b0316146121a95760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166121cf5760405162461bcd60e51b815260040161098f90613a9f565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea08691610a3591613864565b336122246117cd565b6001600160a01b03161461224a5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166122af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161098f565b610f8b81612e73565b6008546001600160a01b031633146122e25760405162461bcd60e51b815260040161098f906138e1565b6305265c0081111561235c5760405162461bcd60e51b815260206004820152603d60248201527f4d41585f4c4f434b5f4455524154494f4e2063616e6e6f74206265206d6f726560448201527f207468616e204d41585f4c4f434b5f4455524154494f4e5f4c494d4954000000606482015260840161098f565b600f8190556040518181527fcab2f3455b51b6ca5377e84fccd0f890b6f6ca36c02e18b6d36cb34f469fe4fe90602001610a35565b6040516001600160a01b03808516602483015283166044820152606481018290526123fc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f53565b50505050565b600061240d826118ad565b61241683611d9f565b610f0f91906139d7565b33600090815260036020526040902080548311156124805760405162461bcd60e51b815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015260640161098f565b428160050154106124c35760405162461bcd60e51b815260206004820152600d60248201526c5374696c6c20696e206c6f636b60981b604482015260640161098f565b6002546001600160a01b031615612537576002546040516351cff8d960e01b81526001600160a01b03909116906351cff8d990612504903390600401613864565b600060405180830381600087803b15801561251e57600080fd5b505af1158015612532573d6000803e3d6000fd5b505050505b805483906000906125546b204fce5e3e25026110000000846139ef565b61255e9190613a0e565b9050612568613025565b612571336131a3565b8415801561257f5750600084115b156125c057600061258e611644565b9050806007548661259f91906139ef565b6125a99190613a0e565b84549093508311156125ba57835492505b506125e7565b82546b204fce5e3e25026110000000906125da90836139ef565b6125e49190613a0e565b91505b6000600754836125f5611644565b6125ff91906139ef565b6126099190613a0e565b90508284600001600082825461261f9190613a30565b9250508190555082600760008282546126389190613a30565b90915550503360009081526005602052604090205460ff1615801561266d5750601854846001015461266a91906139d7565b42105b156126e657601554333b1561268157506016545b600061271061269083856139ef565b61269a9190613a0e565b6009549091506126d7906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6126e18184613a30565b925050505b61271a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612f23565b83541561274c5760075461272c611644565b855461273891906139ef565b6127429190613a0e565b6002850155612754565b600060028501555b4260038501556127633361359e565b604080518281526020810185905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a2505050505050565b6001600160a01b0381166000908152600360205260409020805415806127cc5750600084115b15612845576509184e72a00084116128455760405162461bcd60e51b815260206004820152603660248201527f4465706f73697420616d6f756e74206d757374206265206772656174657220746044820152751a185b8813525397d1115413d4d25517d05353d5539560521b606482015260840161098f565b6005810154839042116128a3578415612882574260048301556008820154600d8054600090612875908490613a30565b9091555050600060088301555b816004015482600501546128969190613a30565b6128a090826139d7565b90505b8315806128b3575062093a808110155b6128ff5760405162461bcd60e51b815260206004820152601f60248201527f4d696e696d756d206c6f636b20706572696f64206973206f6e65207765656b00604482015260640161098f565b600f548111156129515760405162461bcd60e51b815260206004820152601c60248201527f4d6178696d756d206c6f636b20706572696f6420657863656564656400000000604482015260640161098f565b6002546001600160a01b0316156129d057600254604051630efe6a8b60e01b81526001600160a01b038581166004830152602482018890526044820187905290911690630efe6a8b90606401600060405180830381600087803b1580156129b757600080fd5b505af11580156129cb573d6000803e3d6000fd5b505050505b6129d8613025565b600754612a285760006129e9611272565b600954909150612a26906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b505b612a31836131a3565b8315612a8a574282600501541015612a60574260048301819055612a569085906139d7565b6005830155612a7a565b83826005016000828254612a7491906139d7565b90915550505b60078201805460ff191660011790555b600080600080612a98611644565b90508815612ad957612ad56001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001688308c612391565b8892505b855415801590612aed5750600786015460ff165b15612b66576007548654612b0190836139ef565b612b0b9190613a0e565b9150612b1782846139d7565b9250856000015460076000828254612b2f9190613a30565b9091555050600086556004860154421415612b665760088601829055600d8054839190600090612b609084906139d7565b90915550505b60075415612b9657612b788282613a30565b600754612b8590856139ef565b612b8f9190613a0e565b9350612b9a565b8293505b856004015486600501541115612d1b57600060105460125488600401548960050154612bc69190613a30565b612bd091906139ef565b612bda9190613a0e565b9050600064e8d4a51000612bee87846139ef565b612bf89190613a0e565b9050612c0481876139d7565b955085886000016000828254612c1a91906139d7565b909155506000905064e8d4a51000612c3287856139ef565b612c3c9190613a0e565b905080896006016000828254612c5291906139d7565b9250508190555080600c6000828254612c6b91906139d7565b925050819055508b896008016000828254612c8691906139d7565b925050819055508b600d6000828254612c9f91906139d7565b92505081905550896001600160a01b03167f2b943276e5d747f6f7dd46d3b880d8874cb8d6b9b88ca1903990a2738e7dc7a18a600801548b600001548c600401548d60050154612cef9190613a30565b6040805193845260208401929092529082015242606082015260800160405180910390a2505050612d35565b83866000016000828254612d2f91906139d7565b90915550505b6000891180612d445750600088115b15612d50574260018701555b8360076000828254612d6291906139d7565b90915550506006860154600754612d77611644565b8854612d8391906139ef565b612d8d9190613a0e565b612d979190613a30565b6002870155426003870155612dab8761359e565b604080518a8152602081018690529081018990524260608201526001600160a01b038816907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060800160405180910390a2505050505050505050565b612e106114d7565b612e2c5760405162461bcd60e51b815260040161098f90613a71565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051612e699190613864565b60405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612ecb6114d7565b15612ee85760405162461bcd60e51b815260040161098f90613a47565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e5c3390565b6040516001600160a01b03831660248201526044810182905261109c90849063a9059cbb60e01b906064016123c5565b6000612fa8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661366a9092919063ffffffff16565b80519091501561109c5780806020019051810190612fc691906139a4565b61109c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161098f565b600b54604051631175a1dd60e01b815260048101919091523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631175a1dd90604401602060405180830381865afa158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb919061398b565b90508015610f8b5760006130cd611272565b600b54604051630441a3e760e41b81526004810191909152600060248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b15801561313d57600080fd5b505af1158015613151573d6000803e3d6000fd5b50505050600061315f611272565b9050337fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba61318d8484613a30565b60405190815260200160405180910390a2505050565b6001600160a01b038116600090815260036020526040902080541561205a57600781015460ff1615613446576000816006015460075483600001546131e6611644565b6131f091906139ef565b6131fa9190613a0e565b6132049190613a30565b90508160060154600c600082825461321c9190613a30565b90915550506000600683018190558254600780549192909161323f908490613a30565b90915550506001600160a01b03831660009081526006602052604090205460ff1615801561327d575042600e54836005015461327b91906139d7565b105b1561334f5760008260080154826132949190613a30565b90506000600e548460050154426132ab9190613a30565b6132b59190613a30565b90506011548111156132c657506011545b6000601154601754836132d991906139ef565b6132e39190613a0e565b9050600064e8d4a510006132f783866139ef565b6133019190613a0e565b60095490915061333e906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6133488186613a30565b9450505050505b6000613359611644565b9050600060075460001461338f576133718383613a30565b60075461337e90856139ef565b6133889190613a0e565b9050613392565b50815b808455600780548291906000906133aa9084906139d7565b9091555050600584015442111561343f5760078401805460ff19169055600060048501819055600585018190556008850154600d8054919290916133ef908490613a30565b909155505060006008850155604080518481524260208201526001600160a01b038716917ff7870c5b224cbc19873599e46ccfc7103934650509b1af0c3ce90138377c2004910160405180910390a25b5050505050565b6001600160a01b03821660009081526004602052604090205460ff1661205a576000600754613473611644565b835461347f91906139ef565b6134899190613a0e565b90508160000154600760008282546134a19190613a30565b9091555050600080835560028301546134ba9083613a30565b601354909150843b156134cc57506014545b60006127106134db83856139ef565b6134e59190613a0e565b9050801561353457600954613527906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6135318185613a30565b93505b600061353e611644565b90506000600754600014613574576135568683613a30565b60075461356390886139ef565b61356d9190613a0e565b9050613577565b50845b8087556007805482919060009061358f9084906139d7565b90915550505050505050505050565b6001546001600160a01b031615610f8b576001600160a01b0381166000908152600360205260408120600481015460058201549192916135de9190613a30565b6001546008840154600d5460105460405163e874fdaf60e01b81526001600160a01b03898116600483015260248201949094526044810186905260648101929092526084820152929350169063e874fdaf9060a401600060405180830381600087803b15801561364d57600080fd5b505af1158015613661573d6000803e3d6000fd5b50505050505050565b60606136798484600085613683565b90505b9392505050565b6060824710156136e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161098f565b6001600160a01b0385163b61373b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161098f565b600080866001600160a01b031685876040516137579190613b51565b60006040518083038185875af1925050503d8060008114613794576040519150601f19603f3d011682016040523d82523d6000602084013e613799565b606091505b50915091506137a98282866137b4565b979650505050505050565b606083156137c357508161367c565b8251156137d35782518084602001fd5b8160405162461bcd60e51b815260040161098f9190613b6d565b6000602082840312156137ff57600080fd5b5035919050565b6001600160a01b0381168114610f8b57600080fd5b60006020828403121561382d57600080fd5b813561367c81613806565b6000806040838503121561384b57600080fd5b823561385681613806565b946020939093013593505050565b6001600160a01b0391909116815260200190565b8015158114610f8b57600080fd5b6000806040838503121561389957600080fd5b82356138a481613806565b915060208301356138b481613878565b809150509250929050565b600080604083850312156138d257600080fd5b50508035926020909101359150565b6020808252600b908201526a61646d696e3a207775743f60a81b604082015260600190565b60208082526030908201527f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060408201526f4d41585f57495448445241575f46454560801b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561399d57600080fd5b5051919050565b6000602082840312156139b657600080fd5b815161367c81613878565b634e487b7160e01b600052601160045260246000fd5b600082198211156139ea576139ea6139c1565b500190565b6000816000190483118215151615613a0957613a096139c1565b500290565b600082613a2b57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613a4257613a426139c1565b500390565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526016908201527543616e6e6f74206265207a65726f206164647265737360501b604082015260600190565b60208082526036908201527f706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468604082015275616e204d41585f504552464f524d414e43455f46454560501b606082015260800190565b60005b83811015613b40578181015183820152602001613b28565b838111156123fc5750506000910152565b60008251613b63818460208701613b25565b9190910192915050565b6020815260008251806020840152613b8c816040850160208701613b25565b601f01601f1916919091016040019291505056fe3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d44a26469706673582212208fac60e48eb35e29f7a743c638638371e8b2fc9dffb4ce7b25ae133d7651c44a64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106104145760003560e01c80638778878211610221578063cb528b521161012b578063e464c623116100c3578063f2fde38b11610087578063f2fde38b146108f8578063f786b9581461090b578063f851a4401461091e578063fc0c546a14610931578063fd253b641461095857600080fd5b8063e464c623146108c1578063e4b37ef5146108ca578063e73008bc146108d3578063e941fa78146108dc578063f0f44260146108e557600080fd5b8063cb528b5214610829578063ccd34cd514610758578063d4b0de2f14610850578063d826ed0614610859578063def68a9c1461086c578063def7869d1461087f578063df10b4e614610892578063dfcedeee1461089b578063e2bbb158146108ae57600080fd5b8063acaf88cd116101b9578063bc75f4b81161017d578063bc75f4b8146107de578063bdca9165146107e7578063beba0fa0146107f0578063c54d349c14610803578063c6ed51be1461081657600080fd5b8063acaf88cd1461079c578063b3ab15fb146107a5578063b685784414610521578063b6ac642a146107b8578063bb9f408d146107cb57600080fd5b8063877887821461071157806387d4bda91461071a5780638da5cb5b1461073d57806393c99e6a14610745578063948a03f21461075857806395dc14e114610764578063a3639b3914610777578063a5834e061461078a578063aaada5da1461079357600080fd5b806348a0d754116103225780636d4710b9116102ba578063731ff24a1161027e578063731ff24a146106e657806377c7b8fc146106f957806378b4330f146105545780638456cb5914610701578063853828b61461070957600080fd5b80636d4710b9146106a7578063704b6c02146106b057806370897b23146106c3578063715018a6146106d6578063722713f7146106de57600080fd5b806348a0d754146106175780634e4de1e91461061f5780634f1bfc9e146106325780635521e9bf1461063b578063570ca7351461064e57806358ebceb6146106615780635c975abb1461066957806361d027b314610671578063668679ba1461068457600080fd5b80632cfc5f01116103b05780633a98ef39116103745780633a98ef39146105b75780633eb78874146105c05780633f4ba83a146105c95780633fec4e32146105d1578063423b93ed1461060457600080fd5b80632cfc5f01146105545780632d19b9821461055e5780632e1a7d4d1461057e5780632f6c493c1461059157806335981921146105a457600080fd5b806301e813261461041957806305a9f274146104375780630c59696b1461044057806314ff3039146104555780631959a0021461046857806319ab453c1461050e5780631ea30fef146105215780631efac1b81461052e57806329a5cfd614610541575b600080fd5b6104246305265c0081565b6040519081526020015b60405180910390f35b610424600d5481565b61045361044e3660046137ed565b610965565b005b6104536104633660046137ed565b610a40565b6104c861047636600461381b565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460068601546007870154600890970154959794969495939492939192909160ff9091169089565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200161042e565b61045361051c36600461381b565b610ac1565b6104246509184e72a00081565b61045361053c3660046137ed565b610d02565b61042461054f366004613838565b610dda565b61042462093a8081565b600254610571906001600160a01b031681565b60405161042e9190613864565b61045361058c3660046137ed565b610f15565b61045361059f36600461381b565b610f8e565b6104536105b23660046137ed565b6110a1565b61042460075481565b61042460145481565b61045361115f565b6105f46105df36600461381b565b60046020526000908152604090205460ff1681565b604051901515815260200161042e565b610453610612366004613886565b6111e0565b610424611272565b61045361062d366004613886565b611307565b610424600f5481565b6104536106493660046137ed565b611399565b600a54610571906001600160a01b031681565b61042461143f565b6105f46114d7565b600954610571906001600160a01b031681565b6105f461069236600461381b565b60066020526000908152604090205460ff1681565b610424600b5481565b6104536106be36600461381b565b6114e7565b6104536106d13660046137ed565b611588565b610453611609565b610424611644565b6104246b204fce5e3e2502611000000081565b6104246116e0565b610453611732565b6104536117b4565b61042460135481565b6105f461072836600461381b565b60056020526000908152604090205460ff1681565b6105716117cd565b6104536107533660046137ed565b6117dc565b61042464e8d4a5100081565b61042461077236600461381b565b6118ad565b6104536107853660046137ed565b611a00565b61042460175481565b610424600e5481565b61042460115481565b6104536107b336600461381b565b611aaf565b6104536107c63660046137ed565b611b50565b6104536107d93660046137ed565b611bd1565b61042460125481565b6104246107d081565b6104536107fe366004613886565b611c52565b6104536108113660046137ed565b611ce4565b61042461082436600461381b565b611d9f565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b6104246101f481565b61045361086736600461381b565b611e7e565b61045361087a36600461381b565b611f1a565b61045361088d36600461381b565b61205e565b61042460185481565b600154610571906001600160a01b031681565b6104536108bc3660046138bf565b6120fa565b61042460105481565b61042460165481565b610424600c5481565b61042460155481565b6104536108f336600461381b565b61217a565b61045361090636600461381b565b61221b565b6104536109193660046137ed565b6122b8565b600854610571906001600160a01b031681565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b610424652d79883d200081565b6008546001600160a01b031633146109985760405162461bcd60e51b815260040161098f906138e1565b60405180910390fd5b64e8d4a51000811115610a045760405162461bcd60e51b815260206004820152602e60248201527f6f7665726475654665652063616e6e6f74206265206d6f7265207468616e204d60448201526d41585f4f5645524455455f46454560901b606482015260840161098f565b60178190556040518181527ff4bd1c5978320077e792afbb3911e8cab1325ce28a6b3e67f9067a1d80692961906020015b60405180910390a150565b6008546001600160a01b03163314610a6a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115610a8c5760405162461bcd60e51b815260040161098f90613906565b60168190556040518181527fcab352e118188b8a2f20a2e8c4ce1241ce2c1740aac4f17c5b0831e65824d8ef90602001610a35565b33610aca6117cd565b6001600160a01b031614610af05760405162461bcd60e51b815260040161098f90613956565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610b1f903390600401613864565b602060405180830381865afa158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b60919061398b565b905080610ba75760405162461bcd60e51b8152602060048201526015602482015274042616c616e6365206d75737420657863656564203605c1b604482015260640161098f565b610bbc6001600160a01b038316333084612391565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820183905283169063095ea7b3906044016020604051808303816000875af1158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f91906139a4565b50600b54604051631c57762b60e31b81526004810191909152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b50506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc14925060009150a15050565b6008546001600160a01b03163314610d2c5760405162461bcd60e51b815260040161098f906138e1565b62093a80811115610da55760405162461bcd60e51b815260206004820152603d60248201527f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560448201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000606482015260840161098f565b60188190556040518181527fb89ddaddb7435be26824cb48d2d0186c9525a2e1ec057abcb502704cdc0686cc90602001610a35565b6001600160a01b03821660009081526003602052604081208054831115610e0057805492505b3360009081526005602052604090205460ff16158015610e3057506018548160010154610e2d91906139d7565b42105b15610f09576000610e3f61143f565b610e47611644565b610e5191906139d7565b8254909150600090610e6864e8d4a51000876139ef565b610e729190613a0e565b90506000610e7f87612402565b60068501546007548654610e9390876139ef565b610e9d9190613a0e565b610ea79190613a30565b610eb19190613a30565b9050600064e8d4a51000610ec584846139ef565b610ecf9190613a0e565b601554909150333b15610ee157506016545b6000612710610ef083856139ef565b610efa9190613a0e565b9750610f0f9650505050505050565b60009150505b92915050565b610f1d6114d7565b15610f3a5760405162461bcd60e51b815260040161098f90613a47565b60008111610f805760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161098f565b610f8b816000612420565b50565b80336001600160a01b0382161480610fb05750600a546001600160a01b031633145b610ffc5760405162461bcd60e51b815260206004820152601a60248201527f4e6f74206f70657261746f72206f722063616b65206f776e6572000000000000604482015260640161098f565b6110046114d7565b156110215760405162461bcd60e51b815260040161098f90613a47565b6001600160a01b0382166000908152600360205260409020600781015460ff1680156110505750428160050154105b6110905760405162461bcd60e51b815260206004820152601160248201527010d85b9b9bdd081d5b9b1bd8dac81e595d607a1b604482015260640161098f565b61109c600080856127a6565b505050565b6008546001600160a01b031633146110cb5760405162461bcd60e51b815260040161098f906138e1565b6000811161112a5760405162461bcd60e51b815260206004820152602660248201527f4455524154494f4e5f464143544f525f4f5645524455452063616e6e6f74206260448201526565207a65726f60d01b606482015260840161098f565b60118190556040518181527f18b6d179114082d7eda9837e15a39eb30032d5f3df00487a67541398f48fabfe90602001610a35565b6008546001600160a01b031633146111895760405162461bcd60e51b815260040161098f906138e1565b6111916114d7565b6111ad5760405162461bcd60e51b815260040161098f90613a71565b6111b5612e08565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6008546001600160a01b0316331461120a5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166112305760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260046020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906112c1903090600401613864565b602060405180830381865afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611302919061398b565b905090565b6008546001600160a01b031633146113315760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166113575760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260066020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6113a16114d7565b156113be5760405162461bcd60e51b815260040161098f90613a47565b6509184e72a00081116114345760405162461bcd60e51b815260206004820152603860248201527f576974686472617720616d6f756e74206d7573742062652067726561746572206044820152771d1a185b8813525397d5d2551211149055d7d05353d5539560421b606482015260840161098f565b610f8b600082612420565b600b54604051631175a1dd60e01b8152600481019190915230602482015260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631175a1dd90604401602060405180830381865afa1580156114b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f919061398b565b600054600160a01b900460ff1690565b336114f06117cd565b6001600160a01b0316146115165760405162461bcd60e51b815260040161098f90613956565b6001600160a01b03811661153c5760405162461bcd60e51b815260040161098f90613a9f565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91610a3591613864565b6008546001600160a01b031633146115b25760405162461bcd60e51b815260040161098f906138e1565b6107d08111156115d45760405162461bcd60e51b815260040161098f90613acf565b60138190556040518181527fefeafcf03e479a9566d7ef321b4816de0ba19cfa3cd0fae2f8c5f4a0afb342c490602001610a35565b336116126117cd565b6001600160a01b0316146116385760405162461bcd60e51b815260040161098f90613956565b6116426000612e73565b565b6000600c547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016116959190613864565b602060405180830381865afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d6919061398b565b61130291906139d7565b6000600754600014611725576007546116f761143f565b6116ff611644565b61170991906139d7565b61171b90670de0b6b3a76400006139ef565b6113029190613a0e565b50670de0b6b3a764000090565b6008546001600160a01b0316331461175c5760405162461bcd60e51b815260040161098f906138e1565b6117646114d7565b156117815760405162461bcd60e51b815260040161098f90613a47565b611789612ec3565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b3360009081526003602052604090205461164290610f15565b6000546001600160a01b031690565b6008546001600160a01b031633146118065760405162461bcd60e51b815260040161098f906138e1565b652d79883d20008111156118785760405162461bcd60e51b815260206004820152603360248201527f424f4f53545f5745494748542063616e6e6f74206265206d6f7265207468616e604482015272081093d3d4d517d5d15251d21517d312535255606a1b606482015260840161098f565b60128190556040518181527f7666dfff8c3377938e522b4eed3aff079973a976f95969db60a406d49f40da4e90602001610a35565b6001600160a01b03811660009081526003602052604081208054158015906118d95750600781015460ff165b80156118fe57506001600160a01b03831660009081526006602052604090205460ff16155b801561191a575042600e54826005015461191891906139d7565b105b156119f757600061192961143f565b611931611644565b61193b91906139d7565b6006830154600754845492935060009261195590856139ef565b61195f9190613a0e565b6119699190613a30565b9050600083600801548261197d9190613a30565b90506000600e548560050154426119949190613a30565b61199e9190613a30565b90506011548111156119af57506011545b6000601154601754836119c291906139ef565b6119cc9190613a0e565b9050600064e8d4a510006119e083866139ef565b6119ea9190613a0e565b9998505050505050505050565b50600092915050565b6008546001600160a01b03163314611a2a5760405162461bcd60e51b815260040161098f906138e1565b60008111611a7a5760405162461bcd60e51b815260206004820152601e60248201527f4455524154494f4e5f464143544f522063616e6e6f74206265207a65726f0000604482015260640161098f565b60108190556040518181527f9478eb023aac0a7d58a4e935377056bf27cf5b72a2300725f831817a8f62fbde90602001610a35565b33611ab86117cd565b6001600160a01b031614611ade5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b038116611b045760405162461bcd60e51b815260040161098f90613a9f565b600a80546001600160a01b0319166001600160a01b0383169081179091556040517fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a91610a3591613864565b6008546001600160a01b03163314611b7a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115611b9c5760405162461bcd60e51b815260040161098f90613906565b60158190556040518181527fd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d90602001610a35565b6008546001600160a01b03163314611bfb5760405162461bcd60e51b815260040161098f906138e1565b6107d0811115611c1d5760405162461bcd60e51b815260040161098f90613acf565b60148190556040518181527fc5d25457b67b87678c987375af13f6e50beb3ad7bfd009da26766ae986eaa20d90602001610a35565b6008546001600160a01b03163314611c7c5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038216611ca25760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260056020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6008546001600160a01b03163314611d0e5760405162461bcd60e51b815260040161098f906138e1565b60008111611d6a5760405162461bcd60e51b815260206004820152602360248201527f554e4c4f434b5f465245455f4455524154494f4e2063616e6e6f74206265207a60448201526265726f60e81b606482015260840161098f565b600e8190556040518181527ff84bf2b901cfc02956d4e69556d7448cef4ea13587e7714dba7c6d697091e7ad90602001610a35565b6001600160a01b0381166000908152600360205260408120805415801590611dcc5750600781015460ff16155b8015611df157506001600160a01b03831660009081526004602052604090205460ff16155b156119f7576000611e0061143f565b611e08611644565b611e1291906139d7565b90506000600754828460000154611e2991906139ef565b611e339190613a0e565b90506000836002015482611e479190613a30565b601354909150863b15611e5957506014545b6000612710611e6883856139ef565b611e729190613a0e565b98975050505050505050565b6008546001600160a01b03163314611ea85760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038116611ece5760405162461bcd60e51b815260040161098f90613a9f565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5352e27b0414343d9438a1c6e9d04c65c7cb4d91f44920afee588f91717893f191610a3591613864565b6008546001600160a01b03163314611f445760405162461bcd60e51b815260040161098f906138e1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611fd45760405162461bcd60e51b815260206004820152602560248201527f546f6b656e2063616e6e6f742062652073616d65206173206465706f736974206044820152643a37b5b2b760d91b606482015260840161098f565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190612003903090600401613864565b602060405180830381865afa158015612020573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612044919061398b565b905061205a6001600160a01b0383163383612f23565b5050565b6008546001600160a01b031633146120885760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0381166120ae5760405162461bcd60e51b815260040161098f90613a9f565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f8f49a182922022d9119a1a6aeeca151b4a5665e86bd61c1ff32e152d459558b291610a3591613864565b6121026114d7565b1561211f5760405162461bcd60e51b815260040161098f90613a47565b600082118061212e5750600081115b61216f5760405162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015260640161098f565b61205a8282336127a6565b336121836117cd565b6001600160a01b0316146121a95760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166121cf5760405162461bcd60e51b815260040161098f90613a9f565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea08691610a3591613864565b336122246117cd565b6001600160a01b03161461224a5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166122af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161098f565b610f8b81612e73565b6008546001600160a01b031633146122e25760405162461bcd60e51b815260040161098f906138e1565b6305265c0081111561235c5760405162461bcd60e51b815260206004820152603d60248201527f4d41585f4c4f434b5f4455524154494f4e2063616e6e6f74206265206d6f726560448201527f207468616e204d41585f4c4f434b5f4455524154494f4e5f4c494d4954000000606482015260840161098f565b600f8190556040518181527fcab2f3455b51b6ca5377e84fccd0f890b6f6ca36c02e18b6d36cb34f469fe4fe90602001610a35565b6040516001600160a01b03808516602483015283166044820152606481018290526123fc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f53565b50505050565b600061240d826118ad565b61241683611d9f565b610f0f91906139d7565b33600090815260036020526040902080548311156124805760405162461bcd60e51b815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015260640161098f565b428160050154106124c35760405162461bcd60e51b815260206004820152600d60248201526c5374696c6c20696e206c6f636b60981b604482015260640161098f565b6002546001600160a01b031615612537576002546040516351cff8d960e01b81526001600160a01b03909116906351cff8d990612504903390600401613864565b600060405180830381600087803b15801561251e57600080fd5b505af1158015612532573d6000803e3d6000fd5b505050505b805483906000906125546b204fce5e3e25026110000000846139ef565b61255e9190613a0e565b9050612568613025565b612571336131a3565b8415801561257f5750600084115b156125c057600061258e611644565b9050806007548661259f91906139ef565b6125a99190613a0e565b84549093508311156125ba57835492505b506125e7565b82546b204fce5e3e25026110000000906125da90836139ef565b6125e49190613a0e565b91505b6000600754836125f5611644565b6125ff91906139ef565b6126099190613a0e565b90508284600001600082825461261f9190613a30565b9250508190555082600760008282546126389190613a30565b90915550503360009081526005602052604090205460ff1615801561266d5750601854846001015461266a91906139d7565b42105b156126e657601554333b1561268157506016545b600061271061269083856139ef565b61269a9190613a0e565b6009549091506126d7906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6126e18184613a30565b925050505b61271a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612f23565b83541561274c5760075461272c611644565b855461273891906139ef565b6127429190613a0e565b6002850155612754565b600060028501555b4260038501556127633361359e565b604080518281526020810185905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a2505050505050565b6001600160a01b0381166000908152600360205260409020805415806127cc5750600084115b15612845576509184e72a00084116128455760405162461bcd60e51b815260206004820152603660248201527f4465706f73697420616d6f756e74206d757374206265206772656174657220746044820152751a185b8813525397d1115413d4d25517d05353d5539560521b606482015260840161098f565b6005810154839042116128a3578415612882574260048301556008820154600d8054600090612875908490613a30565b9091555050600060088301555b816004015482600501546128969190613a30565b6128a090826139d7565b90505b8315806128b3575062093a808110155b6128ff5760405162461bcd60e51b815260206004820152601f60248201527f4d696e696d756d206c6f636b20706572696f64206973206f6e65207765656b00604482015260640161098f565b600f548111156129515760405162461bcd60e51b815260206004820152601c60248201527f4d6178696d756d206c6f636b20706572696f6420657863656564656400000000604482015260640161098f565b6002546001600160a01b0316156129d057600254604051630efe6a8b60e01b81526001600160a01b038581166004830152602482018890526044820187905290911690630efe6a8b90606401600060405180830381600087803b1580156129b757600080fd5b505af11580156129cb573d6000803e3d6000fd5b505050505b6129d8613025565b600754612a285760006129e9611272565b600954909150612a26906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b505b612a31836131a3565b8315612a8a574282600501541015612a60574260048301819055612a569085906139d7565b6005830155612a7a565b83826005016000828254612a7491906139d7565b90915550505b60078201805460ff191660011790555b600080600080612a98611644565b90508815612ad957612ad56001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001688308c612391565b8892505b855415801590612aed5750600786015460ff165b15612b66576007548654612b0190836139ef565b612b0b9190613a0e565b9150612b1782846139d7565b9250856000015460076000828254612b2f9190613a30565b9091555050600086556004860154421415612b665760088601829055600d8054839190600090612b609084906139d7565b90915550505b60075415612b9657612b788282613a30565b600754612b8590856139ef565b612b8f9190613a0e565b9350612b9a565b8293505b856004015486600501541115612d1b57600060105460125488600401548960050154612bc69190613a30565b612bd091906139ef565b612bda9190613a0e565b9050600064e8d4a51000612bee87846139ef565b612bf89190613a0e565b9050612c0481876139d7565b955085886000016000828254612c1a91906139d7565b909155506000905064e8d4a51000612c3287856139ef565b612c3c9190613a0e565b905080896006016000828254612c5291906139d7565b9250508190555080600c6000828254612c6b91906139d7565b925050819055508b896008016000828254612c8691906139d7565b925050819055508b600d6000828254612c9f91906139d7565b92505081905550896001600160a01b03167f2b943276e5d747f6f7dd46d3b880d8874cb8d6b9b88ca1903990a2738e7dc7a18a600801548b600001548c600401548d60050154612cef9190613a30565b6040805193845260208401929092529082015242606082015260800160405180910390a2505050612d35565b83866000016000828254612d2f91906139d7565b90915550505b6000891180612d445750600088115b15612d50574260018701555b8360076000828254612d6291906139d7565b90915550506006860154600754612d77611644565b8854612d8391906139ef565b612d8d9190613a0e565b612d979190613a30565b6002870155426003870155612dab8761359e565b604080518a8152602081018690529081018990524260608201526001600160a01b038816907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060800160405180910390a2505050505050505050565b612e106114d7565b612e2c5760405162461bcd60e51b815260040161098f90613a71565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051612e699190613864565b60405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612ecb6114d7565b15612ee85760405162461bcd60e51b815260040161098f90613a47565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e5c3390565b6040516001600160a01b03831660248201526044810182905261109c90849063a9059cbb60e01b906064016123c5565b6000612fa8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661366a9092919063ffffffff16565b80519091501561109c5780806020019051810190612fc691906139a4565b61109c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161098f565b600b54604051631175a1dd60e01b815260048101919091523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631175a1dd90604401602060405180830381865afa158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb919061398b565b90508015610f8b5760006130cd611272565b600b54604051630441a3e760e41b81526004810191909152600060248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b15801561313d57600080fd5b505af1158015613151573d6000803e3d6000fd5b50505050600061315f611272565b9050337fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba61318d8484613a30565b60405190815260200160405180910390a2505050565b6001600160a01b038116600090815260036020526040902080541561205a57600781015460ff1615613446576000816006015460075483600001546131e6611644565b6131f091906139ef565b6131fa9190613a0e565b6132049190613a30565b90508160060154600c600082825461321c9190613a30565b90915550506000600683018190558254600780549192909161323f908490613a30565b90915550506001600160a01b03831660009081526006602052604090205460ff1615801561327d575042600e54836005015461327b91906139d7565b105b1561334f5760008260080154826132949190613a30565b90506000600e548460050154426132ab9190613a30565b6132b59190613a30565b90506011548111156132c657506011545b6000601154601754836132d991906139ef565b6132e39190613a0e565b9050600064e8d4a510006132f783866139ef565b6133019190613a0e565b60095490915061333e906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6133488186613a30565b9450505050505b6000613359611644565b9050600060075460001461338f576133718383613a30565b60075461337e90856139ef565b6133889190613a0e565b9050613392565b50815b808455600780548291906000906133aa9084906139d7565b9091555050600584015442111561343f5760078401805460ff19169055600060048501819055600585018190556008850154600d8054919290916133ef908490613a30565b909155505060006008850155604080518481524260208201526001600160a01b038716917ff7870c5b224cbc19873599e46ccfc7103934650509b1af0c3ce90138377c2004910160405180910390a25b5050505050565b6001600160a01b03821660009081526004602052604090205460ff1661205a576000600754613473611644565b835461347f91906139ef565b6134899190613a0e565b90508160000154600760008282546134a19190613a30565b9091555050600080835560028301546134ba9083613a30565b601354909150843b156134cc57506014545b60006127106134db83856139ef565b6134e59190613a0e565b9050801561353457600954613527906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6135318185613a30565b93505b600061353e611644565b90506000600754600014613574576135568683613a30565b60075461356390886139ef565b61356d9190613a0e565b9050613577565b50845b8087556007805482919060009061358f9084906139d7565b90915550505050505050505050565b6001546001600160a01b031615610f8b576001600160a01b0381166000908152600360205260408120600481015460058201549192916135de9190613a30565b6001546008840154600d5460105460405163e874fdaf60e01b81526001600160a01b03898116600483015260248201949094526044810186905260648101929092526084820152929350169063e874fdaf9060a401600060405180830381600087803b15801561364d57600080fd5b505af1158015613661573d6000803e3d6000fd5b50505050505050565b60606136798484600085613683565b90505b9392505050565b6060824710156136e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161098f565b6001600160a01b0385163b61373b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161098f565b600080866001600160a01b031685876040516137579190613b51565b60006040518083038185875af1925050503d8060008114613794576040519150601f19603f3d011682016040523d82523d6000602084013e613799565b606091505b50915091506137a98282866137b4565b979650505050505050565b606083156137c357508161367c565b8251156137d35782518084602001fd5b8160405162461bcd60e51b815260040161098f9190613b6d565b6000602082840312156137ff57600080fd5b5035919050565b6001600160a01b0381168114610f8b57600080fd5b60006020828403121561382d57600080fd5b813561367c81613806565b6000806040838503121561384b57600080fd5b823561385681613806565b946020939093013593505050565b6001600160a01b0391909116815260200190565b8015158114610f8b57600080fd5b6000806040838503121561389957600080fd5b82356138a481613806565b915060208301356138b481613878565b809150509250929050565b600080604083850312156138d257600080fd5b50508035926020909101359150565b6020808252600b908201526a61646d696e3a207775743f60a81b604082015260600190565b60208082526030908201527f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060408201526f4d41585f57495448445241575f46454560801b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561399d57600080fd5b5051919050565b6000602082840312156139b657600080fd5b815161367c81613878565b634e487b7160e01b600052601160045260246000fd5b600082198211156139ea576139ea6139c1565b500190565b6000816000190483118215151615613a0957613a096139c1565b500290565b600082613a2b57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613a4257613a426139c1565b500390565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526016908201527543616e6e6f74206265207a65726f206164647265737360501b604082015260600190565b60208082526036908201527f706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468604082015275616e204d41585f504552464f524d414e43455f46454560501b606082015260800190565b60005b83811015613b40578181015183820152602001613b28565b838111156123fc5750506000910152565b60008251613b63818460208701613b25565b9190910192915050565b6020815260008251806020840152613b8c816040850160208701613b25565b601f01601f1916919091016040019291505056fe3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d44a26469706673582212208fac60e48eb35e29f7a743c638638371e8b2fc9dffb4ce7b25ae133d7651c44a64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v1/test/artifactsFile/CakeToken.json b/projects/revenue-sharing-pool/v1/test/artifactsFile/CakeToken.json new file mode 100644 index 00000000..4e56ee43 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/artifactsFile/CakeToken.json @@ -0,0 +1,639 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CakeToken", + "sourceName": "contracts/test/CakeToken.sol", + "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": "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": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "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" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b50604051806040016040528060118152602001702830b731b0b5b2a9bbb0b8102a37b5b2b760791b8152506040518060400160405280600481526020016343616b6560e01b81525060006200006b620000f660201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000ca906004906020850190620000fa565b508051620000e0906005906020840190620000fa565b50506006805460ff191660121790555062000196565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200013d57805160ff19168380011785556200016d565b828001600101855582156200016d579182015b828111156200016d57825182559160200191906001019062000150565b506200017b9291506200017f565b5090565b5b808211156200017b576000815560010162000180565b61237e80620001a66000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c8063782d6fe1116100f9578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e1461062f578063e7a324dc1461066a578063f1127ed814610672578063f2fde38b146106d1576101b9565b8063a9059cbb1461056f578063b4b5ea57146105a8578063c3cda520146105db576101b9565b80638da5cb5b116100d35780638da5cb5b1461050957806395d89b4114610511578063a0712d6814610519578063a457c2d714610536576101b9565b8063782d6fe1146104955780637ecebe00146104ce578063893d20e814610501576101b9565b806339509351116101665780635c19a95c116101405780635c19a95c146103db5780636fcfff451461040e57806370a082311461045a578063715018a61461048d576101b9565b8063395093511461030b57806340c10f1914610344578063587cde1e1461037f576101b9565b806320606b701161019757806320606b70146102a257806323b872dd146102aa578063313ce567146102ed576101b9565b806306fdde03146101be578063095ea7b31461023b57806318160ddd14610288575b600080fd5b6101c6610704565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356107b8565b604080519115158252519081900360200190f35b6102906107d6565b60408051918252519081900360200190f35b6102906107dc565b610274600480360360608110156102c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610800565b6102f56108a1565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108aa565b61037d6004803603604081101561035a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610905565b005b6103b26004803603602081101561039557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109ed565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61037d600480360360208110156103f157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a18565b6104416004803603602081101561042457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a25565b6040805163ffffffff9092168252519081900360200190f35b6102906004803603602081101561047057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a3d565b61037d610a65565b610290600480360360408110156104ab57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610b7c565b610290600480360360208110156104e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e46565b6103b2610e58565b6103b2610e67565b6101c6610e83565b6102746004803603602081101561052f57600080fd5b5035610f02565b6102746004803603604081101561054c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fc5565b6102746004803603604081101561058557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561103a565b610290600480360360208110156105be57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661104e565b61037d600480360360c08110156105f157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356110ea565b6102906004803603604081101561064557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611429565b610290611461565b6106b16004803603604081101561068857600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611485565b6040805163ffffffff909316835260208301919091528051918290030190f35b61037d600480360360208110156106e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114b2565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b820191906000526020600020905b81548152906001019060200180831161079157829003601f168201915b5050505050905090565b60006107cc6107c5611653565b8484611657565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b600061080d84848461179e565b61089784610819611653565b610892856040518060600160405280602881526020016121ee6028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610864611653565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611965565b611657565b5060019392505050565b60065460ff1690565b60006107cc6108b7611653565b8461089285600260006108c8611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611a16565b61090d611653565b73ffffffffffffffffffffffffffffffffffffffff1661092b610e67565b73ffffffffffffffffffffffffffffffffffffffff16146109ad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6109b78282611a8a565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600760205260408120546109e9921683611bb1565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610a223382611d97565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610a6d611653565b73ffffffffffffffffffffffffffffffffffffffff16610a8b610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610b0d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610bd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806122706027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610c115760009150506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610cd65773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff168352929052206001015490506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610d1e5760009150506107d0565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e0257600282820363ffffffff16048103610d6e612141565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610ddd576020015194506107d09350505050565b805163ffffffff16871115610df457819350610dfb565b6001820392505b5050610d44565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610e62610e67565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b6000610f0c611653565b73ffffffffffffffffffffffffffffffffffffffff16610f2a610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610fac57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610fbd610fb7611653565b83611a8a565b506001919050565b60006107cc610fd2611653565b84610892856040518060600160405280602581526020016123026025913960026000610ffc611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611965565b60006107cc611047611653565b848461179e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff16806110865760006110e3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611115610704565b80519060200120611124611e5e565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa15801561129d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806122166026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146113b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806122bd6022913960400191505060405180910390fd5b87421115611412576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121c86026913960400191505060405180910390fd5b61141c818b611d97565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6114ba611653565b73ffffffffffffffffffffffffffffffffffffffff166114d8610e67565b73ffffffffffffffffffffffffffffffffffffffff161461155a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166115c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121a26026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff83166116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061217e6024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821661172f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806123276022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661180a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806121596025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611876576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806122df6023913960400191505060405180910390fd5b6118c0816040518060600160405280602681526020016122976026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611965565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602052604080822093909355908416815220546118fc9082611a16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611a0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119d35781810151838201526020016119bb565b50505050905090810190601f168015611a005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156110e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b0c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611b199082611a16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611b4c9082611a16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bed5750600081115b15611d925773ffffffffffffffffffffffffffffffffffffffff831615611cc45773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff169081611c47576000611ca4565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611cb28285611e62565b9050611cc086848484611ed9565b5050505b73ffffffffffffffffffffffffffffffffffffffff821615611d925773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff169081611d19576000611d76565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611d848285611a16565b905061142185848484611ed9565b505050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526007602052604081205490911690611dcb84610a3d565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611e58828483611bb1565b50505050565b4690565b600082821115611ed357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611efd4360405180606001604052806034815260200161223c603491396120c9565b905060008463ffffffff16118015611f71575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15611fd95773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612072565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156119d35781810151838201526020016119bb565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a20617070726f766520746f20746865207a65726f2061646472657373a2646970667358221220878bcaf3d45de55293e9d5d1b586861a43290aaa00bc428b8c26b2b0c77d4ef164736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101b95760003560e01c8063782d6fe1116100f9578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e1461062f578063e7a324dc1461066a578063f1127ed814610672578063f2fde38b146106d1576101b9565b8063a9059cbb1461056f578063b4b5ea57146105a8578063c3cda520146105db576101b9565b80638da5cb5b116100d35780638da5cb5b1461050957806395d89b4114610511578063a0712d6814610519578063a457c2d714610536576101b9565b8063782d6fe1146104955780637ecebe00146104ce578063893d20e814610501576101b9565b806339509351116101665780635c19a95c116101405780635c19a95c146103db5780636fcfff451461040e57806370a082311461045a578063715018a61461048d576101b9565b8063395093511461030b57806340c10f1914610344578063587cde1e1461037f576101b9565b806320606b701161019757806320606b70146102a257806323b872dd146102aa578063313ce567146102ed576101b9565b806306fdde03146101be578063095ea7b31461023b57806318160ddd14610288575b600080fd5b6101c6610704565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356107b8565b604080519115158252519081900360200190f35b6102906107d6565b60408051918252519081900360200190f35b6102906107dc565b610274600480360360608110156102c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610800565b6102f56108a1565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108aa565b61037d6004803603604081101561035a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610905565b005b6103b26004803603602081101561039557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109ed565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61037d600480360360208110156103f157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a18565b6104416004803603602081101561042457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a25565b6040805163ffffffff9092168252519081900360200190f35b6102906004803603602081101561047057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a3d565b61037d610a65565b610290600480360360408110156104ab57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610b7c565b610290600480360360208110156104e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e46565b6103b2610e58565b6103b2610e67565b6101c6610e83565b6102746004803603602081101561052f57600080fd5b5035610f02565b6102746004803603604081101561054c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fc5565b6102746004803603604081101561058557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561103a565b610290600480360360208110156105be57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661104e565b61037d600480360360c08110156105f157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356110ea565b6102906004803603604081101561064557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611429565b610290611461565b6106b16004803603604081101561068857600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611485565b6040805163ffffffff909316835260208301919091528051918290030190f35b61037d600480360360208110156106e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114b2565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b820191906000526020600020905b81548152906001019060200180831161079157829003601f168201915b5050505050905090565b60006107cc6107c5611653565b8484611657565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b600061080d84848461179e565b61089784610819611653565b610892856040518060600160405280602881526020016121ee6028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610864611653565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611965565b611657565b5060019392505050565b60065460ff1690565b60006107cc6108b7611653565b8461089285600260006108c8611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611a16565b61090d611653565b73ffffffffffffffffffffffffffffffffffffffff1661092b610e67565b73ffffffffffffffffffffffffffffffffffffffff16146109ad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6109b78282611a8a565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600760205260408120546109e9921683611bb1565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610a223382611d97565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610a6d611653565b73ffffffffffffffffffffffffffffffffffffffff16610a8b610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610b0d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610bd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806122706027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610c115760009150506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610cd65773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff168352929052206001015490506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610d1e5760009150506107d0565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e0257600282820363ffffffff16048103610d6e612141565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610ddd576020015194506107d09350505050565b805163ffffffff16871115610df457819350610dfb565b6001820392505b5050610d44565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610e62610e67565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b6000610f0c611653565b73ffffffffffffffffffffffffffffffffffffffff16610f2a610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610fac57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610fbd610fb7611653565b83611a8a565b506001919050565b60006107cc610fd2611653565b84610892856040518060600160405280602581526020016123026025913960026000610ffc611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611965565b60006107cc611047611653565b848461179e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff16806110865760006110e3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611115610704565b80519060200120611124611e5e565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa15801561129d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806122166026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146113b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806122bd6022913960400191505060405180910390fd5b87421115611412576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121c86026913960400191505060405180910390fd5b61141c818b611d97565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6114ba611653565b73ffffffffffffffffffffffffffffffffffffffff166114d8610e67565b73ffffffffffffffffffffffffffffffffffffffff161461155a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166115c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121a26026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff83166116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061217e6024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821661172f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806123276022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661180a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806121596025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611876576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806122df6023913960400191505060405180910390fd5b6118c0816040518060600160405280602681526020016122976026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611965565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602052604080822093909355908416815220546118fc9082611a16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611a0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119d35781810151838201526020016119bb565b50505050905090810190601f168015611a005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156110e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b0c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611b199082611a16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611b4c9082611a16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bed5750600081115b15611d925773ffffffffffffffffffffffffffffffffffffffff831615611cc45773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff169081611c47576000611ca4565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611cb28285611e62565b9050611cc086848484611ed9565b5050505b73ffffffffffffffffffffffffffffffffffffffff821615611d925773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff169081611d19576000611d76565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611d848285611a16565b905061142185848484611ed9565b505050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526007602052604081205490911690611dcb84610a3d565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611e58828483611bb1565b50505050565b4690565b600082821115611ed357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611efd4360405180606001604052806034815260200161223c603491396120c9565b905060008463ffffffff16118015611f71575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15611fd95773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612072565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156119d35781810151838201526020016119bb565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a20617070726f766520746f20746865207a65726f2061646472657373a2646970667358221220878bcaf3d45de55293e9d5d1b586861a43290aaa00bc428b8c26b2b0c77d4ef164736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v1/test/artifactsFile/ERC20Mock.json b/projects/revenue-sharing-pool/v1/test/artifactsFile/ERC20Mock.json new file mode 100644 index 00000000..506a3546 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/artifactsFile/ERC20Mock.json @@ -0,0 +1,315 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Mock", + "sourceName": "contracts/mocks/ERC20Mock.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "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": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c2c38038062000c2c8339810160408190526200003491620001e1565b8151829082906200004d9060039060208501906200006e565b508051620000639060049060208401906200006e565b505050505062000288565b8280546200007c906200024b565b90600052602060002090601f016020900481019282620000a05760008555620000eb565b82601f10620000bb57805160ff1916838001178555620000eb565b82800160010185558215620000eb579182015b82811115620000eb578251825591602001919060010190620000ce565b50620000f9929150620000fd565b5090565b5b80821115620000f95760008155600101620000fe565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013c57600080fd5b81516001600160401b038082111562000159576200015962000114565b604051601f8301601f19908116603f0116810190828211818310171562000184576200018462000114565b81604052838152602092508683858801011115620001a157600080fd5b600091505b83821015620001c55785820183015181830184015290820190620001a6565b83821115620001d75760008385830101525b9695505050505050565b60008060408385031215620001f557600080fd5b82516001600160401b03808211156200020d57600080fd5b6200021b868387016200012a565b935060208501519150808211156200023257600080fd5b5062000241858286016200012a565b9150509250929050565b600181811c908216806200026057607f821691505b602082108114156200028257634e487b7160e01b600052602260045260246000fd5b50919050565b61099480620002986000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d1565b60405180910390f35b6100ea6100e5366004610842565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461086c565b61026a565b604051601281526020016100ce565b6100ea61013c366004610842565b61028e565b61015461014f366004610842565b6102b0565b005b6100fe6101643660046108a8565b6001600160a01b031660009081526020819052604090205490565b6100c16102be565b6100ea610195366004610842565b6102cd565b6100ea6101a8366004610842565b61034d565b6100fe6101bb3660046108ca565b61035b565b6060600380546101cf906108fd565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108fd565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610386565b5060019392505050565b6000336102788582856104aa565b610283858585610524565b506001949350505050565b6000336102608185856102a1838361035b565b6102ab9190610938565b610386565b6102ba82826106f2565b5050565b6060600480546101cf906108fd565b600033816102db828661035b565b9050838110156103405760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102838286868403610386565b600033610260818585610524565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103e85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610337565b6001600160a01b0382166104495760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610337565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b6848461035b565b9050600019811461051e57818110156105115760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610337565b61051e8484848403610386565b50505050565b6001600160a01b0383166105885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610337565b6001600160a01b0382166105ea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610337565b6001600160a01b038316600090815260208190526040902054818110156106625760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610337565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610699908490610938565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e591815260200190565b60405180910390a361051e565b6001600160a01b0382166107485760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610337565b806002600082825461075a9190610938565b90915550506001600160a01b03821660009081526020819052604081208054839290610787908490610938565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b818110156107fe578581018301518582016040015282016107e2565b81811115610810576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461083d57600080fd5b919050565b6000806040838503121561085557600080fd5b61085e83610826565b946020939093013593505050565b60008060006060848603121561088157600080fd5b61088a84610826565b925061089860208501610826565b9150604084013590509250925092565b6000602082840312156108ba57600080fd5b6108c382610826565b9392505050565b600080604083850312156108dd57600080fd5b6108e683610826565b91506108f460208401610826565b90509250929050565b600181811c9082168061091157607f821691505b6020821081141561093257634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561095957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220c9116e967a89bacdcb5d5cacab54540303b3650686f16fea49473cd777d6624764736f6c634300080c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d1565b60405180910390f35b6100ea6100e5366004610842565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461086c565b61026a565b604051601281526020016100ce565b6100ea61013c366004610842565b61028e565b61015461014f366004610842565b6102b0565b005b6100fe6101643660046108a8565b6001600160a01b031660009081526020819052604090205490565b6100c16102be565b6100ea610195366004610842565b6102cd565b6100ea6101a8366004610842565b61034d565b6100fe6101bb3660046108ca565b61035b565b6060600380546101cf906108fd565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108fd565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610386565b5060019392505050565b6000336102788582856104aa565b610283858585610524565b506001949350505050565b6000336102608185856102a1838361035b565b6102ab9190610938565b610386565b6102ba82826106f2565b5050565b6060600480546101cf906108fd565b600033816102db828661035b565b9050838110156103405760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102838286868403610386565b600033610260818585610524565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103e85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610337565b6001600160a01b0382166104495760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610337565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b6848461035b565b9050600019811461051e57818110156105115760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610337565b61051e8484848403610386565b50505050565b6001600160a01b0383166105885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610337565b6001600160a01b0382166105ea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610337565b6001600160a01b038316600090815260208190526040902054818110156106625760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610337565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610699908490610938565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e591815260200190565b60405180910390a361051e565b6001600160a01b0382166107485760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610337565b806002600082825461075a9190610938565b90915550506001600160a01b03821660009081526020819052604081208054839290610787908490610938565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b818110156107fe578581018301518582016040015282016107e2565b81811115610810576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461083d57600080fd5b919050565b6000806040838503121561085557600080fd5b61085e83610826565b946020939093013593505050565b60008060006060848603121561088157600080fd5b61088a84610826565b925061089860208501610826565b9150604084013590509250925092565b6000602082840312156108ba57600080fd5b6108c382610826565b9392505050565b600080604083850312156108dd57600080fd5b6108e683610826565b91506108f460208401610826565b90509250929050565b600181811c9082168061091157607f821691505b6020821081141561093257634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561095957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220c9116e967a89bacdcb5d5cacab54540303b3650686f16fea49473cd777d6624764736f6c634300080c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v1/test/artifactsFile/MasterChef.json b/projects/revenue-sharing-pool/v1/test/artifactsFile/MasterChef.json new file mode 100644 index 00000000..3824474e --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/artifactsFile/MasterChef.json @@ -0,0 +1,590 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MasterChef", + "sourceName": "contracts/test/MasterChef.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract CakeToken", + "name": "_cake", + "type": "address" + }, + { + "internalType": "contract SyrupBar", + "name": "_syrup", + "type": "address" + }, + { + "internalType": "address", + "name": "_devaddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_cakePerBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_startBlock", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BONUS_MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_lpToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "add", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cake", + "outputs": [ + { + "internalType": "contract CakeToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_devaddr", + "type": "address" + } + ], + "name": "dev", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "devaddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "enterStaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_to", + "type": "uint256" + } + ], + "name": "getMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "leaveStaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "migrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrator", + "outputs": [ + { + "internalType": "contract IMigratorChef", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingCake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "lpToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IMigratorChef", + "name": "_migrator", + "type": "address" + } + ], + "name": "setMigrator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "syrup", + "outputs": [ + { + "internalType": "contract SyrupBar", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "multiplierNumber", + "type": "uint256" + } + ], + "name": "updateMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040526001600555600060095534801561001a57600080fd5b5060405162002b0a38038062002b0a833981810160405260a081101561003f57600080fd5b5080516020820151604083015160608401516080909401519293919290919060006100686101e2565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b03199081166001600160a01b03978816908117835560028054831697891697909717909655600380548216958816959095179094556004928355600a829055604080516080810182529586526103e86020870181815291870193845260006060880181815260078054958601815590915296517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688939095029283018054909616949097169390931790935590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a82015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b909101556009556101e6565b3390565b61291480620001f66000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635ffe6146116101045780638d88a90e116100a2578063d49e77cd11610071578063d49e77cd1461050c578063dce1748414610514578063e2bbb1581461051c578063f2fde38b1461053f576101cf565b80638d88a90e1461045c5780638da5cb5b1461048f5780638dbb1e3a1461049757806393f1a40b146104ba576101cf565b8063715018a6116100de578063715018a6146104135780637cd07e471461041b57806386a952c41461044c5780638aa2855014610454576101cf565b80635ffe6146146103c3578063630b5ba1146103e057806364482f79146103e8576101cf565b806323cf311811610171578063454b06081161014b578063454b06081461036457806348cd4cb11461038157806351eb05a6146103895780635312ea8e146103a6576101cf565b806323cf3118146102f157806341441d3b14610324578063441a3e7014610341576101cf565b80631175a1dd116101ad5780631175a1dd146102155780631526fe271461024e57806317caf6f1146102a85780631eaaa045146102b0576101cf565b80630755e0b6146101d4578063081e3eda146101ee5780631058d281146101f6575b600080fd5b6101dc610572565b60408051918252519081900360200190f35b6101dc610578565b6102136004803603602081101561020c57600080fd5b503561057e565b005b6101dc6004803603604081101561022b57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166107ba565b61026b6004803603602081101561026457600080fd5b503561094a565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526020850193909352838301919091526060830152519081900360800190f35b6101dc610998565b610213600480360360608110156102c657600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135151561099e565b6102136004803603602081101561030757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b99565b6102136004803603602081101561033a57600080fd5b5035610c88565b6102136004803603604081101561035757600080fd5b5080359060200135610e4f565b6102136004803603602081101561037a57600080fd5b5035611040565b6101dc61139b565b6102136004803603602081101561039f57600080fd5b50356113a1565b610213600480360360208110156103bc57600080fd5b503561162d565b610213600480360360208110156103d957600080fd5b50356116d5565b610213611782565b610213600480360360608110156103fe57600080fd5b508035906020810135906040013515156117a5565b6102136118d2565b6104236119e9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610423611a05565b6101dc611a21565b6102136004803603602081101561047257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a27565b610423611af4565b6101dc600480360360408110156104ad57600080fd5b5080359060200135611b10565b6104f3600480360360408110156104d057600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16611b2b565b6040805192835260208301919091528051918290030190f35b610423611b4f565b610423611b6b565b6102136004803603604081101561053257600080fd5b5080359060200135611b87565b6102136004803603602081101561055557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d12565b60045481565b60075490565b6000600760008154811061058e57fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7909152604090922080546004909202909201925083111561063e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b61064860006113a1565b6000610682826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90611f26565b90611fa7565b9050801561069457610694338261201e565b83156106cb5781546106a69085611fa7565b825582546106cb9073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b600383015482546106e69164e8d4a510009161067691611eb3565b6001830155600254604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101879052905173ffffffffffffffffffffffffffffffffffffffff90921691639dc29fac9160448082019260009290919082900301818387803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b5050604080518781529051600093503392507ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350505050565b600080600784815481106107ca57fe5b6000918252602080832087845260088252604080852073ffffffffffffffffffffffffffffffffffffffff898116875290845281862060049586029093016003810154815484517f70a082310000000000000000000000000000000000000000000000000000000081523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b50516002850154909150431180156108af57508015155b156109155760006108c4856002015443611b10565b905060006108f160095461067688600101546108eb60045487611eb390919063ffffffff16565b90611eb3565b9050610910610909846106768464e8d4a51000611eb3565b8590612147565b935050505b61093d836001015461067c64e8d4a51000610676868860000154611eb390919063ffffffff16565b9450505050505b92915050565b6007818154811061095757fe5b6000918252602090912060049091020180546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff9092169350919084565b60095481565b6109a66121bb565b73ffffffffffffffffffffffffffffffffffffffff166109c4611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610a4657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8015610a5457610a54611782565b6000600a544311610a6757600a54610a69565b435b600954909150610a799085612147565b6009556040805160808101825273ffffffffffffffffffffffffffffffffffffffff85811682526020820187815292820184815260006060840181815260078054600181018255925293517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490920291820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919094161790925592517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b90910155610b936121bf565b50505050565b610ba16121bb565b73ffffffffffffffffffffffffffffffffffffffff16610bbf611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610c4157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006007600081548110610c9857fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c790915260408320600490920201925090610cdf906113a1565b805415610d28576000610d14826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610d2657610d26338261201e565b505b8215610d61578154610d529073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054610d5e9084612147565b81555b60038201548154610d7c9164e8d4a510009161067691611eb3565b6001820155600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff909216916340c10f199160448082019260009290919082900301818387803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b5050604080518681529051600093503392507f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505050565b81610ebb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77697468647261772043414b4520627920756e7374616b696e67000000000000604482015290519081900360640190fd5b600060078381548110610eca57fe5b600091825260208083208684526008825260408085203386529092529220805460049092029092019250831115610f6257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b610f6b846113a1565b6000610f99826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610fab57610fab338261201e565b8315610fe2578154610fbd9085611fa7565b82558254610fe29073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b60038301548254610ffd9164e8d4a510009161067691611eb3565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60065473ffffffffffffffffffffffffffffffffffffffff166110c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6d6967726174653a206e6f206d69677261746f72000000000000000000000000604482015290519081900360640190fd5b6000600782815481106110d357fe5b600091825260208083206004928302018054604080517f70a0823100000000000000000000000000000000000000000000000000000000815230958101959095525191955073ffffffffffffffffffffffffffffffffffffffff16939284926370a0823192602480840193829003018186803b15801561115257600080fd5b505afa158015611166573d6000803e3d6000fd5b505050506040513d602081101561117c57600080fd5b50516006549091506111a89073ffffffffffffffffffffffffffffffffffffffff848116911683612319565b600654604080517fce5494bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b1580156112bc57600080fd5b505afa1580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b5051821461135557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d6967726174653a206261640000000000000000000000000000000000000000604482015290519081900360640190fd5b83547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9190911617909255505050565b600a5481565b6000600782815481106113b057fe5b90600052602060002090600402019050806002015443116113d1575061162a565b8054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561144157600080fd5b505afa158015611455573d6000803e3d6000fd5b505050506040513d602081101561146b57600080fd5b505190508061148157504360029091015561162a565b6000611491836002015443611b10565b905060006114b860095461067686600101546108eb60045487611eb390919063ffffffff16565b60015460035491925073ffffffffffffffffffffffffffffffffffffffff908116916340c10f1991166114ec84600a611f26565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561153f57600080fd5b505af1158015611553573d6000803e3d6000fd5b5050600154600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201526024810187905290519190921693506340c10f199250604480830192600092919082900301818387803b1580156115d557600080fd5b505af11580156115e9573d6000803e3d6000fd5b5050505061161761160c8461067664e8d4a5100085611eb390919063ffffffff16565b600386015490612147565b6003850155505043600290920191909155505b50565b60006007828154811061163c57fe5b6000918252602080832085845260088252604080852033808752935290932080546004909302909301805490945061168e9273ffffffffffffffffffffffffffffffffffffffff9190911691906120b5565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b6116dd6121bb565b73ffffffffffffffffffffffffffffffffffffffff166116fb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461177d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600555565b60075460005b818110156117a157611799816113a1565b600101611788565b5050565b6117ad6121bb565b73ffffffffffffffffffffffffffffffffffffffff166117cb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461184d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b801561185b5761185b611782565b60006007848154811061186a57fe5b9060005260206000209060040201600101549050826007858154811061188c57fe5b906000526020600020906004020160010181905550828114610b93576118c7836118c183600954611fa790919063ffffffff16565b90612147565b600955610b936121bf565b6118da6121bb565b73ffffffffffffffffffffffffffffffffffffffff166118f8611af4565b73ffffffffffffffffffffffffffffffffffffffff161461197a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff163314611aad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6465763a207775743f0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600554600090611b24906108eb8486611fa7565b9392505050565b60086020908152600092835260408084209091529082529020805460019091015482565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b81611bf357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6465706f7369742043414b45206279207374616b696e67000000000000000000604482015290519081900360640190fd5b600060078381548110611c0257fe5b60009182526020808320868452600882526040808520338652909252922060049091029091019150611c33846113a1565b805415611c7c576000611c68826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015611c7a57611c7a338261201e565b505b8215611cb5578154611ca69073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054611cb29084612147565b81555b60038201548154611cd09164e8d4a510009161067691611eb3565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b611d1a6121bb565b73ffffffffffffffffffffffffffffffffffffffff16611d38611af4565b73ffffffffffffffffffffffffffffffffffffffff1614611dba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116611e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061283c6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600082611ec257506000610944565b82820282848281611ecf57fe5b0414611b24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128886021913960400191505060405180910390fd5b6000808211611f9657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f9f57fe5b049392505050565b60008282111561201857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600254604080517fa2e6ddcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529151919092169163a2e6ddcc91604480830192600092919082900301818387803b15801561209957600080fd5b505af11580156120ad573d6000803e3d6000fd5b505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526121429084906124a3565b505050565b600082820183811015611b2457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600754600060015b8281101561220a57612200600782815481106121df57fe5b9060005260206000209060040201600101548361214790919063ffffffff16565b91506001016121c7565b5080156117a15761221c816003611f26565b9050612256816118c1600760008154811061223357fe5b906000526020600020906004020160010154600954611fa790919063ffffffff16565b60098190555080600760008154811061226b57fe5b9060005260206000209060040201600101819055505050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b939085906124a3565b8015806123c55750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561239757600080fd5b505afa1580156123ab573d6000803e3d6000fd5b505050506040513d60208110156123c157600080fd5b5051155b61241a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806128a96036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526121429084905b6060612505826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661257b9092919063ffffffff16565b8051909150156121425780806020019051602081101561252457600080fd5b5051612142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612812602a913960400191505060405180910390fd5b606061258a8484600085612592565b949350505050565b6060824710156125ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806128626026913960400191505060405180910390fd5b6125f68561274d565b61266157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106126cb57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161268e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461272d576040519150601f19603f3d011682016040523d82523d6000602084013e612732565b606091505b5091509150612742828286612753565b979650505050505050565b3b151590565b60608315612762575081611b24565b8251156127725782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156127d65781810151838201526020016127be565b50505050905090810190601f1680156128035780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666542455032303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212204a998361f0f5665374d8aaeb4227a26c5a52a806a0be4997372508cb9e5e1e7c64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635ffe6146116101045780638d88a90e116100a2578063d49e77cd11610071578063d49e77cd1461050c578063dce1748414610514578063e2bbb1581461051c578063f2fde38b1461053f576101cf565b80638d88a90e1461045c5780638da5cb5b1461048f5780638dbb1e3a1461049757806393f1a40b146104ba576101cf565b8063715018a6116100de578063715018a6146104135780637cd07e471461041b57806386a952c41461044c5780638aa2855014610454576101cf565b80635ffe6146146103c3578063630b5ba1146103e057806364482f79146103e8576101cf565b806323cf311811610171578063454b06081161014b578063454b06081461036457806348cd4cb11461038157806351eb05a6146103895780635312ea8e146103a6576101cf565b806323cf3118146102f157806341441d3b14610324578063441a3e7014610341576101cf565b80631175a1dd116101ad5780631175a1dd146102155780631526fe271461024e57806317caf6f1146102a85780631eaaa045146102b0576101cf565b80630755e0b6146101d4578063081e3eda146101ee5780631058d281146101f6575b600080fd5b6101dc610572565b60408051918252519081900360200190f35b6101dc610578565b6102136004803603602081101561020c57600080fd5b503561057e565b005b6101dc6004803603604081101561022b57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166107ba565b61026b6004803603602081101561026457600080fd5b503561094a565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526020850193909352838301919091526060830152519081900360800190f35b6101dc610998565b610213600480360360608110156102c657600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135151561099e565b6102136004803603602081101561030757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b99565b6102136004803603602081101561033a57600080fd5b5035610c88565b6102136004803603604081101561035757600080fd5b5080359060200135610e4f565b6102136004803603602081101561037a57600080fd5b5035611040565b6101dc61139b565b6102136004803603602081101561039f57600080fd5b50356113a1565b610213600480360360208110156103bc57600080fd5b503561162d565b610213600480360360208110156103d957600080fd5b50356116d5565b610213611782565b610213600480360360608110156103fe57600080fd5b508035906020810135906040013515156117a5565b6102136118d2565b6104236119e9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610423611a05565b6101dc611a21565b6102136004803603602081101561047257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a27565b610423611af4565b6101dc600480360360408110156104ad57600080fd5b5080359060200135611b10565b6104f3600480360360408110156104d057600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16611b2b565b6040805192835260208301919091528051918290030190f35b610423611b4f565b610423611b6b565b6102136004803603604081101561053257600080fd5b5080359060200135611b87565b6102136004803603602081101561055557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d12565b60045481565b60075490565b6000600760008154811061058e57fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7909152604090922080546004909202909201925083111561063e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b61064860006113a1565b6000610682826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90611f26565b90611fa7565b9050801561069457610694338261201e565b83156106cb5781546106a69085611fa7565b825582546106cb9073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b600383015482546106e69164e8d4a510009161067691611eb3565b6001830155600254604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101879052905173ffffffffffffffffffffffffffffffffffffffff90921691639dc29fac9160448082019260009290919082900301818387803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b5050604080518781529051600093503392507ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350505050565b600080600784815481106107ca57fe5b6000918252602080832087845260088252604080852073ffffffffffffffffffffffffffffffffffffffff898116875290845281862060049586029093016003810154815484517f70a082310000000000000000000000000000000000000000000000000000000081523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b50516002850154909150431180156108af57508015155b156109155760006108c4856002015443611b10565b905060006108f160095461067688600101546108eb60045487611eb390919063ffffffff16565b90611eb3565b9050610910610909846106768464e8d4a51000611eb3565b8590612147565b935050505b61093d836001015461067c64e8d4a51000610676868860000154611eb390919063ffffffff16565b9450505050505b92915050565b6007818154811061095757fe5b6000918252602090912060049091020180546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff9092169350919084565b60095481565b6109a66121bb565b73ffffffffffffffffffffffffffffffffffffffff166109c4611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610a4657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8015610a5457610a54611782565b6000600a544311610a6757600a54610a69565b435b600954909150610a799085612147565b6009556040805160808101825273ffffffffffffffffffffffffffffffffffffffff85811682526020820187815292820184815260006060840181815260078054600181018255925293517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490920291820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919094161790925592517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b90910155610b936121bf565b50505050565b610ba16121bb565b73ffffffffffffffffffffffffffffffffffffffff16610bbf611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610c4157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006007600081548110610c9857fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c790915260408320600490920201925090610cdf906113a1565b805415610d28576000610d14826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610d2657610d26338261201e565b505b8215610d61578154610d529073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054610d5e9084612147565b81555b60038201548154610d7c9164e8d4a510009161067691611eb3565b6001820155600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff909216916340c10f199160448082019260009290919082900301818387803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b5050604080518681529051600093503392507f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505050565b81610ebb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77697468647261772043414b4520627920756e7374616b696e67000000000000604482015290519081900360640190fd5b600060078381548110610eca57fe5b600091825260208083208684526008825260408085203386529092529220805460049092029092019250831115610f6257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b610f6b846113a1565b6000610f99826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610fab57610fab338261201e565b8315610fe2578154610fbd9085611fa7565b82558254610fe29073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b60038301548254610ffd9164e8d4a510009161067691611eb3565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60065473ffffffffffffffffffffffffffffffffffffffff166110c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6d6967726174653a206e6f206d69677261746f72000000000000000000000000604482015290519081900360640190fd5b6000600782815481106110d357fe5b600091825260208083206004928302018054604080517f70a0823100000000000000000000000000000000000000000000000000000000815230958101959095525191955073ffffffffffffffffffffffffffffffffffffffff16939284926370a0823192602480840193829003018186803b15801561115257600080fd5b505afa158015611166573d6000803e3d6000fd5b505050506040513d602081101561117c57600080fd5b50516006549091506111a89073ffffffffffffffffffffffffffffffffffffffff848116911683612319565b600654604080517fce5494bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b1580156112bc57600080fd5b505afa1580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b5051821461135557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d6967726174653a206261640000000000000000000000000000000000000000604482015290519081900360640190fd5b83547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9190911617909255505050565b600a5481565b6000600782815481106113b057fe5b90600052602060002090600402019050806002015443116113d1575061162a565b8054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561144157600080fd5b505afa158015611455573d6000803e3d6000fd5b505050506040513d602081101561146b57600080fd5b505190508061148157504360029091015561162a565b6000611491836002015443611b10565b905060006114b860095461067686600101546108eb60045487611eb390919063ffffffff16565b60015460035491925073ffffffffffffffffffffffffffffffffffffffff908116916340c10f1991166114ec84600a611f26565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561153f57600080fd5b505af1158015611553573d6000803e3d6000fd5b5050600154600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201526024810187905290519190921693506340c10f199250604480830192600092919082900301818387803b1580156115d557600080fd5b505af11580156115e9573d6000803e3d6000fd5b5050505061161761160c8461067664e8d4a5100085611eb390919063ffffffff16565b600386015490612147565b6003850155505043600290920191909155505b50565b60006007828154811061163c57fe5b6000918252602080832085845260088252604080852033808752935290932080546004909302909301805490945061168e9273ffffffffffffffffffffffffffffffffffffffff9190911691906120b5565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b6116dd6121bb565b73ffffffffffffffffffffffffffffffffffffffff166116fb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461177d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600555565b60075460005b818110156117a157611799816113a1565b600101611788565b5050565b6117ad6121bb565b73ffffffffffffffffffffffffffffffffffffffff166117cb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461184d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b801561185b5761185b611782565b60006007848154811061186a57fe5b9060005260206000209060040201600101549050826007858154811061188c57fe5b906000526020600020906004020160010181905550828114610b93576118c7836118c183600954611fa790919063ffffffff16565b90612147565b600955610b936121bf565b6118da6121bb565b73ffffffffffffffffffffffffffffffffffffffff166118f8611af4565b73ffffffffffffffffffffffffffffffffffffffff161461197a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff163314611aad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6465763a207775743f0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600554600090611b24906108eb8486611fa7565b9392505050565b60086020908152600092835260408084209091529082529020805460019091015482565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b81611bf357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6465706f7369742043414b45206279207374616b696e67000000000000000000604482015290519081900360640190fd5b600060078381548110611c0257fe5b60009182526020808320868452600882526040808520338652909252922060049091029091019150611c33846113a1565b805415611c7c576000611c68826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015611c7a57611c7a338261201e565b505b8215611cb5578154611ca69073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054611cb29084612147565b81555b60038201548154611cd09164e8d4a510009161067691611eb3565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b611d1a6121bb565b73ffffffffffffffffffffffffffffffffffffffff16611d38611af4565b73ffffffffffffffffffffffffffffffffffffffff1614611dba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116611e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061283c6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600082611ec257506000610944565b82820282848281611ecf57fe5b0414611b24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128886021913960400191505060405180910390fd5b6000808211611f9657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f9f57fe5b049392505050565b60008282111561201857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600254604080517fa2e6ddcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529151919092169163a2e6ddcc91604480830192600092919082900301818387803b15801561209957600080fd5b505af11580156120ad573d6000803e3d6000fd5b505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526121429084906124a3565b505050565b600082820183811015611b2457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600754600060015b8281101561220a57612200600782815481106121df57fe5b9060005260206000209060040201600101548361214790919063ffffffff16565b91506001016121c7565b5080156117a15761221c816003611f26565b9050612256816118c1600760008154811061223357fe5b906000526020600020906004020160010154600954611fa790919063ffffffff16565b60098190555080600760008154811061226b57fe5b9060005260206000209060040201600101819055505050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b939085906124a3565b8015806123c55750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561239757600080fd5b505afa1580156123ab573d6000803e3d6000fd5b505050506040513d60208110156123c157600080fd5b5051155b61241a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806128a96036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526121429084905b6060612505826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661257b9092919063ffffffff16565b8051909150156121425780806020019051602081101561252457600080fd5b5051612142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612812602a913960400191505060405180910390fd5b606061258a8484600085612592565b949350505050565b6060824710156125ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806128626026913960400191505060405180910390fd5b6125f68561274d565b61266157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106126cb57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161268e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461272d576040519150601f19603f3d011682016040523d82523d6000602084013e612732565b606091505b5091509150612742828286612753565b979650505050505050565b3b151590565b60608315612762575081611b24565b8251156127725782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156127d65781810151838201526020016127be565b50505050905090810190601f1680156128035780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666542455032303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212204a998361f0f5665374d8aaeb4227a26c5a52a806a0be4997372508cb9e5e1e7c64736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v1/test/artifactsFile/MasterChefV2.json b/projects/revenue-sharing-pool/v1/test/artifactsFile/MasterChefV2.json new file mode 100644 index 00000000..8e63e6b4 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/artifactsFile/MasterChefV2.json @@ -0,0 +1,1051 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MasterChefV2", + "sourceName": "contracts/MasterChefV2.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IMasterChef", + "name": "_MASTER_CHEF", + "type": "address" + }, + { + "internalType": "contract IBEP20", + "name": "_CAKE", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_MASTER_PID", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_burnAdmin", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IBEP20", + "name": "lpToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "name": "AddPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Init", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + } + ], + "name": "SetPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "boostContract", + "type": "address" + } + ], + "name": "UpdateBoostContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMultiplier", + "type": "uint256" + } + ], + "name": "UpdateBoostMultiplier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "UpdateBurnAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "burnRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "regularFarmRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "specialFarmRate", + "type": "uint256" + } + ], + "name": "UpdateCakeRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lpSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + } + ], + "name": "UpdatePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isValid", + "type": "bool" + } + ], + "name": "UpdateWhiteList", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "ACC_CAKE_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CAKE", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CAKE_RATE_TOTAL_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTERCHEF_CAKE_PER_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER_CHEF", + "outputs": [ + { + "internalType": "contract IMasterChef", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER_PID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_lpToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isRegular", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "add", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "boostContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "burnAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "burnCake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_isRegular", + "type": "bool" + } + ], + "name": "cakePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePerBlockToBurn", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToBurn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToRegularFarm", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToSpecialFarm", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "getBoostMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvestFromMasterChef", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBEP20", + "name": "dummyToken", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastBurnedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "lpToken", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingCake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "pools", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalRegularAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSpecialAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newBoostContract", + "type": "address" + } + ], + "name": "updateBoostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newMultiplier", + "type": "uint256" + } + ], + "name": "updateBoostMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newAdmin", + "type": "address" + } + ], + "name": "updateBurnAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_burnRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_regularFarmRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_specialFarmRate", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "updateCakeRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "internalType": "struct MasterChefV2.PoolInfo", + "name": "pool", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isValid", + "type": "bool" + } + ], + "name": "updateWhiteList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "boostMultiplier", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whiteList", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60e060405264ae9f7bcc00600a5564174876e800600b556422ecb25c00600c553480156200002c57600080fd5b5060405162003e6538038062003e658339810160408190526200004f91620000f3565b60006200005b620000ef565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055606093841b6001600160601b03199081166080529290931b90911660a05260c052600280546001600160a01b0319166001600160a01b0390921691909117905562000167565b3390565b6000806000806080858703121562000109578384fd5b845162000116816200014e565b602086015190945062000129816200014e565b60408601516060870151919450925062000143816200014e565b939692955090935050565b6001600160a01b03811681146200016457600080fd5b50565b60805160601c60a05160601c60c051613c9e620001c760003980610f7c528061133552806116925250806112a95280611f7e5280612c0a5280612cdd5280612d8a525080610e955280610f4f5280611308528061278d5250613c9e6000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c80637398b7ea11610191578063ac1d0609116100e3578063dfcedeee11610097578063e39e132311610071578063e39e13231461052b578063edd8b17014610569578063f2fde38b14610571576102e9565b8063dfcedeee14610546578063e0f91f6c1461054e578063e2bbb15814610556576102e9565b8063c507aeaa116100c8578063c507aeaa14610518578063cc6db2da1461052b578063dc6363df14610533576102e9565b8063ac1d0609146104fd578063c40d337b14610510576102e9565b80638da5cb5b116101455780639dcc1b5f1161011f5780639dcc1b5f146104da5780639dd2fcc3146104e2578063aa47bc8e146104f5576102e9565b80638da5cb5b146104a857806393f1a40b146104b057806399d7e84a146104d2576102e9565b806378db4c341161017657806378db4c341461048557806378ed5d1f1461048d57806381bdf98c146104a0576102e9565b80637398b7ea1461046a578063777a97f814610472576102e9565b806339aae5ba1161024a5780635312ea8e116101fe57806364482f79116101d857806364482f791461044757806369b021281461045a578063715018a614610462576102e9565b80635312ea8e1461042457806361621aaa14610437578063630b5ba11461043f576102e9565b80634ca6ef281161022f5780634ca6ef28146103e75780634f70b15a146103fc57806351eb05a614610404576102e9565b806339aae5ba146103cc578063441a3e70146103d4576102e9565b80631526fe27116102a15780631ce06d57116102865780631ce06d57146103915780631e9b828b14610399578063372c12b1146103ac576102e9565b80631526fe271461035a57806319ab453c1461037e576102e9565b8063081e3eda116102d2578063081e3eda1461032c5780630bb844bc146103345780631175a1dd14610347576102e9565b8063033186e8146102ee578063041a84c914610317575b600080fd5b6103016102fc366004613081565b610584565b60405161030e9190613ba7565b60405180910390f35b61032a6103253660046130ac565b6105da565b005b610301610952565b61032a61034236600461302d565b610958565b610301610355366004613148565b610ae4565b61036d610368366004613118565b610c97565b60405161030e959493929190613be4565b61032a61038c36600461302d565b610cd8565b610301611009565b6103016103a73660046130e0565b61100f565b6103bf6103ba36600461302d565b611074565b60405161030e91906132e0565b610301611089565b61032a6103e23660046131be565b611096565b6103ef6112a7565b60405161030e9190613268565b61032a6112cb565b610417610412366004613118565b611394565b60405161030e9190613b6b565b61032a610432366004613118565b611562565b610301611690565b61032a6116b4565b61032a6104553660046131df565b611748565b6103016118d6565b61032a6118e0565b6103016119c2565b61032a6104803660046130e0565b6119ce565b610301611aab565b6103ef61049b366004613118565b611ab1565b6103ef611ae5565b6103ef611b01565b6104c36104be366004613148565b611b1d565b60405161030e93929190613bce565b610301611b49565b610301611b4f565b61032a6104f036600461302d565b611b7d565b610301611cd5565b61032a61050b366004613049565b611cdb565b610301611e26565b61032a61052636600461316c565b611e2c565b61030161221c565b61032a610541366004613217565b612225565b6103ef61239e565b6103016123ba565b61032a6105643660046131be565b6123c0565b6103ef61278b565b61032a61057f36600461302d565b6127af565b600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281206002015464e8d4a5100081116105ce5764e8d4a510006105d0565b805b9150505b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff163314610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061384c565b60405180910390fd5b60026001541415610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015573ffffffffffffffffffffffffffffffffffffffff83166106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906135b2565b600482815481106106d057fe5b600091825260209091206004600590920201015460ff1661071d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613906565b64e8d4a51000811015801561073857506501d1a94a20008111155b61076e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613399565b610776612fdb565b61077f83611394565b600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8916845290915281209192506107bb8686610584565b90506107c88686836128fc565b610808670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8a89600001546129d990919063ffffffff16565b90612a2d565b906129d9565b60018301558154610854906108289064e8d4a51000906107fc90886129d9565b835461084e906108439064e8d4a51000906107fc90876129d9565b606087015190612a79565b90612abb565b6060840152600480548491908790811061086a57fe5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608601516003850155608090950151600490930180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016931515939093179092558883526006815281832073ffffffffffffffffffffffffffffffffffffffff8b1680855291529181902090920186905590517f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba9061093e90889085908990613bce565b60405180910390a250506001805550505050565b60045490565b610960612afa565b73ffffffffffffffffffffffffffffffffffffffff1661097e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8116610a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061360f565b60025473ffffffffffffffffffffffffffffffffffffffff82811691161415610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a8b565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b6000610aee612fdb565b60048481548110610afb57fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301939093526002830154908201526003820154606082015260049091015460ff16151560808201529050610b5561300c565b50600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845282529182902082516060808201855282548252600183015482850152600290920154938101939093528351908401519184015190919043118015610bc357508015155b15610c43576000610be1856020015143612a7990919063ffffffff16565b90506000610c1c8660800151610bf957600954610bfd565b6008545b6107fc8860400151610802610c158b6080015161100f565b87906129d9565b9050610c3e610c37846107fc84670de0b6b3a76400006129d9565b8590612abb565b935050505b6000610c6364e8d4a510006107fc610c5b8a8c610584565b8751906129d9565b6020850151909150610c8b90610c85670de0b6b3a76400006107fc85886129d9565b90612a79565b98975050505050505050565b60048181548110610ca457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610ce0612afa565b73ffffffffffffffffffffffffffffffffffffffff16610cfe611b01565b73ffffffffffffffffffffffffffffffffffffffff1614610d4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610da0903390600401613268565b60206040518083038186803b158015610db857600080fd5b505afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df09190613130565b905080610e29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061333c565b610e4b73ffffffffffffffffffffffffffffffffffffffff8316333084612afe565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610ebf907f00000000000000000000000000000000000000000000000000000000000000009085906004016132ba565b602060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1191906130fc565b506040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890610fa6907f0000000000000000000000000000000000000000000000000000000000000000908590600401613bc0565b600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b505043600d5550506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a15050565b600c5481565b600081156110455761103e64e8d4a510006107fc600b5468022b1c8c1227a000006129d990919063ffffffff16565b905061106f565b61106c64e8d4a510006107fc600c5468022b1c8c1227a000006129d990919063ffffffff16565b90505b919050565b60076020526000908152604090205460ff1681565b68022b1c8c1227a0000081565b600260015414156110d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001556110e0612fdb565b6110e983611394565b60008481526006602090815260408083203384529091529020805491925090831115611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137a9565b600061114d3386610584565b905061115a3386836128fc565b83156111af57815461116c9085612a79565b82600001819055506111af33856005888154811061118657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169190612ba1565b6111e3670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b600183015561122b6111fe64e8d4a510006107fc87856129d9565b6004878154811061120b57fe5b906000526020600020906005020160030154612a7990919063ffffffff16565b6004868154811061123857fe5b906000526020600020906005020160030181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516112949190613ba7565b60405180910390a3505060018055505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890611360907f000000000000000000000000000000000000000000000000000000000000000090600090600401613bc0565b600060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b50505050565b61139c612fdb565b600482815481106113a957fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561106f576060810151608082015160009061141b5760095461141f565b6008545b90506000821180156114315750600081115b1561149757600061144f846020015143612a7990919063ffffffff16565b9050600061146f836107fc8760400151610802610c158a6080015161100f565b905061149261148a856107fc84670de0b6b3a76400006129d9565b865190612abb565b855250505b43602084015260048054849190869081106114ae57fe5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608401516003830155608090930151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558401518451915186927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926115539290918791613bce565b60405180910390a25050919050565b6002600154141561159f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001819055506000600482815481106115b657fe5b60009182526020808320858452600682526040808520338087529352842080548582556001820186905560059094029091019450929061160c9064e8d4a51000906107fc906116059089610584565b85906129d9565b90508084600301541161162057600061162f565b600384015461162f9082612a79565b846003018190555061164933836005888154811061118657fe5b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595846040516112949190613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045460005b81811015611744576116ca612fdb565b600482815481106116d757fe5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff161515608082015291501561173b5761173982611394565b505b506001016116ba565b5050565b611750612afa565b73ffffffffffffffffffffffffffffffffffffffff1661176e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146117bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6117c483611394565b5080156117d3576117d36116b4565b600483815481106117e057fe5b600091825260209091206004600590920201015460ff161561183b576118338261084e6004868154811061181057fe5b906000526020600020906005020160020154600854612a7990919063ffffffff16565b600855611876565b6118728261084e6004868154811061184f57fe5b906000526020600020906005020160020154600954612a7990919063ffffffff16565b6009555b816004848154811061188457fe5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516118c99190613ba7565b60405180910390a2505050565b6501d1a94a200081565b6118e8612afa565b73ffffffffffffffffffffffffffffffffffffffff16611906611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b670de0b6b3a764000081565b6119d6612afa565b73ffffffffffffffffffffffffffffffffffffffff166119f4611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b8015611a4f57611a4f6116b4565b6000611a66600d5443612a7990919063ffffffff16565b90506000611a7c611a75611b4f565b83906129d9565b600254909150611aa29073ffffffffffffffffffffffffffffffffffffffff1682612bc5565b505043600d5550565b600d5481565b60058181548110611abe57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60095481565b6000611b7864e8d4a510006107fc600a5468022b1c8c1227a000006129d990919063ffffffff16565b905090565b611b85612afa565b73ffffffffffffffffffffffffffffffffffffffff16611ba3611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811615801590611c30575060035473ffffffffffffffffffffffffffffffffffffffff828116911614155b611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613b0e565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b600b5481565b611ce3612afa565b73ffffffffffffffffffffffffffffffffffffffff16611d01611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8216611d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613963565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600760205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055517fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d5190611e1a9084906132e0565b60405180910390a25050565b60085481565b611e34612afa565b73ffffffffffffffffffffffffffffffffffffffff16611e52611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611e9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190611ef4903090600401613268565b60206040518083038186803b158015611f0c57600080fd5b505afa158015611f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f449190613130565b1015611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906138a9565b8015612010576120106116b4565b811561202b576008546120239085612abb565b60085561203c565b6009546120389085612abb565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905591546121dd91612a79565b7f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa868560405161220e929190613bb0565b60405180910390a350505050565b64e8d4a5100081565b61222d612afa565b73ffffffffffffffffffffffffffffffffffffffff1661224b611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000841180156122a85750600083115b80156122b45750600082115b6122ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061366c565b64e8d4a510006122fe8361084e8787612abb565b14612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139f7565b8015612343576123436116b4565b61234d60006119ce565b600a849055600b839055600c8290556040517fae2d2e7d1ae84564fc72227253ce0f36a007209f7fd5ec414dea80e5af2fb5b09061239090869086908690613bce565b60405180910390a150505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600260015414156123fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015561240a612fdb565b61241383611394565b600084815260066020908152604080832033845290915290206080820151919250908061244f57503360009081526007602052604090205460ff165b612485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906136c9565b60006124913386610584565b8254909150156124a6576124a63386836128fc565b83156126a2576000600586815481106124bb57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a082319061251a903090600401613268565b60206040518083038186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256a9190613130565b90506125a933308760058a8154811061257f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16929190612afe565b61266981600588815481106125ba57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190612619903090600401613268565b60206040518083038186803b15801561263157600080fd5b505afa158015612645573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c859190613130565b83549095506126789086612abb565b835561269b61269064e8d4a510006107fc88866129d9565b606086015190612abb565b6060850152505b6126d6670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b826001018190555082600486815481106126ec57fe5b6000918252602091829020835160059290920201908155908201516001820155604080830151600283015560608301516003830155608090920151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905551859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611294908890613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b6127b7612afa565b73ffffffffffffffffffffffffffffffffffffffff166127d5611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811661286f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613453565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61290461300c565b50600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906129719064e8d4a51000906107fc90866129d9565b905060006129a9670de0b6b3a76400006107fc6004888154811061299157fe5b600091825260209091206005909102015485906129d9565b905060006129c4846020015183612a7990919063ffffffff16565b90506129d08782612bc5565b50505050505050565b6000826129e8575060006105d4565b828202828482816129f557fe5b04146105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061374c565b6000808211612a68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061357b565b818381612a7157fe5b049392505050565b600082821115612ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134e7565b50900390565b6000828201838110156105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134b0565b3390565b61138e846323b872dd60e01b858585604051602401612b1f93929190613289565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612db1565b612bc08363a9059cbb60e01b8484604051602401612b1f9291906132ba565b505050565b8015611744576040517f70a08231000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612c3f903090600401613268565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190613130565b1015612c9d57612c9d6112cb565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612d12903090600401613268565b60206040518083038186803b158015612d2a57600080fd5b505afa158015612d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d629190613130565b905081811015612d70578091505b612bc073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168484612ba1565b6060612e13826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e679092919063ffffffff16565b805190915015612bc05780806020019051810190612e3191906130fc565b612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906133f6565b6060612e768484600085612e80565b90505b9392505050565b606082471015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061351e565b612ec585612f82565b612efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139c0565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612f25919061324c565b60006040518083038185875af1925050503d8060008114612f62576040519150601f19603f3d011682016040523d82523d6000602084013e612f67565b606091505b5091509150612f77828286612f88565b979650505050505050565b3b151590565b60608315612f97575081612e79565b825115612fa75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b91906132eb565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60405180606001604052806000815260200160008152602001600081525090565b60006020828403121561303e578081fd5b81356105ce81613c35565b6000806040838503121561305b578081fd5b823561306681613c35565b9150602083013561307681613c5a565b809150509250929050565b60008060408385031215613093578182fd5b823561309e81613c35565b946020939093013593505050565b6000806000606084860312156130c0578081fd5b83356130cb81613c35565b95602085013595506040909401359392505050565b6000602082840312156130f1578081fd5b81356105ce81613c5a565b60006020828403121561310d578081fd5b81516105ce81613c5a565b600060208284031215613129578081fd5b5035919050565b600060208284031215613141578081fd5b5051919050565b6000806040838503121561315a578182fd5b82359150602083013561307681613c35565b60008060008060808587031215613181578081fd5b84359350602085013561319381613c35565b925060408501356131a381613c5a565b915060608501356131b381613c5a565b939692955090935050565b600080604083850312156131d0578182fd5b50508035926020909101359150565b6000806000606084860312156131f3578283fd5b8335925060208401359150604084013561320c81613c5a565b809150509250925092565b6000806000806080858703121561322c578384fd5b84359350602085013592506040850135915060608501356131b381613c5a565b6000825161325e818460208701613c09565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261330a816040850160208701613c09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526023908201527f4d61737465724368656656323a2042616c616e6365206d75737420657863656560408201527f6420300000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060408201527f6d756c7469706c69657200000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4d61737465724368656656323a2054686520757365722061646472657373206d60408201527f7573742062652076616c69640000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206d7573742062652076616c6964000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a2043616b652072617465206d7573742062652060408201527f67726561746572207468616e2030000000000000000000000000000000000000606082015260800190565b60208082526042908201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460408201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f60608201527f6f6c000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f77697468647261773a20496e73756666696369656e7400000000000000000000604082015260600190565b60208082526011908201527f4e6f6e6520424550323020746f6b656e73000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f737460408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f43414b4520746f6b656e2063616e277420626520616464656420746f2066617260408201527f6d20706f6f6c7300000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060408201527f636f756c6420626520626f6f7374656400000000000000000000000000000000606082015260800190565b60208082526032908201527f4d61737465724368656656323a20546865207768697465206c6973742061646460408201527f72657373206d7573742062652076616c69640000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526025908201527f4d61737465724368656656323a20546f74616c2072617465206d75737420626560408201527f2031653132000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526041908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206973207468652073616d6520776974682063757272656e742061646472657360608201527f7300000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f4d61737465724368656656323a204e657720626f6f737420636f6e747261637460408201527f2061646472657373206d7573742062652076616c696400000000000000000000606082015260800190565b600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b83811015613c24578181015183820152602001613c0c565b8381111561138e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114613c5757600080fd5b50565b8015158114613c5757600080fdfea2646970667358221220f3bdc87a312c1f6922cc6efd7e791ccbfcc6b4d3913517316c9bb61280affda264736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102e95760003560e01c80637398b7ea11610191578063ac1d0609116100e3578063dfcedeee11610097578063e39e132311610071578063e39e13231461052b578063edd8b17014610569578063f2fde38b14610571576102e9565b8063dfcedeee14610546578063e0f91f6c1461054e578063e2bbb15814610556576102e9565b8063c507aeaa116100c8578063c507aeaa14610518578063cc6db2da1461052b578063dc6363df14610533576102e9565b8063ac1d0609146104fd578063c40d337b14610510576102e9565b80638da5cb5b116101455780639dcc1b5f1161011f5780639dcc1b5f146104da5780639dd2fcc3146104e2578063aa47bc8e146104f5576102e9565b80638da5cb5b146104a857806393f1a40b146104b057806399d7e84a146104d2576102e9565b806378db4c341161017657806378db4c341461048557806378ed5d1f1461048d57806381bdf98c146104a0576102e9565b80637398b7ea1461046a578063777a97f814610472576102e9565b806339aae5ba1161024a5780635312ea8e116101fe57806364482f79116101d857806364482f791461044757806369b021281461045a578063715018a614610462576102e9565b80635312ea8e1461042457806361621aaa14610437578063630b5ba11461043f576102e9565b80634ca6ef281161022f5780634ca6ef28146103e75780634f70b15a146103fc57806351eb05a614610404576102e9565b806339aae5ba146103cc578063441a3e70146103d4576102e9565b80631526fe27116102a15780631ce06d57116102865780631ce06d57146103915780631e9b828b14610399578063372c12b1146103ac576102e9565b80631526fe271461035a57806319ab453c1461037e576102e9565b8063081e3eda116102d2578063081e3eda1461032c5780630bb844bc146103345780631175a1dd14610347576102e9565b8063033186e8146102ee578063041a84c914610317575b600080fd5b6103016102fc366004613081565b610584565b60405161030e9190613ba7565b60405180910390f35b61032a6103253660046130ac565b6105da565b005b610301610952565b61032a61034236600461302d565b610958565b610301610355366004613148565b610ae4565b61036d610368366004613118565b610c97565b60405161030e959493929190613be4565b61032a61038c36600461302d565b610cd8565b610301611009565b6103016103a73660046130e0565b61100f565b6103bf6103ba36600461302d565b611074565b60405161030e91906132e0565b610301611089565b61032a6103e23660046131be565b611096565b6103ef6112a7565b60405161030e9190613268565b61032a6112cb565b610417610412366004613118565b611394565b60405161030e9190613b6b565b61032a610432366004613118565b611562565b610301611690565b61032a6116b4565b61032a6104553660046131df565b611748565b6103016118d6565b61032a6118e0565b6103016119c2565b61032a6104803660046130e0565b6119ce565b610301611aab565b6103ef61049b366004613118565b611ab1565b6103ef611ae5565b6103ef611b01565b6104c36104be366004613148565b611b1d565b60405161030e93929190613bce565b610301611b49565b610301611b4f565b61032a6104f036600461302d565b611b7d565b610301611cd5565b61032a61050b366004613049565b611cdb565b610301611e26565b61032a61052636600461316c565b611e2c565b61030161221c565b61032a610541366004613217565b612225565b6103ef61239e565b6103016123ba565b61032a6105643660046131be565b6123c0565b6103ef61278b565b61032a61057f36600461302d565b6127af565b600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281206002015464e8d4a5100081116105ce5764e8d4a510006105d0565b805b9150505b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff163314610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061384c565b60405180910390fd5b60026001541415610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015573ffffffffffffffffffffffffffffffffffffffff83166106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906135b2565b600482815481106106d057fe5b600091825260209091206004600590920201015460ff1661071d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613906565b64e8d4a51000811015801561073857506501d1a94a20008111155b61076e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613399565b610776612fdb565b61077f83611394565b600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8916845290915281209192506107bb8686610584565b90506107c88686836128fc565b610808670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8a89600001546129d990919063ffffffff16565b90612a2d565b906129d9565b60018301558154610854906108289064e8d4a51000906107fc90886129d9565b835461084e906108439064e8d4a51000906107fc90876129d9565b606087015190612a79565b90612abb565b6060840152600480548491908790811061086a57fe5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608601516003850155608090950151600490930180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016931515939093179092558883526006815281832073ffffffffffffffffffffffffffffffffffffffff8b1680855291529181902090920186905590517f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba9061093e90889085908990613bce565b60405180910390a250506001805550505050565b60045490565b610960612afa565b73ffffffffffffffffffffffffffffffffffffffff1661097e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8116610a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061360f565b60025473ffffffffffffffffffffffffffffffffffffffff82811691161415610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a8b565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b6000610aee612fdb565b60048481548110610afb57fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301939093526002830154908201526003820154606082015260049091015460ff16151560808201529050610b5561300c565b50600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845282529182902082516060808201855282548252600183015482850152600290920154938101939093528351908401519184015190919043118015610bc357508015155b15610c43576000610be1856020015143612a7990919063ffffffff16565b90506000610c1c8660800151610bf957600954610bfd565b6008545b6107fc8860400151610802610c158b6080015161100f565b87906129d9565b9050610c3e610c37846107fc84670de0b6b3a76400006129d9565b8590612abb565b935050505b6000610c6364e8d4a510006107fc610c5b8a8c610584565b8751906129d9565b6020850151909150610c8b90610c85670de0b6b3a76400006107fc85886129d9565b90612a79565b98975050505050505050565b60048181548110610ca457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610ce0612afa565b73ffffffffffffffffffffffffffffffffffffffff16610cfe611b01565b73ffffffffffffffffffffffffffffffffffffffff1614610d4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610da0903390600401613268565b60206040518083038186803b158015610db857600080fd5b505afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df09190613130565b905080610e29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061333c565b610e4b73ffffffffffffffffffffffffffffffffffffffff8316333084612afe565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610ebf907f00000000000000000000000000000000000000000000000000000000000000009085906004016132ba565b602060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1191906130fc565b506040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890610fa6907f0000000000000000000000000000000000000000000000000000000000000000908590600401613bc0565b600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b505043600d5550506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a15050565b600c5481565b600081156110455761103e64e8d4a510006107fc600b5468022b1c8c1227a000006129d990919063ffffffff16565b905061106f565b61106c64e8d4a510006107fc600c5468022b1c8c1227a000006129d990919063ffffffff16565b90505b919050565b60076020526000908152604090205460ff1681565b68022b1c8c1227a0000081565b600260015414156110d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001556110e0612fdb565b6110e983611394565b60008481526006602090815260408083203384529091529020805491925090831115611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137a9565b600061114d3386610584565b905061115a3386836128fc565b83156111af57815461116c9085612a79565b82600001819055506111af33856005888154811061118657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169190612ba1565b6111e3670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b600183015561122b6111fe64e8d4a510006107fc87856129d9565b6004878154811061120b57fe5b906000526020600020906005020160030154612a7990919063ffffffff16565b6004868154811061123857fe5b906000526020600020906005020160030181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516112949190613ba7565b60405180910390a3505060018055505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890611360907f000000000000000000000000000000000000000000000000000000000000000090600090600401613bc0565b600060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b50505050565b61139c612fdb565b600482815481106113a957fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561106f576060810151608082015160009061141b5760095461141f565b6008545b90506000821180156114315750600081115b1561149757600061144f846020015143612a7990919063ffffffff16565b9050600061146f836107fc8760400151610802610c158a6080015161100f565b905061149261148a856107fc84670de0b6b3a76400006129d9565b865190612abb565b855250505b43602084015260048054849190869081106114ae57fe5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608401516003830155608090930151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558401518451915186927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926115539290918791613bce565b60405180910390a25050919050565b6002600154141561159f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001819055506000600482815481106115b657fe5b60009182526020808320858452600682526040808520338087529352842080548582556001820186905560059094029091019450929061160c9064e8d4a51000906107fc906116059089610584565b85906129d9565b90508084600301541161162057600061162f565b600384015461162f9082612a79565b846003018190555061164933836005888154811061118657fe5b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595846040516112949190613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045460005b81811015611744576116ca612fdb565b600482815481106116d757fe5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff161515608082015291501561173b5761173982611394565b505b506001016116ba565b5050565b611750612afa565b73ffffffffffffffffffffffffffffffffffffffff1661176e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146117bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6117c483611394565b5080156117d3576117d36116b4565b600483815481106117e057fe5b600091825260209091206004600590920201015460ff161561183b576118338261084e6004868154811061181057fe5b906000526020600020906005020160020154600854612a7990919063ffffffff16565b600855611876565b6118728261084e6004868154811061184f57fe5b906000526020600020906005020160020154600954612a7990919063ffffffff16565b6009555b816004848154811061188457fe5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516118c99190613ba7565b60405180910390a2505050565b6501d1a94a200081565b6118e8612afa565b73ffffffffffffffffffffffffffffffffffffffff16611906611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b670de0b6b3a764000081565b6119d6612afa565b73ffffffffffffffffffffffffffffffffffffffff166119f4611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b8015611a4f57611a4f6116b4565b6000611a66600d5443612a7990919063ffffffff16565b90506000611a7c611a75611b4f565b83906129d9565b600254909150611aa29073ffffffffffffffffffffffffffffffffffffffff1682612bc5565b505043600d5550565b600d5481565b60058181548110611abe57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60095481565b6000611b7864e8d4a510006107fc600a5468022b1c8c1227a000006129d990919063ffffffff16565b905090565b611b85612afa565b73ffffffffffffffffffffffffffffffffffffffff16611ba3611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811615801590611c30575060035473ffffffffffffffffffffffffffffffffffffffff828116911614155b611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613b0e565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b600b5481565b611ce3612afa565b73ffffffffffffffffffffffffffffffffffffffff16611d01611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8216611d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613963565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600760205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055517fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d5190611e1a9084906132e0565b60405180910390a25050565b60085481565b611e34612afa565b73ffffffffffffffffffffffffffffffffffffffff16611e52611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611e9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190611ef4903090600401613268565b60206040518083038186803b158015611f0c57600080fd5b505afa158015611f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f449190613130565b1015611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906138a9565b8015612010576120106116b4565b811561202b576008546120239085612abb565b60085561203c565b6009546120389085612abb565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905591546121dd91612a79565b7f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa868560405161220e929190613bb0565b60405180910390a350505050565b64e8d4a5100081565b61222d612afa565b73ffffffffffffffffffffffffffffffffffffffff1661224b611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000841180156122a85750600083115b80156122b45750600082115b6122ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061366c565b64e8d4a510006122fe8361084e8787612abb565b14612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139f7565b8015612343576123436116b4565b61234d60006119ce565b600a849055600b839055600c8290556040517fae2d2e7d1ae84564fc72227253ce0f36a007209f7fd5ec414dea80e5af2fb5b09061239090869086908690613bce565b60405180910390a150505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600260015414156123fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015561240a612fdb565b61241383611394565b600084815260066020908152604080832033845290915290206080820151919250908061244f57503360009081526007602052604090205460ff165b612485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906136c9565b60006124913386610584565b8254909150156124a6576124a63386836128fc565b83156126a2576000600586815481106124bb57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a082319061251a903090600401613268565b60206040518083038186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256a9190613130565b90506125a933308760058a8154811061257f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16929190612afe565b61266981600588815481106125ba57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190612619903090600401613268565b60206040518083038186803b15801561263157600080fd5b505afa158015612645573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c859190613130565b83549095506126789086612abb565b835561269b61269064e8d4a510006107fc88866129d9565b606086015190612abb565b6060850152505b6126d6670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b826001018190555082600486815481106126ec57fe5b6000918252602091829020835160059290920201908155908201516001820155604080830151600283015560608301516003830155608090920151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905551859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611294908890613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b6127b7612afa565b73ffffffffffffffffffffffffffffffffffffffff166127d5611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811661286f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613453565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61290461300c565b50600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906129719064e8d4a51000906107fc90866129d9565b905060006129a9670de0b6b3a76400006107fc6004888154811061299157fe5b600091825260209091206005909102015485906129d9565b905060006129c4846020015183612a7990919063ffffffff16565b90506129d08782612bc5565b50505050505050565b6000826129e8575060006105d4565b828202828482816129f557fe5b04146105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061374c565b6000808211612a68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061357b565b818381612a7157fe5b049392505050565b600082821115612ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134e7565b50900390565b6000828201838110156105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134b0565b3390565b61138e846323b872dd60e01b858585604051602401612b1f93929190613289565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612db1565b612bc08363a9059cbb60e01b8484604051602401612b1f9291906132ba565b505050565b8015611744576040517f70a08231000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612c3f903090600401613268565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190613130565b1015612c9d57612c9d6112cb565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612d12903090600401613268565b60206040518083038186803b158015612d2a57600080fd5b505afa158015612d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d629190613130565b905081811015612d70578091505b612bc073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168484612ba1565b6060612e13826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e679092919063ffffffff16565b805190915015612bc05780806020019051810190612e3191906130fc565b612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906133f6565b6060612e768484600085612e80565b90505b9392505050565b606082471015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061351e565b612ec585612f82565b612efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139c0565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612f25919061324c565b60006040518083038185875af1925050503d8060008114612f62576040519150601f19603f3d011682016040523d82523d6000602084013e612f67565b606091505b5091509150612f77828286612f88565b979650505050505050565b3b151590565b60608315612f97575081612e79565b825115612fa75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b91906132eb565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60405180606001604052806000815260200160008152602001600081525090565b60006020828403121561303e578081fd5b81356105ce81613c35565b6000806040838503121561305b578081fd5b823561306681613c35565b9150602083013561307681613c5a565b809150509250929050565b60008060408385031215613093578182fd5b823561309e81613c35565b946020939093013593505050565b6000806000606084860312156130c0578081fd5b83356130cb81613c35565b95602085013595506040909401359392505050565b6000602082840312156130f1578081fd5b81356105ce81613c5a565b60006020828403121561310d578081fd5b81516105ce81613c5a565b600060208284031215613129578081fd5b5035919050565b600060208284031215613141578081fd5b5051919050565b6000806040838503121561315a578182fd5b82359150602083013561307681613c35565b60008060008060808587031215613181578081fd5b84359350602085013561319381613c35565b925060408501356131a381613c5a565b915060608501356131b381613c5a565b939692955090935050565b600080604083850312156131d0578182fd5b50508035926020909101359150565b6000806000606084860312156131f3578283fd5b8335925060208401359150604084013561320c81613c5a565b809150509250925092565b6000806000806080858703121561322c578384fd5b84359350602085013592506040850135915060608501356131b381613c5a565b6000825161325e818460208701613c09565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261330a816040850160208701613c09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526023908201527f4d61737465724368656656323a2042616c616e6365206d75737420657863656560408201527f6420300000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060408201527f6d756c7469706c69657200000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4d61737465724368656656323a2054686520757365722061646472657373206d60408201527f7573742062652076616c69640000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206d7573742062652076616c6964000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a2043616b652072617465206d7573742062652060408201527f67726561746572207468616e2030000000000000000000000000000000000000606082015260800190565b60208082526042908201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460408201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f60608201527f6f6c000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f77697468647261773a20496e73756666696369656e7400000000000000000000604082015260600190565b60208082526011908201527f4e6f6e6520424550323020746f6b656e73000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f737460408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f43414b4520746f6b656e2063616e277420626520616464656420746f2066617260408201527f6d20706f6f6c7300000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060408201527f636f756c6420626520626f6f7374656400000000000000000000000000000000606082015260800190565b60208082526032908201527f4d61737465724368656656323a20546865207768697465206c6973742061646460408201527f72657373206d7573742062652076616c69640000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526025908201527f4d61737465724368656656323a20546f74616c2072617465206d75737420626560408201527f2031653132000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526041908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206973207468652073616d6520776974682063757272656e742061646472657360608201527f7300000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f4d61737465724368656656323a204e657720626f6f737420636f6e747261637460408201527f2061646472657373206d7573742062652076616c696400000000000000000000606082015260800190565b600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b83811015613c24578181015183820152602001613c0c565b8381111561138e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114613c5757600080fd5b50565b8015158114613c5757600080fdfea2646970667358221220f3bdc87a312c1f6922cc6efd7e791ccbfcc6b4d3913517316c9bb61280affda264736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v1/test/artifactsFile/RevenueSharingPool.json b/projects/revenue-sharing-pool/v1/test/artifactsFile/RevenueSharingPool.json new file mode 100644 index 00000000..1634df23 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/artifactsFile/RevenueSharingPool.json @@ -0,0 +1,564 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RevenueSharingPool", + "sourceName": "contracts/RevenueSharingPool.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokens", + "type": "uint256" + } + ], + "name": "LogCheckpointToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_claimEpoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_maxEpoch", + "type": "uint256" + } + ], + "name": "LogClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "LogFeed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "LogKilled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "_toggleFlag", + "type": "bool" + } + ], + "name": "LogSetCanCheckpointToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_ok", + "type": "bool" + } + ], + "name": "LogSetWhitelistedCheckpointCallers", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "TOKEN_CHECKPOINT_DEADLINE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VCake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WEEK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canCheckpointToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpointToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "checkpointTotalSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "claim", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_users", + "type": "address[]" + } + ], + "name": "claimMany", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyReturn", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "feed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "injectReward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isKilled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "kill", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastTokenTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_newCanCheckpointToken", + "type": "bool" + } + ], + "name": "setCanCheckpointToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_callers", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "_ok", + "type": "bool" + } + ], + "name": "setWhitelistedCheckpointCallers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startWeekCursor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokensPerWeek", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userEpochOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "weekCursor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "weekCursorOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedCheckpointCallers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b506200001d3362000124565b600180819055506000806000806000336001600160a01b031663890357306040518163ffffffff1660e01b815260040160a060405180830381865afa1580156200006b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000919190620001b5565b945094509450945094506000620000ae856200017460201b60201c565b600281905560068190556003819055600980546001600160a01b038088166001600160a01b031992831617909255600880548a84169216919091179055600c8054918616620100000262010000600160b01b03199092169190911790559050620001188262000124565b5050505050506200026d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062093a806200018681846200021c565b6200019291906200023f565b92915050565b80516001600160a01b0381168114620001b057600080fd5b919050565b600080600080600060a08688031215620001ce57600080fd5b620001d98662000198565b945060208601519350620001f06040870162000198565b9250620002006060870162000198565b9150620002106080870162000198565b90509295509295909350565b6000826200023a57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156200026857634e487b7160e01b600052601160045260246000fd5b500290565b612ce4806200027d6000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80638147b0dd11610104578063a2ab2a46116100a2578063f2fde38b11610071578063f2fde38b14610404578063f4359ce514610417578063f59dfdfb14610421578063f7c618c11461043457600080fd5b8063a2ab2a46146103e0578063a5420e98146103e9578063bee5dc32146103f3578063e1ebb9f0146103fb57600080fd5b8063899519be116100de578063899519be146103705780638da5cb5b146103905780638fe8a101146103ae578063981b24d0146103c057600080fd5b80638147b0dd14610331578063862a9f2f1461035457806386f17a361461035d57600080fd5b806341c0e1b51161017157806361ac407d1161014b57806361ac407d146102ed578063715018a6146102f6578063786479cd146102fe5780637e686e011461031e57600080fd5b806341c0e1b5146102ac5780634ee2cd7e146102b45780635a4b8c1d146102c757600080fd5b80631fe063bd116101ad5780631fe063bd1461022c5780632d19b9821461024c578063326a940714610291578063375871611461029957600080fd5b8063097cd232146101d45780630cc672e4146101e95780631e83409a1461020b575b600080fd5b6101e76101e2366004612716565b610454565b005b600c546101f69060ff1681565b60405190151581526020015b60405180910390f35b61021e610219366004612761565b61053a565b604051908152602001610202565b61021e61023a366004612761565b60046020526000908152604090205481565b60085461026c9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610202565b6101e76106c0565b6101e76102a736600461278a565b610740565b6101e7610826565b61021e6102c23660046127a7565b6109be565b600c5461026c9062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b61021e60025481565b6101e7610b80565b61021e61030c366004612761565b60056020526000908152604090205481565b6101f661032c36600461281d565b610c0d565b6101f661033f366004612761565b600d6020526000908152604090205460ff1681565b61021e600a5481565b6101e761036b36600461285f565b610f28565b61021e61037e3660046128b6565b60076020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff1661026c565b600c546101f690610100900460ff1681565b61021e6103ce3660046128b6565b600b6020526000908152604090205481565b61021e60035481565b61021e6201518081565b6101e76110da565b61021e60065481565b6101e7610412366004612761565b611216565b61021e62093a8081565b6101f661042f3660046128b6565b611346565b60095461026c9073ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6009546104ff9073ffffffffffffffffffffffffffffffffffffffff163330846114bc565b80600a600082825461051191906128fe565b909155508190506007600061052585611598565b81526020810191909152604001600020555050565b6000600260015414156105a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff1615610620576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6003544210610631576106316115b2565b600654600c5460ff168015610651575061064e62015180826128fe565b42115b156106615761065e6117af565b50425b61066a81611598565b9050600061067884836119fd565b905080156106b55780600a5461068e9190612916565b600a556009546106b59073ffffffffffffffffffffffffffffffffffffffff168583611efb565b600180559392505050565b6002600154141561072d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b600260015561073a6115b2565b60018055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527ff1fe457b8a983acb8e891ebd18d654492f091f47738497137f2718583d4a49759060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010017908190556009546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526109939273ffffffffffffffffffffffffffffffffffffffff6201000090910481169216906370a0823190602401602060405180830381865afa15801561094f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610973919061292d565b60095473ffffffffffffffffffffffffffffffffffffffff169190611efb565b6040517f34156ff445c4c60d77a4e0f638ebec01c6f63ceff72508882103e8127e11cad590600090a1565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283929116906381fc83bb90602401602060405180830381865afa158015610a32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a56919061292d565b905080610a67576000915050610b7a565b6000610a74858584611f56565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015610af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b159190612958565b90506000610b31826040015187610b2c9190612916565b61207a565b8260200151610b4091906129f1565b8251610b4c9190612aa7565b9050600081600f0b1215610b67576000945050505050610b7a565b610b7381600f0b61214c565b9450505050505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b610c0b60006121b8565b565b600060026001541415610c7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff1615610cf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6014821115610d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f216f76657220323020757365727300000000000000000000000000000000000060448201526064016104d1565b6003544210610d6f57610d6f6115b2565b600654600c5460ff168015610d8f5750610d8c62015180826128fe565b42115b15610d9f57610d9c6117af565b50425b610da881611598565b90506000805b84811015610f01576000868683818110610dca57610dca612b18565b9050602002016020810190610ddf9190612761565b73ffffffffffffffffffffffffffffffffffffffff161415610e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f626164207573657200000000000000000000000000000000000000000000000060448201526064016104d1565b6000610e8f878784818110610e7457610e74612b18565b9050602002016020810190610e899190612761565b856119fd565b90508015610eee57610ee1878784818110610eac57610eac612b18565b9050602002016020810190610ec19190612761565b60095473ffffffffffffffffffffffffffffffffffffffff169083611efb565b610eeb81846128fe565b92505b5080610ef981612b47565b915050610dae565b508015610f1a5780600a54610f169190612916565b600a555b505060018080559392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fa9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b60005b828110156110d45781600d6000868685818110610fcb57610fcb612b18565b9050602002016020810190610fe09190612761565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905583838281811061104557611045612b18565b905060200201602081019061105a9190612761565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f296409edb0e117b01125cbcf74a4c4f0b65d1533d230c4db68010d87bfbbcb20846040516110ba911515815260200190565b60405180910390a3806110cc81612b47565b915050610fac565b50505050565b60026001541415611147576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b600260015560005473ffffffffffffffffffffffffffffffffffffffff163314806111815750336000908152600d602052604090205460ff165b806111a85750600c5460ff1680156111a85750620151806006546111a591906128fe565b42115b61120e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21616c6c6f77000000000000000000000000000000000000000000000000000060448201526064016104d1565b61073a6117af565b60005473ffffffffffffffffffffffffffffffffffffffff163314611297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b73ffffffffffffffffffffffffffffffffffffffff811661133a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104d1565b611343816121b8565b50565b6000600260015414156113b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff161561142c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6009546114519073ffffffffffffffffffffffffffffffffffffffff163330856114bc565b600c5460ff16801561147257506201518060065461146f91906128fe565b42115b1561147f5761147f6117af565b6040518281527f793ef3f1fc06875d507b76400395f0c7cb5985dfa668fb04175b2f754cff238d9060200160405180910390a15050600180805590565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526110d49085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261222d565b600062093a806115a88184612b80565b610b7a9190612bbb565b60035460006115c042611598565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561162c57600080fd5b505af1158015611640573d6000803e3d6000fd5b5050505060005b60348110156117a8578183111561165d576117a8565b600061166884612339565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa1580156116dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117019190612958565b90506000816040015186111561172757611724826040015187610b2c9190612916565b90505b600081836020015161173991906129f1565b83516117459190612aa7565b9050600081600f0b1215611767576000878152600b6020526040812055611783565b61177381600f0b61214c565b6000888152600b60205260409020555b5050505061179462093a80846128fe565b9250806117a081612b47565b915050611647565b5050600355565b6009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561181e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611842919061292d565b90506000600a54826118549190612916565b600a839055600654909150600061186b8242612916565b9050600061187883611598565b4260065590506000805b60348110156119bb5761189862093a80846128fe565b91508142101561191a57831580156118af57508442145b156118e2576000838152600760205260409020546118ce9087906128fe565b6000848152600760205260409020556119bb565b836118ed8642612916565b6118f79088612bbb565b6119019190612b80565b6000848152600760205260409020546118ce91906128fe565b8315801561192757508482145b1561195a576000838152600760205260409020546119469087906128fe565b6000848152600760205260409020556119a2565b836119658684612916565b61196f9088612bbb565b6119799190612b80565b60008481526007602052604090205461199291906128fe565b6000848152600760205260409020555b81945081925080806119b390612b47565b915050611882565b5060408051428152602081018790527f5f35cdf2d7ef662d66f57c6493498f63de6ac64b3221da30edb54f343fc196ec910160405180910390a1505050505050565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283928392839216906381fc83bb90602401602060405180830381865afa158015611a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a98919061292d565b60025490915081611ab0576000945050505050610b7a565b73ffffffffffffffffffffffffffffffffffffffff871660009081526004602052604090205480611aed57611ae6888385611f56565b9450611b16565b73ffffffffffffffffffffffffffffffffffffffff881660009081526005602052604090205494505b84611b2057600194505b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301526024820188905260009216906334d901a490604401608060405180830381865afa158015611b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bbc9190612958565b905081611bfe5762093a8080600162093a808460400151611bdd91906128fe565b611be79190612916565b611bf19190612b80565b611bfb9190612bbb565b91505b878210611c145760009650505050505050610b7a565b82821015611c20578291505b6040805160808101825260008082526020820181905291810182905260608101829052905b6034811015611e6057898410611c5a57611e60565b82604001518410158015611c6e5750858811155b15611d9557611c7e8860016128fe565b975060405180608001604052808460000151600f0b81526020018460200151600f0b8152602001846040015181526020018460600151815250915085881115611cf35760405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509250611e4e565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d81166004830152602482018b9052909116906334d901a490604401608060405180830381865afa158015611d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8e9190612958565b9250611e4e565b6000611daa836040015186610b2c9190612916565b90506000611ddf611dd7856020015184611dc491906129f1565b8651611dd09190612aa7565b60006124ea565b600f0b61214c565b905080158015611dee5750878a115b15611dfa575050611e60565b8015611e3c576000868152600b6020908152604080832054600790925290912054611e259083612bbb565b611e2f9190612b80565b611e39908a6128fe565b98505b611e4962093a80876128fe565b955050505b80611e5881612b47565b915050611c45565b50611e7585611e7060018a612916565b612507565b73ffffffffffffffffffffffffffffffffffffffff8b166000818152600560209081526040808320859055600482529182902087905581518a8152908101849052908101889052919850907fea919eaf7a28ab483f798b086744ed74dc4f00c9cb7f0feb0310922fce07c8949060600160405180910390a2509398975050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611f519084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611516565b505050565b60008082815b608081101561206d57818310611f715761206d565b60006002611f7f84866128fe565b611f8a9060016128fe565b611f949190612b80565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015612011573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120359190612958565b90508781604001511161204a57819450612058565b612055600183612916565b93505b5050808061206590612b47565b915050611f5c565b50909150505b9392505050565b60007fffffffffffffffffffffffffffffffff8000000000000000000000000000000082128015906120bc57506f7fffffffffffffffffffffffffffffff8213155b612148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f323820626974730000000000000000000000000000000000000000000000000060648201526084016104d1565b5090565b600080821215612148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f73697469766560448201526064016104d1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061228f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166125169092919063ffffffff16565b805190915015611f5157808060200190518101906122ad9190612bf8565b611f51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104d1565b600080600090506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156123af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d3919061292d565b905060005b60808110156124e1578183106123ed576124e1565b600060026123fb84866128fe565b6124069060016128fe565b6124109190612b80565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa158015612485573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a99190612958565b9050868160400151116124be578194506124cc565b6124c9600183612916565b93505b505080806124d990612b47565b9150506123d8565b50909392505050565b600081600f0b83600f0b12156125005781612073565b5090919050565b60008183106125005781612073565b6060612525848460008561252d565b949350505050565b6060824710156125bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104d1565b73ffffffffffffffffffffffffffffffffffffffff85163b61263d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104d1565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516126669190612c41565b60006040518083038185875af1925050503d80600081146126a3576040519150601f19603f3d011682016040523d82523d6000602084013e6126a8565b606091505b50915091506126b88282866126c3565b979650505050505050565b606083156126d2575081612073565b8251156126e25782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d19190612c5d565b6000806040838503121561272957600080fd5b50508035926020909101359150565b803573ffffffffffffffffffffffffffffffffffffffff8116811461275c57600080fd5b919050565b60006020828403121561277357600080fd5b61207382612738565b801515811461134357600080fd5b60006020828403121561279c57600080fd5b81356120738161277c565b600080604083850312156127ba57600080fd5b6127c383612738565b946020939093013593505050565b60008083601f8401126127e357600080fd5b50813567ffffffffffffffff8111156127fb57600080fd5b6020830191508360208260051b850101111561281657600080fd5b9250929050565b6000806020838503121561283057600080fd5b823567ffffffffffffffff81111561284757600080fd5b612853858286016127d1565b90969095509350505050565b60008060006040848603121561287457600080fd5b833567ffffffffffffffff81111561288b57600080fd5b612897868287016127d1565b90945092505060208401356128ab8161277c565b809150509250925092565b6000602082840312156128c857600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612911576129116128cf565b500190565b600082821015612928576129286128cf565b500390565b60006020828403121561293f57600080fd5b5051919050565b8051600f81900b811461275c57600080fd5b60006080828403121561296a57600080fd5b6040516080810181811067ffffffffffffffff821117156129b4577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040526129c083612946565b81526129ce60208401612946565b602082015260408301516040820152606083015160608201528091505092915050565b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff600082136000841383830485118282161615612a2a57612a2a6128cf565b7fffffffffffffffffffffffffffffffff800000000000000000000000000000006000851286820586128184161615612a6557612a656128cf565b60008712925085820587128484161615612a8157612a816128cf565b85850587128184161615612a9757612a976128cf565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff8000000000000000000000000000000001831281151615612aea57612aea6128cf565b816f7fffffffffffffffffffffffffffffff018313811615612b0e57612b0e6128cf565b5090039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612b7957612b796128cf565b5060010190565b600082612bb6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612bf357612bf36128cf565b500290565b600060208284031215612c0a57600080fd5b81516120738161277c565b60005b83811015612c30578181015183820152602001612c18565b838111156110d45750506000910152565b60008251612c53818460208701612c15565b9190910192915050565b6020815260008251806020840152612c7c816040850160208701612c15565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122060c7ccf8d09c7e86724382bdc4bd5baf8a6b4b8b11a9674dbe6962a514345f8c64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80638147b0dd11610104578063a2ab2a46116100a2578063f2fde38b11610071578063f2fde38b14610404578063f4359ce514610417578063f59dfdfb14610421578063f7c618c11461043457600080fd5b8063a2ab2a46146103e0578063a5420e98146103e9578063bee5dc32146103f3578063e1ebb9f0146103fb57600080fd5b8063899519be116100de578063899519be146103705780638da5cb5b146103905780638fe8a101146103ae578063981b24d0146103c057600080fd5b80638147b0dd14610331578063862a9f2f1461035457806386f17a361461035d57600080fd5b806341c0e1b51161017157806361ac407d1161014b57806361ac407d146102ed578063715018a6146102f6578063786479cd146102fe5780637e686e011461031e57600080fd5b806341c0e1b5146102ac5780634ee2cd7e146102b45780635a4b8c1d146102c757600080fd5b80631fe063bd116101ad5780631fe063bd1461022c5780632d19b9821461024c578063326a940714610291578063375871611461029957600080fd5b8063097cd232146101d45780630cc672e4146101e95780631e83409a1461020b575b600080fd5b6101e76101e2366004612716565b610454565b005b600c546101f69060ff1681565b60405190151581526020015b60405180910390f35b61021e610219366004612761565b61053a565b604051908152602001610202565b61021e61023a366004612761565b60046020526000908152604090205481565b60085461026c9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610202565b6101e76106c0565b6101e76102a736600461278a565b610740565b6101e7610826565b61021e6102c23660046127a7565b6109be565b600c5461026c9062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b61021e60025481565b6101e7610b80565b61021e61030c366004612761565b60056020526000908152604090205481565b6101f661032c36600461281d565b610c0d565b6101f661033f366004612761565b600d6020526000908152604090205460ff1681565b61021e600a5481565b6101e761036b36600461285f565b610f28565b61021e61037e3660046128b6565b60076020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff1661026c565b600c546101f690610100900460ff1681565b61021e6103ce3660046128b6565b600b6020526000908152604090205481565b61021e60035481565b61021e6201518081565b6101e76110da565b61021e60065481565b6101e7610412366004612761565b611216565b61021e62093a8081565b6101f661042f3660046128b6565b611346565b60095461026c9073ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6009546104ff9073ffffffffffffffffffffffffffffffffffffffff163330846114bc565b80600a600082825461051191906128fe565b909155508190506007600061052585611598565b81526020810191909152604001600020555050565b6000600260015414156105a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff1615610620576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6003544210610631576106316115b2565b600654600c5460ff168015610651575061064e62015180826128fe565b42115b156106615761065e6117af565b50425b61066a81611598565b9050600061067884836119fd565b905080156106b55780600a5461068e9190612916565b600a556009546106b59073ffffffffffffffffffffffffffffffffffffffff168583611efb565b600180559392505050565b6002600154141561072d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b600260015561073a6115b2565b60018055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527ff1fe457b8a983acb8e891ebd18d654492f091f47738497137f2718583d4a49759060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010017908190556009546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526109939273ffffffffffffffffffffffffffffffffffffffff6201000090910481169216906370a0823190602401602060405180830381865afa15801561094f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610973919061292d565b60095473ffffffffffffffffffffffffffffffffffffffff169190611efb565b6040517f34156ff445c4c60d77a4e0f638ebec01c6f63ceff72508882103e8127e11cad590600090a1565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283929116906381fc83bb90602401602060405180830381865afa158015610a32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a56919061292d565b905080610a67576000915050610b7a565b6000610a74858584611f56565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015610af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b159190612958565b90506000610b31826040015187610b2c9190612916565b61207a565b8260200151610b4091906129f1565b8251610b4c9190612aa7565b9050600081600f0b1215610b67576000945050505050610b7a565b610b7381600f0b61214c565b9450505050505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b610c0b60006121b8565b565b600060026001541415610c7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff1615610cf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6014821115610d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f216f76657220323020757365727300000000000000000000000000000000000060448201526064016104d1565b6003544210610d6f57610d6f6115b2565b600654600c5460ff168015610d8f5750610d8c62015180826128fe565b42115b15610d9f57610d9c6117af565b50425b610da881611598565b90506000805b84811015610f01576000868683818110610dca57610dca612b18565b9050602002016020810190610ddf9190612761565b73ffffffffffffffffffffffffffffffffffffffff161415610e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f626164207573657200000000000000000000000000000000000000000000000060448201526064016104d1565b6000610e8f878784818110610e7457610e74612b18565b9050602002016020810190610e899190612761565b856119fd565b90508015610eee57610ee1878784818110610eac57610eac612b18565b9050602002016020810190610ec19190612761565b60095473ffffffffffffffffffffffffffffffffffffffff169083611efb565b610eeb81846128fe565b92505b5080610ef981612b47565b915050610dae565b508015610f1a5780600a54610f169190612916565b600a555b505060018080559392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fa9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b60005b828110156110d45781600d6000868685818110610fcb57610fcb612b18565b9050602002016020810190610fe09190612761565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905583838281811061104557611045612b18565b905060200201602081019061105a9190612761565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f296409edb0e117b01125cbcf74a4c4f0b65d1533d230c4db68010d87bfbbcb20846040516110ba911515815260200190565b60405180910390a3806110cc81612b47565b915050610fac565b50505050565b60026001541415611147576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b600260015560005473ffffffffffffffffffffffffffffffffffffffff163314806111815750336000908152600d602052604090205460ff165b806111a85750600c5460ff1680156111a85750620151806006546111a591906128fe565b42115b61120e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21616c6c6f77000000000000000000000000000000000000000000000000000060448201526064016104d1565b61073a6117af565b60005473ffffffffffffffffffffffffffffffffffffffff163314611297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b73ffffffffffffffffffffffffffffffffffffffff811661133a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104d1565b611343816121b8565b50565b6000600260015414156113b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff161561142c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6009546114519073ffffffffffffffffffffffffffffffffffffffff163330856114bc565b600c5460ff16801561147257506201518060065461146f91906128fe565b42115b1561147f5761147f6117af565b6040518281527f793ef3f1fc06875d507b76400395f0c7cb5985dfa668fb04175b2f754cff238d9060200160405180910390a15050600180805590565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526110d49085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261222d565b600062093a806115a88184612b80565b610b7a9190612bbb565b60035460006115c042611598565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561162c57600080fd5b505af1158015611640573d6000803e3d6000fd5b5050505060005b60348110156117a8578183111561165d576117a8565b600061166884612339565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa1580156116dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117019190612958565b90506000816040015186111561172757611724826040015187610b2c9190612916565b90505b600081836020015161173991906129f1565b83516117459190612aa7565b9050600081600f0b1215611767576000878152600b6020526040812055611783565b61177381600f0b61214c565b6000888152600b60205260409020555b5050505061179462093a80846128fe565b9250806117a081612b47565b915050611647565b5050600355565b6009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561181e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611842919061292d565b90506000600a54826118549190612916565b600a839055600654909150600061186b8242612916565b9050600061187883611598565b4260065590506000805b60348110156119bb5761189862093a80846128fe565b91508142101561191a57831580156118af57508442145b156118e2576000838152600760205260409020546118ce9087906128fe565b6000848152600760205260409020556119bb565b836118ed8642612916565b6118f79088612bbb565b6119019190612b80565b6000848152600760205260409020546118ce91906128fe565b8315801561192757508482145b1561195a576000838152600760205260409020546119469087906128fe565b6000848152600760205260409020556119a2565b836119658684612916565b61196f9088612bbb565b6119799190612b80565b60008481526007602052604090205461199291906128fe565b6000848152600760205260409020555b81945081925080806119b390612b47565b915050611882565b5060408051428152602081018790527f5f35cdf2d7ef662d66f57c6493498f63de6ac64b3221da30edb54f343fc196ec910160405180910390a1505050505050565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283928392839216906381fc83bb90602401602060405180830381865afa158015611a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a98919061292d565b60025490915081611ab0576000945050505050610b7a565b73ffffffffffffffffffffffffffffffffffffffff871660009081526004602052604090205480611aed57611ae6888385611f56565b9450611b16565b73ffffffffffffffffffffffffffffffffffffffff881660009081526005602052604090205494505b84611b2057600194505b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301526024820188905260009216906334d901a490604401608060405180830381865afa158015611b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bbc9190612958565b905081611bfe5762093a8080600162093a808460400151611bdd91906128fe565b611be79190612916565b611bf19190612b80565b611bfb9190612bbb565b91505b878210611c145760009650505050505050610b7a565b82821015611c20578291505b6040805160808101825260008082526020820181905291810182905260608101829052905b6034811015611e6057898410611c5a57611e60565b82604001518410158015611c6e5750858811155b15611d9557611c7e8860016128fe565b975060405180608001604052808460000151600f0b81526020018460200151600f0b8152602001846040015181526020018460600151815250915085881115611cf35760405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509250611e4e565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d81166004830152602482018b9052909116906334d901a490604401608060405180830381865afa158015611d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8e9190612958565b9250611e4e565b6000611daa836040015186610b2c9190612916565b90506000611ddf611dd7856020015184611dc491906129f1565b8651611dd09190612aa7565b60006124ea565b600f0b61214c565b905080158015611dee5750878a115b15611dfa575050611e60565b8015611e3c576000868152600b6020908152604080832054600790925290912054611e259083612bbb565b611e2f9190612b80565b611e39908a6128fe565b98505b611e4962093a80876128fe565b955050505b80611e5881612b47565b915050611c45565b50611e7585611e7060018a612916565b612507565b73ffffffffffffffffffffffffffffffffffffffff8b166000818152600560209081526040808320859055600482529182902087905581518a8152908101849052908101889052919850907fea919eaf7a28ab483f798b086744ed74dc4f00c9cb7f0feb0310922fce07c8949060600160405180910390a2509398975050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611f519084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611516565b505050565b60008082815b608081101561206d57818310611f715761206d565b60006002611f7f84866128fe565b611f8a9060016128fe565b611f949190612b80565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015612011573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120359190612958565b90508781604001511161204a57819450612058565b612055600183612916565b93505b5050808061206590612b47565b915050611f5c565b50909150505b9392505050565b60007fffffffffffffffffffffffffffffffff8000000000000000000000000000000082128015906120bc57506f7fffffffffffffffffffffffffffffff8213155b612148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f323820626974730000000000000000000000000000000000000000000000000060648201526084016104d1565b5090565b600080821215612148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f73697469766560448201526064016104d1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061228f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166125169092919063ffffffff16565b805190915015611f5157808060200190518101906122ad9190612bf8565b611f51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104d1565b600080600090506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156123af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d3919061292d565b905060005b60808110156124e1578183106123ed576124e1565b600060026123fb84866128fe565b6124069060016128fe565b6124109190612b80565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa158015612485573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a99190612958565b9050868160400151116124be578194506124cc565b6124c9600183612916565b93505b505080806124d990612b47565b9150506123d8565b50909392505050565b600081600f0b83600f0b12156125005781612073565b5090919050565b60008183106125005781612073565b6060612525848460008561252d565b949350505050565b6060824710156125bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104d1565b73ffffffffffffffffffffffffffffffffffffffff85163b61263d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104d1565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516126669190612c41565b60006040518083038185875af1925050503d80600081146126a3576040519150601f19603f3d011682016040523d82523d6000602084013e6126a8565b606091505b50915091506126b88282866126c3565b979650505050505050565b606083156126d2575081612073565b8251156126e25782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d19190612c5d565b6000806040838503121561272957600080fd5b50508035926020909101359150565b803573ffffffffffffffffffffffffffffffffffffffff8116811461275c57600080fd5b919050565b60006020828403121561277357600080fd5b61207382612738565b801515811461134357600080fd5b60006020828403121561279c57600080fd5b81356120738161277c565b600080604083850312156127ba57600080fd5b6127c383612738565b946020939093013593505050565b60008083601f8401126127e357600080fd5b50813567ffffffffffffffff8111156127fb57600080fd5b6020830191508360208260051b850101111561281657600080fd5b9250929050565b6000806020838503121561283057600080fd5b823567ffffffffffffffff81111561284757600080fd5b612853858286016127d1565b90969095509350505050565b60008060006040848603121561287457600080fd5b833567ffffffffffffffff81111561288b57600080fd5b612897868287016127d1565b90945092505060208401356128ab8161277c565b809150509250925092565b6000602082840312156128c857600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612911576129116128cf565b500190565b600082821015612928576129286128cf565b500390565b60006020828403121561293f57600080fd5b5051919050565b8051600f81900b811461275c57600080fd5b60006080828403121561296a57600080fd5b6040516080810181811067ffffffffffffffff821117156129b4577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040526129c083612946565b81526129ce60208401612946565b602082015260408301516040820152606083015160608201528091505092915050565b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff600082136000841383830485118282161615612a2a57612a2a6128cf565b7fffffffffffffffffffffffffffffffff800000000000000000000000000000006000851286820586128184161615612a6557612a656128cf565b60008712925085820587128484161615612a8157612a816128cf565b85850587128184161615612a9757612a976128cf565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff8000000000000000000000000000000001831281151615612aea57612aea6128cf565b816f7fffffffffffffffffffffffffffffff018313811615612b0e57612b0e6128cf565b5090039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612b7957612b796128cf565b5060010190565b600082612bb6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612bf357612bf36128cf565b500290565b600060208284031215612c0a57600080fd5b81516120738161277c565b60005b83811015612c30578181015183820152602001612c18565b838111156110d45750506000910152565b60008251612c53818460208701612c15565b9190910192915050565b6020815260008251806020840152612c7c816040850160208701612c15565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122060c7ccf8d09c7e86724382bdc4bd5baf8a6b4b8b11a9674dbe6962a514345f8c64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v1/test/artifactsFile/RevenueSharingPoolFactory.json b/projects/revenue-sharing-pool/v1/test/artifactsFile/RevenueSharingPoolFactory.json new file mode 100644 index 00000000..e9da4d28 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/artifactsFile/RevenueSharingPoolFactory.json @@ -0,0 +1,238 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RevenueSharingPoolFactory", + "sourceName": "contracts/RevenueSharingPoolFactory.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_VCake", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "startTime", + "type": "uint256" + } + ], + "name": "NewRevenueSharingPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_STARTTIME_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VCake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_startTime", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_emergencyReturn", + "type": "address" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parameters", + "outputs": [ + { + "internalType": "address", + "name": "VCake", + "type": "address" + }, + { + "internalType": "uint256", + "name": "startTime", + "type": "uint256" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "address", + "name": "emergencyReturn", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pools", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rewardTokenPools", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506040516139e73803806139e783398101604081905261002f916100ad565b6100383361005d565b600680546001600160a01b0319166001600160a01b03929092169190911790556100dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100bf57600080fd5b81516001600160a01b03811681146100d657600080fd5b9392505050565b6138fb806100ec6000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c806389035730116100765780639442fd621161005b5780639442fd621461020a578063ac4afa381461021d578063f2fde38b1461025357600080fd5b8063890357301461016e5780638da5cb5b146101ec57600080fd5b80633f137f44116100a75780633f137f4414610124578063715018a61461015a5780637434c73c1461016457600080fd5b8063081e3eda146100c35780632d19b982146100df575b600080fd5b6100cc60075481565b6040519081526020015b60405180910390f35b6006546100ff9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100d6565b6100ff61013236600461086d565b60096020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b610162610266565b005b6100cc6224ea0081565b6001546002546003546004546005546101a59473ffffffffffffffffffffffffffffffffffffffff90811694938116928116911685565b6040805173ffffffffffffffffffffffffffffffffffffffff968716815260208101959095529285169284019290925283166060830152909116608082015260a0016100d6565b60005473ffffffffffffffffffffffffffffffffffffffff166100ff565b6100ff61021836600461088f565b6102f8565b6100ff61022b3660046108cb565b60086020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b61016261026136600461086d565b610692565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102f660006107c2565b565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461037a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600960205260409020541615610409576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f416c7265616479206372656174656420706f6f6c00000000000000000000000060448201526064016102e3565b6104166224ea0042610913565b84111561047f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c696420737461727454696d6500000000000000000000000000000060448201526064016102e3565b6040805160a0808201835260065473ffffffffffffffffffffffffffffffffffffffff90811680845260208085018a90528883168587018190529288166060808701829052336080978801819052600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000908116909617905560028d9055600380548616871790556004805486168417905560058054909516179093558651808301949094528387015290820189905242828501528451808303909401845291019283905281519101209061055590610837565b8190604051809103906000f5905080158015610575573d6000803e3d6000fd5b50600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560006002819055600380548316905560048054831690556005805483169055600780548252600860205260408220805490931673ffffffffffffffffffffffffffffffffffffffff85161790925581549293506105fd8361092b565b909155505073ffffffffffffffffffffffffffffffffffffffff83811660008181526009602090815260409182902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016948616948517905590518781529192917fec2e1cb6a896fbbc1dde3d584a806aaebbee2b30b73ecd99d4ece1691cb338f8910160405180910390a39392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610713576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b73ffffffffffffffffffffffffffffffffffffffff81166107b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102e3565b6107bf816107c2565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612f618061096583390190565b803573ffffffffffffffffffffffffffffffffffffffff8116811461086857600080fd5b919050565b60006020828403121561087f57600080fd5b61088882610844565b9392505050565b6000806000606084860312156108a457600080fd5b833592506108b460208501610844565b91506108c260408501610844565b90509250925092565b6000602082840312156108dd57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115610926576109266108e4565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561095d5761095d6108e4565b506001019056fe60806040523480156200001157600080fd5b506200001d3362000124565b600180819055506000806000806000336001600160a01b031663890357306040518163ffffffff1660e01b815260040160a060405180830381865afa1580156200006b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000919190620001b5565b945094509450945094506000620000ae856200017460201b60201c565b600281905560068190556003819055600980546001600160a01b038088166001600160a01b031992831617909255600880548a84169216919091179055600c8054918616620100000262010000600160b01b03199092169190911790559050620001188262000124565b5050505050506200026d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062093a806200018681846200021c565b6200019291906200023f565b92915050565b80516001600160a01b0381168114620001b057600080fd5b919050565b600080600080600060a08688031215620001ce57600080fd5b620001d98662000198565b945060208601519350620001f06040870162000198565b9250620002006060870162000198565b9150620002106080870162000198565b90509295509295909350565b6000826200023a57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156200026857634e487b7160e01b600052601160045260246000fd5b500290565b612ce4806200027d6000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80638147b0dd11610104578063a2ab2a46116100a2578063f2fde38b11610071578063f2fde38b14610404578063f4359ce514610417578063f59dfdfb14610421578063f7c618c11461043457600080fd5b8063a2ab2a46146103e0578063a5420e98146103e9578063bee5dc32146103f3578063e1ebb9f0146103fb57600080fd5b8063899519be116100de578063899519be146103705780638da5cb5b146103905780638fe8a101146103ae578063981b24d0146103c057600080fd5b80638147b0dd14610331578063862a9f2f1461035457806386f17a361461035d57600080fd5b806341c0e1b51161017157806361ac407d1161014b57806361ac407d146102ed578063715018a6146102f6578063786479cd146102fe5780637e686e011461031e57600080fd5b806341c0e1b5146102ac5780634ee2cd7e146102b45780635a4b8c1d146102c757600080fd5b80631fe063bd116101ad5780631fe063bd1461022c5780632d19b9821461024c578063326a940714610291578063375871611461029957600080fd5b8063097cd232146101d45780630cc672e4146101e95780631e83409a1461020b575b600080fd5b6101e76101e2366004612716565b610454565b005b600c546101f69060ff1681565b60405190151581526020015b60405180910390f35b61021e610219366004612761565b61053a565b604051908152602001610202565b61021e61023a366004612761565b60046020526000908152604090205481565b60085461026c9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610202565b6101e76106c0565b6101e76102a736600461278a565b610740565b6101e7610826565b61021e6102c23660046127a7565b6109be565b600c5461026c9062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b61021e60025481565b6101e7610b80565b61021e61030c366004612761565b60056020526000908152604090205481565b6101f661032c36600461281d565b610c0d565b6101f661033f366004612761565b600d6020526000908152604090205460ff1681565b61021e600a5481565b6101e761036b36600461285f565b610f28565b61021e61037e3660046128b6565b60076020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff1661026c565b600c546101f690610100900460ff1681565b61021e6103ce3660046128b6565b600b6020526000908152604090205481565b61021e60035481565b61021e6201518081565b6101e76110da565b61021e60065481565b6101e7610412366004612761565b611216565b61021e62093a8081565b6101f661042f3660046128b6565b611346565b60095461026c9073ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6009546104ff9073ffffffffffffffffffffffffffffffffffffffff163330846114bc565b80600a600082825461051191906128fe565b909155508190506007600061052585611598565b81526020810191909152604001600020555050565b6000600260015414156105a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff1615610620576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6003544210610631576106316115b2565b600654600c5460ff168015610651575061064e62015180826128fe565b42115b156106615761065e6117af565b50425b61066a81611598565b9050600061067884836119fd565b905080156106b55780600a5461068e9190612916565b600a556009546106b59073ffffffffffffffffffffffffffffffffffffffff168583611efb565b600180559392505050565b6002600154141561072d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b600260015561073a6115b2565b60018055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527ff1fe457b8a983acb8e891ebd18d654492f091f47738497137f2718583d4a49759060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010017908190556009546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526109939273ffffffffffffffffffffffffffffffffffffffff6201000090910481169216906370a0823190602401602060405180830381865afa15801561094f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610973919061292d565b60095473ffffffffffffffffffffffffffffffffffffffff169190611efb565b6040517f34156ff445c4c60d77a4e0f638ebec01c6f63ceff72508882103e8127e11cad590600090a1565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283929116906381fc83bb90602401602060405180830381865afa158015610a32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a56919061292d565b905080610a67576000915050610b7a565b6000610a74858584611f56565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015610af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b159190612958565b90506000610b31826040015187610b2c9190612916565b61207a565b8260200151610b4091906129f1565b8251610b4c9190612aa7565b9050600081600f0b1215610b67576000945050505050610b7a565b610b7381600f0b61214c565b9450505050505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b610c0b60006121b8565b565b600060026001541415610c7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff1615610cf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6014821115610d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f216f76657220323020757365727300000000000000000000000000000000000060448201526064016104d1565b6003544210610d6f57610d6f6115b2565b600654600c5460ff168015610d8f5750610d8c62015180826128fe565b42115b15610d9f57610d9c6117af565b50425b610da881611598565b90506000805b84811015610f01576000868683818110610dca57610dca612b18565b9050602002016020810190610ddf9190612761565b73ffffffffffffffffffffffffffffffffffffffff161415610e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f626164207573657200000000000000000000000000000000000000000000000060448201526064016104d1565b6000610e8f878784818110610e7457610e74612b18565b9050602002016020810190610e899190612761565b856119fd565b90508015610eee57610ee1878784818110610eac57610eac612b18565b9050602002016020810190610ec19190612761565b60095473ffffffffffffffffffffffffffffffffffffffff169083611efb565b610eeb81846128fe565b92505b5080610ef981612b47565b915050610dae565b508015610f1a5780600a54610f169190612916565b600a555b505060018080559392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fa9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b60005b828110156110d45781600d6000868685818110610fcb57610fcb612b18565b9050602002016020810190610fe09190612761565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905583838281811061104557611045612b18565b905060200201602081019061105a9190612761565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f296409edb0e117b01125cbcf74a4c4f0b65d1533d230c4db68010d87bfbbcb20846040516110ba911515815260200190565b60405180910390a3806110cc81612b47565b915050610fac565b50505050565b60026001541415611147576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b600260015560005473ffffffffffffffffffffffffffffffffffffffff163314806111815750336000908152600d602052604090205460ff165b806111a85750600c5460ff1680156111a85750620151806006546111a591906128fe565b42115b61120e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21616c6c6f77000000000000000000000000000000000000000000000000000060448201526064016104d1565b61073a6117af565b60005473ffffffffffffffffffffffffffffffffffffffff163314611297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b73ffffffffffffffffffffffffffffffffffffffff811661133a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104d1565b611343816121b8565b50565b6000600260015414156113b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff161561142c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6009546114519073ffffffffffffffffffffffffffffffffffffffff163330856114bc565b600c5460ff16801561147257506201518060065461146f91906128fe565b42115b1561147f5761147f6117af565b6040518281527f793ef3f1fc06875d507b76400395f0c7cb5985dfa668fb04175b2f754cff238d9060200160405180910390a15050600180805590565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526110d49085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261222d565b600062093a806115a88184612b80565b610b7a9190612bbb565b60035460006115c042611598565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561162c57600080fd5b505af1158015611640573d6000803e3d6000fd5b5050505060005b60348110156117a8578183111561165d576117a8565b600061166884612339565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa1580156116dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117019190612958565b90506000816040015186111561172757611724826040015187610b2c9190612916565b90505b600081836020015161173991906129f1565b83516117459190612aa7565b9050600081600f0b1215611767576000878152600b6020526040812055611783565b61177381600f0b61214c565b6000888152600b60205260409020555b5050505061179462093a80846128fe565b9250806117a081612b47565b915050611647565b5050600355565b6009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561181e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611842919061292d565b90506000600a54826118549190612916565b600a839055600654909150600061186b8242612916565b9050600061187883611598565b4260065590506000805b60348110156119bb5761189862093a80846128fe565b91508142101561191a57831580156118af57508442145b156118e2576000838152600760205260409020546118ce9087906128fe565b6000848152600760205260409020556119bb565b836118ed8642612916565b6118f79088612bbb565b6119019190612b80565b6000848152600760205260409020546118ce91906128fe565b8315801561192757508482145b1561195a576000838152600760205260409020546119469087906128fe565b6000848152600760205260409020556119a2565b836119658684612916565b61196f9088612bbb565b6119799190612b80565b60008481526007602052604090205461199291906128fe565b6000848152600760205260409020555b81945081925080806119b390612b47565b915050611882565b5060408051428152602081018790527f5f35cdf2d7ef662d66f57c6493498f63de6ac64b3221da30edb54f343fc196ec910160405180910390a1505050505050565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283928392839216906381fc83bb90602401602060405180830381865afa158015611a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a98919061292d565b60025490915081611ab0576000945050505050610b7a565b73ffffffffffffffffffffffffffffffffffffffff871660009081526004602052604090205480611aed57611ae6888385611f56565b9450611b16565b73ffffffffffffffffffffffffffffffffffffffff881660009081526005602052604090205494505b84611b2057600194505b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301526024820188905260009216906334d901a490604401608060405180830381865afa158015611b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bbc9190612958565b905081611bfe5762093a8080600162093a808460400151611bdd91906128fe565b611be79190612916565b611bf19190612b80565b611bfb9190612bbb565b91505b878210611c145760009650505050505050610b7a565b82821015611c20578291505b6040805160808101825260008082526020820181905291810182905260608101829052905b6034811015611e6057898410611c5a57611e60565b82604001518410158015611c6e5750858811155b15611d9557611c7e8860016128fe565b975060405180608001604052808460000151600f0b81526020018460200151600f0b8152602001846040015181526020018460600151815250915085881115611cf35760405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509250611e4e565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d81166004830152602482018b9052909116906334d901a490604401608060405180830381865afa158015611d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8e9190612958565b9250611e4e565b6000611daa836040015186610b2c9190612916565b90506000611ddf611dd7856020015184611dc491906129f1565b8651611dd09190612aa7565b60006124ea565b600f0b61214c565b905080158015611dee5750878a115b15611dfa575050611e60565b8015611e3c576000868152600b6020908152604080832054600790925290912054611e259083612bbb565b611e2f9190612b80565b611e39908a6128fe565b98505b611e4962093a80876128fe565b955050505b80611e5881612b47565b915050611c45565b50611e7585611e7060018a612916565b612507565b73ffffffffffffffffffffffffffffffffffffffff8b166000818152600560209081526040808320859055600482529182902087905581518a8152908101849052908101889052919850907fea919eaf7a28ab483f798b086744ed74dc4f00c9cb7f0feb0310922fce07c8949060600160405180910390a2509398975050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611f519084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611516565b505050565b60008082815b608081101561206d57818310611f715761206d565b60006002611f7f84866128fe565b611f8a9060016128fe565b611f949190612b80565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015612011573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120359190612958565b90508781604001511161204a57819450612058565b612055600183612916565b93505b5050808061206590612b47565b915050611f5c565b50909150505b9392505050565b60007fffffffffffffffffffffffffffffffff8000000000000000000000000000000082128015906120bc57506f7fffffffffffffffffffffffffffffff8213155b612148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f323820626974730000000000000000000000000000000000000000000000000060648201526084016104d1565b5090565b600080821215612148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f73697469766560448201526064016104d1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061228f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166125169092919063ffffffff16565b805190915015611f5157808060200190518101906122ad9190612bf8565b611f51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104d1565b600080600090506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156123af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d3919061292d565b905060005b60808110156124e1578183106123ed576124e1565b600060026123fb84866128fe565b6124069060016128fe565b6124109190612b80565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa158015612485573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a99190612958565b9050868160400151116124be578194506124cc565b6124c9600183612916565b93505b505080806124d990612b47565b9150506123d8565b50909392505050565b600081600f0b83600f0b12156125005781612073565b5090919050565b60008183106125005781612073565b6060612525848460008561252d565b949350505050565b6060824710156125bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104d1565b73ffffffffffffffffffffffffffffffffffffffff85163b61263d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104d1565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516126669190612c41565b60006040518083038185875af1925050503d80600081146126a3576040519150601f19603f3d011682016040523d82523d6000602084013e6126a8565b606091505b50915091506126b88282866126c3565b979650505050505050565b606083156126d2575081612073565b8251156126e25782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d19190612c5d565b6000806040838503121561272957600080fd5b50508035926020909101359150565b803573ffffffffffffffffffffffffffffffffffffffff8116811461275c57600080fd5b919050565b60006020828403121561277357600080fd5b61207382612738565b801515811461134357600080fd5b60006020828403121561279c57600080fd5b81356120738161277c565b600080604083850312156127ba57600080fd5b6127c383612738565b946020939093013593505050565b60008083601f8401126127e357600080fd5b50813567ffffffffffffffff8111156127fb57600080fd5b6020830191508360208260051b850101111561281657600080fd5b9250929050565b6000806020838503121561283057600080fd5b823567ffffffffffffffff81111561284757600080fd5b612853858286016127d1565b90969095509350505050565b60008060006040848603121561287457600080fd5b833567ffffffffffffffff81111561288b57600080fd5b612897868287016127d1565b90945092505060208401356128ab8161277c565b809150509250925092565b6000602082840312156128c857600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612911576129116128cf565b500190565b600082821015612928576129286128cf565b500390565b60006020828403121561293f57600080fd5b5051919050565b8051600f81900b811461275c57600080fd5b60006080828403121561296a57600080fd5b6040516080810181811067ffffffffffffffff821117156129b4577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040526129c083612946565b81526129ce60208401612946565b602082015260408301516040820152606083015160608201528091505092915050565b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff600082136000841383830485118282161615612a2a57612a2a6128cf565b7fffffffffffffffffffffffffffffffff800000000000000000000000000000006000851286820586128184161615612a6557612a656128cf565b60008712925085820587128484161615612a8157612a816128cf565b85850587128184161615612a9757612a976128cf565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff8000000000000000000000000000000001831281151615612aea57612aea6128cf565b816f7fffffffffffffffffffffffffffffff018313811615612b0e57612b0e6128cf565b5090039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612b7957612b796128cf565b5060010190565b600082612bb6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612bf357612bf36128cf565b500290565b600060208284031215612c0a57600080fd5b81516120738161277c565b60005b83811015612c30578181015183820152602001612c18565b838111156110d45750506000910152565b60008251612c53818460208701612c15565b9190910192915050565b6020815260008251806020840152612c7c816040850160208701612c15565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122060c7ccf8d09c7e86724382bdc4bd5baf8a6b4b8b11a9674dbe6962a514345f8c64736f6c634300080a0033a2646970667358221220b445df708884cd1182f94b74b5abf9df5b00fada34deb08ea875e197077cddb964736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100be5760003560e01c806389035730116100765780639442fd621161005b5780639442fd621461020a578063ac4afa381461021d578063f2fde38b1461025357600080fd5b8063890357301461016e5780638da5cb5b146101ec57600080fd5b80633f137f44116100a75780633f137f4414610124578063715018a61461015a5780637434c73c1461016457600080fd5b8063081e3eda146100c35780632d19b982146100df575b600080fd5b6100cc60075481565b6040519081526020015b60405180910390f35b6006546100ff9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100d6565b6100ff61013236600461086d565b60096020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b610162610266565b005b6100cc6224ea0081565b6001546002546003546004546005546101a59473ffffffffffffffffffffffffffffffffffffffff90811694938116928116911685565b6040805173ffffffffffffffffffffffffffffffffffffffff968716815260208101959095529285169284019290925283166060830152909116608082015260a0016100d6565b60005473ffffffffffffffffffffffffffffffffffffffff166100ff565b6100ff61021836600461088f565b6102f8565b6100ff61022b3660046108cb565b60086020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b61016261026136600461086d565b610692565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102f660006107c2565b565b6000805473ffffffffffffffffffffffffffffffffffffffff16331461037a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600960205260409020541615610409576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f416c7265616479206372656174656420706f6f6c00000000000000000000000060448201526064016102e3565b6104166224ea0042610913565b84111561047f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c696420737461727454696d6500000000000000000000000000000060448201526064016102e3565b6040805160a0808201835260065473ffffffffffffffffffffffffffffffffffffffff90811680845260208085018a90528883168587018190529288166060808701829052336080978801819052600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000908116909617905560028d9055600380548616871790556004805486168417905560058054909516179093558651808301949094528387015290820189905242828501528451808303909401845291019283905281519101209061055590610837565b8190604051809103906000f5905080158015610575573d6000803e3d6000fd5b50600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560006002819055600380548316905560048054831690556005805483169055600780548252600860205260408220805490931673ffffffffffffffffffffffffffffffffffffffff85161790925581549293506105fd8361092b565b909155505073ffffffffffffffffffffffffffffffffffffffff83811660008181526009602090815260409182902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016948616948517905590518781529192917fec2e1cb6a896fbbc1dde3d584a806aaebbee2b30b73ecd99d4ece1691cb338f8910160405180910390a39392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610713576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b73ffffffffffffffffffffffffffffffffffffffff81166107b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102e3565b6107bf816107c2565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612f618061096583390190565b803573ffffffffffffffffffffffffffffffffffffffff8116811461086857600080fd5b919050565b60006020828403121561087f57600080fd5b61088882610844565b9392505050565b6000806000606084860312156108a457600080fd5b833592506108b460208501610844565b91506108c260408501610844565b90509250925092565b6000602082840312156108dd57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115610926576109266108e4565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561095d5761095d6108e4565b506001019056fe60806040523480156200001157600080fd5b506200001d3362000124565b600180819055506000806000806000336001600160a01b031663890357306040518163ffffffff1660e01b815260040160a060405180830381865afa1580156200006b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000919190620001b5565b945094509450945094506000620000ae856200017460201b60201c565b600281905560068190556003819055600980546001600160a01b038088166001600160a01b031992831617909255600880548a84169216919091179055600c8054918616620100000262010000600160b01b03199092169190911790559050620001188262000124565b5050505050506200026d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062093a806200018681846200021c565b6200019291906200023f565b92915050565b80516001600160a01b0381168114620001b057600080fd5b919050565b600080600080600060a08688031215620001ce57600080fd5b620001d98662000198565b945060208601519350620001f06040870162000198565b9250620002006060870162000198565b9150620002106080870162000198565b90509295509295909350565b6000826200023a57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156200026857634e487b7160e01b600052601160045260246000fd5b500290565b612ce4806200027d6000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80638147b0dd11610104578063a2ab2a46116100a2578063f2fde38b11610071578063f2fde38b14610404578063f4359ce514610417578063f59dfdfb14610421578063f7c618c11461043457600080fd5b8063a2ab2a46146103e0578063a5420e98146103e9578063bee5dc32146103f3578063e1ebb9f0146103fb57600080fd5b8063899519be116100de578063899519be146103705780638da5cb5b146103905780638fe8a101146103ae578063981b24d0146103c057600080fd5b80638147b0dd14610331578063862a9f2f1461035457806386f17a361461035d57600080fd5b806341c0e1b51161017157806361ac407d1161014b57806361ac407d146102ed578063715018a6146102f6578063786479cd146102fe5780637e686e011461031e57600080fd5b806341c0e1b5146102ac5780634ee2cd7e146102b45780635a4b8c1d146102c757600080fd5b80631fe063bd116101ad5780631fe063bd1461022c5780632d19b9821461024c578063326a940714610291578063375871611461029957600080fd5b8063097cd232146101d45780630cc672e4146101e95780631e83409a1461020b575b600080fd5b6101e76101e2366004612716565b610454565b005b600c546101f69060ff1681565b60405190151581526020015b60405180910390f35b61021e610219366004612761565b61053a565b604051908152602001610202565b61021e61023a366004612761565b60046020526000908152604090205481565b60085461026c9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610202565b6101e76106c0565b6101e76102a736600461278a565b610740565b6101e7610826565b61021e6102c23660046127a7565b6109be565b600c5461026c9062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b61021e60025481565b6101e7610b80565b61021e61030c366004612761565b60056020526000908152604090205481565b6101f661032c36600461281d565b610c0d565b6101f661033f366004612761565b600d6020526000908152604090205460ff1681565b61021e600a5481565b6101e761036b36600461285f565b610f28565b61021e61037e3660046128b6565b60076020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff1661026c565b600c546101f690610100900460ff1681565b61021e6103ce3660046128b6565b600b6020526000908152604090205481565b61021e60035481565b61021e6201518081565b6101e76110da565b61021e60065481565b6101e7610412366004612761565b611216565b61021e62093a8081565b6101f661042f3660046128b6565b611346565b60095461026c9073ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6009546104ff9073ffffffffffffffffffffffffffffffffffffffff163330846114bc565b80600a600082825461051191906128fe565b909155508190506007600061052585611598565b81526020810191909152604001600020555050565b6000600260015414156105a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff1615610620576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6003544210610631576106316115b2565b600654600c5460ff168015610651575061064e62015180826128fe565b42115b156106615761065e6117af565b50425b61066a81611598565b9050600061067884836119fd565b905080156106b55780600a5461068e9190612916565b600a556009546106b59073ffffffffffffffffffffffffffffffffffffffff168583611efb565b600180559392505050565b6002600154141561072d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b600260015561073a6115b2565b60018055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527ff1fe457b8a983acb8e891ebd18d654492f091f47738497137f2718583d4a49759060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010017908190556009546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526109939273ffffffffffffffffffffffffffffffffffffffff6201000090910481169216906370a0823190602401602060405180830381865afa15801561094f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610973919061292d565b60095473ffffffffffffffffffffffffffffffffffffffff169190611efb565b6040517f34156ff445c4c60d77a4e0f638ebec01c6f63ceff72508882103e8127e11cad590600090a1565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283929116906381fc83bb90602401602060405180830381865afa158015610a32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a56919061292d565b905080610a67576000915050610b7a565b6000610a74858584611f56565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015610af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b159190612958565b90506000610b31826040015187610b2c9190612916565b61207a565b8260200151610b4091906129f1565b8251610b4c9190612aa7565b9050600081600f0b1215610b67576000945050505050610b7a565b610b7381600f0b61214c565b9450505050505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b610c0b60006121b8565b565b600060026001541415610c7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff1615610cf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6014821115610d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f216f76657220323020757365727300000000000000000000000000000000000060448201526064016104d1565b6003544210610d6f57610d6f6115b2565b600654600c5460ff168015610d8f5750610d8c62015180826128fe565b42115b15610d9f57610d9c6117af565b50425b610da881611598565b90506000805b84811015610f01576000868683818110610dca57610dca612b18565b9050602002016020810190610ddf9190612761565b73ffffffffffffffffffffffffffffffffffffffff161415610e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f626164207573657200000000000000000000000000000000000000000000000060448201526064016104d1565b6000610e8f878784818110610e7457610e74612b18565b9050602002016020810190610e899190612761565b856119fd565b90508015610eee57610ee1878784818110610eac57610eac612b18565b9050602002016020810190610ec19190612761565b60095473ffffffffffffffffffffffffffffffffffffffff169083611efb565b610eeb81846128fe565b92505b5080610ef981612b47565b915050610dae565b508015610f1a5780600a54610f169190612916565b600a555b505060018080559392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fa9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b60005b828110156110d45781600d6000868685818110610fcb57610fcb612b18565b9050602002016020810190610fe09190612761565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905583838281811061104557611045612b18565b905060200201602081019061105a9190612761565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f296409edb0e117b01125cbcf74a4c4f0b65d1533d230c4db68010d87bfbbcb20846040516110ba911515815260200190565b60405180910390a3806110cc81612b47565b915050610fac565b50505050565b60026001541415611147576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b600260015560005473ffffffffffffffffffffffffffffffffffffffff163314806111815750336000908152600d602052604090205460ff165b806111a85750600c5460ff1680156111a85750620151806006546111a591906128fe565b42115b61120e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21616c6c6f77000000000000000000000000000000000000000000000000000060448201526064016104d1565b61073a6117af565b60005473ffffffffffffffffffffffffffffffffffffffff163314611297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b73ffffffffffffffffffffffffffffffffffffffff811661133a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104d1565b611343816121b8565b50565b6000600260015414156113b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600155600c54610100900460ff161561142c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c6564000000000000000000000000000000000000000000000000000060448201526064016104d1565b6009546114519073ffffffffffffffffffffffffffffffffffffffff163330856114bc565b600c5460ff16801561147257506201518060065461146f91906128fe565b42115b1561147f5761147f6117af565b6040518281527f793ef3f1fc06875d507b76400395f0c7cb5985dfa668fb04175b2f754cff238d9060200160405180910390a15050600180805590565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526110d49085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261222d565b600062093a806115a88184612b80565b610b7a9190612bbb565b60035460006115c042611598565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561162c57600080fd5b505af1158015611640573d6000803e3d6000fd5b5050505060005b60348110156117a8578183111561165d576117a8565b600061166884612339565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa1580156116dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117019190612958565b90506000816040015186111561172757611724826040015187610b2c9190612916565b90505b600081836020015161173991906129f1565b83516117459190612aa7565b9050600081600f0b1215611767576000878152600b6020526040812055611783565b61177381600f0b61214c565b6000888152600b60205260409020555b5050505061179462093a80846128fe565b9250806117a081612b47565b915050611647565b5050600355565b6009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561181e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611842919061292d565b90506000600a54826118549190612916565b600a839055600654909150600061186b8242612916565b9050600061187883611598565b4260065590506000805b60348110156119bb5761189862093a80846128fe565b91508142101561191a57831580156118af57508442145b156118e2576000838152600760205260409020546118ce9087906128fe565b6000848152600760205260409020556119bb565b836118ed8642612916565b6118f79088612bbb565b6119019190612b80565b6000848152600760205260409020546118ce91906128fe565b8315801561192757508482145b1561195a576000838152600760205260409020546119469087906128fe565b6000848152600760205260409020556119a2565b836119658684612916565b61196f9088612bbb565b6119799190612b80565b60008481526007602052604090205461199291906128fe565b6000848152600760205260409020555b81945081925080806119b390612b47565b915050611882565b5060408051428152602081018790527f5f35cdf2d7ef662d66f57c6493498f63de6ac64b3221da30edb54f343fc196ec910160405180910390a1505050505050565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283928392839216906381fc83bb90602401602060405180830381865afa158015611a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a98919061292d565b60025490915081611ab0576000945050505050610b7a565b73ffffffffffffffffffffffffffffffffffffffff871660009081526004602052604090205480611aed57611ae6888385611f56565b9450611b16565b73ffffffffffffffffffffffffffffffffffffffff881660009081526005602052604090205494505b84611b2057600194505b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301526024820188905260009216906334d901a490604401608060405180830381865afa158015611b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bbc9190612958565b905081611bfe5762093a8080600162093a808460400151611bdd91906128fe565b611be79190612916565b611bf19190612b80565b611bfb9190612bbb565b91505b878210611c145760009650505050505050610b7a565b82821015611c20578291505b6040805160808101825260008082526020820181905291810182905260608101829052905b6034811015611e6057898410611c5a57611e60565b82604001518410158015611c6e5750858811155b15611d9557611c7e8860016128fe565b975060405180608001604052808460000151600f0b81526020018460200151600f0b8152602001846040015181526020018460600151815250915085881115611cf35760405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509250611e4e565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d81166004830152602482018b9052909116906334d901a490604401608060405180830381865afa158015611d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8e9190612958565b9250611e4e565b6000611daa836040015186610b2c9190612916565b90506000611ddf611dd7856020015184611dc491906129f1565b8651611dd09190612aa7565b60006124ea565b600f0b61214c565b905080158015611dee5750878a115b15611dfa575050611e60565b8015611e3c576000868152600b6020908152604080832054600790925290912054611e259083612bbb565b611e2f9190612b80565b611e39908a6128fe565b98505b611e4962093a80876128fe565b955050505b80611e5881612b47565b915050611c45565b50611e7585611e7060018a612916565b612507565b73ffffffffffffffffffffffffffffffffffffffff8b166000818152600560209081526040808320859055600482529182902087905581518a8152908101849052908101889052919850907fea919eaf7a28ab483f798b086744ed74dc4f00c9cb7f0feb0310922fce07c8949060600160405180910390a2509398975050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611f519084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611516565b505050565b60008082815b608081101561206d57818310611f715761206d565b60006002611f7f84866128fe565b611f8a9060016128fe565b611f949190612b80565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015612011573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120359190612958565b90508781604001511161204a57819450612058565b612055600183612916565b93505b5050808061206590612b47565b915050611f5c565b50909150505b9392505050565b60007fffffffffffffffffffffffffffffffff8000000000000000000000000000000082128015906120bc57506f7fffffffffffffffffffffffffffffff8213155b612148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f323820626974730000000000000000000000000000000000000000000000000060648201526084016104d1565b5090565b600080821215612148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f73697469766560448201526064016104d1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061228f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166125169092919063ffffffff16565b805190915015611f5157808060200190518101906122ad9190612bf8565b611f51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104d1565b600080600090506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156123af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d3919061292d565b905060005b60808110156124e1578183106123ed576124e1565b600060026123fb84866128fe565b6124069060016128fe565b6124109190612b80565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa158015612485573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a99190612958565b9050868160400151116124be578194506124cc565b6124c9600183612916565b93505b505080806124d990612b47565b9150506123d8565b50909392505050565b600081600f0b83600f0b12156125005781612073565b5090919050565b60008183106125005781612073565b6060612525848460008561252d565b949350505050565b6060824710156125bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104d1565b73ffffffffffffffffffffffffffffffffffffffff85163b61263d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104d1565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516126669190612c41565b60006040518083038185875af1925050503d80600081146126a3576040519150601f19603f3d011682016040523d82523d6000602084013e6126a8565b606091505b50915091506126b88282866126c3565b979650505050505050565b606083156126d2575081612073565b8251156126e25782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d19190612c5d565b6000806040838503121561272957600080fd5b50508035926020909101359150565b803573ffffffffffffffffffffffffffffffffffffffff8116811461275c57600080fd5b919050565b60006020828403121561277357600080fd5b61207382612738565b801515811461134357600080fd5b60006020828403121561279c57600080fd5b81356120738161277c565b600080604083850312156127ba57600080fd5b6127c383612738565b946020939093013593505050565b60008083601f8401126127e357600080fd5b50813567ffffffffffffffff8111156127fb57600080fd5b6020830191508360208260051b850101111561281657600080fd5b9250929050565b6000806020838503121561283057600080fd5b823567ffffffffffffffff81111561284757600080fd5b612853858286016127d1565b90969095509350505050565b60008060006040848603121561287457600080fd5b833567ffffffffffffffff81111561288b57600080fd5b612897868287016127d1565b90945092505060208401356128ab8161277c565b809150509250925092565b6000602082840312156128c857600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612911576129116128cf565b500190565b600082821015612928576129286128cf565b500390565b60006020828403121561293f57600080fd5b5051919050565b8051600f81900b811461275c57600080fd5b60006080828403121561296a57600080fd5b6040516080810181811067ffffffffffffffff821117156129b4577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040526129c083612946565b81526129ce60208401612946565b602082015260408301516040820152606083015160608201528091505092915050565b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff600082136000841383830485118282161615612a2a57612a2a6128cf565b7fffffffffffffffffffffffffffffffff800000000000000000000000000000006000851286820586128184161615612a6557612a656128cf565b60008712925085820587128484161615612a8157612a816128cf565b85850587128184161615612a9757612a976128cf565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff8000000000000000000000000000000001831281151615612aea57612aea6128cf565b816f7fffffffffffffffffffffffffffffff018313811615612b0e57612b0e6128cf565b5090039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612b7957612b796128cf565b5060010190565b600082612bb6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612bf357612bf36128cf565b500290565b600060208284031215612c0a57600080fd5b81516120738161277c565b60005b83811015612c30578181015183820152602001612c18565b838111156110d45750506000910152565b60008251612c53818460208701612c15565b9190910192915050565b6020815260008251806020840152612c7c816040850160208701612c15565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122060c7ccf8d09c7e86724382bdc4bd5baf8a6b4b8b11a9674dbe6962a514345f8c64736f6c634300080a0033a2646970667358221220b445df708884cd1182f94b74b5abf9df5b00fada34deb08ea875e197077cddb964736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v1/test/artifactsFile/SyrupBar.json b/projects/revenue-sharing-pool/v1/test/artifactsFile/SyrupBar.json new file mode 100644 index 00000000..b0ed0f78 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/artifactsFile/SyrupBar.json @@ -0,0 +1,699 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SyrupBar", + "sourceName": "contracts/test/SyrupBar.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract CakeToken", + "name": "_cake", + "type": "address" + } + ], + "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": "value", + "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": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cake", + "outputs": [ + { + "internalType": "contract CakeToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "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" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "safeCakeTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002b0a38038062002b0a833981810160405260208110156200003757600080fd5b5051604080518082018252600e81526d29bcb93ab82130b9102a37b5b2b760911b60208281019190915282518084019093526005835264053595255560dc1b908301529060006200008762000136565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000e69060049060208501906200013a565b508051620000fc9060059060208401906200013a565b5050600680546001600160a01b0390931661010002610100600160a81b031960ff19909416601217939093169290921790915550620001d6565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200017d57805160ff1916838001178555620001ad565b82800160010185558215620001ad579182015b82811115620001ad57825182559160200191906001019062000190565b50620001bb929150620001bf565b5090565b5b80821115620001bb5760008155600101620001c0565b61292480620001e66000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063893d20e811610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146106ca578063e7a324dc14610705578063f1127ed81461070d578063f2fde38b1461076c576101da565b8063a9059cbb14610602578063b4b5ea571461063b578063c3cda5201461066e578063dce17484146106c2576101da565b80639dc29fac116100de5780639dc29fac1461053a578063a0712d6814610573578063a2e6ddcc14610590578063a457c2d7146105c9576101da565b8063893d20e8146105225780638da5cb5b1461052a57806395d89b4114610532576101da565b806340c10f191161017c57806370a082311161014b57806370a082311461047b578063715018a6146104ae578063782d6fe1146104b65780637ecebe00146104ef576101da565b806340c10f1914610365578063587cde1e146103a05780635c19a95c146103fc5780636fcfff451461042f576101da565b806320606b70116101b857806320606b70146102c357806323b872dd146102cb578063313ce5671461030e578063395093511461032c576101da565b806306fdde03146101df578063095ea7b31461025c57806318160ddd146102a9575b600080fd5b6101e761079f565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610221578181015183820152602001610209565b50505050905090810190601f16801561024e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102956004803603604081101561027257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610853565b604080519115158252519081900360200190f35b6102b1610871565b60408051918252519081900360200190f35b6102b1610877565b610295600480360360608110156102e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561089b565b61031661093c565b6040805160ff9092168252519081900360200190f35b6102956004803603604081101561034257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610945565b61039e6004803603604081101561037b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109a0565b005b6103d3600480360360208110156103b657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a88565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039e6004803603602081101561041257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ab3565b6104626004803603602081101561044557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ac0565b6040805163ffffffff9092168252519081900360200190f35b6102b16004803603602081101561049157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ad8565b61039e610b00565b6102b1600480360360408110156104cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c17565b6102b16004803603602081101561050557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ee1565b6103d3610ef3565b6103d3610f02565b6101e7610f1e565b61039e6004803603604081101561055057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f9d565b6102956004803603602081101561058957600080fd5b503561104f565b61039e600480360360408110156105a657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611112565b610295600480360360408110156105df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113ce565b6102956004803603604081101561061857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611443565b6102b16004803603602081101561065157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611457565b61039e600480360360c081101561068457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356114f3565b6103d3611832565b6102b1600480360360408110156106e057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611853565b6102b161188b565b61074c6004803603604081101561072357600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff166118af565b6040805163ffffffff909316835260208301919091528051918290030190f35b61039e6004803603602081101561078257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118dc565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b820191906000526020600020905b81548152906001019060200180831161082c57829003601f168201915b5050505050905090565b6000610867610860611a7d565b8484611a81565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b60006108a8848484611bc8565b610932846108b4611a7d565b61092d856040518060600160405280602881526020016127516028913973ffffffffffffffffffffffffffffffffffffffff8a166000908152600260205260408120906108ff611a7d565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611d8f565b611a81565b5060019392505050565b60065460ff1690565b6000610867610952611a7d565b8461092d8560026000610963611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611e40565b6109a8611a7d565b73ffffffffffffffffffffffffffffffffffffffff166109c6610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610a4857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282611eb4565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054610a84921683611fdb565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610abd33826121bc565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610b08611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610b26610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610ba857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610c71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806127d36027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610cac57600091505061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610d715773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff1683529290522060010154905061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610db957600091505061086b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e9d57600282820363ffffffff16048103610e096126a4565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610e785760200151945061086b9350505050565b805163ffffffff16871115610e8f57819350610e96565b6001820392505b5050610ddf565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610efd610f02565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b610fa5611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610fc3610f02565b73ffffffffffffffffffffffffffffffffffffffff161461104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282612283565b6000611059611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611077610f02565b73ffffffffffffffffffffffffffffffffffffffff16146110f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61110a611104611a7d565b83611eb4565b506001919050565b61111a611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611138610f02565b73ffffffffffffffffffffffffffffffffffffffff16146111ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092610100900473ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561123057600080fd5b505afa158015611244573d6000803e3d6000fd5b505050506040513d602081101561125a57600080fd5b505190508082111561131a57600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b1580156112e857600080fd5b505af11580156112fc573d6000803e3d6000fd5b505050506040513d602081101561131257600080fd5b506113c99050565b600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820186905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b15801561139c57600080fd5b505af11580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b50505b505050565b60006108676113db611a7d565b8461092d856040518060600160405280602581526020016128656025913960026000611405611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611d8f565b6000610867611450611a7d565b8484611bc8565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff168061148f5760006114ec565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86661151e61079f565b8051906020012061152d6123c1565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa1580156116a6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661173d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127796026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146117c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128206022913960400191505060405180910390fd5b8742111561181b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061272b6026913960400191505060405180910390fd5b611825818b6121bc565b505050505b505050505050565b600654610100900473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6118e4611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611902610f02565b73ffffffffffffffffffffffffffffffffffffffff161461198457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166119f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127056026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611aed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806126e16024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128cd6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316611c34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806126bc6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611ca0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806128426023913960400191505060405180910390fd5b611cea816040518060600160405280602681526020016127fa6026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611d269082611e40565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611e38576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dfd578181015183820152602001611de5565b50505050905090810190601f168015611e2a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156114ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611f439082611e40565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611f769082611e40565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120175750600081115b156113c95773ffffffffffffffffffffffffffffffffffffffff8316156120ee5773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff1690816120715760006120ce565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006120dc82856123c5565b90506120ea8684848461243c565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156113c95773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff1690816121435760006121a0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006121ae8285611e40565b905061182a8584848461243c565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054909116906121f084610ad8565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461227d828483611fdb565b50505050565b73ffffffffffffffffffffffffffffffffffffffff82166122ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061288a6021913960400191505060405180910390fd5b612339816040518060600160405280602281526020016128ab6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205560035461236c90826123c5565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b4690565b60008282111561243657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006124604360405180606001604052806034815260200161279f6034913961262c565b905060008463ffffffff161180156124d4575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b1561253c5773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff890116845290915290206001018290556125d5565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b600081640100000000841061269c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611dfd578181015183820152602001611de5565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a206275726e2066726f6d20746865207a65726f206164647265737342455032303a206275726e20616d6f756e7420657863656564732062616c616e636542455032303a20617070726f766520746f20746865207a65726f2061646472657373a26469706673582212201422e88a0353871be13774eb48012ed80d303ace501a54c167b5111bd7069bd664736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063893d20e811610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146106ca578063e7a324dc14610705578063f1127ed81461070d578063f2fde38b1461076c576101da565b8063a9059cbb14610602578063b4b5ea571461063b578063c3cda5201461066e578063dce17484146106c2576101da565b80639dc29fac116100de5780639dc29fac1461053a578063a0712d6814610573578063a2e6ddcc14610590578063a457c2d7146105c9576101da565b8063893d20e8146105225780638da5cb5b1461052a57806395d89b4114610532576101da565b806340c10f191161017c57806370a082311161014b57806370a082311461047b578063715018a6146104ae578063782d6fe1146104b65780637ecebe00146104ef576101da565b806340c10f1914610365578063587cde1e146103a05780635c19a95c146103fc5780636fcfff451461042f576101da565b806320606b70116101b857806320606b70146102c357806323b872dd146102cb578063313ce5671461030e578063395093511461032c576101da565b806306fdde03146101df578063095ea7b31461025c57806318160ddd146102a9575b600080fd5b6101e761079f565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610221578181015183820152602001610209565b50505050905090810190601f16801561024e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102956004803603604081101561027257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610853565b604080519115158252519081900360200190f35b6102b1610871565b60408051918252519081900360200190f35b6102b1610877565b610295600480360360608110156102e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561089b565b61031661093c565b6040805160ff9092168252519081900360200190f35b6102956004803603604081101561034257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610945565b61039e6004803603604081101561037b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109a0565b005b6103d3600480360360208110156103b657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a88565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039e6004803603602081101561041257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ab3565b6104626004803603602081101561044557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ac0565b6040805163ffffffff9092168252519081900360200190f35b6102b16004803603602081101561049157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ad8565b61039e610b00565b6102b1600480360360408110156104cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c17565b6102b16004803603602081101561050557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ee1565b6103d3610ef3565b6103d3610f02565b6101e7610f1e565b61039e6004803603604081101561055057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f9d565b6102956004803603602081101561058957600080fd5b503561104f565b61039e600480360360408110156105a657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611112565b610295600480360360408110156105df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113ce565b6102956004803603604081101561061857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611443565b6102b16004803603602081101561065157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611457565b61039e600480360360c081101561068457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356114f3565b6103d3611832565b6102b1600480360360408110156106e057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611853565b6102b161188b565b61074c6004803603604081101561072357600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff166118af565b6040805163ffffffff909316835260208301919091528051918290030190f35b61039e6004803603602081101561078257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118dc565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b820191906000526020600020905b81548152906001019060200180831161082c57829003601f168201915b5050505050905090565b6000610867610860611a7d565b8484611a81565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b60006108a8848484611bc8565b610932846108b4611a7d565b61092d856040518060600160405280602881526020016127516028913973ffffffffffffffffffffffffffffffffffffffff8a166000908152600260205260408120906108ff611a7d565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611d8f565b611a81565b5060019392505050565b60065460ff1690565b6000610867610952611a7d565b8461092d8560026000610963611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611e40565b6109a8611a7d565b73ffffffffffffffffffffffffffffffffffffffff166109c6610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610a4857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282611eb4565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054610a84921683611fdb565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610abd33826121bc565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610b08611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610b26610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610ba857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610c71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806127d36027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610cac57600091505061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610d715773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff1683529290522060010154905061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610db957600091505061086b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e9d57600282820363ffffffff16048103610e096126a4565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610e785760200151945061086b9350505050565b805163ffffffff16871115610e8f57819350610e96565b6001820392505b5050610ddf565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610efd610f02565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b610fa5611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610fc3610f02565b73ffffffffffffffffffffffffffffffffffffffff161461104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282612283565b6000611059611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611077610f02565b73ffffffffffffffffffffffffffffffffffffffff16146110f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61110a611104611a7d565b83611eb4565b506001919050565b61111a611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611138610f02565b73ffffffffffffffffffffffffffffffffffffffff16146111ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092610100900473ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561123057600080fd5b505afa158015611244573d6000803e3d6000fd5b505050506040513d602081101561125a57600080fd5b505190508082111561131a57600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b1580156112e857600080fd5b505af11580156112fc573d6000803e3d6000fd5b505050506040513d602081101561131257600080fd5b506113c99050565b600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820186905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b15801561139c57600080fd5b505af11580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b50505b505050565b60006108676113db611a7d565b8461092d856040518060600160405280602581526020016128656025913960026000611405611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611d8f565b6000610867611450611a7d565b8484611bc8565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff168061148f5760006114ec565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86661151e61079f565b8051906020012061152d6123c1565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa1580156116a6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661173d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127796026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146117c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128206022913960400191505060405180910390fd5b8742111561181b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061272b6026913960400191505060405180910390fd5b611825818b6121bc565b505050505b505050505050565b600654610100900473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6118e4611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611902610f02565b73ffffffffffffffffffffffffffffffffffffffff161461198457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166119f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127056026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611aed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806126e16024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128cd6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316611c34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806126bc6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611ca0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806128426023913960400191505060405180910390fd5b611cea816040518060600160405280602681526020016127fa6026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611d269082611e40565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611e38576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dfd578181015183820152602001611de5565b50505050905090810190601f168015611e2a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156114ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611f439082611e40565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611f769082611e40565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120175750600081115b156113c95773ffffffffffffffffffffffffffffffffffffffff8316156120ee5773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff1690816120715760006120ce565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006120dc82856123c5565b90506120ea8684848461243c565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156113c95773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff1690816121435760006121a0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006121ae8285611e40565b905061182a8584848461243c565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054909116906121f084610ad8565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461227d828483611fdb565b50505050565b73ffffffffffffffffffffffffffffffffffffffff82166122ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061288a6021913960400191505060405180910390fd5b612339816040518060600160405280602281526020016128ab6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205560035461236c90826123c5565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b4690565b60008282111561243657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006124604360405180606001604052806034815260200161279f6034913961262c565b905060008463ffffffff161180156124d4575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b1561253c5773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff890116845290915290206001018290556125d5565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b600081640100000000841061269c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611dfd578181015183820152602001611de5565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a206275726e2066726f6d20746865207a65726f206164647265737342455032303a206275726e20616d6f756e7420657863656564732062616c616e636542455032303a20617070726f766520746f20746865207a65726f2061646472657373a26469706673582212201422e88a0353871be13774eb48012ed80d303ace501a54c167b5111bd7069bd664736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v1/test/artifactsFile/VCake.json b/projects/revenue-sharing-pool/v1/test/artifactsFile/VCake.json new file mode 100644 index 00000000..628e6709 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/artifactsFile/VCake.json @@ -0,0 +1,598 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VCake", + "sourceName": "contracts/VCake.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICakePool", + "name": "_cakePool", + "type": "address" + }, + { + "internalType": "contract IMasterChefV2", + "name": "_masterchefV2", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxLock", + "type": "uint256" + } + ], + "name": "NewMaxLock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "RemoveUserInitialization", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedAmount", + "type": "uint256" + } + ], + "name": "Sync", + "type": "event" + }, + { + "inputs": [], + "name": "CakePool", + "outputs": [ + { + "internalType": "contract ICakePool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CakePoolPID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION_FACTOR_OVERDUE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MasterchefV2", + "outputs": [ + { + "internalType": "contract IMasterChefV2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION_FACTOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNLOCK_FREE_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WEEK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpoint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockDuration", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "epoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "initialization", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_users", + "type": "address[]" + } + ], + "name": "removeUserInitialization", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxLock", + "type": "uint256" + } + ], + "name": "setMaxLock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "slopeChanges", + "outputs": [ + { + "internalType": "int128", + "name": "", + "type": "int128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "syncFromCakePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userPointEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "userPointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userPrevLockedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60e060405262093a8060015562ed4e006002556301e133806003553480156200002757600080fd5b5060405162003876380380620038768339810160408190526200004a91620002b5565b6200005533620001a6565b6001600160a01b03808416608090815290831660a05260c0829052604080519182018152600080835260208084018281524285850190815243606087019081526005805460018101825595819052965192516001600160801b03908116600160801b0293169290921760039094027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810194909455517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1840155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db290920191909155600d805460ff191660121790558151808301909252828252645643616b6560d81b91019081526200016d91600b9190620001f6565b50604080518082019091526005808252645643616b6560d81b60209092019182526200019c91600c91620001f6565b505050506200033a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200020490620002fd565b90600052602060002090601f01602090048101928262000228576000855562000273565b82601f106200024357805160ff191683800117855562000273565b8280016001018555821562000273579182015b828111156200027357825182559160200191906001019062000256565b506200028192915062000285565b5090565b5b8082111562000281576000815560010162000286565b6001600160a01b0381168114620002b257600080fd5b50565b600080600060608486031215620002cb57600080fd5b8351620002d8816200029c565b6020850151909350620002eb816200029c565b80925050604084015190509250925092565b600181811c908216806200031257607f821691505b602082108114156200033457634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05161349c620003da6000396000818161046201526109b40152600081816102310152610a1a01526000818161040e0152818161059c015281816106e5015281816107d601528181610869015281816108fa015281816109ef01528181610b6101528181610c3b01528181610de701528181610eac01528181610f44015281816115bb015281816116ba0152611a34015261349c6000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80638da5cb5b1161010f578063bfdbd03b116100a2578063cd15b2a511610071578063cd15b2a514610490578063f2fde38b146104a3578063f4359ce5146104b6578063f52a36f7146104c057600080fd5b8063bfdbd03b14610442578063c2c4c5c114610455578063c589dbe21461045d578063ccd34cd51461048457600080fd5b8063981b24d0116100de578063981b24d0146103f6578063aa94ab5914610409578063aaada5da14610430578063acaf88cd1461043957600080fd5b80638da5cb5b14610394578063900cf0cf146103b257806390b4b79c146103bb57806395d89b41146103ee57600080fd5b80634ee2cd7e11610187578063715018a611610156578063715018a614610351578063787e52db1461035957806381fc83bb146103615780638ad4c4471461038157600080fd5b80634ee2cd7e1461030f57806351cff8d91461032257806365a5d5f01461033557806370a082311461033e57600080fd5b806318160ddd116101c357806318160ddd1461028d578063313ce5671461029557806334d901a4146102b45780633c0be328146102ef57600080fd5b8063059f8b16146101f557806306fdde0314610217578063071aed2b1461022c5780630efe6a8b14610278575b600080fd5b610204670de0b6b3a764000081565b6040519081526020015b60405180910390f35b61021f6104f6565b60405161020e9190612e64565b6102537f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161020e565b61028b610286366004612f00565b610584565b005b6102046111a7565b600d546102a29060ff1681565b60405160ff909116815260200161020e565b6102c76102c2366004612f33565b611224565b60408051600f95860b81529390940b602084015292820152606081019190915260800161020e565b6102046102fd366004612f5d565b600a6020526000908152604090205481565b61020461031d366004612f33565b611281565b61028b610330366004612f5d565b6115a3565b61020460035481565b61020461034c366004612f5d565b6117aa565b61028b6118c3565b61028b611950565b61020461036f366004612f5d565b60076020526000908152604090205481565b6102c761038f366004612f7f565b611b6a565b60005473ffffffffffffffffffffffffffffffffffffffff16610253565b61020460045481565b6103de6103c9366004612f5d565b60096020526000908152604090205460ff1681565b604051901515815260200161020e565b61021f611bbb565b610204610404366004612f7f565b611bc8565b6102537f000000000000000000000000000000000000000000000000000000000000000081565b61020460015481565b61020460025481565b61028b610450366004612f98565b611e04565b61028b611f8b565b6102047f000000000000000000000000000000000000000000000000000000000000000081565b61020464e8d4a5100081565b61028b61049e366004612f7f565b611fac565b61028b6104b1366004612f5d565b612068565b61020462093a8081565b6104e36104ce366004612f7f565b600860205260009081526040902054600f0b81565b604051600f9190910b815260200161020e565b600b80546105039061300d565b80601f016020809104026020016040519081016040528092919081815260200182805461052f9061300d565b801561057c5780601f106105515761010080835404028352916020019161057c565b820191906000526020600020905b81548152906001019060200180831161055f57829003601f168201915b505050505081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610628576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f742063616b6520706f6f6c0000000000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205460ff16156111a2576106a0604051806101000160405280600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081525090565b6040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527f00000000000000000000000000000000000000000000000000000000000000001690631959a0029060240161012060405180830381865afa15801561072d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107519190613071565b60c08a0152151560a089015260808801526060870152604080870191909152602080870193909352938552508251808401845273ffffffffffffffffffffffffffffffffffffffff88166000908152600a909252928120549092915081906107b890612195565b600f0b81526020016107cd8460600151612267565b815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633a98ef396040518163ffffffff1660e01b8152600401602060405180830381865afa15801561083f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086391906130e1565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e73008bc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f691906130e1565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166348a0d7546040518163ffffffff1660e01b8152600401602060405180830381865afa158015610963573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098791906130e1565b60e08501526040517f1175a1dd0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690631175a1dd90604401602060405180830381865afa158015610a63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8791906130e1565b90508015610aa557808560e001818151610aa19190613129565b9052505b84511561106d578460a0015115610da25760008560800151848760000151858960e00151610ad39190613129565b610add9190613141565b610ae791906131ad565b610af191906131c1565b9050856080015183610b0391906131c1565b600060808801528651909350610b1990856131c1565b6040517f668679ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301529195507f00000000000000000000000000000000000000000000000000000000000000009091169063668679ba90602401602060405180830381865afa158015610baa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bce91906131d8565b158015610beb5750426001548760600151610be99190613129565b105b15610d225760008660c0015182610c0291906131c1565b90506000600154886060015142610c1991906131c1565b610c2391906131c1565b9050600254811115610c3457506002545b60006002547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a5834e066040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc891906130e1565b610cd29084613141565b610cdc91906131ad565b9050600064e8d4a51000610cf08386613141565b610cfa91906131ad565b9050808a60e001818151610d0e91906131c1565b905250610d1b81866131c1565b9450505050505b60008415610d605781848860e00151610d3b9190613129565b610d4591906131c1565b610d4f8684613141565b610d5991906131ad565b9050610d63565b50805b808752610d708186613129565b94504287606001511015610d9b57600060a08801819052604088018190526060880181905260c08801525b505061106d565b6040517f3fec4e3200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301527f00000000000000000000000000000000000000000000000000000000000000001690633fec4e3290602401602060405180830381865afa158015610e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5291906131d8565b61106d57600083838760e00151610e699190613129565b8751610e759190613141565b610e7f91906131ad565b8651909150610e8e90856131c1565b6000808852602088015191955090610ea690836131c1565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663877887826040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3991906130e1565b90508a3b15610fd4577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633eb788746040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd191906130e1565b90505b6000612710610fe38385613141565b610fed91906131ad565b9050801561101757808960e00181815161100791906131c1565b90525061101481856131c1565b93505b600087156110555784878b60e001516110309190613129565b61103a91906131c1565b6110448987613141565b61104e91906131ad565b9050611058565b50835b808a526110658189613129565b975050505050505b85156110ba57428560600151101561109c574260408601819052611092908790613129565b60608601526110b2565b85856060018181516110ae9190613129565b9052505b600160a08601525b8451158015906110cb57508460a001515b1561110c57428560400151141561110c57828560000151838760e001516110f29190613129565b6110fc9190613141565b61110691906131ad565b60c08601525b84604001518560600151111561113257868560c00181815161112e9190613129565b9052505b6000604051806040016040528061114c8860c00151612195565b600f0b81526020016111618860600151612267565b905260c087015173ffffffffffffffffffffffffffffffffffffffff8b166000908152600a6020526040902055905061119b898683612281565b5050505050505b505050565b600061121f6005600454815481106111c1576111c16131f3565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606082015242612b0f565b905090565b6006602052816000526040600020818154811061124057600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b955070010000000000000000000000000000000090920490910b925084565b6000438211156112ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f626164205f626c6f636b4e756d62657200000000000000000000000000000000604482015260640161061f565b60006112f98484612c07565b90508061130a57600091505061159d565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600660205260408120805483908110611341576113416131f3565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b92840192909252600182015490830152600201546060820152600454909250906113a78683612cef565b90506000600582815481106113be576113be6131f3565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b92840192909252600182015490830152600201546060820152915080848410156114c6576000600561142d866001613129565b8154811061143d5761143d6131f3565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b9383019390935260018301549082015260029091015460608083018290528601519192506114a891906131c1565b9250836040015181604001516114be91906131c1565b9150506114ea565b60608301516114d590436131c1565b91508260400151426114e791906131c1565b90505b60408301518215611527578284606001518b61150691906131c1565b6115109084613141565b61151a91906131ad565b6115249082613129565b90505b61153f87604001518261153a91906131c1565b612195565b876020015161154e9190613222565b8751889061155d9083906132d8565b600f90810b90915288516000910b121590506115845760009850505050505050505061159d565b865161159290600f0b612d83565b985050505050505050505b92915050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611642576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f742063616b6520706f6f6c00000000000000000000000000000000000000604482015260640161061f565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604090205460ff16156117a7576040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff828116600483015260009182917f00000000000000000000000000000000000000000000000000000000000000001690631959a0029060240161012060405180830381865afa158015611702573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117269190613071565b98505050965050505050506000604051806040016040528061174784612195565b600f0b815260200161175885612267565b90526040805180820182526000808252602080830182905273ffffffffffffffffffffffffffffffffffffffff89168252600a9052918220919091559091506117a2858383612281565b505050505b50565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260076020526040812054806117de5750600092915050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600660205260408120805483908110611815576118156131f3565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b9383019390935260018301549082018190526002909201546060820152915061187f9061153a90426131c1565b816020015161188e9190613222565b815161189a91906132d8565b600f0b808252600013156118ad57600081525b80516118bb90600f0b612d83565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061f565b61194e6000612def565b565b3360009081526009602052604090205460ff16156119ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a656400000000000000000000000000604482015260640161061f565b3360008181526009602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f1959a00200000000000000000000000000000000000000000000000000000000815260048101929092529081907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690631959a0029060240161012060405180830381865afa158015611a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab59190613071565b9850505096505050505050600081118015611acf57504282115b15611b3157336000908152600a6020908152604080832084905580518082018252838152918201839052805180820190915290919080611b0e85612195565b600f0b8152602001611b1f86612267565b90529050611b2e338383612281565b50505b60405181815233907f99869d968ca3581a661f31abb3a6aa70ccec5cdc49855eab174cf9e00a2462db9060200160405180910390a25050565b60058181548110611b7a57600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b945070010000000000000000000000000000000090920490910b919084565b600c80546105039061300d565b600043821115611c34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f626164205f626c6f636b4e756d62657200000000000000000000000000000000604482015260640161061f565b6004546000611c438483612cef565b9050600060058281548110611c5a57611c5a6131f3565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b92840192909252600182015490830152600201546060820152915083831015611d925760006005611cc8856001613129565b81548110611cd857611cd86131f3565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606080830182905285015191925014611d8c5782606001518160600151611d5291906131c1565b83604001518260400151611d6691906131c1565b6060850151611d75908a6131c1565b611d7f9190613141565b611d8991906131ad565b91505b50611de1565b43826060015114611de1576060820151611dac90436131c1565b6040830151611dbb90426131c1565b6060840151611dca90896131c1565b611dd49190613141565b611dde91906131ad565b90505b611dfa82828460400151611df59190613129565b612b0f565b9695505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611e85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061f565b60005b818110156111a257600060096000858585818110611ea857611ea86131f3565b9050602002016020810190611ebd9190612f5d565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055828282818110611f2257611f226131f3565b9050602002016020810190611f379190612f5d565b73ffffffffffffffffffffffffffffffffffffffff167f94b46c743a5c10eae50d592c030e1c00931c13b51332eb14561b144dc32d8f7060405160405180910390a280611f8381613349565b915050611e88565b604080518082019091526000808252602082018190526117a7908280612281565b60005473ffffffffffffffffffffffffffffffffffffffff16331461202d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061f565b60038190556040518181527f4f43394587b9c1f0936e683b916a561ce2c09c61f697b53d9e73df8346f6246b9060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff1633146120e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061f565b73ffffffffffffffffffffffffffffffffffffffff811661218c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161061f565b6117a781612def565b60007fffffffffffffffffffffffffffffffff8000000000000000000000000000000082128015906121d757506f7fffffffffffffffffffffffffffffff8213155b612263576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f3238206269747300000000000000000000000000000000000000000000000000606482015260840161061f565b5090565b600062093a8061227781846131ad565b61159d9190613141565b60408051608080820183526000808352602080840182905283850182905260608085018390528551938401865282845290830182905293820181905292810183905260045491929091819073ffffffffffffffffffffffffffffffffffffffff88161561256c57428760200151118015612302575060008760000151600f0b135b1561235157612312600354612195565b875161231e9190613382565b600f0b60208087019190915287015161233c9061153a9042906131c1565b856020015161234b9190613222565b600f0b85525b42866020015111801561236b575060008660000151600f0b135b156123ba5761237b600354612195565b86516123879190613382565b600f0b6020808601919091528601516123a59061153a9042906131c1565b84602001516123b49190613222565b600f0b84525b73ffffffffffffffffffffffffffffffffffffffff88166000908152600760205260409020548061246e5773ffffffffffffffffffffffffffffffffffffffff89166000908152600660209081526040808320805460018181018355918552938390208a51938b01516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000294169390931760039094029092019283558801519082015560608701516002909101555b612479816001613129565b73ffffffffffffffffffffffffffffffffffffffff8a16600081815260076020908152604080832094909455428985019081524360608b01908152938352600682528483208054600181810183559185528385208c518d8601516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039092020190815591519082015592516002909301929092558a820151815260088252919091205490880151600f9190910b94501561256a5787602001518760200151141561254f5783925061256a565b602080880151600090815260089091526040902054600f0b92505b505b60408051608081018252600080825260208201524291810191909152436060820152811561260257600582815481106125a7576125a76131f3565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606082015290505b60408082018051825160808101845260008082526020820181905283519482019490945260608086015190820152915190929042111561267957604084015161264b90426131c1565b606085015161265a90436131c1565b61266c90670de0b6b3a7640000613141565b61267691906131ad565b90505b600061268484612267565b905060005b60ff8110156128805761269f62093a8083613129565b91506000428311156126b3574292506126c7565b50600082815260086020526040902054600f0b5b60006126d661153a88866131c1565b88602001516126e59190613222565b88519091506126f59082906132d8565b600f0b8852602088015161270a9083906133f6565b600f90810b60208a015288516000910b121561272557600088525b60008860200151600f0b121561273d57600060208901525b60408089018590528601519396508693670de0b6b3a76400009061276190866131c1565b61276b9087613141565b61277591906131ad565b86606001516127849190613129565b6060890152612794896001613129565b9850428414156127ab575050436060870152612880565b60058054600181018255600091909152885160208a01516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039091027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db081019190915560408901517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015560608901517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2909101555050808061287890613349565b915050612689565b50600486905573ffffffffffffffffffffffffffffffffffffffff8d161561291a578960200151896020015186602001516128bb91906133f6565b6128c591906132d8565b600f0b60208601528951895186516128dd91906133f6565b6128e791906132d8565b600f90810b865260208601516000910b121561290557600060208601525b60008560000151600f0b121561291a57600085525b60058054600181018255600091909152855160208701516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039091027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db081019190915560408601517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015560608601517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015573ffffffffffffffffffffffffffffffffffffffff8d1615612b0057428c602001511115612a845760208a0151612a1190896133f6565b97508b602001518b602001511415612a35576020890151612a3290896132d8565b97505b60208c810151600090815260089091526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff8a161790555b428b602001511115612b00578b602001518b602001511115612b00576020890151612aaf90886132d8565b60208c810151600090815260089091526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff831617905596505b50505050505050505050505050565b6000808390506000612b248560400151612267565b905060005b60ff811015612bda57612b3f62093a8083613129565b9150600085831115612b5357859250612b67565b50600082815260086020526040902054600f0b5b612b7a84604001518461153a91906131c1565b8460200151612b899190613222565b8451612b9591906132d8565b600f0b845282861415612ba85750612bda565b808460200151612bb891906133f6565b600f0b6020850152506040830182905280612bd281613349565b915050612b29565b5060008260000151600f0b1215612bf057600082525b8151612bfe90600f0b612d83565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760205260408120548190815b6080811015612ce557818310612c4657612ce5565b60006002612c548486613129565b612c5f906001613129565b612c6991906131ad565b73ffffffffffffffffffffffffffffffffffffffff881660009081526006602052604090208054919250879183908110612ca557612ca56131f3565b90600052602060002090600302016002015411612cc457809350612cd2565b612ccf6001826131c1565b92505b5080612cdd81613349565b915050612c31565b5090949350505050565b60008082815b6080811015612ce557818310612d0a57612ce5565b60006002612d188486613129565b612d23906001613129565b612d2d91906131ad565b90508660058281548110612d4357612d436131f3565b90600052602060002090600302016002015411612d6257809350612d70565b612d6d6001826131c1565b92505b5080612d7b81613349565b915050612cf5565b600080821215612263576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f736974697665604482015260640161061f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208083528351808285015260005b81811015612e9157858101830151858201604001528201612e75565b81811115612ea3576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612efb57600080fd5b919050565b600080600060608486031215612f1557600080fd5b612f1e84612ed7565b95602085013595506040909401359392505050565b60008060408385031215612f4657600080fd5b612f4f83612ed7565b946020939093013593505050565b600060208284031215612f6f57600080fd5b612f7882612ed7565b9392505050565b600060208284031215612f9157600080fd5b5035919050565b60008060208385031215612fab57600080fd5b823567ffffffffffffffff80821115612fc357600080fd5b818501915085601f830112612fd757600080fd5b813581811115612fe657600080fd5b8660208260051b8501011115612ffb57600080fd5b60209290920196919550909350505050565b600181811c9082168061302157607f821691505b6020821081141561305b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b80518015158114612efb57600080fd5b60008060008060008060008060006101208a8c03121561309057600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a015192506130ca60e08b01613061565b91506101008a015190509295985092959850929598565b6000602082840312156130f357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561313c5761313c6130fa565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613179576131796130fa565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826131bc576131bc61317e565b500490565b6000828210156131d3576131d36130fa565b500390565b6000602082840312156131ea57600080fd5b612f7882613061565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff60008213600084138383048511828216161561325b5761325b6130fa565b7fffffffffffffffffffffffffffffffff800000000000000000000000000000006000851286820586128184161615613296576132966130fa565b600087129250858205871284841616156132b2576132b26130fa565b858505871281841616156132c8576132c86130fa565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff800000000000000000000000000000000183128115161561331b5761331b6130fa565b816f7fffffffffffffffffffffffffffffff01831381161561333f5761333f6130fa565b5090039392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561337b5761337b6130fa565b5060010190565b600081600f0b83600f0b806133995761339961317e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81147fffffffffffffffffffffffffffffffff80000000000000000000000000000000831416156133ed576133ed6130fa565b90059392505050565b600081600f0b83600f0b60008212826f7fffffffffffffffffffffffffffffff03821381151615613429576134296130fa565b827fffffffffffffffffffffffffffffffff8000000000000000000000000000000003821281161561345d5761345d6130fa565b5001939250505056fea2646970667358221220699a703b6846330c847c90e443461c4695a871e4040b95c3f101c275c0adca8e64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80638da5cb5b1161010f578063bfdbd03b116100a2578063cd15b2a511610071578063cd15b2a514610490578063f2fde38b146104a3578063f4359ce5146104b6578063f52a36f7146104c057600080fd5b8063bfdbd03b14610442578063c2c4c5c114610455578063c589dbe21461045d578063ccd34cd51461048457600080fd5b8063981b24d0116100de578063981b24d0146103f6578063aa94ab5914610409578063aaada5da14610430578063acaf88cd1461043957600080fd5b80638da5cb5b14610394578063900cf0cf146103b257806390b4b79c146103bb57806395d89b41146103ee57600080fd5b80634ee2cd7e11610187578063715018a611610156578063715018a614610351578063787e52db1461035957806381fc83bb146103615780638ad4c4471461038157600080fd5b80634ee2cd7e1461030f57806351cff8d91461032257806365a5d5f01461033557806370a082311461033e57600080fd5b806318160ddd116101c357806318160ddd1461028d578063313ce5671461029557806334d901a4146102b45780633c0be328146102ef57600080fd5b8063059f8b16146101f557806306fdde0314610217578063071aed2b1461022c5780630efe6a8b14610278575b600080fd5b610204670de0b6b3a764000081565b6040519081526020015b60405180910390f35b61021f6104f6565b60405161020e9190612e64565b6102537f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161020e565b61028b610286366004612f00565b610584565b005b6102046111a7565b600d546102a29060ff1681565b60405160ff909116815260200161020e565b6102c76102c2366004612f33565b611224565b60408051600f95860b81529390940b602084015292820152606081019190915260800161020e565b6102046102fd366004612f5d565b600a6020526000908152604090205481565b61020461031d366004612f33565b611281565b61028b610330366004612f5d565b6115a3565b61020460035481565b61020461034c366004612f5d565b6117aa565b61028b6118c3565b61028b611950565b61020461036f366004612f5d565b60076020526000908152604090205481565b6102c761038f366004612f7f565b611b6a565b60005473ffffffffffffffffffffffffffffffffffffffff16610253565b61020460045481565b6103de6103c9366004612f5d565b60096020526000908152604090205460ff1681565b604051901515815260200161020e565b61021f611bbb565b610204610404366004612f7f565b611bc8565b6102537f000000000000000000000000000000000000000000000000000000000000000081565b61020460015481565b61020460025481565b61028b610450366004612f98565b611e04565b61028b611f8b565b6102047f000000000000000000000000000000000000000000000000000000000000000081565b61020464e8d4a5100081565b61028b61049e366004612f7f565b611fac565b61028b6104b1366004612f5d565b612068565b61020462093a8081565b6104e36104ce366004612f7f565b600860205260009081526040902054600f0b81565b604051600f9190910b815260200161020e565b600b80546105039061300d565b80601f016020809104026020016040519081016040528092919081815260200182805461052f9061300d565b801561057c5780601f106105515761010080835404028352916020019161057c565b820191906000526020600020905b81548152906001019060200180831161055f57829003601f168201915b505050505081565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610628576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f742063616b6520706f6f6c0000000000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205460ff16156111a2576106a0604051806101000160405280600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081525090565b6040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527f00000000000000000000000000000000000000000000000000000000000000001690631959a0029060240161012060405180830381865afa15801561072d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107519190613071565b60c08a0152151560a089015260808801526060870152604080870191909152602080870193909352938552508251808401845273ffffffffffffffffffffffffffffffffffffffff88166000908152600a909252928120549092915081906107b890612195565b600f0b81526020016107cd8460600151612267565b815250905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633a98ef396040518163ffffffff1660e01b8152600401602060405180830381865afa15801561083f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086391906130e1565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e73008bc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f691906130e1565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166348a0d7546040518163ffffffff1660e01b8152600401602060405180830381865afa158015610963573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098791906130e1565b60e08501526040517f1175a1dd0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690631175a1dd90604401602060405180830381865afa158015610a63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8791906130e1565b90508015610aa557808560e001818151610aa19190613129565b9052505b84511561106d578460a0015115610da25760008560800151848760000151858960e00151610ad39190613129565b610add9190613141565b610ae791906131ad565b610af191906131c1565b9050856080015183610b0391906131c1565b600060808801528651909350610b1990856131c1565b6040517f668679ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301529195507f00000000000000000000000000000000000000000000000000000000000000009091169063668679ba90602401602060405180830381865afa158015610baa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bce91906131d8565b158015610beb5750426001548760600151610be99190613129565b105b15610d225760008660c0015182610c0291906131c1565b90506000600154886060015142610c1991906131c1565b610c2391906131c1565b9050600254811115610c3457506002545b60006002547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a5834e066040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc891906130e1565b610cd29084613141565b610cdc91906131ad565b9050600064e8d4a51000610cf08386613141565b610cfa91906131ad565b9050808a60e001818151610d0e91906131c1565b905250610d1b81866131c1565b9450505050505b60008415610d605781848860e00151610d3b9190613129565b610d4591906131c1565b610d4f8684613141565b610d5991906131ad565b9050610d63565b50805b808752610d708186613129565b94504287606001511015610d9b57600060a08801819052604088018190526060880181905260c08801525b505061106d565b6040517f3fec4e3200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301527f00000000000000000000000000000000000000000000000000000000000000001690633fec4e3290602401602060405180830381865afa158015610e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5291906131d8565b61106d57600083838760e00151610e699190613129565b8751610e759190613141565b610e7f91906131ad565b8651909150610e8e90856131c1565b6000808852602088015191955090610ea690836131c1565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663877887826040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3991906130e1565b90508a3b15610fd4577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633eb788746040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd191906130e1565b90505b6000612710610fe38385613141565b610fed91906131ad565b9050801561101757808960e00181815161100791906131c1565b90525061101481856131c1565b93505b600087156110555784878b60e001516110309190613129565b61103a91906131c1565b6110448987613141565b61104e91906131ad565b9050611058565b50835b808a526110658189613129565b975050505050505b85156110ba57428560600151101561109c574260408601819052611092908790613129565b60608601526110b2565b85856060018181516110ae9190613129565b9052505b600160a08601525b8451158015906110cb57508460a001515b1561110c57428560400151141561110c57828560000151838760e001516110f29190613129565b6110fc9190613141565b61110691906131ad565b60c08601525b84604001518560600151111561113257868560c00181815161112e9190613129565b9052505b6000604051806040016040528061114c8860c00151612195565b600f0b81526020016111618860600151612267565b905260c087015173ffffffffffffffffffffffffffffffffffffffff8b166000908152600a6020526040902055905061119b898683612281565b5050505050505b505050565b600061121f6005600454815481106111c1576111c16131f3565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606082015242612b0f565b905090565b6006602052816000526040600020818154811061124057600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b955070010000000000000000000000000000000090920490910b925084565b6000438211156112ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f626164205f626c6f636b4e756d62657200000000000000000000000000000000604482015260640161061f565b60006112f98484612c07565b90508061130a57600091505061159d565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600660205260408120805483908110611341576113416131f3565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b92840192909252600182015490830152600201546060820152600454909250906113a78683612cef565b90506000600582815481106113be576113be6131f3565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b92840192909252600182015490830152600201546060820152915080848410156114c6576000600561142d866001613129565b8154811061143d5761143d6131f3565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b9383019390935260018301549082015260029091015460608083018290528601519192506114a891906131c1565b9250836040015181604001516114be91906131c1565b9150506114ea565b60608301516114d590436131c1565b91508260400151426114e791906131c1565b90505b60408301518215611527578284606001518b61150691906131c1565b6115109084613141565b61151a91906131ad565b6115249082613129565b90505b61153f87604001518261153a91906131c1565b612195565b876020015161154e9190613222565b8751889061155d9083906132d8565b600f90810b90915288516000910b121590506115845760009850505050505050505061159d565b865161159290600f0b612d83565b985050505050505050505b92915050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611642576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f742063616b6520706f6f6c00000000000000000000000000000000000000604482015260640161061f565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604090205460ff16156117a7576040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff828116600483015260009182917f00000000000000000000000000000000000000000000000000000000000000001690631959a0029060240161012060405180830381865afa158015611702573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117269190613071565b98505050965050505050506000604051806040016040528061174784612195565b600f0b815260200161175885612267565b90526040805180820182526000808252602080830182905273ffffffffffffffffffffffffffffffffffffffff89168252600a9052918220919091559091506117a2858383612281565b505050505b50565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260076020526040812054806117de5750600092915050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600660205260408120805483908110611815576118156131f3565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b9383019390935260018301549082018190526002909201546060820152915061187f9061153a90426131c1565b816020015161188e9190613222565b815161189a91906132d8565b600f0b808252600013156118ad57600081525b80516118bb90600f0b612d83565b949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611944576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061f565b61194e6000612def565b565b3360009081526009602052604090205460ff16156119ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a656400000000000000000000000000604482015260640161061f565b3360008181526009602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f1959a00200000000000000000000000000000000000000000000000000000000815260048101929092529081907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690631959a0029060240161012060405180830381865afa158015611a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab59190613071565b9850505096505050505050600081118015611acf57504282115b15611b3157336000908152600a6020908152604080832084905580518082018252838152918201839052805180820190915290919080611b0e85612195565b600f0b8152602001611b1f86612267565b90529050611b2e338383612281565b50505b60405181815233907f99869d968ca3581a661f31abb3a6aa70ccec5cdc49855eab174cf9e00a2462db9060200160405180910390a25050565b60058181548110611b7a57600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b945070010000000000000000000000000000000090920490910b919084565b600c80546105039061300d565b600043821115611c34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f626164205f626c6f636b4e756d62657200000000000000000000000000000000604482015260640161061f565b6004546000611c438483612cef565b9050600060058281548110611c5a57611c5a6131f3565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b92840192909252600182015490830152600201546060820152915083831015611d925760006005611cc8856001613129565b81548110611cd857611cd86131f3565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606080830182905285015191925014611d8c5782606001518160600151611d5291906131c1565b83604001518260400151611d6691906131c1565b6060850151611d75908a6131c1565b611d7f9190613141565b611d8991906131ad565b91505b50611de1565b43826060015114611de1576060820151611dac90436131c1565b6040830151611dbb90426131c1565b6060840151611dca90896131c1565b611dd49190613141565b611dde91906131ad565b90505b611dfa82828460400151611df59190613129565b612b0f565b9695505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611e85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061f565b60005b818110156111a257600060096000858585818110611ea857611ea86131f3565b9050602002016020810190611ebd9190612f5d565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055828282818110611f2257611f226131f3565b9050602002016020810190611f379190612f5d565b73ffffffffffffffffffffffffffffffffffffffff167f94b46c743a5c10eae50d592c030e1c00931c13b51332eb14561b144dc32d8f7060405160405180910390a280611f8381613349565b915050611e88565b604080518082019091526000808252602082018190526117a7908280612281565b60005473ffffffffffffffffffffffffffffffffffffffff16331461202d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061f565b60038190556040518181527f4f43394587b9c1f0936e683b916a561ce2c09c61f697b53d9e73df8346f6246b9060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff1633146120e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061f565b73ffffffffffffffffffffffffffffffffffffffff811661218c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161061f565b6117a781612def565b60007fffffffffffffffffffffffffffffffff8000000000000000000000000000000082128015906121d757506f7fffffffffffffffffffffffffffffff8213155b612263576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f3238206269747300000000000000000000000000000000000000000000000000606482015260840161061f565b5090565b600062093a8061227781846131ad565b61159d9190613141565b60408051608080820183526000808352602080840182905283850182905260608085018390528551938401865282845290830182905293820181905292810183905260045491929091819073ffffffffffffffffffffffffffffffffffffffff88161561256c57428760200151118015612302575060008760000151600f0b135b1561235157612312600354612195565b875161231e9190613382565b600f0b60208087019190915287015161233c9061153a9042906131c1565b856020015161234b9190613222565b600f0b85525b42866020015111801561236b575060008660000151600f0b135b156123ba5761237b600354612195565b86516123879190613382565b600f0b6020808601919091528601516123a59061153a9042906131c1565b84602001516123b49190613222565b600f0b84525b73ffffffffffffffffffffffffffffffffffffffff88166000908152600760205260409020548061246e5773ffffffffffffffffffffffffffffffffffffffff89166000908152600660209081526040808320805460018181018355918552938390208a51938b01516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000294169390931760039094029092019283558801519082015560608701516002909101555b612479816001613129565b73ffffffffffffffffffffffffffffffffffffffff8a16600081815260076020908152604080832094909455428985019081524360608b01908152938352600682528483208054600181810183559185528385208c518d8601516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039092020190815591519082015592516002909301929092558a820151815260088252919091205490880151600f9190910b94501561256a5787602001518760200151141561254f5783925061256a565b602080880151600090815260089091526040902054600f0b92505b505b60408051608081018252600080825260208201524291810191909152436060820152811561260257600582815481106125a7576125a76131f3565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606082015290505b60408082018051825160808101845260008082526020820181905283519482019490945260608086015190820152915190929042111561267957604084015161264b90426131c1565b606085015161265a90436131c1565b61266c90670de0b6b3a7640000613141565b61267691906131ad565b90505b600061268484612267565b905060005b60ff8110156128805761269f62093a8083613129565b91506000428311156126b3574292506126c7565b50600082815260086020526040902054600f0b5b60006126d661153a88866131c1565b88602001516126e59190613222565b88519091506126f59082906132d8565b600f0b8852602088015161270a9083906133f6565b600f90810b60208a015288516000910b121561272557600088525b60008860200151600f0b121561273d57600060208901525b60408089018590528601519396508693670de0b6b3a76400009061276190866131c1565b61276b9087613141565b61277591906131ad565b86606001516127849190613129565b6060890152612794896001613129565b9850428414156127ab575050436060870152612880565b60058054600181018255600091909152885160208a01516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039091027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db081019190915560408901517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015560608901517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2909101555050808061287890613349565b915050612689565b50600486905573ffffffffffffffffffffffffffffffffffffffff8d161561291a578960200151896020015186602001516128bb91906133f6565b6128c591906132d8565b600f0b60208601528951895186516128dd91906133f6565b6128e791906132d8565b600f90810b865260208601516000910b121561290557600060208601525b60008560000151600f0b121561291a57600085525b60058054600181018255600091909152855160208701516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039091027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db081019190915560408601517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015560608601517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015573ffffffffffffffffffffffffffffffffffffffff8d1615612b0057428c602001511115612a845760208a0151612a1190896133f6565b97508b602001518b602001511415612a35576020890151612a3290896132d8565b97505b60208c810151600090815260089091526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff8a161790555b428b602001511115612b00578b602001518b602001511115612b00576020890151612aaf90886132d8565b60208c810151600090815260089091526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff831617905596505b50505050505050505050505050565b6000808390506000612b248560400151612267565b905060005b60ff811015612bda57612b3f62093a8083613129565b9150600085831115612b5357859250612b67565b50600082815260086020526040902054600f0b5b612b7a84604001518461153a91906131c1565b8460200151612b899190613222565b8451612b9591906132d8565b600f0b845282861415612ba85750612bda565b808460200151612bb891906133f6565b600f0b6020850152506040830182905280612bd281613349565b915050612b29565b5060008260000151600f0b1215612bf057600082525b8151612bfe90600f0b612d83565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760205260408120548190815b6080811015612ce557818310612c4657612ce5565b60006002612c548486613129565b612c5f906001613129565b612c6991906131ad565b73ffffffffffffffffffffffffffffffffffffffff881660009081526006602052604090208054919250879183908110612ca557612ca56131f3565b90600052602060002090600302016002015411612cc457809350612cd2565b612ccf6001826131c1565b92505b5080612cdd81613349565b915050612c31565b5090949350505050565b60008082815b6080811015612ce557818310612d0a57612ce5565b60006002612d188486613129565b612d23906001613129565b612d2d91906131ad565b90508660058281548110612d4357612d436131f3565b90600052602060002090600302016002015411612d6257809350612d70565b612d6d6001826131c1565b92505b5080612d7b81613349565b915050612cf5565b600080821215612263576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f736974697665604482015260640161061f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208083528351808285015260005b81811015612e9157858101830151858201604001528201612e75565b81811115612ea3576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612efb57600080fd5b919050565b600080600060608486031215612f1557600080fd5b612f1e84612ed7565b95602085013595506040909401359392505050565b60008060408385031215612f4657600080fd5b612f4f83612ed7565b946020939093013593505050565b600060208284031215612f6f57600080fd5b612f7882612ed7565b9392505050565b600060208284031215612f9157600080fd5b5035919050565b60008060208385031215612fab57600080fd5b823567ffffffffffffffff80821115612fc357600080fd5b818501915085601f830112612fd757600080fd5b813581811115612fe657600080fd5b8660208260051b8501011115612ffb57600080fd5b60209290920196919550909350505050565b600181811c9082168061302157607f821691505b6020821081141561305b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b80518015158114612efb57600080fd5b60008060008060008060008060006101208a8c03121561309057600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a015192506130ca60e08b01613061565b91506101008a015190509295985092959850929598565b6000602082840312156130f357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561313c5761313c6130fa565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613179576131796130fa565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826131bc576131bc61317e565b500490565b6000828210156131d3576131d36130fa565b500390565b6000602082840312156131ea57600080fd5b612f7882613061565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff60008213600084138383048511828216161561325b5761325b6130fa565b7fffffffffffffffffffffffffffffffff800000000000000000000000000000006000851286820586128184161615613296576132966130fa565b600087129250858205871284841616156132b2576132b26130fa565b858505871281841616156132c8576132c86130fa565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff800000000000000000000000000000000183128115161561331b5761331b6130fa565b816f7fffffffffffffffffffffffffffffff01831381161561333f5761333f6130fa565b5090039392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561337b5761337b6130fa565b5060010190565b600081600f0b83600f0b806133995761339961317e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81147fffffffffffffffffffffffffffffffff80000000000000000000000000000000831416156133ed576133ed6130fa565b90059392505050565b600081600f0b83600f0b60008212826f7fffffffffffffffffffffffffffffff03821381151615613429576134296130fa565b827fffffffffffffffffffffffffffffffff8000000000000000000000000000000003821281161561345d5761345d6130fa565b5001939250505056fea2646970667358221220699a703b6846330c847c90e443461c4695a871e4040b95c3f101c275c0adca8e64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v1/test/artifactsFile/VCakeTest.json b/projects/revenue-sharing-pool/v1/test/artifactsFile/VCakeTest.json new file mode 100644 index 00000000..bb0cb057 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/test/artifactsFile/VCakeTest.json @@ -0,0 +1,529 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VCakeTest", + "sourceName": "contracts/test/VCakeTest.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICakePool", + "name": "_cakePool", + "type": "address" + }, + { + "internalType": "contract IMasterChefV2", + "name": "_masterchefV2", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedAmount", + "type": "uint256" + } + ], + "name": "Sync", + "type": "event" + }, + { + "inputs": [], + "name": "CakePool", + "outputs": [ + { + "internalType": "contract ICakePool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CakePoolPID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION_FACTOR_OVERDUE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MasterchefV2", + "outputs": [ + { + "internalType": "contract IMasterChefV2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION_FACTOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNLOCK_FREE_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WEEK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpoint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockDuration", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "epoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "initialization", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "locks", + "outputs": [ + { + "internalType": "int128", + "name": "amount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "prevLocks", + "outputs": [ + { + "internalType": "int128", + "name": "amount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "slopeChanges", + "outputs": [ + { + "internalType": "int128", + "name": "", + "type": "int128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "syncFromCakePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userPointEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "userPointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userPrevLockedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60e060405262093a8060005562ed4e006001553480156200001f57600080fd5b506040516200399338038062003993833981016040819052620000429162000252565b6001600160a01b03808416608090815290831660a05260c0829052604080519182018152600080835260208084018281524285850190815243606087019081526005805460018101825595819052965192516001600160801b03908116600160801b0293169290921760039094027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810194909455517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1840155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db290920191909155600d805460ff191660121790558151808301909252828252645643616b6560d81b91019081526200015a91600b919062000193565b50604080518082019091526005808252645643616b6560d81b60209092019182526200018991600c9162000193565b50505050620002d7565b828054620001a1906200029a565b90600052602060002090601f016020900481019282620001c5576000855562000210565b82601f10620001e057805160ff191683800117855562000210565b8280016001018555821562000210579182015b8281111562000210578251825591602001919060010190620001f3565b506200021e92915062000222565b5090565b5b808211156200021e576000815560010162000223565b6001600160a01b03811681146200024f57600080fd5b50565b6000806000606084860312156200026857600080fd5b8351620002758162000239565b6020850151909350620002888162000239565b80925050604084015190509250925092565b600181811c90821680620002af57607f821691505b60208210811415620002d157634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c0516136156200037e6000396000818161046a0152610a620152600081816102050152610ac80152600081816104290152818161057e015281816106c70152818161088401528181610917015281816109a801528181610a9d01528181610c0f01528181610ce801528181610ed301528181610f9801528181611030015281816117560152818161185501528181611bde015261243001526136156000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806381fc83bb116100f9578063aaada5da11610097578063c589dbe211610071578063c589dbe214610465578063ccd34cd51461048c578063f4359ce514610498578063f52a36f7146104a257600080fd5b8063aaada5da1461044b578063acaf88cd14610454578063c2c4c5c11461045d57600080fd5b806390b4b79c116100d357806390b4b79c146103d657806395d89b4114610409578063981b24d014610411578063aa94ab591461042457600080fd5b806381fc83bb1461039a5780638ad4c447146103ba578063900cf0cf146103cd57600080fd5b80633c0be3281161016657806351cff8d91161014057806351cff8d91461033e5780635de9a1371461035157806370a082311461037f578063787e52db1461039257600080fd5b80633c0be328146102c35780633c3c81ab146102e35780634ee2cd7e1461032b57600080fd5b80630efe6a8b116101a25780630efe6a8b1461024c57806318160ddd14610261578063313ce5671461026957806334d901a41461028857600080fd5b8063059f8b16146101c957806306fdde03146101eb578063071aed2b14610200575b600080fd5b6101d8670de0b6b3a764000081565b6040519081526020015b60405180910390f35b6101f36104d8565b6040516101e2919061306b565b6102277f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101e2565b61025f61025a3660046130ae565b610566565b005b6101d8611342565b600d546102769060ff1681565b60405160ff90911681526020016101e2565b61029b6102963660046130e1565b6113bf565b60408051600f95860b81529390940b60208401529282015260608101919091526080016101e2565b6101d86102d136600461310b565b600a6020526000908152604090205481565b6103116102f136600461310b565b60036020526000908152604090208054600190910154600f9190910b9082565b60408051600f9390930b83526020830191909152016101e2565b6101d86103393660046130e1565b61141c565b61025f61034c36600461310b565b61173e565b61031161035f36600461310b565b60026020526000908152604090208054600190910154600f9190910b9082565b6101d861038d36600461310b565b6119e1565b61025f611afa565b6101d86103a836600461310b565b60076020526000908152604090205481565b61029b6103c8366004613126565b611db7565b6101d860045481565b6103f96103e436600461310b565b60096020526000908152604090205460ff1681565b60405190151581526020016101e2565b6101f3611e08565b6101d861041f366004613126565b611e15565b6102277f000000000000000000000000000000000000000000000000000000000000000081565b6101d860005481565b6101d860015481565b61025f612051565b6101d87f000000000000000000000000000000000000000000000000000000000000000081565b6101d864e8d4a5100081565b6101d862093a8081565b6104c56104b0366004613126565b600860205260009081526040902054600f0b81565b604051600f9190910b81526020016101e2565b600b80546104e59061313f565b80601f01602080910402602001604051908101604052809291908181526020018280546105119061313f565b801561055e5780601f106105335761010080835404028352916020019161055e565b820191906000526020600020905b81548152906001019060200180831161054157829003601f168201915b505050505081565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461060a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f742063616b6520706f6f6c0000000000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205460ff161561133d57610682604051806101000160405280600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081525090565b6040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527f00000000000000000000000000000000000000000000000000000000000000001690631959a0029060240161012060405180830381865afa15801561070f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073391906131a3565b60c08a0152151560a089015260808801526060870152604080870191909152602080870193909352938552508251808401845273ffffffffffffffffffffffffffffffffffffffff88166000908152600a9092529281205490929150819061079a90612072565b600f0b81526020016107af8460600151612144565b81525090506107f26040518060400160405280600b81526020017f6465706f736974206c6f6700000000000000000000000000000000000000000081525061215e565b6107fd8585856121ed565b6108806040518060400160405280600a81526020017f707265764c6f636b656400000000000000000000000000000000000000000000815250600a60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846060015161229c565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633a98ef396040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109119190613213565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e73008bc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610980573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a49190613213565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166348a0d7546040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a359190613213565b60e08501526040517f1175a1dd0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690631175a1dd90604401602060405180830381865afa158015610b11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b359190613213565b90508015610b5357808560e001818151610b4f919061325b565b9052505b845115611159578460a0015115610e8e5760008560800151848760000151858960e00151610b81919061325b565b610b8b9190613273565b610b9591906132df565b610b9f91906132f3565b9050856080015183610bb191906132f3565b600060808801528651909350610bc790856132f3565b6040517f668679ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301529195507f00000000000000000000000000000000000000000000000000000000000000009091169063668679ba90602401602060405180830381865afa158015610c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7c919061330a565b158015610c995750426000548760600151610c97919061325b565b105b15610e0e5760008660c0015182610cb091906132f3565b905060008054886060015142610cc691906132f3565b610cd091906132f3565b9050600154811115610ce157506001545b60006001547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a5834e066040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d759190613213565b610d7f9084613273565b610d8991906132df565b9050600064e8d4a51000610d9d8386613273565b610da791906132df565b9050808a60e001818151610dbb91906132f3565b905250610dc881866132f3565b9450610e096040518060400160405280601281526020017f436861726765206f7665726475652066656500000000000000000000000000008152508261232f565b505050505b60008415610e4c5781848860e00151610e27919061325b565b610e3191906132f3565b610e3b8684613273565b610e4591906132df565b9050610e4f565b50805b808752610e5c818661325b565b94504287606001511015610e8757600060a08801819052604088018190526060880181905260c08801525b5050611159565b6040517f3fec4e3200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301527f00000000000000000000000000000000000000000000000000000000000000001690633fec4e3290602401602060405180830381865afa158015610f1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3e919061330a565b61115957600083838760e00151610f55919061325b565b8751610f619190613273565b610f6b91906132df565b8651909150610f7a90856132f3565b6000808852602088015191955090610f9290836132f3565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663877887826040518163ffffffff1660e01b8152600401602060405180830381865afa158015611001573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110259190613213565b90508a3b156110c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633eb788746040518163ffffffff1660e01b8152600401602060405180830381865afa158015611099573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bd9190613213565b90505b60006127106110cf8385613273565b6110d991906132df565b9050801561110357808960e0018181516110f391906132f3565b90525061110081856132f3565b93505b600087156111415784878b60e0015161111c919061325b565b61112691906132f3565b6111308987613273565b61113a91906132df565b9050611144565b50835b808a52611151818961325b565b975050505050505b85156111a657428560600151101561118857426040860181905261117e90879061325b565b606086015261119e565b858560600181815161119a919061325b565b9052505b600160a08601525b8451600090158015906111ba57508560a001515b156111ff57838660000151848860e001516111d5919061325b565b6111df9190613273565b6111e991906132df565b905042866040015114156111ff5760c086018190525b85604001518660600151111561122557878660c001818151611221919061325b565b9052505b6000604051806040016040528061123f8960c00151612072565b600f0b81526020016112548960600151612144565b905260c088015173ffffffffffffffffffffffffffffffffffffffff8c166000818152600a6020908152604080832094909455835180850185528b51600f90810b82528c83015182840190815285855260038452868520925183546fffffffffffffffffffffffffffffffff9182167fffffffffffffffffffffffffffffffff00000000000000000000000000000000918216178555915160019485015587518089018952895190930b83528489015183860190815296865260029094529590932092518354921691909416178155905191015590506113358a87836123c4565b505050505050505b505050565b60006113ba60056004548154811061135c5761135c613325565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606082015242612cff565b905090565b600660205281600052604060002081815481106113db57600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b955070010000000000000000000000000000000090920490910b925084565b600043821115611488576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f626164205f626c6f636b4e756d626572000000000000000000000000000000006044820152606401610601565b60006114948484612df7565b9050806114a5576000915050611738565b73ffffffffffffffffffffffffffffffffffffffff841660009081526006602052604081208054839081106114dc576114dc613325565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b92840192909252600182015490830152600201546060820152600454909250906115428683612edf565b905060006005828154811061155957611559613325565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b928401929092526001820154908301526002015460608201529150808484101561166157600060056115c886600161325b565b815481106115d8576115d8613325565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606080830182905286015191925061164391906132f3565b92508360400151816040015161165991906132f3565b915050611685565b606083015161167090436132f3565b915082604001514261168291906132f3565b90505b604083015182156116c2578284606001518b6116a191906132f3565b6116ab9084613273565b6116b591906132df565b6116bf908261325b565b90505b6116da8760400151826116d591906132f3565b612072565b87602001516116e99190613354565b875188906116f890839061340a565b600f90810b90915288516000910b1215905061171f57600098505050505050505050611738565b865161172d90600f0b612f73565b985050505050505050505b92915050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146117dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f742063616b6520706f6f6c000000000000000000000000000000000000006044820152606401610601565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604090205460ff16156119de576040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff828116600483015260009182917f00000000000000000000000000000000000000000000000000000000000000001690631959a0029060240161012060405180830381865afa15801561189d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c191906131a3565b9850505096505050505050600060405180604001604052806118e284612072565b600f0b81526020016118f385612144565b905260408051808201825260008082526020808301828152845180860186528651600f90810b82528784015182850190815273ffffffffffffffffffffffffffffffffffffffff8d1680875260038652888720935184547fffffffffffffffffffffffffffffffff000000000000000000000000000000009081166fffffffffffffffffffffffffffffffff92831617865592516001958601558951808b018b52895190940b845294518387019081529087526002865288872092518354909216919094161781559151910155600a9052918220919091559091506119d98583836123c4565b505050505b50565b73ffffffffffffffffffffffffffffffffffffffff811660009081526007602052604081205480611a155750600092915050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600660205260408120805483908110611a4c57611a4c613325565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820181905260029092015460608201529150611ab6906116d590426132f3565b8160200151611ac59190613354565b8151611ad1919061340a565b600f0b80825260001315611ae457600081525b8051611af290600f0b612f73565b949350505050565b3360009081526009602052604090205460ff1615611b74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610601565b3360008181526009602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f1959a00200000000000000000000000000000000000000000000000000000000815260048101929092529081907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690631959a0029060240161012060405180830381865afa158015611c3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c5f91906131a3565b98505050965050505050506000811115611d7e57336000908152600a6020908152604080832084905580518082018252838152918201839052805180820190915290919080611cad85612072565b600f0b8152602001611cbe86612144565b9052336000818152600a602090815260408083208890558051808201825283815280830184815285855260038452828520915182546fffffffffffffffffffffffffffffffff9182167fffffffffffffffffffffffffffffffff000000000000000000000000000000009182161784559151600193840155835180850185528851600f0b81528589015181870190815288885260029096529390952092518354951694169390931781559051910155909150611d7b9083836123c4565b50505b60405181815233907f99869d968ca3581a661f31abb3a6aa70ccec5cdc49855eab174cf9e00a2462db9060200160405180910390a25050565b60058181548110611dc757600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b945070010000000000000000000000000000000090920490910b919084565b600c80546104e59061313f565b600043821115611e81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f626164205f626c6f636b4e756d626572000000000000000000000000000000006044820152606401610601565b6004546000611e908483612edf565b9050600060058281548110611ea757611ea7613325565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b92840192909252600182015490830152600201546060820152915083831015611fdf5760006005611f1585600161325b565b81548110611f2557611f25613325565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606080830182905285015191925014611fd95782606001518160600151611f9f91906132f3565b83604001518260400151611fb391906132f3565b6060850151611fc2908a6132f3565b611fcc9190613273565b611fd691906132df565b91505b5061202e565b4382606001511461202e576060820151611ff990436132f3565b604083015161200890426132f3565b606084015161201790896132f3565b6120219190613273565b61202b91906132df565b90505b61204782828460400151612042919061325b565b612cff565b9695505050505050565b604080518082019091526000808252602082018190526119de9082806123c4565b60007fffffffffffffffffffffffffffffffff8000000000000000000000000000000082128015906120b457506f7fffffffffffffffffffffffffffffff8213155b612140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610601565b5090565b600062093a8061215481846132df565b6117389190613273565b6119de81604051602401612172919061306b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f41304fac00000000000000000000000000000000000000000000000000000000179052612fdf565b60405173ffffffffffffffffffffffffffffffffffffffff84166024820152604481018390526064810182905261133d90608401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8786135e00000000000000000000000000000000000000000000000000000000179052612fdf565b61133d8383836040516024016122b49392919061347b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f969cdd0300000000000000000000000000000000000000000000000000000000179052612fdf565b6123c082826040516024016123459291906134a0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f9710a9d000000000000000000000000000000000000000000000000000000000179052612fdf565b5050565b600060405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509050600060405180608001604052806000600f0b81526020016000600f0b815260200160008152602001600081525090506000806000600454905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634f1bfc9e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612499573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bd9190613213565b905073ffffffffffffffffffffffffffffffffffffffff89161561275b574288602001511180156124f5575060008860000151600f0b135b156125425761250381612072565b885161250f91906134c2565b600f0b60208088019190915288015161252d906116d59042906132f3565b866020015161253c9190613354565b600f0b86525b42876020015111801561255c575060008760000151600f0b135b156125a95761256a81612072565b875161257691906134c2565b600f0b602080870191909152870151612594906116d59042906132f3565b85602001516125a39190613354565b600f0b85525b73ffffffffffffffffffffffffffffffffffffffff89166000908152600760205260409020548061265d5773ffffffffffffffffffffffffffffffffffffffff8a166000908152600660209081526040808320805460018181018355918552938390208b51938c01516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000294169390931760039094029092019283558901519082015560608801516002909101555b61266881600161325b565b73ffffffffffffffffffffffffffffffffffffffff8b16600081815260076020908152604080832094909455428a85019081524360608c01908152938352600682528483208054600181810183559185528385208d518e8601516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039092020190815591519082015592516002909301929092558b820151815260088252919091205490890151600f9190910b9550156127595788602001518860200151141561273e57849350612759565b602080890151600090815260089091526040902054600f0b93505b505b6040805160808101825260008082526020820152429181019190915243606082015282156127f1576005838154811061279657612796613325565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606082015290505b60408082018051825160808101845260008082526020820181905283519482019490945260608086015190820152915190929042111561286857604084015161283a90426132f3565b606085015161284990436132f3565b61285b90670de0b6b3a7640000613273565b61286591906132df565b90505b600061287384612144565b905060005b60ff811015612a6f5761288e62093a808361325b565b91506000428311156128a2574292506128b6565b50600082815260086020526040902054600f0b5b60006128c56116d588866132f3565b88602001516128d49190613354565b88519091506128e490829061340a565b600f0b885260208801516128f9908390613536565b600f90810b60208a015288516000910b121561291457600088525b60008860200151600f0b121561292c57600060208901525b60408089018590528601519396508693670de0b6b3a76400009061295090866132f3565b61295a9087613273565b61296491906132df565b8660600151612973919061325b565b60608901526129838a600161325b565b99504284141561299a575050436060870152612a6f565b60058054600181018255600091909152885160208a01516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039091027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db081019190915560408901517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015560608901517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015550508080612a67906135a6565b915050612878565b50600487905573ffffffffffffffffffffffffffffffffffffffff8e1615612b09578a602001518a602001518660200151612aaa9190613536565b612ab4919061340a565b600f0b60208601528a518a518651612acc9190613536565b612ad6919061340a565b600f90810b865260208601516000910b1215612af457600060208601525b60008560000151600f0b1215612b0957600085525b60058054600181018255600091909152855160208701516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039091027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db081019190915560408601517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015560608601517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015573ffffffffffffffffffffffffffffffffffffffff8e1615612cef57428d602001511115612c735760208b0151612c00908a613536565b98508c602001518c602001511415612c245760208a0151612c21908a61340a565b98505b60208d810151600090815260089091526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff8b161790555b428c602001511115612cef578c602001518c602001511115612cef5760208a0151612c9e908961340a565b60208d810151600090815260089091526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff831617905597505b5050505050505050505050505050565b6000808390506000612d148560400151612144565b905060005b60ff811015612dca57612d2f62093a808361325b565b9150600085831115612d4357859250612d57565b50600082815260086020526040902054600f0b5b612d6a8460400151846116d591906132f3565b8460200151612d799190613354565b8451612d85919061340a565b600f0b845282861415612d985750612dca565b808460200151612da89190613536565b600f0b6020850152506040830182905280612dc2816135a6565b915050612d19565b5060008260000151600f0b1215612de057600082525b8151612dee90600f0b612f73565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760205260408120548190815b6080811015612ed557818310612e3657612ed5565b60006002612e44848661325b565b612e4f90600161325b565b612e5991906132df565b73ffffffffffffffffffffffffffffffffffffffff881660009081526006602052604090208054919250879183908110612e9557612e95613325565b90600052602060002090600302016002015411612eb457809350612ec2565b612ebf6001826132f3565b92505b5080612ecd816135a6565b915050612e21565b5090949350505050565b60008082815b6080811015612ed557818310612efa57612ed5565b60006002612f08848661325b565b612f1390600161325b565b612f1d91906132df565b90508660058281548110612f3357612f33613325565b90600052602060002090600302016002015411612f5257809350612f60565b612f5d6001826132f3565b92505b5080612f6b816135a6565b915050612ee5565b600080821215612140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610601565b80516a636f6e736f6c652e6c6f67602083016000808483855afa5050505050565b6000815180845260005b818110156130265760208185018101518683018201520161300a565b81811115613038576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061307e6020830184613000565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146130a957600080fd5b919050565b6000806000606084860312156130c357600080fd5b6130cc84613085565b95602085013595506040909401359392505050565b600080604083850312156130f457600080fd5b6130fd83613085565b946020939093013593505050565b60006020828403121561311d57600080fd5b61307e82613085565b60006020828403121561313857600080fd5b5035919050565b600181811c9082168061315357607f821691505b6020821081141561318d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b805180151581146130a957600080fd5b60008060008060008060008060006101208a8c0312156131c257600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a015192506131fc60e08b01613193565b91506101008a015190509295985092959850929598565b60006020828403121561322557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561326e5761326e61322c565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132ab576132ab61322c565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826132ee576132ee6132b0565b500490565b6000828210156133055761330561322c565b500390565b60006020828403121561331c57600080fd5b61307e82613193565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff60008213600084138383048511828216161561338d5761338d61322c565b7fffffffffffffffffffffffffffffffff8000000000000000000000000000000060008512868205861281841616156133c8576133c861322c565b600087129250858205871284841616156133e4576133e461322c565b858505871281841616156133fa576133fa61322c565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff800000000000000000000000000000000183128115161561344d5761344d61322c565b816f7fffffffffffffffffffffffffffffff0183138116156134715761347161322c565b5090039392505050565b60608152600061348e6060830186613000565b60208301949094525060400152919050565b6040815260006134b36040830185613000565b90508260208301529392505050565b600081600f0b83600f0b806134d9576134d96132b0565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81147fffffffffffffffffffffffffffffffff800000000000000000000000000000008314161561352d5761352d61322c565b90059392505050565b600081600f0b83600f0b60008212826f7fffffffffffffffffffffffffffffff038213811516156135695761356961322c565b827fffffffffffffffffffffffffffffffff8000000000000000000000000000000003821281161561359d5761359d61322c565b50019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156135d8576135d861322c565b506001019056fea2646970667358221220650717928ecaa7a30844ff2b713806e52e1620e77a11d6f4c89ca4a8d9e65e6c64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806381fc83bb116100f9578063aaada5da11610097578063c589dbe211610071578063c589dbe214610465578063ccd34cd51461048c578063f4359ce514610498578063f52a36f7146104a257600080fd5b8063aaada5da1461044b578063acaf88cd14610454578063c2c4c5c11461045d57600080fd5b806390b4b79c116100d357806390b4b79c146103d657806395d89b4114610409578063981b24d014610411578063aa94ab591461042457600080fd5b806381fc83bb1461039a5780638ad4c447146103ba578063900cf0cf146103cd57600080fd5b80633c0be3281161016657806351cff8d91161014057806351cff8d91461033e5780635de9a1371461035157806370a082311461037f578063787e52db1461039257600080fd5b80633c0be328146102c35780633c3c81ab146102e35780634ee2cd7e1461032b57600080fd5b80630efe6a8b116101a25780630efe6a8b1461024c57806318160ddd14610261578063313ce5671461026957806334d901a41461028857600080fd5b8063059f8b16146101c957806306fdde03146101eb578063071aed2b14610200575b600080fd5b6101d8670de0b6b3a764000081565b6040519081526020015b60405180910390f35b6101f36104d8565b6040516101e2919061306b565b6102277f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101e2565b61025f61025a3660046130ae565b610566565b005b6101d8611342565b600d546102769060ff1681565b60405160ff90911681526020016101e2565b61029b6102963660046130e1565b6113bf565b60408051600f95860b81529390940b60208401529282015260608101919091526080016101e2565b6101d86102d136600461310b565b600a6020526000908152604090205481565b6103116102f136600461310b565b60036020526000908152604090208054600190910154600f9190910b9082565b60408051600f9390930b83526020830191909152016101e2565b6101d86103393660046130e1565b61141c565b61025f61034c36600461310b565b61173e565b61031161035f36600461310b565b60026020526000908152604090208054600190910154600f9190910b9082565b6101d861038d36600461310b565b6119e1565b61025f611afa565b6101d86103a836600461310b565b60076020526000908152604090205481565b61029b6103c8366004613126565b611db7565b6101d860045481565b6103f96103e436600461310b565b60096020526000908152604090205460ff1681565b60405190151581526020016101e2565b6101f3611e08565b6101d861041f366004613126565b611e15565b6102277f000000000000000000000000000000000000000000000000000000000000000081565b6101d860005481565b6101d860015481565b61025f612051565b6101d87f000000000000000000000000000000000000000000000000000000000000000081565b6101d864e8d4a5100081565b6101d862093a8081565b6104c56104b0366004613126565b600860205260009081526040902054600f0b81565b604051600f9190910b81526020016101e2565b600b80546104e59061313f565b80601f01602080910402602001604051908101604052809291908181526020018280546105119061313f565b801561055e5780601f106105335761010080835404028352916020019161055e565b820191906000526020600020905b81548152906001019060200180831161054157829003601f168201915b505050505081565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461060a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f742063616b6520706f6f6c0000000000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205460ff161561133d57610682604051806101000160405280600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081525090565b6040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527f00000000000000000000000000000000000000000000000000000000000000001690631959a0029060240161012060405180830381865afa15801561070f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073391906131a3565b60c08a0152151560a089015260808801526060870152604080870191909152602080870193909352938552508251808401845273ffffffffffffffffffffffffffffffffffffffff88166000908152600a9092529281205490929150819061079a90612072565b600f0b81526020016107af8460600151612144565b81525090506107f26040518060400160405280600b81526020017f6465706f736974206c6f6700000000000000000000000000000000000000000081525061215e565b6107fd8585856121ed565b6108806040518060400160405280600a81526020017f707265764c6f636b656400000000000000000000000000000000000000000000815250600a60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846060015161229c565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633a98ef396040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109119190613213565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e73008bc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610980573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a49190613213565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166348a0d7546040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a359190613213565b60e08501526040517f1175a1dd0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660248301526000917f000000000000000000000000000000000000000000000000000000000000000090911690631175a1dd90604401602060405180830381865afa158015610b11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b359190613213565b90508015610b5357808560e001818151610b4f919061325b565b9052505b845115611159578460a0015115610e8e5760008560800151848760000151858960e00151610b81919061325b565b610b8b9190613273565b610b9591906132df565b610b9f91906132f3565b9050856080015183610bb191906132f3565b600060808801528651909350610bc790856132f3565b6040517f668679ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301529195507f00000000000000000000000000000000000000000000000000000000000000009091169063668679ba90602401602060405180830381865afa158015610c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7c919061330a565b158015610c995750426000548760600151610c97919061325b565b105b15610e0e5760008660c0015182610cb091906132f3565b905060008054886060015142610cc691906132f3565b610cd091906132f3565b9050600154811115610ce157506001545b60006001547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a5834e066040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d759190613213565b610d7f9084613273565b610d8991906132df565b9050600064e8d4a51000610d9d8386613273565b610da791906132df565b9050808a60e001818151610dbb91906132f3565b905250610dc881866132f3565b9450610e096040518060400160405280601281526020017f436861726765206f7665726475652066656500000000000000000000000000008152508261232f565b505050505b60008415610e4c5781848860e00151610e27919061325b565b610e3191906132f3565b610e3b8684613273565b610e4591906132df565b9050610e4f565b50805b808752610e5c818661325b565b94504287606001511015610e8757600060a08801819052604088018190526060880181905260c08801525b5050611159565b6040517f3fec4e3200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301527f00000000000000000000000000000000000000000000000000000000000000001690633fec4e3290602401602060405180830381865afa158015610f1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3e919061330a565b61115957600083838760e00151610f55919061325b565b8751610f619190613273565b610f6b91906132df565b8651909150610f7a90856132f3565b6000808852602088015191955090610f9290836132f3565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663877887826040518163ffffffff1660e01b8152600401602060405180830381865afa158015611001573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110259190613213565b90508a3b156110c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633eb788746040518163ffffffff1660e01b8152600401602060405180830381865afa158015611099573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bd9190613213565b90505b60006127106110cf8385613273565b6110d991906132df565b9050801561110357808960e0018181516110f391906132f3565b90525061110081856132f3565b93505b600087156111415784878b60e0015161111c919061325b565b61112691906132f3565b6111308987613273565b61113a91906132df565b9050611144565b50835b808a52611151818961325b565b975050505050505b85156111a657428560600151101561118857426040860181905261117e90879061325b565b606086015261119e565b858560600181815161119a919061325b565b9052505b600160a08601525b8451600090158015906111ba57508560a001515b156111ff57838660000151848860e001516111d5919061325b565b6111df9190613273565b6111e991906132df565b905042866040015114156111ff5760c086018190525b85604001518660600151111561122557878660c001818151611221919061325b565b9052505b6000604051806040016040528061123f8960c00151612072565b600f0b81526020016112548960600151612144565b905260c088015173ffffffffffffffffffffffffffffffffffffffff8c166000818152600a6020908152604080832094909455835180850185528b51600f90810b82528c83015182840190815285855260038452868520925183546fffffffffffffffffffffffffffffffff9182167fffffffffffffffffffffffffffffffff00000000000000000000000000000000918216178555915160019485015587518089018952895190930b83528489015183860190815296865260029094529590932092518354921691909416178155905191015590506113358a87836123c4565b505050505050505b505050565b60006113ba60056004548154811061135c5761135c613325565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606082015242612cff565b905090565b600660205281600052604060002081815481106113db57600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b955070010000000000000000000000000000000090920490910b925084565b600043821115611488576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f626164205f626c6f636b4e756d626572000000000000000000000000000000006044820152606401610601565b60006114948484612df7565b9050806114a5576000915050611738565b73ffffffffffffffffffffffffffffffffffffffff841660009081526006602052604081208054839081106114dc576114dc613325565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b92840192909252600182015490830152600201546060820152600454909250906115428683612edf565b905060006005828154811061155957611559613325565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b928401929092526001820154908301526002015460608201529150808484101561166157600060056115c886600161325b565b815481106115d8576115d8613325565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606080830182905286015191925061164391906132f3565b92508360400151816040015161165991906132f3565b915050611685565b606083015161167090436132f3565b915082604001514261168291906132f3565b90505b604083015182156116c2578284606001518b6116a191906132f3565b6116ab9084613273565b6116b591906132df565b6116bf908261325b565b90505b6116da8760400151826116d591906132f3565b612072565b87602001516116e99190613354565b875188906116f890839061340a565b600f90810b90915288516000910b1215905061171f57600098505050505050505050611738565b865161172d90600f0b612f73565b985050505050505050505b92915050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146117dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4e6f742063616b6520706f6f6c000000000000000000000000000000000000006044820152606401610601565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604090205460ff16156119de576040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff828116600483015260009182917f00000000000000000000000000000000000000000000000000000000000000001690631959a0029060240161012060405180830381865afa15801561189d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c191906131a3565b9850505096505050505050600060405180604001604052806118e284612072565b600f0b81526020016118f385612144565b905260408051808201825260008082526020808301828152845180860186528651600f90810b82528784015182850190815273ffffffffffffffffffffffffffffffffffffffff8d1680875260038652888720935184547fffffffffffffffffffffffffffffffff000000000000000000000000000000009081166fffffffffffffffffffffffffffffffff92831617865592516001958601558951808b018b52895190940b845294518387019081529087526002865288872092518354909216919094161781559151910155600a9052918220919091559091506119d98583836123c4565b505050505b50565b73ffffffffffffffffffffffffffffffffffffffff811660009081526007602052604081205480611a155750600092915050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600660205260408120805483908110611a4c57611a4c613325565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820181905260029092015460608201529150611ab6906116d590426132f3565b8160200151611ac59190613354565b8151611ad1919061340a565b600f0b80825260001315611ae457600081525b8051611af290600f0b612f73565b949350505050565b3360009081526009602052604090205460ff1615611b74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610601565b3360008181526009602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f1959a00200000000000000000000000000000000000000000000000000000000815260048101929092529081907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690631959a0029060240161012060405180830381865afa158015611c3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c5f91906131a3565b98505050965050505050506000811115611d7e57336000908152600a6020908152604080832084905580518082018252838152918201839052805180820190915290919080611cad85612072565b600f0b8152602001611cbe86612144565b9052336000818152600a602090815260408083208890558051808201825283815280830184815285855260038452828520915182546fffffffffffffffffffffffffffffffff9182167fffffffffffffffffffffffffffffffff000000000000000000000000000000009182161784559151600193840155835180850185528851600f0b81528589015181870190815288885260029096529390952092518354951694169390931781559051910155909150611d7b9083836123c4565b50505b60405181815233907f99869d968ca3581a661f31abb3a6aa70ccec5cdc49855eab174cf9e00a2462db9060200160405180910390a25050565b60058181548110611dc757600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b945070010000000000000000000000000000000090920490910b919084565b600c80546104e59061313f565b600043821115611e81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f626164205f626c6f636b4e756d626572000000000000000000000000000000006044820152606401610601565b6004546000611e908483612edf565b9050600060058281548110611ea757611ea7613325565b600091825260208083206040805160808101825260039094029091018054600f81810b8652700100000000000000000000000000000000909104900b92840192909252600182015490830152600201546060820152915083831015611fdf5760006005611f1585600161325b565b81548110611f2557611f25613325565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606080830182905285015191925014611fd95782606001518160600151611f9f91906132f3565b83604001518260400151611fb391906132f3565b6060850151611fc2908a6132f3565b611fcc9190613273565b611fd691906132df565b91505b5061202e565b4382606001511461202e576060820151611ff990436132f3565b604083015161200890426132f3565b606084015161201790896132f3565b6120219190613273565b61202b91906132df565b90505b61204782828460400151612042919061325b565b612cff565b9695505050505050565b604080518082019091526000808252602082018190526119de9082806123c4565b60007fffffffffffffffffffffffffffffffff8000000000000000000000000000000082128015906120b457506f7fffffffffffffffffffffffffffffff8213155b612140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610601565b5090565b600062093a8061215481846132df565b6117389190613273565b6119de81604051602401612172919061306b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f41304fac00000000000000000000000000000000000000000000000000000000179052612fdf565b60405173ffffffffffffffffffffffffffffffffffffffff84166024820152604481018390526064810182905261133d90608401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8786135e00000000000000000000000000000000000000000000000000000000179052612fdf565b61133d8383836040516024016122b49392919061347b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f969cdd0300000000000000000000000000000000000000000000000000000000179052612fdf565b6123c082826040516024016123459291906134a0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f9710a9d000000000000000000000000000000000000000000000000000000000179052612fdf565b5050565b600060405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509050600060405180608001604052806000600f0b81526020016000600f0b815260200160008152602001600081525090506000806000600454905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634f1bfc9e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612499573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bd9190613213565b905073ffffffffffffffffffffffffffffffffffffffff89161561275b574288602001511180156124f5575060008860000151600f0b135b156125425761250381612072565b885161250f91906134c2565b600f0b60208088019190915288015161252d906116d59042906132f3565b866020015161253c9190613354565b600f0b86525b42876020015111801561255c575060008760000151600f0b135b156125a95761256a81612072565b875161257691906134c2565b600f0b602080870191909152870151612594906116d59042906132f3565b85602001516125a39190613354565b600f0b85525b73ffffffffffffffffffffffffffffffffffffffff89166000908152600760205260409020548061265d5773ffffffffffffffffffffffffffffffffffffffff8a166000908152600660209081526040808320805460018181018355918552938390208b51938c01516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000294169390931760039094029092019283558901519082015560608801516002909101555b61266881600161325b565b73ffffffffffffffffffffffffffffffffffffffff8b16600081815260076020908152604080832094909455428a85019081524360608c01908152938352600682528483208054600181810183559185528385208d518e8601516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039092020190815591519082015592516002909301929092558b820151815260088252919091205490890151600f9190910b9550156127595788602001518860200151141561273e57849350612759565b602080890151600090815260089091526040902054600f0b93505b505b6040805160808101825260008082526020820152429181019190915243606082015282156127f1576005838154811061279657612796613325565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552700100000000000000000000000000000000909104900b93830193909352600183015490820152600290910154606082015290505b60408082018051825160808101845260008082526020820181905283519482019490945260608086015190820152915190929042111561286857604084015161283a90426132f3565b606085015161284990436132f3565b61285b90670de0b6b3a7640000613273565b61286591906132df565b90505b600061287384612144565b905060005b60ff811015612a6f5761288e62093a808361325b565b91506000428311156128a2574292506128b6565b50600082815260086020526040902054600f0b5b60006128c56116d588866132f3565b88602001516128d49190613354565b88519091506128e490829061340a565b600f0b885260208801516128f9908390613536565b600f90810b60208a015288516000910b121561291457600088525b60008860200151600f0b121561292c57600060208901525b60408089018590528601519396508693670de0b6b3a76400009061295090866132f3565b61295a9087613273565b61296491906132df565b8660600151612973919061325b565b60608901526129838a600161325b565b99504284141561299a575050436060870152612a6f565b60058054600181018255600091909152885160208a01516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039091027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db081019190915560408901517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015560608901517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015550508080612a67906135a6565b915050612878565b50600487905573ffffffffffffffffffffffffffffffffffffffff8e1615612b09578a602001518a602001518660200151612aaa9190613536565b612ab4919061340a565b600f0b60208601528a518a518651612acc9190613536565b612ad6919061340a565b600f90810b865260208601516000910b1215612af457600060208601525b60008560000151600f0b1215612b0957600085525b60058054600181018255600091909152855160208701516fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000000291161760039091027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db081019190915560408601517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db182015560608601517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db29091015573ffffffffffffffffffffffffffffffffffffffff8e1615612cef57428d602001511115612c735760208b0151612c00908a613536565b98508c602001518c602001511415612c245760208a0151612c21908a61340a565b98505b60208d810151600090815260089091526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff8b161790555b428c602001511115612cef578c602001518c602001511115612cef5760208a0151612c9e908961340a565b60208d810151600090815260089091526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff831617905597505b5050505050505050505050505050565b6000808390506000612d148560400151612144565b905060005b60ff811015612dca57612d2f62093a808361325b565b9150600085831115612d4357859250612d57565b50600082815260086020526040902054600f0b5b612d6a8460400151846116d591906132f3565b8460200151612d799190613354565b8451612d85919061340a565b600f0b845282861415612d985750612dca565b808460200151612da89190613536565b600f0b6020850152506040830182905280612dc2816135a6565b915050612d19565b5060008260000151600f0b1215612de057600082525b8151612dee90600f0b612f73565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760205260408120548190815b6080811015612ed557818310612e3657612ed5565b60006002612e44848661325b565b612e4f90600161325b565b612e5991906132df565b73ffffffffffffffffffffffffffffffffffffffff881660009081526006602052604090208054919250879183908110612e9557612e95613325565b90600052602060002090600302016002015411612eb457809350612ec2565b612ebf6001826132f3565b92505b5080612ecd816135a6565b915050612e21565b5090949350505050565b60008082815b6080811015612ed557818310612efa57612ed5565b60006002612f08848661325b565b612f1390600161325b565b612f1d91906132df565b90508660058281548110612f3357612f33613325565b90600052602060002090600302016002015411612f5257809350612f60565b612f5d6001826132f3565b92505b5080612f6b816135a6565b915050612ee5565b600080821215612140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610601565b80516a636f6e736f6c652e6c6f67602083016000808483855afa5050505050565b6000815180845260005b818110156130265760208185018101518683018201520161300a565b81811115613038576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061307e6020830184613000565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146130a957600080fd5b919050565b6000806000606084860312156130c357600080fd5b6130cc84613085565b95602085013595506040909401359392505050565b600080604083850312156130f457600080fd5b6130fd83613085565b946020939093013593505050565b60006020828403121561311d57600080fd5b61307e82613085565b60006020828403121561313857600080fd5b5035919050565b600181811c9082168061315357607f821691505b6020821081141561318d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b805180151581146130a957600080fd5b60008060008060008060008060006101208a8c0312156131c257600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a015192506131fc60e08b01613193565b91506101008a015190509295985092959850929598565b60006020828403121561322557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561326e5761326e61322c565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132ab576132ab61322c565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826132ee576132ee6132b0565b500490565b6000828210156133055761330561322c565b500390565b60006020828403121561331c57600080fd5b61307e82613193565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff60008213600084138383048511828216161561338d5761338d61322c565b7fffffffffffffffffffffffffffffffff8000000000000000000000000000000060008512868205861281841616156133c8576133c861322c565b600087129250858205871284841616156133e4576133e461322c565b858505871281841616156133fa576133fa61322c565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff800000000000000000000000000000000183128115161561344d5761344d61322c565b816f7fffffffffffffffffffffffffffffff0183138116156134715761347161322c565b5090039392505050565b60608152600061348e6060830186613000565b60208301949094525060400152919050565b6040815260006134b36040830185613000565b90508260208301529392505050565b600081600f0b83600f0b806134d9576134d96132b0565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81147fffffffffffffffffffffffffffffffff800000000000000000000000000000008314161561352d5761352d61322c565b90059392505050565b600081600f0b83600f0b60008212826f7fffffffffffffffffffffffffffffff038213811516156135695761356961322c565b827fffffffffffffffffffffffffffffffff8000000000000000000000000000000003821281161561359d5761359d61322c565b50019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156135d8576135d861322c565b506001019056fea2646970667358221220650717928ecaa7a30844ff2b713806e52e1620e77a11d6f4c89ca4a8d9e65e6c64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v1/tsconfig.json b/projects/revenue-sharing-pool/v1/tsconfig.json new file mode 100644 index 00000000..dd966549 --- /dev/null +++ b/projects/revenue-sharing-pool/v1/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "noImplicitAny": false + } +} diff --git a/projects/revenue-sharing-pool/v2/README.md b/projects/revenue-sharing-pool/v2/README.md new file mode 100644 index 00000000..9103ebfb --- /dev/null +++ b/projects/revenue-sharing-pool/v2/README.md @@ -0,0 +1,6 @@ +# Pancake Revenue Sharing Pool V2 + +## Description + +Pancake Revenue Sharing Pool V2. + diff --git a/projects/revenue-sharing-pool/v2/config.ts b/projects/revenue-sharing-pool/v2/config.ts new file mode 100644 index 00000000..6129328d --- /dev/null +++ b/projects/revenue-sharing-pool/v2/config.ts @@ -0,0 +1,38 @@ +export default { + CakePool: { + mainnet: "0x45c54210128a065de780C4B0Df3d16664f7f859e", + testnet: "0x1088Fb24053F03802F673b84d16AE1A7023E400b", + }, + Cake: { + mainnet: "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82", + testnet: "0x8d008B313C1d6C7fE2982F62d32Da7507cF43551", + }, + VECake: { + mainnet: "0x5692DB8177a81A6c6afc8084C2976C9933EC1bAB", + testnet: "0x279957513FC505F8Cb16f4b6783D170C9BEcE322", + }, + RevenueSharingPoolFactory: { + mainnet: "0xE6F366E1EB0E9CeF01cCC2ac308F9b802436d920", + testnet: "0x7c1f320246C25cd6E58f9f40807fe08274973689", + }, + RevenueSharingPoolForCake_One: { + mainnet: "0x9cac9745731d1Cf2B483f257745A512f0938DD01", + testnet: "0x58fde4bf684B631363640808F452952D8c14084b", + }, + RevenueSharingPoolForCake_Two: { + mainnet: "0xCaF4e48a4Cb930060D0c3409F40Ae7b34d2AbE2D", + testnet: "0x482a401D57C9892D6d6BD6A4A976CfDDeD83BF11", + }, + RevenueSharingPoolGateway: { + mainnet: "0x011f2a82846a4E9c62C2FC4Fd6fDbad19147D94A", + testnet: "0x946273012ED616410F698536F1BF2513417BF8Ec", + }, + RevenueSharingPoolForCake_One_Keeper: { + mainnet: "0x6aA1F8F1B3560Ea51781c52c3761b7Aa8ca4BC09", + testnet: "0x0000000000000000000000000000000000000000", + }, + RevenueSharingPoolForCake_Two_Keeper: { + mainnet: "0x3fc88d8EeF0901CB0B407f7a4bAb6F5c73fA3874", + testnet: "0x0000000000000000000000000000000000000000", + }, +}; diff --git a/projects/revenue-sharing-pool/v2/contracts/RevenueSharingPool.sol b/projects/revenue-sharing-pool/v2/contracts/RevenueSharingPool.sol new file mode 100644 index 00000000..29cfba08 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/RevenueSharingPool.sol @@ -0,0 +1,609 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin-4.5.0/contracts/security/ReentrancyGuard.sol"; +import "./libraries/SafeCast.sol"; +import "./utils/Math128.sol"; +import "./interfaces/IProxyForCakePool.sol"; +import "./interfaces/IVECake.sol"; +import "./interfaces/IRevenueSharingPoolFactory.sol"; + +contract RevenueSharingPool is Ownable, ReentrancyGuard { + using SafeERC20 for IERC20; + + /// @dev Events + event SetCanCheckpointToken(bool _toggleFlag); + event Feed(uint256 _amount); + event CheckpointToken(uint256 _timestamp, uint256 _tokens); + event Claimed( + address indexed _user, + address indexed _recipient, + uint256 _amount, + uint256 _claimEpoch, + uint256 _maxEpoch + ); + event Killed(); + event SetWhitelistedCheckpointCallers(address indexed _caller, address indexed _address, bool _ok); + event UpdateRecipient( + address _owner, + address indexed _user, + address indexed _oldRecipient, + address indexed _newRecipient + ); + + /// @dev Time-related constants + uint256 public constant WEEK = 1 weeks; + uint256 public constant TOKEN_CHECKPOINT_DEADLINE = 1 days; + + uint256 public startWeekCursor; + uint256 public weekCursor; + mapping(address => uint256) public weekCursorOf; + mapping(address => uint256) public userEpochOf; + + uint256 public lastTokenTimestamp; + mapping(uint256 => uint256) public tokensPerWeek; + + address public VECake; + IERC20 public rewardToken; + uint256 public lastTokenBalance; + + uint256 public totalDistributed; + + /// @dev VECake supply at week bounds + mapping(uint256 => uint256) public totalSupplyAt; + + /// @dev User can set recipient address for claim + mapping(address => address) public recipient; + + /// @dev User had set recipient or not + mapping(address => bool) public everSetRecipient; + + bool public canCheckpointToken; + + /// @dev address to get token when contract is emergency stop + bool public isKilled; + address public emergencyReturn; + + /// @dev list of whitelist checkpoint callers + mapping(address => bool) public whitelistedCheckpointCallers; + + /// @notice constructor + constructor() { + ( + address _VECake, + uint256 _startTime, + address _rewardToken, + address _emergencyReturn, + address owner + ) = IRevenueSharingPoolFactory(msg.sender).parameters(); + uint256 _startTimeFloorWeek = _timestampToFloorWeek(_startTime); + startWeekCursor = _startTimeFloorWeek; + lastTokenTimestamp = _startTimeFloorWeek; + weekCursor = _startTimeFloorWeek; + rewardToken = IERC20(_rewardToken); + VECake = _VECake; + emergencyReturn = _emergencyReturn; + + _transferOwnership(owner); + } + + modifier onlyLive() { + require(!isKilled, "killed"); + _; + } + + /// @notice Get VECake balance of "_user" at "_timstamp" + /// @param _user The user address + /// @param _timestamp The timestamp to get user's balance + function balanceOfAt(address _user, uint256 _timestamp) external view returns (uint256) { + (address cakePoolProxy, , , , , ) = IVECake(VECake).userInfo(_user); + + if (cakePoolProxy != address(0)) { + return _balanceOfAt(_user, _timestamp) + _balanceOfAt(cakePoolProxy, _timestamp); + } else { + return _balanceOfAt(_user, _timestamp); + } + } + + function balanceOfAtProxy(address _user, uint256 _timestamp) external view returns (uint256) { + (address cakePoolProxy, , , , , ) = IVECake(VECake).userInfo(_user); + if (cakePoolProxy != address(0)) { + return _balanceOfAt(cakePoolProxy, _timestamp); + } + } + + function balanceOfAtUser(address _user, uint256 _timestamp) external view returns (uint256) { + return _balanceOfAt(_user, _timestamp); + } + + function _balanceOfAt(address _user, uint256 _timestamp) internal view returns (uint256) { + uint256 _maxUserEpoch = IVECake(VECake).userPointEpoch(_user); + if (_maxUserEpoch == 0) { + return 0; + } + + uint256 _epoch = _findTimestampUserEpoch(_user, _timestamp, _maxUserEpoch); + Point memory _point = IVECake(VECake).userPointHistory(_user, _epoch); + int128 _bias = _point.bias - _point.slope * SafeCast.toInt128(int256(_timestamp - _point.timestamp)); + if (_bias < 0) { + return 0; + } + return SafeCast.toUint256(_bias); + } + + /// @notice Record token distribution checkpoint + function _checkpointToken() internal { + // Find out how many tokens to be distributed + uint256 _rewardTokenBalance = rewardToken.balanceOf(address(this)); + uint256 _toDistribute = _rewardTokenBalance - lastTokenBalance; + lastTokenBalance = _rewardTokenBalance; + + totalDistributed += _toDistribute; + + // Prepare and update time-related variables + // 1. Setup _timeCursor to be the "lastTokenTimestamp" + // 2. Find out how long from previous checkpoint + // 3. Setup iterable cursor + // 4. Update lastTokenTimestamp to be block.timestamp + uint256 _timeCursor = lastTokenTimestamp; + uint256 _deltaSinceLastTimestamp = block.timestamp - _timeCursor; + uint256 _thisWeekCursor = _timestampToFloorWeek(_timeCursor); + uint256 _nextWeekCursor = 0; + lastTokenTimestamp = block.timestamp; + + // Iterate through weeks to filled out missing tokensPerWeek (if any) + for (uint256 _i = 0; _i < 52; _i++) { + _nextWeekCursor = _thisWeekCursor + WEEK; + + // if block.timestamp < _nextWeekCursor, means _nextWeekCursor goes + // beyond the actual block.timestamp, hence it is the last iteration + // to fill out tokensPerWeek + if (block.timestamp < _nextWeekCursor) { + if (_deltaSinceLastTimestamp == 0 && block.timestamp == _timeCursor) { + tokensPerWeek[_thisWeekCursor] = tokensPerWeek[_thisWeekCursor] + _toDistribute; + } else { + tokensPerWeek[_thisWeekCursor] = + tokensPerWeek[_thisWeekCursor] + + ((_toDistribute * (block.timestamp - _timeCursor)) / _deltaSinceLastTimestamp); + } + break; + } else { + if (_deltaSinceLastTimestamp == 0 && _nextWeekCursor == _timeCursor) { + tokensPerWeek[_thisWeekCursor] = tokensPerWeek[_thisWeekCursor] + _toDistribute; + } else { + tokensPerWeek[_thisWeekCursor] = + tokensPerWeek[_thisWeekCursor] + + ((_toDistribute * (_nextWeekCursor - _timeCursor)) / _deltaSinceLastTimestamp); + } + } + _timeCursor = _nextWeekCursor; + _thisWeekCursor = _nextWeekCursor; + } + + emit CheckpointToken(block.timestamp, _toDistribute); + } + + /// @notice Update token checkpoint + /// @dev Calculate the total token to be distributed in a given week. + /// At launch can only be called by owner, after launch can be called + /// by anyone if block.timestamp > lastTokenTime + TOKEN_CHECKPOINT_DEADLINE + function checkpointToken() external nonReentrant { + require( + msg.sender == owner() || + whitelistedCheckpointCallers[msg.sender] || + (canCheckpointToken && (block.timestamp > lastTokenTimestamp + TOKEN_CHECKPOINT_DEADLINE)), + "!allow" + ); + _checkpointToken(); + } + + /// @notice Record VECake total supply for each week + function _checkpointTotalSupply() internal { + uint256 _weekCursor = weekCursor; + uint256 _roundedTimestamp = _timestampToFloorWeek(block.timestamp); + + IVECake(VECake).checkpoint(); + + for (uint256 _i = 0; _i < 52; _i++) { + if (_weekCursor > _roundedTimestamp) { + break; + } else { + uint256 _epoch = _findTimestampEpoch(_weekCursor); + Point memory _point = IVECake(VECake).pointHistory(_epoch); + int128 _timeDelta = 0; + if (_weekCursor > _point.timestamp) { + _timeDelta = SafeCast.toInt128(int256(_weekCursor - _point.timestamp)); + } + int128 _bias = _point.bias - _point.slope * _timeDelta; + if (_bias < 0) { + totalSupplyAt[_weekCursor] = 0; + } else { + totalSupplyAt[_weekCursor] = SafeCast.toUint256(_bias); + } + } + _weekCursor = _weekCursor + WEEK; + } + + weekCursor = _weekCursor; + } + + /// @notice Update VECake total supply checkpoint + /// @dev This function can be called independently or at the first claim of + /// the new epoch week. + function checkpointTotalSupply() external nonReentrant { + _checkpointTotalSupply(); + } + + /// @notice Claim rewardToken + /// @dev Perform claim rewardToken + function _claim( + address _user, + address _recipient, + uint256 _maxClaimTimestamp + ) internal returns (uint256) { + uint256 _userEpoch = 0; + uint256 _toDistribute = 0; + + uint256 _maxUserEpoch = IVECake(VECake).userPointEpoch(_user); + uint256 _startWeekCursor = startWeekCursor; + + // _maxUserEpoch = 0, meaning no lock. + // Hence, no yield for _user + if (_maxUserEpoch == 0) { + return 0; + } + + uint256 _userWeekCursor = weekCursorOf[_user]; + if (_userWeekCursor == 0) { + // if _user has no _userWeekCursor with GrassHouse yet + // then we need to perform binary search + _userEpoch = _findTimestampUserEpoch(_user, _startWeekCursor, _maxUserEpoch); + } else { + // else, _user must has epoch with GrassHouse already + _userEpoch = userEpochOf[_user]; + } + + if (_userEpoch == 0) { + _userEpoch = 1; + } + + Point memory _userPoint = IVECake(VECake).userPointHistory(_user, _userEpoch); + + if (_userWeekCursor == 0) { + _userWeekCursor = ((_userPoint.timestamp + WEEK - 1) / WEEK) * WEEK; + } + + // _userWeekCursor is already at/beyond _maxClaimTimestamp + // meaning nothing to be claimed for this user. + // This can be: + // 1) User just lock their ALPACA less than 1 week + // 2) User already claimed their rewards + if (_userWeekCursor >= _maxClaimTimestamp) { + return 0; + } + + // Handle when user lock ALPACA before Grasshouse started + // by assign _userWeekCursor to Grasshouse's _startWeekCursor + if (_userWeekCursor < _startWeekCursor) { + _userWeekCursor = _startWeekCursor; + } + + Point memory _prevUserPoint = Point({bias: 0, slope: 0, timestamp: 0, blockNumber: 0}); + + // Go through weeks + for (uint256 _i = 0; _i < 52; _i++) { + // If _userWeekCursor is iterated to be at/beyond _maxClaimTimestamp + // This means we went through all weeks that user subject to claim rewards already + if (_userWeekCursor >= _maxClaimTimestamp) { + break; + } + // Move to the new epoch if need to, + // else calculate rewards that user should get. + if (_userWeekCursor >= _userPoint.timestamp && _userEpoch <= _maxUserEpoch) { + _userEpoch = _userEpoch + 1; + _prevUserPoint = Point({ + bias: _userPoint.bias, + slope: _userPoint.slope, + timestamp: _userPoint.timestamp, + blockNumber: _userPoint.blockNumber + }); + // When _userEpoch goes beyond _maxUserEpoch then there is no more Point, + // else take _userEpoch as a new Point + if (_userEpoch > _maxUserEpoch) { + _userPoint = Point({bias: 0, slope: 0, timestamp: 0, blockNumber: 0}); + } else { + _userPoint = IVECake(VECake).userPointHistory(_user, _userEpoch); + } + } else { + int128 _timeDelta = SafeCast.toInt128(int256(_userWeekCursor - _prevUserPoint.timestamp)); + uint256 _balanceOf = SafeCast.toUint256( + Math128.max(_prevUserPoint.bias - _timeDelta * _prevUserPoint.slope, 0) + ); + if (_balanceOf == 0 && _userEpoch > _maxUserEpoch) { + break; + } + if (_balanceOf > 0) { + _toDistribute = + _toDistribute + + (_balanceOf * tokensPerWeek[_userWeekCursor]) / + totalSupplyAt[_userWeekCursor]; + } + _userWeekCursor = _userWeekCursor + WEEK; + } + } + + _userEpoch = Math128.min(_maxUserEpoch, _userEpoch - 1); + userEpochOf[_user] = _userEpoch; + weekCursorOf[_user] = _userWeekCursor; + + emit Claimed(_user, _recipient, _toDistribute, _userEpoch, _maxUserEpoch); + + return _toDistribute; + } + + /// @notice Get claim recipient address + /// @param _user The address to claim rewards for + function getRecipient(address _user) public view returns (address _recipient) { + _recipient = _user; + + bool isCakePoolProxy = IVECake(VECake).isCakePoolProxy(_user); + if (isCakePoolProxy) { + _recipient = IProxyForCakePool(_user).cakePoolUser(); + } + address userRecipient = recipient[_recipient]; + if (userRecipient != address(0)) { + _recipient = userRecipient; + } + } + + /// @notice Claim rewardToken for "_user", without cake pool proxy + /// @param _user The address to claim rewards for + function claimForUser(address _user) external nonReentrant onlyLive returns (uint256) { + if (block.timestamp >= weekCursor) _checkpointTotalSupply(); + uint256 _lastTokenTimestamp = lastTokenTimestamp; + + if (canCheckpointToken && (block.timestamp > _lastTokenTimestamp + TOKEN_CHECKPOINT_DEADLINE)) { + _checkpointToken(); + _lastTokenTimestamp = block.timestamp; + } + + _lastTokenTimestamp = _timestampToFloorWeek(_lastTokenTimestamp); + address _recipient = getRecipient(_user); + uint256 _amount = _claim(_user, _recipient, _lastTokenTimestamp); + if (_amount != 0) { + lastTokenBalance = lastTokenBalance - _amount; + rewardToken.safeTransfer(_recipient, _amount); + } + + return _amount; + } + + /// @notice Claim rewardToken for user and user's cake pool proxy + /// @dev Need owner permission + /// @param _recipient The recipient address will be claimed to + function claimTo(address _recipient) external nonReentrant onlyLive returns (uint256) { + return _claimWithCakePoolProxy(msg.sender, _recipient); + } + + /// @notice Claim rewardToken for user and user's cake pool proxy + /// @dev Do not need owner permission + /// @param _user The address to claim rewards for + function claim(address _user) external nonReentrant onlyLive returns (uint256) { + return _claimWithCakePoolProxy(_user, address(0)); + } + + function _claimWithCakePoolProxy(address _user, address _recipient) internal returns (uint256) { + if (block.timestamp >= weekCursor) _checkpointTotalSupply(); + + uint256 _lastTokenTimestamp = lastTokenTimestamp; + + if (canCheckpointToken && (block.timestamp > _lastTokenTimestamp + TOKEN_CHECKPOINT_DEADLINE)) { + _checkpointToken(); + _lastTokenTimestamp = block.timestamp; + } + + _lastTokenTimestamp = _timestampToFloorWeek(_lastTokenTimestamp); + if (_recipient == address(0)) { + _recipient = getRecipient(_user); + } + uint256 _total = _claim(_user, _recipient, _lastTokenTimestamp); + (address cakePoolProxy, , , , , ) = IVECake(VECake).userInfo(_user); + if (cakePoolProxy != address(0)) { + _total += _claim(cakePoolProxy, _recipient, _lastTokenTimestamp); + } + if (_total != 0) { + lastTokenBalance = lastTokenBalance - _total; + rewardToken.safeTransfer(_recipient, _total); + } + + return _total; + } + + /// @notice Claim rewardToken for multiple users + /// @param _users The array of addresses to claim reward for + function claimMany(address[] calldata _users) external nonReentrant onlyLive returns (bool) { + require(_users.length <= 20, "!over 20 users"); + + if (block.timestamp >= weekCursor) _checkpointTotalSupply(); + + uint256 _lastTokenTimestamp = lastTokenTimestamp; + + if (canCheckpointToken && (block.timestamp > _lastTokenTimestamp + TOKEN_CHECKPOINT_DEADLINE)) { + _checkpointToken(); + _lastTokenTimestamp = block.timestamp; + } + + _lastTokenTimestamp = _timestampToFloorWeek(_lastTokenTimestamp); + uint256 _total = 0; + + for (uint256 i = 0; i < _users.length; i++) { + address _user = _users[i]; + require(_user != address(0), "bad user"); + + address _recipient = getRecipient(_user); + uint256 _amount = _claim(_user, _recipient, _lastTokenTimestamp); + + (address cakePoolProxy, , , , , ) = IVECake(VECake).userInfo(_user); + if (cakePoolProxy != address(0)) { + _amount += _claim(cakePoolProxy, _recipient, _lastTokenTimestamp); + } + if (_amount != 0) { + rewardToken.safeTransfer(_recipient, _amount); + _total = _total + _amount; + } + } + + if (_total != 0) { + lastTokenBalance = lastTokenBalance - _total; + } + + return true; + } + + /// @notice Receive rewardTokens into the contract and trigger token checkpoint + function feed(uint256 _amount) external nonReentrant onlyLive returns (bool) { + rewardToken.safeTransferFrom(msg.sender, address(this), _amount); + + if (canCheckpointToken && (block.timestamp > lastTokenTimestamp + TOKEN_CHECKPOINT_DEADLINE)) { + _checkpointToken(); + } + + emit Feed(_amount); + + return true; + } + + /// @notice Do Binary Search to find out epoch from timestamp + /// @param _timestamp Timestamp to find epoch + function _findTimestampEpoch(uint256 _timestamp) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = IVECake(VECake).epoch(); + // Loop for 128 times -> enough for 128-bit numbers + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + Point memory _point = IVECake(VECake).pointHistory(_mid); + if (_point.timestamp <= _timestamp) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + /// @notice Perform binary search to find out user's epoch from the given timestamp + /// @param _user The user address + /// @param _timestamp The timestamp that you wish to find out epoch + /// @param _maxUserEpoch Max epoch to find out the timestamp + function _findTimestampUserEpoch( + address _user, + uint256 _timestamp, + uint256 _maxUserEpoch + ) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = _maxUserEpoch; + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + Point memory _point = IVECake(VECake).userPointHistory(_user, _mid); + if (_point.timestamp <= _timestamp) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + function kill() external onlyOwner { + isKilled = true; + rewardToken.safeTransfer(emergencyReturn, rewardToken.balanceOf(address(this))); + + emit Killed(); + } + + /// @notice Set canCheckpointToken to allow random callers to call checkpointToken + /// @param _newCanCheckpointToken The new canCheckpointToken flag + function setCanCheckpointToken(bool _newCanCheckpointToken) external onlyOwner { + canCheckpointToken = _newCanCheckpointToken; + emit SetCanCheckpointToken(_newCanCheckpointToken); + } + + /// @notice Round off random timestamp to week + /// @param _timestamp The timestamp to be rounded off + function _timestampToFloorWeek(uint256 _timestamp) internal pure returns (uint256) { + return (_timestamp / WEEK) * WEEK; + } + + /// @notice Inject rewardToken into the contract + /// @param _timestamp The timestamp of the rewardToken to be distributed + /// @param _amount The amount of rewardToken to be distributed + function injectReward(uint256 _timestamp, uint256 _amount) external onlyOwner { + _injectReward(_timestamp, _amount); + } + + /// @notice Inject rewardToken for currect week into the contract + /// @param _amount The amount of rewardToken to be distributed + function injectRewardForCurrentWeek(uint256 _amount) external onlyOwner { + _injectReward(block.timestamp, _amount); + } + + function _injectReward(uint256 _timestamp, uint256 _amount) internal { + rewardToken.safeTransferFrom(msg.sender, address(this), _amount); + lastTokenBalance += _amount; + totalDistributed += _amount; + uint256 weekTimestamp = _timestampToFloorWeek(_timestamp); + tokensPerWeek[weekTimestamp] += _amount; + } + + /// @notice Set whitelisted checkpoint callers. + /// @dev Must only be called by owner. + /// @param _callers addresses to be whitelisted. + /// @param _ok The new ok flag for callers. + function setWhitelistedCheckpointCallers(address[] calldata _callers, bool _ok) external onlyOwner { + for (uint256 _idx = 0; _idx < _callers.length; _idx++) { + whitelistedCheckpointCallers[_callers[_idx]] = _ok; + emit SetWhitelistedCheckpointCallers(msg.sender, _callers[_idx], _ok); + } + } + + /// @notice Set recipient address + /// @dev In case some partners integrated our VECake , but did not write claim logic for revenue sharing pool. So owner can set recipient for them , partners still can get reward. + /// @dev If the user address is not EOA, You can set recipient once , then owner will lose permission to set recipient for the user + /// @param _user User address + /// @param _recipient Recipient address + function setRecipient(address _user, address _recipient) external { + bool allowOwner; + // if user address is not EOA and has not set recipient before, owner can set recipient for it. + if (_isContract(_user) && !everSetRecipient[_user]) { + allowOwner = true; + } + address ownerAddress = owner(); + require(msg.sender == _user || (allowOwner && msg.sender == ownerAddress), "Permission denied"); + if (msg.sender != ownerAddress && !everSetRecipient[_user]) { + everSetRecipient[_user] = true; + } + address oldRecipient = recipient[_user]; + recipient[_user] = _recipient; + emit UpdateRecipient(msg.sender, _user, oldRecipient, _recipient); + } + + /** + * @notice Checks if address is a contract + */ + function _isContract(address addr) internal view returns (bool) { + uint256 size; + assembly { + size := extcodesize(addr) + } + return size > 0; + } +} diff --git a/projects/revenue-sharing-pool/v2/contracts/RevenueSharingPoolFactory.sol b/projects/revenue-sharing-pool/v2/contracts/RevenueSharingPoolFactory.sol new file mode 100644 index 00000000..2cba8bde --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/RevenueSharingPoolFactory.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "./RevenueSharingPool.sol"; + +contract RevenueSharingPoolFactory is Ownable { + struct Parameters { + address VECake; + uint256 startTime; + address rewardToken; + address emergencyReturn; + address owner; + } + + Parameters public parameters; + + address public VECake; + + uint256 public poolLength; + + mapping(uint256 => address) public pools; + + uint256 public constant MAX_STARTTIME_DURATION = 4 weeks; + + event NewRevenueSharingPool( + address indexed pool, + address indexed rewardToken, + uint256 startTime, + uint256 poolsIndex + ); + + constructor(address _VECake) { + VECake = _VECake; + } + + /// @dev Deploys a RevenueSharingPool + /// @param _startTime Time to be started + /// @param _rewardToken The token to be distributed + /// @param _emergencyReturn The address to return token when emergency stop + function deploy( + uint256 _startTime, + address _rewardToken, + address _emergencyReturn + ) external onlyOwner returns (address pool) { + require(_startTime <= block.timestamp + MAX_STARTTIME_DURATION, "Invalid startTime"); + parameters = Parameters({ + VECake: VECake, + startTime: _startTime, + rewardToken: _rewardToken, + emergencyReturn: _emergencyReturn, + owner: msg.sender + }); + + pool = address( + new RevenueSharingPool{ + salt: keccak256(abi.encode(_rewardToken, _emergencyReturn, _startTime, block.timestamp)) + }() + ); + + delete parameters; + + poolLength++; + pools[poolLength] = pool; + + emit NewRevenueSharingPool(pool, _rewardToken, _startTime, poolLength); + } +} diff --git a/projects/revenue-sharing-pool/v2/contracts/RevenueSharingPoolGateway.sol b/projects/revenue-sharing-pool/v2/contracts/RevenueSharingPoolGateway.sol new file mode 100644 index 00000000..8a0f18f1 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/RevenueSharingPoolGateway.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "./interfaces/IRevenueSharingPool.sol"; + +contract RevenueSharingPoolGateway { + /// @notice Claim multiple pools for user , with cake pool proxy + /// @dev If user had cake pool proxy , will claim at the same time + function claimMultiple(address[] calldata _revenueSharingPools, address _for) external { + for (uint256 i = 0; i < _revenueSharingPools.length; i++) { + IRevenueSharingPool(_revenueSharingPools[i]).claim(_for); + } + } + + /// @notice Claim multiple pools for user, without cake pool proxy + /// @dev If user had cake pool proxy , will not claim at the same time + /// @dev You can use cake pool proxy address as _for , will claim for cake pool proxy + function claimMultipleWithoutProxy(address[] calldata _revenueSharingPools, address _for) external { + for (uint256 i = 0; i < _revenueSharingPools.length; i++) { + IRevenueSharingPool(_revenueSharingPools[i]).claimForUser(_for); + } + } +} diff --git a/projects/revenue-sharing-pool/v2/contracts/interfaces/ICakePool.sol b/projects/revenue-sharing-pool/v2/contracts/interfaces/ICakePool.sol new file mode 100644 index 00000000..bf34a250 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/interfaces/ICakePool.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface ICakePool { + struct UserInfo { + uint256 shares; // number of shares for a user. + uint256 lastDepositedTime; // keep track of deposited time for potential penalty. + uint256 cakeAtLastUserAction; // keep track of cake deposited at the last user action. + uint256 lastUserActionTime; // keep track of the last user action time. + uint256 lockStartTime; // lock start time. + uint256 lockEndTime; // lock end time. + uint256 userBoostedShare; // boost share, in order to give the user higher reward. The user only enjoys the reward, so the principal needs to be recorded as a debt. + bool locked; //lock status. + uint256 lockedAmount; // amount deposited during lock period. + } + + function userInfo(address user) + external + view + returns ( + uint256, + uint256, + uint256, + uint256, + uint256, + uint256, + uint256, + bool, + uint256 + ); + + function freePerformanceFeeUsers(address user) external view returns (bool); + + function freeWithdrawFeeUsers(address user) external view returns (bool); + + function freeOverdueFeeUsers(address user) external view returns (bool); + + function getPricePerFullShare() external view returns (uint256); + + function overdueFee() external view returns (uint256); + + function performanceFee() external view returns (uint256); + + function performanceFeeContract() external view returns (uint256); + + function totalShares() external view returns (uint256); + + function totalBoostDebt() external view returns (uint256); + + function balanceOf() external view returns (uint256); + + function available() external view returns (uint256); + + function BOOST_WEIGHT() external view returns (uint256); + + function MAX_LOCK_DURATION() external view returns (uint256); + + function deposit(uint256 _amount, uint256 _lockDuration) external; + + function withdrawByAmount(uint256 _amount) external; + + function withdraw(uint256 _shares) external; + + function withdrawAll() external; +} diff --git a/projects/revenue-sharing-pool/v2/contracts/interfaces/IMasterChefV2.sol b/projects/revenue-sharing-pool/v2/contracts/interfaces/IMasterChefV2.sol new file mode 100644 index 00000000..c5e9b24a --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/interfaces/IMasterChefV2.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IMasterChefV2 { + function pendingCake(uint256 _pid, address _user) external view returns (uint256); +} diff --git a/projects/revenue-sharing-pool/v2/contracts/interfaces/IProxyForCakePool.sol b/projects/revenue-sharing-pool/v2/contracts/interfaces/IProxyForCakePool.sol new file mode 100644 index 00000000..88246e4c --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/interfaces/IProxyForCakePool.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IProxyForCakePool { + function cakePoolUser() external view returns (address); +} diff --git a/projects/revenue-sharing-pool/v2/contracts/interfaces/IRevenueSharingPool.sol b/projects/revenue-sharing-pool/v2/contracts/interfaces/IRevenueSharingPool.sol new file mode 100644 index 00000000..4a597d13 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/interfaces/IRevenueSharingPool.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IRevenueSharingPool { + function lastTokenTimestamp() external view returns (uint256); + + function checkpointToken() external; + + function checkpointTotalSupply() external; + + function claim(address user) external returns (uint256); + + function claimForUser(address user) external returns (uint256); + + function setRecipient(address _user, address _recipient) external; +} diff --git a/projects/revenue-sharing-pool/v2/contracts/interfaces/IRevenueSharingPoolFactory.sol b/projects/revenue-sharing-pool/v2/contracts/interfaces/IRevenueSharingPoolFactory.sol new file mode 100644 index 00000000..980beea3 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/interfaces/IRevenueSharingPoolFactory.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IRevenueSharingPoolFactory { + function parameters() + external + view + returns ( + address VCake, + uint256 startTime, + address rewardToken, + address emergencyReturn, + address owner + ); +} diff --git a/projects/revenue-sharing-pool/v2/contracts/interfaces/IVECake.sol b/projects/revenue-sharing-pool/v2/contracts/interfaces/IVECake.sol new file mode 100644 index 00000000..ef5edc3c --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/interfaces/IVECake.sol @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +struct Point { + int128 bias; // Voting weight + int128 slope; // Multiplier factor to get voting weight at a given time + uint256 timestamp; + uint256 blockNumber; +} + +interface IVECake { + /// @dev Cake pool deposit will trigger this + function deposit( + address _user, + uint256 _amount, + uint256 _lockDuration + ) external; + + /// @dev Cake pool withdraw will trigger this + function withdraw(address _user) external; + + function userInfo(address user) + external + view + returns ( + address cakePoolProxy, // Proxy Smart Contract for users who had locked in cake pool. + uint128 cakeAmount, // Cake amount locked in cake pool. + uint48 lockEndTime, // Record the lockEndTime in cake pool. + uint48 migrationTime, // Record the migration time. + uint16 cakePoolType, // 1: Migration, 2: Delegation. + uint16 withdrawFlag // 0: Not withdraw, 1 : withdrew. + ); + + function isCakePoolProxy(address _user) external view returns (bool); + + /// @dev Return the max epoch of the given "_user" + function userPointEpoch(address _user) external view returns (uint256); + + /// @dev Return the max global epoch + function epoch() external view returns (uint256); + + /// @dev Return the recorded point for _user at specific _epoch + function userPointHistory(address _user, uint256 _epoch) external view returns (Point memory); + + /// @dev Return the recorded global point at specific _epoch + function pointHistory(uint256 _epoch) external view returns (Point memory); + + /// @dev Trigger global check point + function checkpoint() external; + + /// @notice Return the proxy balance of VECake at a given "_blockNumber" + /// @param _user The proxy owner address to get a balance of VECake + /// @param _blockNumber The speicific block number that you want to check the balance of VECake + function balanceOfAtForProxy(address _user, uint256 _blockNumber) external view returns (uint256); + + /// @notice Return the balance of VECake at a given "_blockNumber" + /// @param _user The address to get a balance of VECake + /// @param _blockNumber The speicific block number that you want to check the balance of VECake + function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256); + + /// @notice Return the voting weight of a givne user's proxy + /// @param _user The address of a user + function balanceOfForProxy(address _user) external view returns (uint256); + + /// @notice Return the voting weight of a givne user + /// @param _user The address of a user + function balanceOf(address _user) external view returns (uint256); + + /// @notice Migrate from cake pool. + function migrateFromCakePool() external; + + /// @notice Delegate from cake pool. + /// @dev this function will call one function in delegator smart contract, like this: DelegatorSC.delegate(address user, uint256 amount, uint256 endTime). + /// @param _delegator delegator address + function delegateFromCakePool(address _delegator) external; + + /// @notice Create a new lock. + /// @dev This will crate a new lock and deposit Cake to VECake Vault + /// @param _amount the amount that user wishes to deposit + /// @param _unlockTime the timestamp when Cake get unlocked, it will be + /// floored down to whole weeks + function createLock(uint256 _amount, uint256 _unlockTime) external; + + function createLockForProxy(uint256 _amount, uint256 _unlockTime) external; + + /// @notice Increase lock amount without increase "end" + /// @param _amount The amount of Cake to be added to the lock + function increaseLockAmount(uint256 _amount) external; + + /// @notice Increase unlock time without changing locked amount + /// @param _newUnlockTime The new unlock time to be updated + function increaseUnlockTime(uint256 _newUnlockTime) external; + + /// @notice Withdraw all Cake when lock has expired + /// @param _to The address which will receive the cake + function withdrawAll(address _to) external; + + /// @notice Early withdraw Cake with penalty. + /// @param _to The address which will receive the cake + /// @param _amount Cake amount + function earlyWithdraw(address _to, uint256 _amount) external; + + /// @notice Emergency withdraw Cake. + /// @dev Under any circumstances, it is guaranteed that the user’s assets will not be locked + function emergencyWithdraw() external; +} diff --git a/projects/revenue-sharing-pool/v2/contracts/keeper/RevenueSharingPoolKeeper.sol b/projects/revenue-sharing-pool/v2/contracts/keeper/RevenueSharingPoolKeeper.sol new file mode 100644 index 00000000..f0263c0a --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/keeper/RevenueSharingPoolKeeper.sol @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "@openzeppelin-4.5.0/contracts/security/Pausable.sol"; +import "@chainlink/contracts/src/v0.8/KeeperCompatible.sol"; +import "../interfaces/IRevenueSharingPool.sol"; + +/** + * @dev RevenueSharingPoolKeeper was designed to execute checkpointToken. + */ +contract RevenueSharingPoolKeeper is KeeperCompatibleInterface, Ownable, Pausable { + address public register; + IRevenueSharingPool public immutable RevenueSharingPool; + + uint256 public constant WEEK = 1 weeks; + + mapping(uint256 => bool) public checkpointTokenFlag; + + event NewRegister(address indexed register); + + /// @notice constructor. + /// @param _RevenueSharingPool RevenueSharingPool address. + constructor(IRevenueSharingPool _RevenueSharingPool) { + RevenueSharingPool = _RevenueSharingPool; + } + + modifier onlyRegister() { + require(msg.sender == register, "Not register"); + _; + } + + /// @notice Round off random timestamp to week + /// @param _timestamp The timestamp to be rounded off + function _timestampToFloorWeek(uint256 _timestamp) internal pure returns (uint256) { + return (_timestamp / WEEK) * WEEK; + } + + //The logic is consistent with the following performUpkeep function, in order to make the code logic clearer. + function checkUpkeep(bytes calldata) external view override returns (bool upkeepNeeded, bytes memory) { + if (!paused()) { + uint256 lastTokenTimestamp = RevenueSharingPool.lastTokenTimestamp(); + uint256 weekCursor = _timestampToFloorWeek(block.timestamp); + if (lastTokenTimestamp < weekCursor && !checkpointTokenFlag[weekCursor]) { + upkeepNeeded = true; + } + } + } + + function performUpkeep(bytes calldata) external override onlyRegister whenNotPaused { + uint256 lastTokenTimestamp = RevenueSharingPool.lastTokenTimestamp(); + uint256 weekCursor = _timestampToFloorWeek(block.timestamp); + if (lastTokenTimestamp < weekCursor && !checkpointTokenFlag[weekCursor]) { + checkpointTokenFlag[weekCursor] = true; + RevenueSharingPool.checkpointToken(); + RevenueSharingPool.checkpointTotalSupply(); + } + } + + /// @notice Set register. + /// @dev Callable by owner + /// @param _register New register. + function setRegister(address _register) external onlyOwner { + require(_register != address(0), "Can not be zero address"); + register = _register; + emit NewRegister(_register); + } + + function pause() external onlyOwner { + _pause(); + } + + function unpause() external onlyOwner { + _unpause(); + } +} diff --git a/projects/revenue-sharing-pool/v2/contracts/libraries/SafeCast.sol b/projects/revenue-sharing-pool/v2/contracts/libraries/SafeCast.sol new file mode 100644 index 00000000..3cd64735 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/libraries/SafeCast.sol @@ -0,0 +1,241 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow + * checks. + * + * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can + * easily result in undesired exploitation or bugs, since developers usually + * assume that overflows raise errors. `SafeCast` restores this intuition by + * reverting the transaction when such 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. + * + * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing + * all math on `uint256` and `int256` and then downcasting. + */ +library SafeCast { + /** + * @dev Returns the downcasted uint224 from uint256, reverting on + * overflow (when the input is greater than largest uint224). + * + * Counterpart to Solidity's `uint224` operator. + * + * Requirements: + * + * - input must fit into 224 bits + */ + function toUint224(uint256 value) internal pure returns (uint224) { + require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); + return uint224(value); + } + + /** + * @dev Returns the downcasted uint128 from uint256, reverting on + * overflow (when the input is greater than largest uint128). + * + * Counterpart to Solidity's `uint128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + */ + function toUint128(uint256 value) internal pure returns (uint128) { + require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); + return uint128(value); + } + + /** + * @dev Returns the downcasted uint96 from uint256, reverting on + * overflow (when the input is greater than largest uint96). + * + * Counterpart to Solidity's `uint96` operator. + * + * Requirements: + * + * - input must fit into 96 bits + */ + function toUint96(uint256 value) internal pure returns (uint96) { + require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); + return uint96(value); + } + + /** + * @dev Returns the downcasted uint64 from uint256, reverting on + * overflow (when the input is greater than largest uint64). + * + * Counterpart to Solidity's `uint64` operator. + * + * Requirements: + * + * - input must fit into 64 bits + */ + function toUint64(uint256 value) internal pure returns (uint64) { + require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); + return uint64(value); + } + + /** + * @dev Returns the downcasted uint32 from uint256, reverting on + * overflow (when the input is greater than largest uint32). + * + * Counterpart to Solidity's `uint32` operator. + * + * Requirements: + * + * - input must fit into 32 bits + */ + function toUint32(uint256 value) internal pure returns (uint32) { + require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); + return uint32(value); + } + + /** + * @dev Returns the downcasted uint16 from uint256, reverting on + * overflow (when the input is greater than largest uint16). + * + * Counterpart to Solidity's `uint16` operator. + * + * Requirements: + * + * - input must fit into 16 bits + */ + function toUint16(uint256 value) internal pure returns (uint16) { + require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); + return uint16(value); + } + + /** + * @dev Returns the downcasted uint8 from uint256, reverting on + * overflow (when the input is greater than largest uint8). + * + * Counterpart to Solidity's `uint8` operator. + * + * Requirements: + * + * - input must fit into 8 bits. + */ + function toUint8(uint256 value) internal pure returns (uint8) { + require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); + return uint8(value); + } + + /** + * @dev Converts a signed int256 into an unsigned uint256. + * + * Requirements: + * + * - input must be greater than or equal to 0. + */ + function toUint256(int256 value) internal pure returns (uint256) { + require(value >= 0, "SafeCast: value must be positive"); + return uint256(value); + } + + /** + * @dev Returns the downcasted int128 from int256, reverting on + * overflow (when the input is less than smallest int128 or + * greater than largest int128). + * + * Counterpart to Solidity's `int128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + * + * _Available since v3.1._ + */ + function toInt128(int256 value) internal pure returns (int128) { + require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits"); + return int128(value); + } + + /** + * @dev Returns the downcasted int64 from int256, reverting on + * overflow (when the input is less than smallest int64 or + * greater than largest int64). + * + * Counterpart to Solidity's `int64` operator. + * + * Requirements: + * + * - input must fit into 64 bits + * + * _Available since v3.1._ + */ + function toInt64(int256 value) internal pure returns (int64) { + require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits"); + return int64(value); + } + + /** + * @dev Returns the downcasted int32 from int256, reverting on + * overflow (when the input is less than smallest int32 or + * greater than largest int32). + * + * Counterpart to Solidity's `int32` operator. + * + * Requirements: + * + * - input must fit into 32 bits + * + * _Available since v3.1._ + */ + function toInt32(int256 value) internal pure returns (int32) { + require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits"); + return int32(value); + } + + /** + * @dev Returns the downcasted int16 from int256, reverting on + * overflow (when the input is less than smallest int16 or + * greater than largest int16). + * + * Counterpart to Solidity's `int16` operator. + * + * Requirements: + * + * - input must fit into 16 bits + * + * _Available since v3.1._ + */ + function toInt16(int256 value) internal pure returns (int16) { + require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits"); + return int16(value); + } + + /** + * @dev Returns the downcasted int8 from int256, reverting on + * overflow (when the input is less than smallest int8 or + * greater than largest int8). + * + * Counterpart to Solidity's `int8` operator. + * + * Requirements: + * + * - input must fit into 8 bits. + * + * _Available since v3.1._ + */ + function toInt8(int256 value) internal pure returns (int8) { + require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits"); + return int8(value); + } + + /** + * @dev Converts an unsigned uint256 into a signed int256. + * + * Requirements: + * + * - input must be less than or equal to maxInt256. + */ + function toInt256(uint256 value) internal pure returns (int256) { + // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive + require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); + return int256(value); + } +} diff --git a/projects/revenue-sharing-pool/v2/contracts/test/Delegator.sol b/projects/revenue-sharing-pool/v2/contracts/test/Delegator.sol new file mode 100644 index 00000000..ad4a77a1 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/test/Delegator.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "../interfaces/IVECake.sol"; +import "../interfaces/IRevenueSharingPool.sol"; + +contract Delegator is ERC20 { + using SafeERC20 for IERC20; + + IERC20 public immutable token; + IVECake public immutable VECake; + + /** + * @notice Constructor + * @param _VECake: VECake contract + * @param _token: Cake Token contract + */ + constructor(IVECake _VECake, IERC20 _token) ERC20("VECake Delegator Token", "VDT") { + VECake = _VECake; + token = _token; + token.safeApprove(address(_VECake), type(uint256).max); + } + + function createLock(uint256 _amount, uint256 _unlockTime) external { + token.safeTransferFrom(msg.sender, address(this), _amount); + VECake.createLock(_amount, _unlockTime); + } + + function withdrawAll(address _to) external { + VECake.withdrawAll(_to); + } + + function earlyWithdraw(address _to, uint256 _amount) external { + VECake.earlyWithdraw(_to, _amount); + } + + function increaseLockAmount(uint256 _amount) external { + token.safeTransferFrom(msg.sender, address(this), _amount); + VECake.increaseLockAmount(_amount); + } + + function increaseUnlockTime(uint256 _newUnlockTime) external { + VECake.increaseUnlockTime(_newUnlockTime); + } + + function emergencyWithdraw() external { + VECake.emergencyWithdraw(); + } + + /// @notice Delegate in delegator smart contract. + /// @param user The user address + /// @param amount The delegated cake amount + /// @param lockEndTime The lock end time in cake pool. + function delegate( + address user, + uint256 amount, + uint256 lockEndTime + ) external { + _mint(user, amount); + } + + function setRecipient(IRevenueSharingPool _pool, address _recipient) external { + _pool.setRecipient(address(this), _recipient); + } +} diff --git a/projects/revenue-sharing-pool/v2/contracts/utils/Math128.sol b/projects/revenue-sharing-pool/v2/contracts/utils/Math128.sol new file mode 100644 index 00000000..aaf71ac6 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/contracts/utils/Math128.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/** + * @dev Standard math utilities missing in the Solidity language. + */ +library Math128 { + /** + * @dev Returns the largest of two numbers. + */ + function max(int128 a, int128 b) internal pure returns (int128) { + return a >= b ? a : b; + } + + /** + * @dev Returns the smallest of two numbers. + */ + function min(int128 a, int128 b) internal pure returns (int128) { + return a < b ? a : b; + } + + /** + * @dev Returns the smallest of two numbers. + */ + function min(uint256 a, uint256 b) internal pure returns (uint256) { + return a < b ? a : b; + } +} diff --git a/projects/revenue-sharing-pool/v2/hardhat.config.ts b/projects/revenue-sharing-pool/v2/hardhat.config.ts new file mode 100644 index 00000000..895e2b63 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/hardhat.config.ts @@ -0,0 +1,73 @@ +import type { HardhatUserConfig, NetworkUserConfig } from "hardhat/types"; +import "@nomiclabs-2.2.2/hardhat-ethers"; +import "@nomiclabs/hardhat-web3"; +import "@nomiclabs/hardhat-truffle5"; +import "hardhat-abi-exporter"; +import "hardhat-contract-sizer"; +import "solidity-coverage"; +import "dotenv/config"; + +const bscTestnet: NetworkUserConfig = { + url: "https://data-seed-prebsc-1-s1.binance.org:8545/", + chainId: 97, + accounts: [process.env.KEY_TESTNET!], +}; + +const bscMainnet: NetworkUserConfig = { + url: "https://bsc-dataseed.binance.org/", + chainId: 56, + accounts: [process.env.KEY_MAINNET!], +}; + +const config = { + defaultNetwork: "hardhat", + networks: { + hardhat: {}, + // testnet: bscTestnet, + // mainnet: bscMainnet, + }, + solidity: { + compilers: [ + { + version: "0.8.10", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + { + version: "0.8.0", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + { + version: "0.6.12", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + ], + }, + paths: { + sources: "./contracts/", + tests: "./test", + cache: "./cache", + artifacts: "./artifacts", + }, + // abiExporter: { + // path: "./data/abi", + // clear: true, + // flat: false, + // }, +}; + +export default config; diff --git a/projects/revenue-sharing-pool/v2/package.json b/projects/revenue-sharing-pool/v2/package.json new file mode 100644 index 00000000..14255823 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/package.json @@ -0,0 +1,24 @@ +{ + "name": "pancake-revenue-sharing-pool-v2", + "description": "Pancake Revenue Sharing Pool V2", + "main": "index.js", + "version": "1.0.0", + "license": "MIT", + "private": true, + "scripts": { + "compile": "npx hardhat compile", + "deploy_factory:testnet": "npx hardhat run --network testnet scripts/deployFactory.ts", + "deploy_factory:mainnet": "npx hardhat run --network mainnet scripts/deployFactory.ts", + "deploy_keeper:mainnet": "npx hardhat run --network mainnet scripts/deployKeeper.ts", + "test": "npx hardhat test", + "test:coverage": "npx hardhat coverage", + "test:size-contracts": "npx hardhat size-contracts" + }, + "devDependencies": { + "@chainlink/contracts": "^0.6.1" + }, + "dependencies": { + "@openzeppelin-4.5.0/contracts": "npm:@openzeppelin/contracts@4.5.0", + "@nomiclabs-2.2.2/hardhat-ethers": "npm:@nomiclabs/hardhat-ethers@^2.2.2" + } +} \ No newline at end of file diff --git a/projects/revenue-sharing-pool/v2/scripts/deployFactory.ts b/projects/revenue-sharing-pool/v2/scripts/deployFactory.ts new file mode 100644 index 00000000..67e2a572 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/scripts/deployFactory.ts @@ -0,0 +1,39 @@ +import { parseEther } from "ethers/lib/utils"; +import { ethers, network, run } from "hardhat"; +import config from "../config"; + +const main = async () => { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Check if the addresses in the config are set. + if (config.VECake[networkName] === ethers.constants.AddressZero) { + throw new Error("Missing addresses"); + } + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + // Deploy contracts. + const RevenueSharingPoolFactoryContract = await ethers.getContractFactory("RevenueSharingPoolFactory"); + const contract = await RevenueSharingPoolFactoryContract.deploy(config.VECake[networkName]); + + // Wait for the contract to be deployed before exiting the script. + await contract.deployed(); + console.log(`Deployed to ${contract.address}`); + } else { + console.log(`Deploying to ${networkName} network is not supported...`); + } +}; + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/revenue-sharing-pool/v2/scripts/deployKeeper.ts b/projects/revenue-sharing-pool/v2/scripts/deployKeeper.ts new file mode 100644 index 00000000..6b6bab45 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/scripts/deployKeeper.ts @@ -0,0 +1,39 @@ +import { parseEther } from "ethers/lib/utils"; +import { ethers, network, run } from "hardhat"; +import config from "../config"; + +const main = async () => { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Check if the addresses in the config are set. + if (config.RevenueSharingPoolForCake_Two[networkName] === ethers.constants.AddressZero) { + throw new Error("Missing addresses"); + } + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + // Deploy contracts. + const RevenueSharingPoolKeeperContract = await ethers.getContractFactory("RevenueSharingPoolKeeper"); + const contract = await RevenueSharingPoolKeeperContract.deploy(config.RevenueSharingPoolForCake_Two[networkName]); + + // Wait for the contract to be deployed before exiting the script. + await contract.deployed(); + console.log(`Deployed to ${contract.address}`); + } else { + console.log(`Deploying to ${networkName} network is not supported...`); + } +}; + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/revenue-sharing-pool/v2/test/RevenueSharingPool.test.ts b/projects/revenue-sharing-pool/v2/test/RevenueSharingPool.test.ts new file mode 100644 index 00000000..6100607b --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/RevenueSharingPool.test.ts @@ -0,0 +1,1185 @@ +import { artifacts, contract, ethers, network } from "hardhat"; +import { time, BN, expectEvent, expectRevert } from "@openzeppelin/test-helpers"; +import { parseEther, formatEther } from "ethers/lib/utils"; +import { expect } from "chai"; +import { beforeEach } from "mocha"; +import { BigNumber } from "ethers"; + +import ERC20MockArtifact from "./artifactsFile/ERC20Mock.json"; +import CakeTokenArtifact from "./artifactsFile/CakeToken.json"; +import SyrupBarArtifact from "./artifactsFile/SyrupBar.json"; +import MasterChefArtifact from "./artifactsFile/MasterChef.json"; +import MasterChefV2Artifact from "./artifactsFile/MasterChefV2.json"; +import CakePoolArtifact from "./artifactsFile/CakePool.json"; +import VECakeArtifact from "./artifactsFile/VECake.json"; +import ProxyForCakePoolArtifact from "./artifactsFile/ProxyForCakePool.json"; +import ProxyForCakePoolFactoryArtifact from "./artifactsFile/ProxyForCakePoolFactory.json"; +import DelegatorArtifact from "./artifactsFile/Delegator.json"; +import RevenueSharingPoolFactoryArtifact from "./artifactsFile/RevenueSharingPoolFactory.json"; +import RevenueSharingPoolArtifact from "./artifactsFile/RevenueSharingPool.json"; + +const ZERO = BigNumber.from(0); +const TOLERANCE = "0.04"; // 0.04% +const HOUR = BigNumber.from(3600); +const DAY = BigNumber.from(86400); +const WEEK = DAY.mul(7); +const YEAR = DAY.mul(365); +const MAX_LOCK = BigNumber.from(32054399); // seconds in 53 weeks - 1 second (60 * 60 * 24 * 7 * 53) - 1 +const TOKEN_CHECKPOINT_DEADLINE = DAY; +const PRECISION = BigNumber.from(10).pow(17); +const tolerancePercent = 9990; // 99.9% + +describe("Revenue Sharing Pool", () => { + let CakePoolSC; + let masterChefV2; + let ProxyForCakePoolFactorySC; + let VECakeSC; + let CakeTokenSC; + let RevenueSharingPoolSC; + let RevenueToken; + let RevenueSharingPoolFactorySC; + let delegatorSC; + let admin; + let user1; + let user2; + let user3; + let user4; + let recipient; + before(async function () { + [admin, user1, user2, user3, user4, recipient] = await ethers.getSigners(); + }); + + beforeEach(async () => { + const ERC20Mock = await ethers.getContractFactoryFromArtifact(ERC20MockArtifact); + + // Prepare for master chef v3 + + const CakeToken = await ethers.getContractFactoryFromArtifact(CakeTokenArtifact); + CakeTokenSC = await CakeToken.deploy(); + await CakeTokenSC["mint(address,uint256)"](admin.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user1.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user2.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user3.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user4.address, ethers.utils.parseUnits("100000000000000")); + + const SyrupBar = await ethers.getContractFactoryFromArtifact(SyrupBarArtifact); + const syrupBar = await SyrupBar.deploy(CakeTokenSC.address); + + const lpTokenV1 = await ERC20Mock.deploy("LP Token V1", "LPV1"); + const dummyTokenV2 = await ERC20Mock.deploy("Dummy Token V2", "DTV2"); + + const MasterChef = await ethers.getContractFactoryFromArtifact(MasterChefArtifact); + const masterChef = await MasterChef.deploy( + CakeTokenSC.address, + syrupBar.address, + admin.address, + ethers.utils.parseUnits("40"), + ethers.constants.Zero + ); + + await CakeTokenSC.transferOwnership(masterChef.address); + await syrupBar.transferOwnership(masterChef.address); + + await masterChef.add(0, lpTokenV1.address, true); // farm with pid 1 and 0 allocPoint + await masterChef.add(1, dummyTokenV2.address, true); // farm with pid 2 and 1 allocPoint + + const MasterChefV2 = await ethers.getContractFactoryFromArtifact(MasterChefV2Artifact); + masterChefV2 = await MasterChefV2.deploy(masterChef.address, CakeTokenSC.address, 2, admin.address); + + await dummyTokenV2.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenV2.approve(masterChefV2.address, ethers.constants.MaxUint256); + await masterChefV2.init(dummyTokenV2.address); + + const lpTokenV2 = await ERC20Mock.deploy("LP Token V2", "LPV2"); + const dummyTokenV3 = await ERC20Mock.deploy("Dummy Token V3", "DTV3"); + const dummyTokenForCakePool = await ERC20Mock.deploy("Dummy Token Cake Pool", "DTCP"); + const dummyTokenForSpecialPool2 = await ERC20Mock.deploy("Dummy Token Special pool 2", "DT"); + + await masterChefV2.add(0, lpTokenV2.address, true, true); // regular farm with pid 0 and 1 allocPoint + await masterChefV2.add(1, dummyTokenV3.address, true, true); // regular farm with pid 1 and 1 allocPoint + await masterChefV2.add(1, dummyTokenForCakePool.address, false, true); // special farm with pid 2 and 1 allocPoint + await masterChefV2.add(0, dummyTokenForSpecialPool2.address, false, true); // special farm with pid 3 and 0 allocPoint + + // set cake pool + const CakePool = await ethers.getContractFactoryFromArtifact(CakePoolArtifact); + CakePoolSC = await CakePool.deploy( + CakeTokenSC.address, + masterChefV2.address, + admin.address, + admin.address, + admin.address, + 2 + ); + await masterChefV2.updateWhiteList(CakePoolSC.address, true); + await dummyTokenForCakePool.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenForCakePool.approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakePoolSC.init(dummyTokenForCakePool.address); + + await CakeTokenSC.connect(admin).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user1).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user2).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user3).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user4).approve(CakePoolSC.address, ethers.constants.MaxUint256); + + // deploy ProxyForCakePoolFactory + const ProxyForCakePoolFactory = await ethers.getContractFactoryFromArtifact(ProxyForCakePoolFactoryArtifact); + ProxyForCakePoolFactorySC = await ProxyForCakePoolFactory.deploy(); + + // deploy VECake + const VECake = await ethers.getContractFactoryFromArtifact(VECakeArtifact); + VECakeSC = await VECake.deploy(CakePoolSC.address, CakeTokenSC.address, ProxyForCakePoolFactorySC.address); + + await CakeTokenSC.connect(admin).approve(VECakeSC.address, ethers.constants.MaxUint256); + + await ProxyForCakePoolFactorySC.initialize(VECakeSC.address); + + await CakePoolSC.setVCakeContract(VECakeSC.address); + + await VECakeSC.initializeCakePoolMigration(); + + const RevenueSharingPoolFactory = await ethers.getContractFactoryFromArtifact(RevenueSharingPoolFactoryArtifact); + RevenueSharingPoolFactorySC = await RevenueSharingPoolFactory.deploy(VECakeSC.address); + + RevenueToken = await ERC20Mock.deploy("Revenue Token", "RT"); + await RevenueToken.mint(admin.address, ethers.utils.parseUnits("10000000000")); + + const currentTime = (await time.latest()).toString(); + let tx = await RevenueSharingPoolFactorySC.deploy(currentTime, RevenueToken.address, admin.address); + let receipt = await tx.wait(); + const newPoolAddress = receipt.events[2].args.pool; + RevenueSharingPoolSC = await ethers.getContractAt(RevenueSharingPoolArtifact.abi, newPoolAddress, admin); + + await RevenueToken.connect(admin).approve(RevenueSharingPoolSC.address, ethers.constants.MaxUint256); + }); + + afterEach(async () => { + await network.provider.send("hardhat_reset"); + }); + + describe("initialized", async () => { + it("should initialized correctly", async () => { + let latestTimestamp = (await time.latest()).toString(); + const startWeekCursor = BigNumber.from(latestTimestamp).div(WEEK).mul(WEEK); + expect(await RevenueSharingPoolSC.startWeekCursor()).to.deep.eq(startWeekCursor); + expect(await RevenueSharingPoolSC.lastTokenTimestamp()).deep.eq(startWeekCursor); + expect(await RevenueSharingPoolSC.weekCursor()).to.deep.eq(startWeekCursor); + expect(await RevenueSharingPoolSC.rewardToken()).to.deep.eq(RevenueToken.address); + expect(await RevenueSharingPoolSC.VECake()).to.deep.eq(VECakeSC.address); + expect(await RevenueSharingPoolSC.emergencyReturn()).to.deep.eq(admin.address); + expect(await RevenueSharingPoolSC.canCheckpointToken()).deep.eq(false); + }); + }); + + describe("checkpointToken", () => { + beforeEach(async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 30); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("1"), 0); + + await VECakeSC.connect(user1).migrateFromCakePool(); + await VECakeSC.connect(user2).migrateFromCakePool(); + await VECakeSC.connect(user3).migrateFromCakePool(); + }); + + context("when owner call checkpointToken", async () => { + it("should work", async () => { + let latestTimestamp = (await time.latest()).toString(); + await RevenueToken.transfer(RevenueSharingPoolSC.address, ethers.utils.parseEther("888")); + await RevenueSharingPoolSC.connect(admin).checkpointToken(); + + expect(await RevenueSharingPoolSC.lastTokenBalance()).to.deep.eq(ethers.utils.parseEther("888")); + const lastTokenTimestamp = (await RevenueSharingPoolSC.lastTokenTimestamp()).toNumber(); + expect(lastTokenTimestamp).to.be.gt(Number(latestTimestamp)); + + const weekTimeStamp = BigNumber.from(latestTimestamp).div(WEEK).mul(WEEK); + const tokensPerWeek = await RevenueSharingPoolSC.tokensPerWeek(weekTimeStamp); + expect(tokensPerWeek).to.deep.eq(ethers.utils.parseEther("888")); + }); + }); + }); + + describe("totalSupplyAt and balanceOfAt", () => { + beforeEach(async function () { + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("1"), 0); + }); + + context("One user", async () => { + it("The user's balanceOfAt is equal to the totalSupplyAt at specific week cursor when have only one user", async () => { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await VECakeSC.connect(user1).migrateFromCakePool(); + + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + + let weekCursor = latestTimestamp.div(WEEK).mul(WEEK); + let totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(weekCursor); + + let user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, weekCursor); + + expect(user1BalanceOfAt).to.deep.eq(ZERO); + expect(totalSupplyAt).to.deep.eq(ZERO); + + let nextWeekCursor = latestTimestamp.div(WEEK).add(1).mul(WEEK); + totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(nextWeekCursor); + + user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, nextWeekCursor); + let userinfoInVECake = await VECakeSC.getUserInfo(user1.address); + + expect(user1BalanceOfAt.gt(ZERO)).to.deep.eq(true); + expect(totalSupplyAt).to.deep.eq(ZERO); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(nextWeekCursor); + + user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, nextWeekCursor); + + expect(user1BalanceOfAt.gt(ZERO)).to.deep.eq(true); + expect(totalSupplyAt).to.deep.eq(ZERO); + + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const weekBlock = await time.latestBlock(); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(nextWeekCursor); + user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, nextWeekCursor); + const totalSupplyAtInVECake = await VECakeSC.totalSupplyAt(weekBlock.toNumber()); + expect(user1BalanceOfAt).to.deep.eq(totalSupplyAt); + expect(totalSupplyAtInVECake).to.deep.eq(totalSupplyAt); + }); + }); + + context("Three users", async () => { + it("The total balanceOfAt of all users is equal to the totalSupplyAt at specific week cursor", async () => { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 30); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + await VECakeSC.connect(user1).migrateFromCakePool(); + await VECakeSC.connect(user2).migrateFromCakePool(); + await VECakeSC.connect(user3).migrateFromCakePool(); + + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + const weekCursor = lastTokenTimestamp.div(WEEK).mul(WEEK); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + const totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(weekCursor); + + const user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, weekCursor); + const user2BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user2.address, weekCursor); + const user3BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user3.address, weekCursor); + + const userTotalBalanceOfAt = user1BalanceOfAt.add(user2BalanceOfAt).add(user3BalanceOfAt); + expect(userTotalBalanceOfAt).to.deep.eq(totalSupplyAt); + }); + }); + }); + + describe("claim", () => { + beforeEach(async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 30); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("1"), 0); + + await VECakeSC.connect(user1).migrateFromCakePool(); + await VECakeSC.connect(user2).migrateFromCakePool(); + await VECakeSC.connect(user3).migrateFromCakePool(); + }); + + it("should return 0 when user with no lock try to claim", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), ethers.utils.parseUnits("88888")); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + let lastTokenBalance = await RevenueSharingPoolSC.lastTokenBalance(); + + expect(lastTokenBalance).to.deep.eq(ethers.utils.parseUnits("88888")); + + const user4BalanceBefore = await RevenueToken.balanceOf(user4.address); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + + const user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceBefore).to.deep.eq(user4BalanceAfter); + }); + + it("All users claim reward amount should be equal with inject reward amount", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + const weekCursor = lastTokenTimestamp.div(WEEK).mul(WEEK); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + const totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(weekCursor); + const totalRewardBalance = await RevenueToken.balanceOf(RevenueSharingPoolSC.address); + + const user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, weekCursor); + const user2BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user2.address, weekCursor); + const user3BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user3.address, weekCursor); + + const userTotalBalanceOfAt = user1BalanceOfAt.add(user2BalanceOfAt).add(user3BalanceOfAt); + let user1ClaimAmount = user1BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + let user2ClaimAmount = user2BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + let user3ClaimAmount = user3BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + const user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + const user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1ClaimAmount).to.deep.eq(user1BalanceAfter); + expect(user2ClaimAmount).to.deep.eq(user2BalanceAfter); + expect(user3ClaimAmount).to.deep.eq(user3BalanceAfter); + + const totalBalance = user1BalanceAfter.add(user2BalanceAfter).add(user3BalanceAfter); + + //The result is not completely consistent due to the loss of precision of the calculation + expect(totalBalance.mul(10000).div(injectAmount).gt(tolerancePercent)).to.deep.eq(true); + }); + + it("user claim 0 when lock after checkpointToken ", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekTimeStamp = latestTimestamp.div(WEEK).add(1).mul(WEEK); + await time.increaseTo(nextWeekTimeStamp.sub(1).toNumber()); + + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await VECakeSC.connect(user4).migrateFromCakePool(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + const user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + }); + + it("user claim 0 at this week when lock at this week", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekTimeStamp = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + await time.increaseTo(nextWeekTimeStamp.sub(DAY).toNumber()); + + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await VECakeSC.connect(user4).migrateFromCakePool(); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.sub(DAY).toNumber(), injectAmount); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + const user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + }); + + it("user claim 0 at next week when lock at this week", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekTimeStamp = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + await time.increaseTo(nextWeekTimeStamp.sub(DAY).toNumber()); + + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await VECakeSC.connect(user4).migrateFromCakePool(); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.sub(DAY).toNumber(), injectAmount); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + let user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + + await time.increaseTo(nextWeekTimeStamp.add(3600).toNumber()); + + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.add(3600).toNumber(), ethers.utils.parseUnits("88888")); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + }); + + it("user can claim reward after next week when lock at this week", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekTimeStamp = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + await time.increaseTo(nextWeekTimeStamp.sub(DAY).toNumber()); + + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await VECakeSC.connect(user4).migrateFromCakePool(); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.sub(DAY).toNumber(), injectAmount); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + let user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + + await time.increaseTo(nextWeekTimeStamp.add(3600).toNumber()); + + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.add(3600).toNumber(), ethers.utils.parseUnits("88888")); + await RevenueSharingPoolSC.checkpointToken(); + + await time.increaseTo(nextWeekTimeStamp.add(WEEK).add(3600).toNumber()); + + await RevenueSharingPoolSC.injectReward( + nextWeekTimeStamp.add(WEEK).add(3600).toNumber(), + ethers.utils.parseUnits("88888") + ); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + expect(user4BalanceAfter.gt(ZERO)).to.deep.eq(true); + }); + + it("user can not claim reward again after had claimed", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekTimeStamp = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + await time.increaseTo(nextWeekTimeStamp.sub(DAY).toNumber()); + + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await VECakeSC.connect(user4).migrateFromCakePool(); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.sub(DAY).toNumber(), injectAmount); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + let user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + + await time.increaseTo(nextWeekTimeStamp.add(3600).toNumber()); + + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.add(3600).toNumber(), ethers.utils.parseUnits("88888")); + await RevenueSharingPoolSC.checkpointToken(); + + await time.increaseTo(nextWeekTimeStamp.add(WEEK).add(3600).toNumber()); + + await RevenueSharingPoolSC.injectReward( + nextWeekTimeStamp.add(WEEK).add(3600).toNumber(), + ethers.utils.parseUnits("88888") + ); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + expect(user4BalanceAfter.gt(ZERO)).to.deep.eq(true); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + + let user4BalanceClaimedAgain = await RevenueToken.balanceOf(user4.address); + expect(user4BalanceClaimedAgain).to.deep.eq(user4BalanceAfter); + }); + + it("user can not claim reward again used claimTo after had claimTo", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekTimeStamp = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + await time.increaseTo(nextWeekTimeStamp.sub(DAY).toNumber()); + + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await VECakeSC.connect(user4).migrateFromCakePool(); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.sub(DAY).toNumber(), injectAmount); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + let user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + + expect(user4BalanceAfter).to.deep.eq(ZERO); + + await time.increaseTo(nextWeekTimeStamp.add(3600).toNumber()); + + await RevenueSharingPoolSC.injectReward(nextWeekTimeStamp.add(3600).toNumber(), ethers.utils.parseUnits("88888")); + await RevenueSharingPoolSC.checkpointToken(); + + await time.increaseTo(nextWeekTimeStamp.add(WEEK).add(3600).toNumber()); + + await RevenueSharingPoolSC.injectReward( + nextWeekTimeStamp.add(WEEK).add(3600).toNumber(), + ethers.utils.parseUnits("88888") + ); + await RevenueSharingPoolSC.checkpointToken(); + + await RevenueSharingPoolSC.connect(user4).claimTo(user4.address); + user4BalanceAfter = await RevenueToken.balanceOf(user4.address); + expect(user4BalanceAfter.gt(ZERO)).to.deep.eq(true); + + await RevenueSharingPoolSC.connect(user4).claimTo(user4.address); + + let user4BalanceClaimedAgain = await RevenueToken.balanceOf(user4.address); + expect(user4BalanceClaimedAgain).to.deep.eq(user4BalanceAfter); + }); + }); + + describe("Delegator claim", () => { + let delegatorLockEndTime; + beforeEach(async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 30); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("1"), 0); + + // deploy mock delegator smart contract + const Delegator = await ethers.getContractFactoryFromArtifact(DelegatorArtifact); + delegatorSC = await Delegator.deploy(VECakeSC.address, CakeTokenSC.address); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + // add whitelist for delegator in VECakeSC + await VECakeSC.setWhitelistedCallers([delegatorSC.address], true); + // add delegator in VECakeSC + await VECakeSC.updateDelegator(delegatorSC.address, true, OneYear); + + // create lock for delegator + await CakeTokenSC.approve(delegatorSC.address, ethers.utils.parseUnits("1")); + delegatorLockEndTime = OneYear; + await delegatorSC.createLock(ethers.utils.parseUnits("1"), OneYear); + + await VECakeSC.connect(user1).delegateFromCakePool(delegatorSC.address); + await VECakeSC.connect(user2).delegateFromCakePool(delegatorSC.address); + await VECakeSC.connect(user3).delegateFromCakePool(delegatorSC.address); + }); + + it("Claim reward amount should be equal with inject reward amount", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + const weekCursor = lastTokenTimestamp.div(WEEK).mul(WEEK); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + await RevenueSharingPoolSC.claim(delegatorSC.address); + + const delegatorBalanceAfter = await RevenueToken.balanceOf(delegatorSC.address); + + expect(injectAmount).to.deep.eq(delegatorBalanceAfter); + }); + + it("The total balanceOfAt of all users is equal to the totalSupplyAt at specific week cursor", async () => { + let totalLockAmountOfDelegator = ethers.utils + .parseUnits("80000") + .add(ethers.utils.parseUnits("90000")) + .add(ethers.utils.parseUnits("100000")) + .add(ethers.utils.parseUnits("1")); + + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + await VECakeSC.connect(user4).createLock(totalLockAmountOfDelegator, delegatorLockEndTime); + + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.div(WEEK).add(1).mul(WEEK).add(1); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + const weekCursor = lastTokenTimestamp.div(WEEK).mul(WEEK); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + const totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(weekCursor); + + const delegatorBalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(delegatorSC.address, weekCursor); + const user4BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user4.address, weekCursor); + + const userTotalBalanceOfAt = delegatorBalanceOfAt.add(user4BalanceOfAt); + expect(userTotalBalanceOfAt).to.deep.eq(totalSupplyAt); + }); + + it("The owner can set recipient for smart contract", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + const weekCursor = lastTokenTimestamp.div(WEEK).mul(WEEK); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + // set recipient for smart contract + await RevenueSharingPoolSC.setRecipient(delegatorSC.address, recipient.address); + let everSetRecipient = await RevenueSharingPoolSC.everSetRecipient(delegatorSC.address); + expect(everSetRecipient).to.deep.eq(false); + + const recipientBalanceBefore = await RevenueToken.balanceOf(recipient.address); + + await RevenueSharingPoolSC.claim(delegatorSC.address); + + const recipientBalanceAfter = await RevenueToken.balanceOf(recipient.address); + const delegatorBalanceAfter = await RevenueToken.balanceOf(delegatorSC.address); + + expect(ZERO).to.deep.eq(delegatorBalanceAfter); + expect(injectAmount).to.deep.eq(recipientBalanceAfter.sub(recipientBalanceBefore)); + }); + + it("The owner can not set recipient for smart contract after had set before", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + const weekCursor = lastTokenTimestamp.div(WEEK).mul(WEEK); + + await RevenueSharingPoolSC.checkpointTotalSupply(); + + // set recipient for smart contract + await delegatorSC.setRecipient(RevenueSharingPoolSC.address, recipient.address); + let everSetRecipient = await RevenueSharingPoolSC.everSetRecipient(delegatorSC.address); + expect(everSetRecipient).to.deep.eq(true); + await expectRevert( + RevenueSharingPoolSC.setRecipient(delegatorSC.address, recipient.address), + "Permission denied" + ); + }); + }); + + describe("CanCheckpointToken", () => { + beforeEach(async function () { + await RevenueSharingPoolSC.setCanCheckpointToken(true); + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 30); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 30); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 30); + + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("1"), 0); + + await VECakeSC.connect(user1).migrateFromCakePool(); + await VECakeSC.connect(user2).migrateFromCakePool(); + await VECakeSC.connect(user3).migrateFromCakePool(); + }); + it("All users claim reward amount should be equal with inject reward amount", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + await RevenueSharingPoolSC.connect(user4).claim(user4.address); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + const weekCursor = lastTokenTimestamp.div(WEEK).mul(WEEK); + + const totalSupplyAt = await RevenueSharingPoolSC.totalSupplyAt(weekCursor); + const totalRewardBalance = await RevenueToken.balanceOf(RevenueSharingPoolSC.address); + + const user1BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user1.address, weekCursor); + const user2BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user2.address, weekCursor); + const user3BalanceOfAt = await RevenueSharingPoolSC.balanceOfAt(user3.address, weekCursor); + + const userTotalBalanceOfAt = user1BalanceOfAt.add(user2BalanceOfAt).add(user3BalanceOfAt); + let user1ClaimAmount = user1BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + let user2ClaimAmount = user2BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + let user3ClaimAmount = user3BalanceOfAt.mul(totalRewardBalance).div(totalSupplyAt); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + const user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + const user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1ClaimAmount).to.deep.eq(user1BalanceAfter); + expect(user2ClaimAmount).to.deep.eq(user2BalanceAfter); + expect(user3ClaimAmount).to.deep.eq(user3BalanceAfter); + + const totalBalance = user1BalanceAfter.add(user2BalanceAfter).add(user3BalanceAfter); + + //The result is not completely consistent due to the loss of precision of the calculation + expect(totalBalance.mul(10000).div(injectAmount).gt(tolerancePercent)).to.deep.eq(true); + }); + + it("User will get reward by claim without checkpointToken", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + await RevenueSharingPoolSC.injectReward(latestTimestamp.add(WEEK), injectAmount); + await time.increase(WEEK.toNumber()); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + const user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + const user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1BalanceAfter.gt(ZERO)).to.deep.eq(true); + expect(user2BalanceAfter.gt(ZERO)).to.deep.eq(true); + expect(user3BalanceAfter.gt(ZERO)).to.deep.eq(true); + }); + + it("User will not get reward by claim before TOKEN_CHECKPOINT_DEADLINE", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekCursor = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + // increase time to nextWeekCursor - 1 hours + await time.increaseTo(nextWeekCursor.sub(BigNumber.from(3600)).toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.injectReward(targetTime, injectAmount); + + // await time.increase(WEEK.toNumber()); + + await time.increaseTo(nextWeekCursor.add(BigNumber.from(1)).toNumber()); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + const user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + const user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1BalanceAfter).to.deep.eq(ZERO); + expect(user2BalanceAfter).to.deep.eq(ZERO); + expect(user3BalanceAfter).to.deep.eq(ZERO); + }); + + it("User will get reward by claim after TOKEN_CHECKPOINT_DEADLINE", async () => { + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + const targetTime = latestTimestamp.add(WEEK); + await time.increaseTo(targetTime.toNumber()); + + const injectAmount = ethers.utils.parseUnits("88888"); + + latestTimestamp = BigNumber.from((await time.latest()).toString()); + let nextWeekCursor = latestTimestamp.div(WEEK).add(1).mul(WEEK); + + // increase time to nextWeekCursor - 1 hours + await time.increaseTo(nextWeekCursor.sub(BigNumber.from(3600)).toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.injectReward(targetTime, injectAmount); + + await time.increaseTo(nextWeekCursor.add(1).toNumber()); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + let user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + let user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + let user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1BalanceAfter).to.deep.eq(ZERO); + expect(user2BalanceAfter).to.deep.eq(ZERO); + expect(user3BalanceAfter).to.deep.eq(ZERO); + + await time.increase(DAY.toNumber()); + + const lastTokenTimestamp = await RevenueSharingPoolSC.lastTokenTimestamp(); + latestTimestamp = BigNumber.from((await time.latest()).toString()); + + expect(latestTimestamp.gt(lastTokenTimestamp.add(DAY))).to.deep.eq(true); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + await RevenueSharingPoolSC.connect(user2).claim(user2.address); + await RevenueSharingPoolSC.connect(user3).claim(user3.address); + + user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + user2BalanceAfter = await RevenueToken.balanceOf(user2.address); + user3BalanceAfter = await RevenueToken.balanceOf(user3.address); + + expect(user1BalanceAfter.gt(ZERO)).to.deep.eq(true); + expect(user2BalanceAfter.gt(ZERO)).to.deep.eq(true); + expect(user3BalanceAfter.gt(ZERO)).to.deep.eq(true); + }); + }); + + describe("Inject Reward", () => { + let Week1, Week2, Week3, Week4, Week5; + let rewardInWeekFour; + beforeEach(async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 60); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 60); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 60); + + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("1"), 0); + + await VECakeSC.connect(user1).migrateFromCakePool(); + await VECakeSC.connect(user2).migrateFromCakePool(); + await VECakeSC.connect(user3).migrateFromCakePool(); + + let latestTimestamp = BigNumber.from((await time.latest()).toString()); + + Week1 = latestTimestamp.div(WEEK).add(1).mul(WEEK); + Week2 = Week1.add(WEEK); + Week3 = Week2.add(WEEK); + Week4 = Week3.add(WEEK); + Week5 = Week4.add(WEEK); + // Inject reward in Week3 + await RevenueSharingPoolSC.injectReward(Week3.toNumber(), ethers.utils.parseEther("888")); + }); + + context("Can claim reward after inject reward timestamp", async () => { + it("No reward in week one", async () => { + await time.increaseTo(Week1.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + + expect(user1Balance).to.deep.eq(ZERO); + }); + + it("No reward in week two", async () => { + await time.increaseTo(Week2.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + + expect(user1Balance).to.deep.eq(ZERO); + }); + + it("No reward in week three", async () => { + await time.increaseTo(Week3.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + + expect(user1Balance).to.deep.eq(ZERO); + }); + + it("Inject again with amount zero , still get reward in week four", async () => { + await RevenueSharingPoolSC.injectReward(Week3.toNumber(), ethers.utils.parseEther("0")); + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + expect(user1Balance.gt(ZERO)).to.deep.eq(true); + }); + + it("Get reward in week four", async () => { + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + rewardInWeekFour = user1Balance; + expect(user1Balance.gt(ZERO)).to.deep.eq(true); + }); + + it("Using claimMany , will get same reward in week four as used claim", async () => { + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claimMany([user1.address]); + const user1Balance = await RevenueToken.balanceOf(user1.address); + expect(user1Balance.gt(ZERO)).to.deep.eq(true); + expect(user1Balance).to.deep.eq(rewardInWeekFour); + }); + + it("Using claimMany with cake pool proxy address , will get same reward in week four as used claim", async () => { + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + let userInfo = await VECakeSC.userInfo(user1.address); + await RevenueSharingPoolSC.connect(user1).claimMany([userInfo.cakePoolProxy]); + const user1Balance = await RevenueToken.balanceOf(user1.address); + expect(user1Balance.gt(ZERO)).to.deep.eq(true); + expect(user1Balance).to.deep.eq(rewardInWeekFour); + }); + + it("Using claimTo , will get same reward in week four as used claim", async () => { + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claimTo(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + expect(user1Balance.gt(ZERO)).to.deep.eq(true); + expect(user1Balance).to.deep.eq(rewardInWeekFour); + }); + + it("Using claim with cake pool proxy address , will get same reward in week four as used claim", async () => { + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + let userInfo = await VECakeSC.userInfo(user1.address); + await RevenueSharingPoolSC.connect(user1).claim(userInfo.cakePoolProxy); + const user1Balance = await RevenueToken.balanceOf(user1.address); + expect(user1Balance.gt(ZERO)).to.deep.eq(true); + expect(user1Balance).to.deep.eq(rewardInWeekFour); + }); + + it("Using claimForUser with user address , will not get reward for cake pool proxy in week four as used claim", async () => { + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claimForUser(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + expect(user1Balance).to.deep.eq(ZERO); + }); + + it("Using claimForUser with cake pool proxy address , will get same reward in week four as used claim", async () => { + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + let userInfo = await VECakeSC.userInfo(user1.address); + await RevenueSharingPoolSC.connect(user1).claimForUser(userInfo.cakePoolProxy); + const user1Balance = await RevenueToken.balanceOf(user1.address); + expect(user1Balance.gt(ZERO)).to.deep.eq(true); + expect(user1Balance).to.deep.eq(rewardInWeekFour); + }); + + it("user can not claim reward again used claimForUser after had used claimForUser", async () => { + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + let userInfo = await VECakeSC.userInfo(user1.address); + await RevenueSharingPoolSC.connect(user1).claimForUser(userInfo.cakePoolProxy); + const user1Balance = await RevenueToken.balanceOf(user1.address); + expect(user1Balance.gt(ZERO)).to.deep.eq(true); + expect(user1Balance).to.deep.eq(rewardInWeekFour); + + const user1BalanceClaimForUserAgain = await RevenueToken.balanceOf(user1.address); + await RevenueSharingPoolSC.connect(user1).claimForUser(userInfo.cakePoolProxy); + expect(user1Balance).to.deep.eq(user1BalanceClaimForUserAgain); + }); + + it("Set recipient, will claim reward to recipient address", async () => { + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).setRecipient(user1.address, recipient.address); + let everSetRecipient = await RevenueSharingPoolSC.everSetRecipient(user1.address); + expect(everSetRecipient).to.deep.eq(true); + + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + const recipientBalance = await RevenueToken.balanceOf(recipient.address); + expect(user1Balance).to.deep.eq(ZERO); + expect(recipientBalance).to.deep.eq(rewardInWeekFour); + }); + + it("Inject more , will get more reward in week four", async () => { + await RevenueSharingPoolSC.injectReward(Week3.toNumber(), ethers.utils.parseEther("999")); + await time.increaseTo(Week4.toNumber()); + + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1Balance = await RevenueToken.balanceOf(user1.address); + expect(user1Balance.gt(ZERO)).to.deep.eq(true); + expect(user1Balance.gt(rewardInWeekFour)).to.deep.eq(true); + }); + + it("No reward in week five after claim in week four", async () => { + // claim in week four + await time.increaseTo(Week4.toNumber()); + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + + await time.increaseTo(Week5.toNumber()); + const user1BalanceBefore = await RevenueToken.balanceOf(user1.address); + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + expect(user1BalanceAfter.sub(user1BalanceBefore)).to.deep.eq(ZERO); + }); + + it("Get reward even after lock expired", async () => { + const Year = Week1.add(YEAR); + await time.increaseTo(Year.toNumber()); + const user1BalanceBefore = await RevenueToken.balanceOf(user1.address); + await RevenueSharingPoolSC.checkpointToken(); + await RevenueSharingPoolSC.connect(user1).claim(user1.address); + const user1BalanceAfter = await RevenueToken.balanceOf(user1.address); + expect(user1BalanceAfter.sub(user1BalanceBefore).gt(ZERO)).to.deep.eq(true); + }); + + it("The totalDistributed should be equal to all injected amount", async () => { + await RevenueSharingPoolSC.injectReward(Week3.toNumber(), ethers.utils.parseEther("999")); + + let totalDistributed = await RevenueSharingPoolSC.totalDistributed(); + + expect(totalDistributed).to.deep.eq(ethers.utils.parseEther("999").add(ethers.utils.parseEther("888"))); + }); + }); + }); + + describe("getRecipient", () => { + let Week1, Week2, Week3, Week4, Week5; + beforeEach(async function () { + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("80000"), 3600 * 24 * 60); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("90000"), 3600 * 24 * 60); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("100000"), 3600 * 24 * 60); + + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user4).deposit(ethers.utils.parseUnits("1"), 0); + + await VECakeSC.connect(user1).migrateFromCakePool(); + await VECakeSC.connect(user2).migrateFromCakePool(); + await VECakeSC.connect(user3).migrateFromCakePool(); + }); + + it("Users recipient will be user address when user had no proxy and did not set recipient", async () => { + let recipientAddress = await RevenueSharingPoolSC.getRecipient(user4.address); + expect(recipientAddress).to.deep.eq(user4.address); + let everSetRecipient = await RevenueSharingPoolSC.everSetRecipient(user4.address); + expect(everSetRecipient).to.deep.eq(false); + }); + + it("Users recipient will be user recipient address when user had no proxy and had set recipient", async () => { + await RevenueSharingPoolSC.connect(user4).setRecipient(user4.address, recipient.address); + let recipientAddress = await RevenueSharingPoolSC.getRecipient(user4.address); + expect(recipientAddress).to.deep.eq(recipient.address); + let everSetRecipient = await RevenueSharingPoolSC.everSetRecipient(user4.address); + expect(everSetRecipient).to.deep.eq(true); + }); + + it("Users proxy recipient will be user address when user had proxy and did not set recipient", async () => { + let userInfo = await VECakeSC.userInfo(user1.address); + let recipientAddress = await RevenueSharingPoolSC.getRecipient(userInfo.cakePoolProxy); + expect(recipientAddress).to.deep.eq(user1.address); + let everSetRecipient = await RevenueSharingPoolSC.everSetRecipient(user1.address); + expect(everSetRecipient).to.deep.eq(false); + }); + + it("Users proxy recipient will be user recipient address when user had proxy and had set recipient", async () => { + let userInfo = await VECakeSC.userInfo(user1.address); + await RevenueSharingPoolSC.connect(user1).setRecipient(user1.address, recipient.address); + let recipientAddress = await RevenueSharingPoolSC.getRecipient(userInfo.cakePoolProxy); + expect(recipientAddress).to.deep.eq(recipient.address); + let everSetRecipient = await RevenueSharingPoolSC.everSetRecipient(user1.address); + expect(everSetRecipient).to.deep.eq(true); + }); + + it("Users can not set recipient for other users", async () => { + await expectRevert( + RevenueSharingPoolSC.connect(user1).setRecipient(user2.address, recipient.address), + "Permission denied" + ); + }); + + it("Owner can not set recipient for EOA users", async () => { + await expectRevert(RevenueSharingPoolSC.setRecipient(user1.address, recipient.address), "Permission denied"); + }); + }); +}); diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/CakePool.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/CakePool.json new file mode 100644 index 00000000..50a59266 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/CakePool.json @@ -0,0 +1,1551 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CakePool", + "sourceName": "contracts/CakePool.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IMasterChefV2", + "name": "_masterchefV2", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastDepositedTime", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "free", + "type": "bool" + } + ], + "name": "FreeFeeUser", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Harvest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Init", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedDuration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockTimestamp", + "type": "uint256" + } + ], + "name": "Lock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "boostContract", + "type": "address" + } + ], + "name": "NewBoostContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "boostWeight", + "type": "uint256" + } + ], + "name": "NewBoostWeight", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "durationFactor", + "type": "uint256" + } + ], + "name": "NewDurationFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "durationFactorOverdue", + "type": "uint256" + } + ], + "name": "NewDurationFactorOverdue", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxLockDuration", + "type": "uint256" + } + ], + "name": "NewMaxLockDuration", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "NewOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "overdueFee", + "type": "uint256" + } + ], + "name": "NewOverdueFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "performanceFee", + "type": "uint256" + } + ], + "name": "NewPerformanceFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "performanceFeeContract", + "type": "uint256" + } + ], + "name": "NewPerformanceFeeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "treasury", + "type": "address" + } + ], + "name": "NewTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unlockFreeDuration", + "type": "uint256" + } + ], + "name": "NewUnlockFreeDuration", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "VCake", + "type": "address" + } + ], + "name": "NewVCakeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFee", + "type": "uint256" + } + ], + "name": "NewWithdrawFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFeeContract", + "type": "uint256" + } + ], + "name": "NewWithdrawFeeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFeePeriod", + "type": "uint256" + } + ], + "name": "NewWithdrawFeePeriod", + "type": "event" + }, + { + "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": [], + "name": "Pause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockTimestamp", + "type": "uint256" + } + ], + "name": "Unlock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Unpause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BOOST_WEIGHT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BOOST_WEIGHT_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION_FACTOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION_FACTOR_OVERDUE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK_DURATION_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_OVERDUE_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_PERFORMANCE_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_WITHDRAW_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_WITHDRAW_FEE_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_DEPOSIT_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_LOCK_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_WITHDRAW_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION_FACTOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION_FACTOR_SHARE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNLOCK_FREE_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VCake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "available", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "boostContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePoolPID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "calculateOverdueFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "calculatePerformanceFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "calculateTotalPendingCakeRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "calculateWithdrawFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockDuration", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freeOverdueFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freePerformanceFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freeWithdrawFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPricePerFullShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "inCaseTokensGetStuck", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "dummyToken", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "masterchefV2", + "outputs": [ + { + "internalType": "contract IMasterChefV2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "overdueFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "performanceFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "performanceFeeContract", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_boostContract", + "type": "address" + } + ], + "name": "setBoostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_boostWeight", + "type": "uint256" + } + ], + "name": "setBoostWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_durationFactor", + "type": "uint256" + } + ], + "name": "setDurationFactor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_durationFactorOverdue", + "type": "uint256" + } + ], + "name": "setDurationFactorOverdue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setFreePerformanceFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxLockDuration", + "type": "uint256" + } + ], + "name": "setMaxLockDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_overdueFee", + "type": "uint256" + } + ], + "name": "setOverdueFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setOverdueFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_performanceFee", + "type": "uint256" + } + ], + "name": "setPerformanceFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_performanceFeeContract", + "type": "uint256" + } + ], + "name": "setPerformanceFeeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasury", + "type": "address" + } + ], + "name": "setTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_unlockFreeDuration", + "type": "uint256" + } + ], + "name": "setUnlockFreeDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_VCake", + "type": "address" + } + ], + "name": "setVCakeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFee", + "type": "uint256" + } + ], + "name": "setWithdrawFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFeeContract", + "type": "uint256" + } + ], + "name": "setWithdrawFeeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFeePeriod", + "type": "uint256" + } + ], + "name": "setWithdrawFeePeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setWithdrawFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalBoostDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalLockedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "unlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastDepositedTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cakeAtLastUserAction", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUserActionTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockStartTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockEndTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "locked", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "lockedAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawByAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFeeContract", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFeePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60c060405262093a80600e556301e13380600f556301e1338060105562ed4e0060115564e8d4a5100060125560c860135560c8601455600a601555600a60165564e8d4a510006017556203f4806018553480156200005c57600080fd5b5060405162003e5838038062003e588339810160408190526200007f9162000152565b6200008a33620000e9565b6000805460ff60a01b191690556001600160a01b0395861660805293851660a052600880549386166001600160a01b03199485161790556009805492861692841692909217909155600a805491909416911617909155600b55620001da565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200014f57600080fd5b50565b60008060008060008060c087890312156200016c57600080fd5b8651620001798162000139565b60208801519096506200018c8162000139565b60408801519095506200019f8162000139565b6060880151909450620001b28162000139565b6080880151909350620001c58162000139565b8092505060a087015190509295509295509295565b60805160a051613bf6620002626000396000818161082e01528181610bd301528181610c710152818161146c0152818161304801526130f10152600081816109360152818161128c0152818161164b01528181611f46015281816126ae015281816126f3015281816129fd01528181612aad0152818161331501526134fe0152613bf66000f3fe608060405234801561001057600080fd5b50600436106104145760003560e01c80638778878211610221578063cb528b521161012b578063e464c623116100c3578063f2fde38b11610087578063f2fde38b146108f8578063f786b9581461090b578063f851a4401461091e578063fc0c546a14610931578063fd253b641461095857600080fd5b8063e464c623146108c1578063e4b37ef5146108ca578063e73008bc146108d3578063e941fa78146108dc578063f0f44260146108e557600080fd5b8063cb528b5214610829578063ccd34cd514610758578063d4b0de2f14610850578063d826ed0614610859578063def68a9c1461086c578063def7869d1461087f578063df10b4e614610892578063dfcedeee1461089b578063e2bbb158146108ae57600080fd5b8063acaf88cd116101b9578063bc75f4b81161017d578063bc75f4b8146107de578063bdca9165146107e7578063beba0fa0146107f0578063c54d349c14610803578063c6ed51be1461081657600080fd5b8063acaf88cd1461079c578063b3ab15fb146107a5578063b685784414610521578063b6ac642a146107b8578063bb9f408d146107cb57600080fd5b8063877887821461071157806387d4bda91461071a5780638da5cb5b1461073d57806393c99e6a14610745578063948a03f21461075857806395dc14e114610764578063a3639b3914610777578063a5834e061461078a578063aaada5da1461079357600080fd5b806348a0d754116103225780636d4710b9116102ba578063731ff24a1161027e578063731ff24a146106e657806377c7b8fc146106f957806378b4330f146105545780638456cb5914610701578063853828b61461070957600080fd5b80636d4710b9146106a7578063704b6c02146106b057806370897b23146106c3578063715018a6146106d6578063722713f7146106de57600080fd5b806348a0d754146106175780634e4de1e91461061f5780634f1bfc9e146106325780635521e9bf1461063b578063570ca7351461064e57806358ebceb6146106615780635c975abb1461066957806361d027b314610671578063668679ba1461068457600080fd5b80632cfc5f01116103b05780633a98ef39116103745780633a98ef39146105b75780633eb78874146105c05780633f4ba83a146105c95780633fec4e32146105d1578063423b93ed1461060457600080fd5b80632cfc5f01146105545780632d19b9821461055e5780632e1a7d4d1461057e5780632f6c493c1461059157806335981921146105a457600080fd5b806301e813261461041957806305a9f274146104375780630c59696b1461044057806314ff3039146104555780631959a0021461046857806319ab453c1461050e5780631ea30fef146105215780631efac1b81461052e57806329a5cfd614610541575b600080fd5b6104246305265c0081565b6040519081526020015b60405180910390f35b610424600d5481565b61045361044e3660046137ed565b610965565b005b6104536104633660046137ed565b610a40565b6104c861047636600461381b565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460068601546007870154600890970154959794969495939492939192909160ff9091169089565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200161042e565b61045361051c36600461381b565b610ac1565b6104246509184e72a00081565b61045361053c3660046137ed565b610d02565b61042461054f366004613838565b610dda565b61042462093a8081565b600254610571906001600160a01b031681565b60405161042e9190613864565b61045361058c3660046137ed565b610f15565b61045361059f36600461381b565b610f8e565b6104536105b23660046137ed565b6110a1565b61042460075481565b61042460145481565b61045361115f565b6105f46105df36600461381b565b60046020526000908152604090205460ff1681565b604051901515815260200161042e565b610453610612366004613886565b6111e0565b610424611272565b61045361062d366004613886565b611307565b610424600f5481565b6104536106493660046137ed565b611399565b600a54610571906001600160a01b031681565b61042461143f565b6105f46114d7565b600954610571906001600160a01b031681565b6105f461069236600461381b565b60066020526000908152604090205460ff1681565b610424600b5481565b6104536106be36600461381b565b6114e7565b6104536106d13660046137ed565b611588565b610453611609565b610424611644565b6104246b204fce5e3e2502611000000081565b6104246116e0565b610453611732565b6104536117b4565b61042460135481565b6105f461072836600461381b565b60056020526000908152604090205460ff1681565b6105716117cd565b6104536107533660046137ed565b6117dc565b61042464e8d4a5100081565b61042461077236600461381b565b6118ad565b6104536107853660046137ed565b611a00565b61042460175481565b610424600e5481565b61042460115481565b6104536107b336600461381b565b611aaf565b6104536107c63660046137ed565b611b50565b6104536107d93660046137ed565b611bd1565b61042460125481565b6104246107d081565b6104536107fe366004613886565b611c52565b6104536108113660046137ed565b611ce4565b61042461082436600461381b565b611d9f565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b6104246101f481565b61045361086736600461381b565b611e7e565b61045361087a36600461381b565b611f1a565b61045361088d36600461381b565b61205e565b61042460185481565b600154610571906001600160a01b031681565b6104536108bc3660046138bf565b6120fa565b61042460105481565b61042460165481565b610424600c5481565b61042460155481565b6104536108f336600461381b565b61217a565b61045361090636600461381b565b61221b565b6104536109193660046137ed565b6122b8565b600854610571906001600160a01b031681565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b610424652d79883d200081565b6008546001600160a01b031633146109985760405162461bcd60e51b815260040161098f906138e1565b60405180910390fd5b64e8d4a51000811115610a045760405162461bcd60e51b815260206004820152602e60248201527f6f7665726475654665652063616e6e6f74206265206d6f7265207468616e204d60448201526d41585f4f5645524455455f46454560901b606482015260840161098f565b60178190556040518181527ff4bd1c5978320077e792afbb3911e8cab1325ce28a6b3e67f9067a1d80692961906020015b60405180910390a150565b6008546001600160a01b03163314610a6a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115610a8c5760405162461bcd60e51b815260040161098f90613906565b60168190556040518181527fcab352e118188b8a2f20a2e8c4ce1241ce2c1740aac4f17c5b0831e65824d8ef90602001610a35565b33610aca6117cd565b6001600160a01b031614610af05760405162461bcd60e51b815260040161098f90613956565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610b1f903390600401613864565b602060405180830381865afa158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b60919061398b565b905080610ba75760405162461bcd60e51b8152602060048201526015602482015274042616c616e6365206d75737420657863656564203605c1b604482015260640161098f565b610bbc6001600160a01b038316333084612391565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820183905283169063095ea7b3906044016020604051808303816000875af1158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f91906139a4565b50600b54604051631c57762b60e31b81526004810191909152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b50506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc14925060009150a15050565b6008546001600160a01b03163314610d2c5760405162461bcd60e51b815260040161098f906138e1565b62093a80811115610da55760405162461bcd60e51b815260206004820152603d60248201527f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560448201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000606482015260840161098f565b60188190556040518181527fb89ddaddb7435be26824cb48d2d0186c9525a2e1ec057abcb502704cdc0686cc90602001610a35565b6001600160a01b03821660009081526003602052604081208054831115610e0057805492505b3360009081526005602052604090205460ff16158015610e3057506018548160010154610e2d91906139d7565b42105b15610f09576000610e3f61143f565b610e47611644565b610e5191906139d7565b8254909150600090610e6864e8d4a51000876139ef565b610e729190613a0e565b90506000610e7f87612402565b60068501546007548654610e9390876139ef565b610e9d9190613a0e565b610ea79190613a30565b610eb19190613a30565b9050600064e8d4a51000610ec584846139ef565b610ecf9190613a0e565b601554909150333b15610ee157506016545b6000612710610ef083856139ef565b610efa9190613a0e565b9750610f0f9650505050505050565b60009150505b92915050565b610f1d6114d7565b15610f3a5760405162461bcd60e51b815260040161098f90613a47565b60008111610f805760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161098f565b610f8b816000612420565b50565b80336001600160a01b0382161480610fb05750600a546001600160a01b031633145b610ffc5760405162461bcd60e51b815260206004820152601a60248201527f4e6f74206f70657261746f72206f722063616b65206f776e6572000000000000604482015260640161098f565b6110046114d7565b156110215760405162461bcd60e51b815260040161098f90613a47565b6001600160a01b0382166000908152600360205260409020600781015460ff1680156110505750428160050154105b6110905760405162461bcd60e51b815260206004820152601160248201527010d85b9b9bdd081d5b9b1bd8dac81e595d607a1b604482015260640161098f565b61109c600080856127a6565b505050565b6008546001600160a01b031633146110cb5760405162461bcd60e51b815260040161098f906138e1565b6000811161112a5760405162461bcd60e51b815260206004820152602660248201527f4455524154494f4e5f464143544f525f4f5645524455452063616e6e6f74206260448201526565207a65726f60d01b606482015260840161098f565b60118190556040518181527f18b6d179114082d7eda9837e15a39eb30032d5f3df00487a67541398f48fabfe90602001610a35565b6008546001600160a01b031633146111895760405162461bcd60e51b815260040161098f906138e1565b6111916114d7565b6111ad5760405162461bcd60e51b815260040161098f90613a71565b6111b5612e08565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6008546001600160a01b0316331461120a5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166112305760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260046020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906112c1903090600401613864565b602060405180830381865afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611302919061398b565b905090565b6008546001600160a01b031633146113315760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166113575760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260066020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6113a16114d7565b156113be5760405162461bcd60e51b815260040161098f90613a47565b6509184e72a00081116114345760405162461bcd60e51b815260206004820152603860248201527f576974686472617720616d6f756e74206d7573742062652067726561746572206044820152771d1a185b8813525397d5d2551211149055d7d05353d5539560421b606482015260840161098f565b610f8b600082612420565b600b54604051631175a1dd60e01b8152600481019190915230602482015260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631175a1dd90604401602060405180830381865afa1580156114b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f919061398b565b600054600160a01b900460ff1690565b336114f06117cd565b6001600160a01b0316146115165760405162461bcd60e51b815260040161098f90613956565b6001600160a01b03811661153c5760405162461bcd60e51b815260040161098f90613a9f565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91610a3591613864565b6008546001600160a01b031633146115b25760405162461bcd60e51b815260040161098f906138e1565b6107d08111156115d45760405162461bcd60e51b815260040161098f90613acf565b60138190556040518181527fefeafcf03e479a9566d7ef321b4816de0ba19cfa3cd0fae2f8c5f4a0afb342c490602001610a35565b336116126117cd565b6001600160a01b0316146116385760405162461bcd60e51b815260040161098f90613956565b6116426000612e73565b565b6000600c547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016116959190613864565b602060405180830381865afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d6919061398b565b61130291906139d7565b6000600754600014611725576007546116f761143f565b6116ff611644565b61170991906139d7565b61171b90670de0b6b3a76400006139ef565b6113029190613a0e565b50670de0b6b3a764000090565b6008546001600160a01b0316331461175c5760405162461bcd60e51b815260040161098f906138e1565b6117646114d7565b156117815760405162461bcd60e51b815260040161098f90613a47565b611789612ec3565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b3360009081526003602052604090205461164290610f15565b6000546001600160a01b031690565b6008546001600160a01b031633146118065760405162461bcd60e51b815260040161098f906138e1565b652d79883d20008111156118785760405162461bcd60e51b815260206004820152603360248201527f424f4f53545f5745494748542063616e6e6f74206265206d6f7265207468616e604482015272081093d3d4d517d5d15251d21517d312535255606a1b606482015260840161098f565b60128190556040518181527f7666dfff8c3377938e522b4eed3aff079973a976f95969db60a406d49f40da4e90602001610a35565b6001600160a01b03811660009081526003602052604081208054158015906118d95750600781015460ff165b80156118fe57506001600160a01b03831660009081526006602052604090205460ff16155b801561191a575042600e54826005015461191891906139d7565b105b156119f757600061192961143f565b611931611644565b61193b91906139d7565b6006830154600754845492935060009261195590856139ef565b61195f9190613a0e565b6119699190613a30565b9050600083600801548261197d9190613a30565b90506000600e548560050154426119949190613a30565b61199e9190613a30565b90506011548111156119af57506011545b6000601154601754836119c291906139ef565b6119cc9190613a0e565b9050600064e8d4a510006119e083866139ef565b6119ea9190613a0e565b9998505050505050505050565b50600092915050565b6008546001600160a01b03163314611a2a5760405162461bcd60e51b815260040161098f906138e1565b60008111611a7a5760405162461bcd60e51b815260206004820152601e60248201527f4455524154494f4e5f464143544f522063616e6e6f74206265207a65726f0000604482015260640161098f565b60108190556040518181527f9478eb023aac0a7d58a4e935377056bf27cf5b72a2300725f831817a8f62fbde90602001610a35565b33611ab86117cd565b6001600160a01b031614611ade5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b038116611b045760405162461bcd60e51b815260040161098f90613a9f565b600a80546001600160a01b0319166001600160a01b0383169081179091556040517fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a91610a3591613864565b6008546001600160a01b03163314611b7a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115611b9c5760405162461bcd60e51b815260040161098f90613906565b60158190556040518181527fd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d90602001610a35565b6008546001600160a01b03163314611bfb5760405162461bcd60e51b815260040161098f906138e1565b6107d0811115611c1d5760405162461bcd60e51b815260040161098f90613acf565b60148190556040518181527fc5d25457b67b87678c987375af13f6e50beb3ad7bfd009da26766ae986eaa20d90602001610a35565b6008546001600160a01b03163314611c7c5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038216611ca25760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260056020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6008546001600160a01b03163314611d0e5760405162461bcd60e51b815260040161098f906138e1565b60008111611d6a5760405162461bcd60e51b815260206004820152602360248201527f554e4c4f434b5f465245455f4455524154494f4e2063616e6e6f74206265207a60448201526265726f60e81b606482015260840161098f565b600e8190556040518181527ff84bf2b901cfc02956d4e69556d7448cef4ea13587e7714dba7c6d697091e7ad90602001610a35565b6001600160a01b0381166000908152600360205260408120805415801590611dcc5750600781015460ff16155b8015611df157506001600160a01b03831660009081526004602052604090205460ff16155b156119f7576000611e0061143f565b611e08611644565b611e1291906139d7565b90506000600754828460000154611e2991906139ef565b611e339190613a0e565b90506000836002015482611e479190613a30565b601354909150863b15611e5957506014545b6000612710611e6883856139ef565b611e729190613a0e565b98975050505050505050565b6008546001600160a01b03163314611ea85760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038116611ece5760405162461bcd60e51b815260040161098f90613a9f565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5352e27b0414343d9438a1c6e9d04c65c7cb4d91f44920afee588f91717893f191610a3591613864565b6008546001600160a01b03163314611f445760405162461bcd60e51b815260040161098f906138e1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611fd45760405162461bcd60e51b815260206004820152602560248201527f546f6b656e2063616e6e6f742062652073616d65206173206465706f736974206044820152643a37b5b2b760d91b606482015260840161098f565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190612003903090600401613864565b602060405180830381865afa158015612020573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612044919061398b565b905061205a6001600160a01b0383163383612f23565b5050565b6008546001600160a01b031633146120885760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0381166120ae5760405162461bcd60e51b815260040161098f90613a9f565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f8f49a182922022d9119a1a6aeeca151b4a5665e86bd61c1ff32e152d459558b291610a3591613864565b6121026114d7565b1561211f5760405162461bcd60e51b815260040161098f90613a47565b600082118061212e5750600081115b61216f5760405162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015260640161098f565b61205a8282336127a6565b336121836117cd565b6001600160a01b0316146121a95760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166121cf5760405162461bcd60e51b815260040161098f90613a9f565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea08691610a3591613864565b336122246117cd565b6001600160a01b03161461224a5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166122af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161098f565b610f8b81612e73565b6008546001600160a01b031633146122e25760405162461bcd60e51b815260040161098f906138e1565b6305265c0081111561235c5760405162461bcd60e51b815260206004820152603d60248201527f4d41585f4c4f434b5f4455524154494f4e2063616e6e6f74206265206d6f726560448201527f207468616e204d41585f4c4f434b5f4455524154494f4e5f4c494d4954000000606482015260840161098f565b600f8190556040518181527fcab2f3455b51b6ca5377e84fccd0f890b6f6ca36c02e18b6d36cb34f469fe4fe90602001610a35565b6040516001600160a01b03808516602483015283166044820152606481018290526123fc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f53565b50505050565b600061240d826118ad565b61241683611d9f565b610f0f91906139d7565b33600090815260036020526040902080548311156124805760405162461bcd60e51b815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015260640161098f565b428160050154106124c35760405162461bcd60e51b815260206004820152600d60248201526c5374696c6c20696e206c6f636b60981b604482015260640161098f565b6002546001600160a01b031615612537576002546040516351cff8d960e01b81526001600160a01b03909116906351cff8d990612504903390600401613864565b600060405180830381600087803b15801561251e57600080fd5b505af1158015612532573d6000803e3d6000fd5b505050505b805483906000906125546b204fce5e3e25026110000000846139ef565b61255e9190613a0e565b9050612568613025565b612571336131a3565b8415801561257f5750600084115b156125c057600061258e611644565b9050806007548661259f91906139ef565b6125a99190613a0e565b84549093508311156125ba57835492505b506125e7565b82546b204fce5e3e25026110000000906125da90836139ef565b6125e49190613a0e565b91505b6000600754836125f5611644565b6125ff91906139ef565b6126099190613a0e565b90508284600001600082825461261f9190613a30565b9250508190555082600760008282546126389190613a30565b90915550503360009081526005602052604090205460ff1615801561266d5750601854846001015461266a91906139d7565b42105b156126e657601554333b1561268157506016545b600061271061269083856139ef565b61269a9190613a0e565b6009549091506126d7906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6126e18184613a30565b925050505b61271a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612f23565b83541561274c5760075461272c611644565b855461273891906139ef565b6127429190613a0e565b6002850155612754565b600060028501555b4260038501556127633361359e565b604080518281526020810185905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a2505050505050565b6001600160a01b0381166000908152600360205260409020805415806127cc5750600084115b15612845576509184e72a00084116128455760405162461bcd60e51b815260206004820152603660248201527f4465706f73697420616d6f756e74206d757374206265206772656174657220746044820152751a185b8813525397d1115413d4d25517d05353d5539560521b606482015260840161098f565b6005810154839042116128a3578415612882574260048301556008820154600d8054600090612875908490613a30565b9091555050600060088301555b816004015482600501546128969190613a30565b6128a090826139d7565b90505b8315806128b3575062093a808110155b6128ff5760405162461bcd60e51b815260206004820152601f60248201527f4d696e696d756d206c6f636b20706572696f64206973206f6e65207765656b00604482015260640161098f565b600f548111156129515760405162461bcd60e51b815260206004820152601c60248201527f4d6178696d756d206c6f636b20706572696f6420657863656564656400000000604482015260640161098f565b6002546001600160a01b0316156129d057600254604051630efe6a8b60e01b81526001600160a01b038581166004830152602482018890526044820187905290911690630efe6a8b90606401600060405180830381600087803b1580156129b757600080fd5b505af11580156129cb573d6000803e3d6000fd5b505050505b6129d8613025565b600754612a285760006129e9611272565b600954909150612a26906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b505b612a31836131a3565b8315612a8a574282600501541015612a60574260048301819055612a569085906139d7565b6005830155612a7a565b83826005016000828254612a7491906139d7565b90915550505b60078201805460ff191660011790555b600080600080612a98611644565b90508815612ad957612ad56001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001688308c612391565b8892505b855415801590612aed5750600786015460ff165b15612b66576007548654612b0190836139ef565b612b0b9190613a0e565b9150612b1782846139d7565b9250856000015460076000828254612b2f9190613a30565b9091555050600086556004860154421415612b665760088601829055600d8054839190600090612b609084906139d7565b90915550505b60075415612b9657612b788282613a30565b600754612b8590856139ef565b612b8f9190613a0e565b9350612b9a565b8293505b856004015486600501541115612d1b57600060105460125488600401548960050154612bc69190613a30565b612bd091906139ef565b612bda9190613a0e565b9050600064e8d4a51000612bee87846139ef565b612bf89190613a0e565b9050612c0481876139d7565b955085886000016000828254612c1a91906139d7565b909155506000905064e8d4a51000612c3287856139ef565b612c3c9190613a0e565b905080896006016000828254612c5291906139d7565b9250508190555080600c6000828254612c6b91906139d7565b925050819055508b896008016000828254612c8691906139d7565b925050819055508b600d6000828254612c9f91906139d7565b92505081905550896001600160a01b03167f2b943276e5d747f6f7dd46d3b880d8874cb8d6b9b88ca1903990a2738e7dc7a18a600801548b600001548c600401548d60050154612cef9190613a30565b6040805193845260208401929092529082015242606082015260800160405180910390a2505050612d35565b83866000016000828254612d2f91906139d7565b90915550505b6000891180612d445750600088115b15612d50574260018701555b8360076000828254612d6291906139d7565b90915550506006860154600754612d77611644565b8854612d8391906139ef565b612d8d9190613a0e565b612d979190613a30565b6002870155426003870155612dab8761359e565b604080518a8152602081018690529081018990524260608201526001600160a01b038816907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060800160405180910390a2505050505050505050565b612e106114d7565b612e2c5760405162461bcd60e51b815260040161098f90613a71565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051612e699190613864565b60405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612ecb6114d7565b15612ee85760405162461bcd60e51b815260040161098f90613a47565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e5c3390565b6040516001600160a01b03831660248201526044810182905261109c90849063a9059cbb60e01b906064016123c5565b6000612fa8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661366a9092919063ffffffff16565b80519091501561109c5780806020019051810190612fc691906139a4565b61109c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161098f565b600b54604051631175a1dd60e01b815260048101919091523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631175a1dd90604401602060405180830381865afa158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb919061398b565b90508015610f8b5760006130cd611272565b600b54604051630441a3e760e41b81526004810191909152600060248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b15801561313d57600080fd5b505af1158015613151573d6000803e3d6000fd5b50505050600061315f611272565b9050337fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba61318d8484613a30565b60405190815260200160405180910390a2505050565b6001600160a01b038116600090815260036020526040902080541561205a57600781015460ff1615613446576000816006015460075483600001546131e6611644565b6131f091906139ef565b6131fa9190613a0e565b6132049190613a30565b90508160060154600c600082825461321c9190613a30565b90915550506000600683018190558254600780549192909161323f908490613a30565b90915550506001600160a01b03831660009081526006602052604090205460ff1615801561327d575042600e54836005015461327b91906139d7565b105b1561334f5760008260080154826132949190613a30565b90506000600e548460050154426132ab9190613a30565b6132b59190613a30565b90506011548111156132c657506011545b6000601154601754836132d991906139ef565b6132e39190613a0e565b9050600064e8d4a510006132f783866139ef565b6133019190613a0e565b60095490915061333e906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6133488186613a30565b9450505050505b6000613359611644565b9050600060075460001461338f576133718383613a30565b60075461337e90856139ef565b6133889190613a0e565b9050613392565b50815b808455600780548291906000906133aa9084906139d7565b9091555050600584015442111561343f5760078401805460ff19169055600060048501819055600585018190556008850154600d8054919290916133ef908490613a30565b909155505060006008850155604080518481524260208201526001600160a01b038716917ff7870c5b224cbc19873599e46ccfc7103934650509b1af0c3ce90138377c2004910160405180910390a25b5050505050565b6001600160a01b03821660009081526004602052604090205460ff1661205a576000600754613473611644565b835461347f91906139ef565b6134899190613a0e565b90508160000154600760008282546134a19190613a30565b9091555050600080835560028301546134ba9083613a30565b601354909150843b156134cc57506014545b60006127106134db83856139ef565b6134e59190613a0e565b9050801561353457600954613527906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6135318185613a30565b93505b600061353e611644565b90506000600754600014613574576135568683613a30565b60075461356390886139ef565b61356d9190613a0e565b9050613577565b50845b8087556007805482919060009061358f9084906139d7565b90915550505050505050505050565b6001546001600160a01b031615610f8b576001600160a01b0381166000908152600360205260408120600481015460058201549192916135de9190613a30565b6001546008840154600d5460105460405163e874fdaf60e01b81526001600160a01b03898116600483015260248201949094526044810186905260648101929092526084820152929350169063e874fdaf9060a401600060405180830381600087803b15801561364d57600080fd5b505af1158015613661573d6000803e3d6000fd5b50505050505050565b60606136798484600085613683565b90505b9392505050565b6060824710156136e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161098f565b6001600160a01b0385163b61373b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161098f565b600080866001600160a01b031685876040516137579190613b51565b60006040518083038185875af1925050503d8060008114613794576040519150601f19603f3d011682016040523d82523d6000602084013e613799565b606091505b50915091506137a98282866137b4565b979650505050505050565b606083156137c357508161367c565b8251156137d35782518084602001fd5b8160405162461bcd60e51b815260040161098f9190613b6d565b6000602082840312156137ff57600080fd5b5035919050565b6001600160a01b0381168114610f8b57600080fd5b60006020828403121561382d57600080fd5b813561367c81613806565b6000806040838503121561384b57600080fd5b823561385681613806565b946020939093013593505050565b6001600160a01b0391909116815260200190565b8015158114610f8b57600080fd5b6000806040838503121561389957600080fd5b82356138a481613806565b915060208301356138b481613878565b809150509250929050565b600080604083850312156138d257600080fd5b50508035926020909101359150565b6020808252600b908201526a61646d696e3a207775743f60a81b604082015260600190565b60208082526030908201527f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060408201526f4d41585f57495448445241575f46454560801b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561399d57600080fd5b5051919050565b6000602082840312156139b657600080fd5b815161367c81613878565b634e487b7160e01b600052601160045260246000fd5b600082198211156139ea576139ea6139c1565b500190565b6000816000190483118215151615613a0957613a096139c1565b500290565b600082613a2b57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613a4257613a426139c1565b500390565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526016908201527543616e6e6f74206265207a65726f206164647265737360501b604082015260600190565b60208082526036908201527f706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468604082015275616e204d41585f504552464f524d414e43455f46454560501b606082015260800190565b60005b83811015613b40578181015183820152602001613b28565b838111156123fc5750506000910152565b60008251613b63818460208701613b25565b9190910192915050565b6020815260008251806020840152613b8c816040850160208701613b25565b601f01601f1916919091016040019291505056fe3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d44a26469706673582212208fac60e48eb35e29f7a743c638638371e8b2fc9dffb4ce7b25ae133d7651c44a64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106104145760003560e01c80638778878211610221578063cb528b521161012b578063e464c623116100c3578063f2fde38b11610087578063f2fde38b146108f8578063f786b9581461090b578063f851a4401461091e578063fc0c546a14610931578063fd253b641461095857600080fd5b8063e464c623146108c1578063e4b37ef5146108ca578063e73008bc146108d3578063e941fa78146108dc578063f0f44260146108e557600080fd5b8063cb528b5214610829578063ccd34cd514610758578063d4b0de2f14610850578063d826ed0614610859578063def68a9c1461086c578063def7869d1461087f578063df10b4e614610892578063dfcedeee1461089b578063e2bbb158146108ae57600080fd5b8063acaf88cd116101b9578063bc75f4b81161017d578063bc75f4b8146107de578063bdca9165146107e7578063beba0fa0146107f0578063c54d349c14610803578063c6ed51be1461081657600080fd5b8063acaf88cd1461079c578063b3ab15fb146107a5578063b685784414610521578063b6ac642a146107b8578063bb9f408d146107cb57600080fd5b8063877887821461071157806387d4bda91461071a5780638da5cb5b1461073d57806393c99e6a14610745578063948a03f21461075857806395dc14e114610764578063a3639b3914610777578063a5834e061461078a578063aaada5da1461079357600080fd5b806348a0d754116103225780636d4710b9116102ba578063731ff24a1161027e578063731ff24a146106e657806377c7b8fc146106f957806378b4330f146105545780638456cb5914610701578063853828b61461070957600080fd5b80636d4710b9146106a7578063704b6c02146106b057806370897b23146106c3578063715018a6146106d6578063722713f7146106de57600080fd5b806348a0d754146106175780634e4de1e91461061f5780634f1bfc9e146106325780635521e9bf1461063b578063570ca7351461064e57806358ebceb6146106615780635c975abb1461066957806361d027b314610671578063668679ba1461068457600080fd5b80632cfc5f01116103b05780633a98ef39116103745780633a98ef39146105b75780633eb78874146105c05780633f4ba83a146105c95780633fec4e32146105d1578063423b93ed1461060457600080fd5b80632cfc5f01146105545780632d19b9821461055e5780632e1a7d4d1461057e5780632f6c493c1461059157806335981921146105a457600080fd5b806301e813261461041957806305a9f274146104375780630c59696b1461044057806314ff3039146104555780631959a0021461046857806319ab453c1461050e5780631ea30fef146105215780631efac1b81461052e57806329a5cfd614610541575b600080fd5b6104246305265c0081565b6040519081526020015b60405180910390f35b610424600d5481565b61045361044e3660046137ed565b610965565b005b6104536104633660046137ed565b610a40565b6104c861047636600461381b565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460068601546007870154600890970154959794969495939492939192909160ff9091169089565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200161042e565b61045361051c36600461381b565b610ac1565b6104246509184e72a00081565b61045361053c3660046137ed565b610d02565b61042461054f366004613838565b610dda565b61042462093a8081565b600254610571906001600160a01b031681565b60405161042e9190613864565b61045361058c3660046137ed565b610f15565b61045361059f36600461381b565b610f8e565b6104536105b23660046137ed565b6110a1565b61042460075481565b61042460145481565b61045361115f565b6105f46105df36600461381b565b60046020526000908152604090205460ff1681565b604051901515815260200161042e565b610453610612366004613886565b6111e0565b610424611272565b61045361062d366004613886565b611307565b610424600f5481565b6104536106493660046137ed565b611399565b600a54610571906001600160a01b031681565b61042461143f565b6105f46114d7565b600954610571906001600160a01b031681565b6105f461069236600461381b565b60066020526000908152604090205460ff1681565b610424600b5481565b6104536106be36600461381b565b6114e7565b6104536106d13660046137ed565b611588565b610453611609565b610424611644565b6104246b204fce5e3e2502611000000081565b6104246116e0565b610453611732565b6104536117b4565b61042460135481565b6105f461072836600461381b565b60056020526000908152604090205460ff1681565b6105716117cd565b6104536107533660046137ed565b6117dc565b61042464e8d4a5100081565b61042461077236600461381b565b6118ad565b6104536107853660046137ed565b611a00565b61042460175481565b610424600e5481565b61042460115481565b6104536107b336600461381b565b611aaf565b6104536107c63660046137ed565b611b50565b6104536107d93660046137ed565b611bd1565b61042460125481565b6104246107d081565b6104536107fe366004613886565b611c52565b6104536108113660046137ed565b611ce4565b61042461082436600461381b565b611d9f565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b6104246101f481565b61045361086736600461381b565b611e7e565b61045361087a36600461381b565b611f1a565b61045361088d36600461381b565b61205e565b61042460185481565b600154610571906001600160a01b031681565b6104536108bc3660046138bf565b6120fa565b61042460105481565b61042460165481565b610424600c5481565b61042460155481565b6104536108f336600461381b565b61217a565b61045361090636600461381b565b61221b565b6104536109193660046137ed565b6122b8565b600854610571906001600160a01b031681565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b610424652d79883d200081565b6008546001600160a01b031633146109985760405162461bcd60e51b815260040161098f906138e1565b60405180910390fd5b64e8d4a51000811115610a045760405162461bcd60e51b815260206004820152602e60248201527f6f7665726475654665652063616e6e6f74206265206d6f7265207468616e204d60448201526d41585f4f5645524455455f46454560901b606482015260840161098f565b60178190556040518181527ff4bd1c5978320077e792afbb3911e8cab1325ce28a6b3e67f9067a1d80692961906020015b60405180910390a150565b6008546001600160a01b03163314610a6a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115610a8c5760405162461bcd60e51b815260040161098f90613906565b60168190556040518181527fcab352e118188b8a2f20a2e8c4ce1241ce2c1740aac4f17c5b0831e65824d8ef90602001610a35565b33610aca6117cd565b6001600160a01b031614610af05760405162461bcd60e51b815260040161098f90613956565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610b1f903390600401613864565b602060405180830381865afa158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b60919061398b565b905080610ba75760405162461bcd60e51b8152602060048201526015602482015274042616c616e6365206d75737420657863656564203605c1b604482015260640161098f565b610bbc6001600160a01b038316333084612391565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820183905283169063095ea7b3906044016020604051808303816000875af1158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f91906139a4565b50600b54604051631c57762b60e31b81526004810191909152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b50506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc14925060009150a15050565b6008546001600160a01b03163314610d2c5760405162461bcd60e51b815260040161098f906138e1565b62093a80811115610da55760405162461bcd60e51b815260206004820152603d60248201527f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560448201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000606482015260840161098f565b60188190556040518181527fb89ddaddb7435be26824cb48d2d0186c9525a2e1ec057abcb502704cdc0686cc90602001610a35565b6001600160a01b03821660009081526003602052604081208054831115610e0057805492505b3360009081526005602052604090205460ff16158015610e3057506018548160010154610e2d91906139d7565b42105b15610f09576000610e3f61143f565b610e47611644565b610e5191906139d7565b8254909150600090610e6864e8d4a51000876139ef565b610e729190613a0e565b90506000610e7f87612402565b60068501546007548654610e9390876139ef565b610e9d9190613a0e565b610ea79190613a30565b610eb19190613a30565b9050600064e8d4a51000610ec584846139ef565b610ecf9190613a0e565b601554909150333b15610ee157506016545b6000612710610ef083856139ef565b610efa9190613a0e565b9750610f0f9650505050505050565b60009150505b92915050565b610f1d6114d7565b15610f3a5760405162461bcd60e51b815260040161098f90613a47565b60008111610f805760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161098f565b610f8b816000612420565b50565b80336001600160a01b0382161480610fb05750600a546001600160a01b031633145b610ffc5760405162461bcd60e51b815260206004820152601a60248201527f4e6f74206f70657261746f72206f722063616b65206f776e6572000000000000604482015260640161098f565b6110046114d7565b156110215760405162461bcd60e51b815260040161098f90613a47565b6001600160a01b0382166000908152600360205260409020600781015460ff1680156110505750428160050154105b6110905760405162461bcd60e51b815260206004820152601160248201527010d85b9b9bdd081d5b9b1bd8dac81e595d607a1b604482015260640161098f565b61109c600080856127a6565b505050565b6008546001600160a01b031633146110cb5760405162461bcd60e51b815260040161098f906138e1565b6000811161112a5760405162461bcd60e51b815260206004820152602660248201527f4455524154494f4e5f464143544f525f4f5645524455452063616e6e6f74206260448201526565207a65726f60d01b606482015260840161098f565b60118190556040518181527f18b6d179114082d7eda9837e15a39eb30032d5f3df00487a67541398f48fabfe90602001610a35565b6008546001600160a01b031633146111895760405162461bcd60e51b815260040161098f906138e1565b6111916114d7565b6111ad5760405162461bcd60e51b815260040161098f90613a71565b6111b5612e08565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6008546001600160a01b0316331461120a5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166112305760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260046020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906112c1903090600401613864565b602060405180830381865afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611302919061398b565b905090565b6008546001600160a01b031633146113315760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166113575760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260066020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6113a16114d7565b156113be5760405162461bcd60e51b815260040161098f90613a47565b6509184e72a00081116114345760405162461bcd60e51b815260206004820152603860248201527f576974686472617720616d6f756e74206d7573742062652067726561746572206044820152771d1a185b8813525397d5d2551211149055d7d05353d5539560421b606482015260840161098f565b610f8b600082612420565b600b54604051631175a1dd60e01b8152600481019190915230602482015260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631175a1dd90604401602060405180830381865afa1580156114b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f919061398b565b600054600160a01b900460ff1690565b336114f06117cd565b6001600160a01b0316146115165760405162461bcd60e51b815260040161098f90613956565b6001600160a01b03811661153c5760405162461bcd60e51b815260040161098f90613a9f565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91610a3591613864565b6008546001600160a01b031633146115b25760405162461bcd60e51b815260040161098f906138e1565b6107d08111156115d45760405162461bcd60e51b815260040161098f90613acf565b60138190556040518181527fefeafcf03e479a9566d7ef321b4816de0ba19cfa3cd0fae2f8c5f4a0afb342c490602001610a35565b336116126117cd565b6001600160a01b0316146116385760405162461bcd60e51b815260040161098f90613956565b6116426000612e73565b565b6000600c547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016116959190613864565b602060405180830381865afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d6919061398b565b61130291906139d7565b6000600754600014611725576007546116f761143f565b6116ff611644565b61170991906139d7565b61171b90670de0b6b3a76400006139ef565b6113029190613a0e565b50670de0b6b3a764000090565b6008546001600160a01b0316331461175c5760405162461bcd60e51b815260040161098f906138e1565b6117646114d7565b156117815760405162461bcd60e51b815260040161098f90613a47565b611789612ec3565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b3360009081526003602052604090205461164290610f15565b6000546001600160a01b031690565b6008546001600160a01b031633146118065760405162461bcd60e51b815260040161098f906138e1565b652d79883d20008111156118785760405162461bcd60e51b815260206004820152603360248201527f424f4f53545f5745494748542063616e6e6f74206265206d6f7265207468616e604482015272081093d3d4d517d5d15251d21517d312535255606a1b606482015260840161098f565b60128190556040518181527f7666dfff8c3377938e522b4eed3aff079973a976f95969db60a406d49f40da4e90602001610a35565b6001600160a01b03811660009081526003602052604081208054158015906118d95750600781015460ff165b80156118fe57506001600160a01b03831660009081526006602052604090205460ff16155b801561191a575042600e54826005015461191891906139d7565b105b156119f757600061192961143f565b611931611644565b61193b91906139d7565b6006830154600754845492935060009261195590856139ef565b61195f9190613a0e565b6119699190613a30565b9050600083600801548261197d9190613a30565b90506000600e548560050154426119949190613a30565b61199e9190613a30565b90506011548111156119af57506011545b6000601154601754836119c291906139ef565b6119cc9190613a0e565b9050600064e8d4a510006119e083866139ef565b6119ea9190613a0e565b9998505050505050505050565b50600092915050565b6008546001600160a01b03163314611a2a5760405162461bcd60e51b815260040161098f906138e1565b60008111611a7a5760405162461bcd60e51b815260206004820152601e60248201527f4455524154494f4e5f464143544f522063616e6e6f74206265207a65726f0000604482015260640161098f565b60108190556040518181527f9478eb023aac0a7d58a4e935377056bf27cf5b72a2300725f831817a8f62fbde90602001610a35565b33611ab86117cd565b6001600160a01b031614611ade5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b038116611b045760405162461bcd60e51b815260040161098f90613a9f565b600a80546001600160a01b0319166001600160a01b0383169081179091556040517fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a91610a3591613864565b6008546001600160a01b03163314611b7a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115611b9c5760405162461bcd60e51b815260040161098f90613906565b60158190556040518181527fd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d90602001610a35565b6008546001600160a01b03163314611bfb5760405162461bcd60e51b815260040161098f906138e1565b6107d0811115611c1d5760405162461bcd60e51b815260040161098f90613acf565b60148190556040518181527fc5d25457b67b87678c987375af13f6e50beb3ad7bfd009da26766ae986eaa20d90602001610a35565b6008546001600160a01b03163314611c7c5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038216611ca25760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260056020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6008546001600160a01b03163314611d0e5760405162461bcd60e51b815260040161098f906138e1565b60008111611d6a5760405162461bcd60e51b815260206004820152602360248201527f554e4c4f434b5f465245455f4455524154494f4e2063616e6e6f74206265207a60448201526265726f60e81b606482015260840161098f565b600e8190556040518181527ff84bf2b901cfc02956d4e69556d7448cef4ea13587e7714dba7c6d697091e7ad90602001610a35565b6001600160a01b0381166000908152600360205260408120805415801590611dcc5750600781015460ff16155b8015611df157506001600160a01b03831660009081526004602052604090205460ff16155b156119f7576000611e0061143f565b611e08611644565b611e1291906139d7565b90506000600754828460000154611e2991906139ef565b611e339190613a0e565b90506000836002015482611e479190613a30565b601354909150863b15611e5957506014545b6000612710611e6883856139ef565b611e729190613a0e565b98975050505050505050565b6008546001600160a01b03163314611ea85760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038116611ece5760405162461bcd60e51b815260040161098f90613a9f565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5352e27b0414343d9438a1c6e9d04c65c7cb4d91f44920afee588f91717893f191610a3591613864565b6008546001600160a01b03163314611f445760405162461bcd60e51b815260040161098f906138e1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611fd45760405162461bcd60e51b815260206004820152602560248201527f546f6b656e2063616e6e6f742062652073616d65206173206465706f736974206044820152643a37b5b2b760d91b606482015260840161098f565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190612003903090600401613864565b602060405180830381865afa158015612020573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612044919061398b565b905061205a6001600160a01b0383163383612f23565b5050565b6008546001600160a01b031633146120885760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0381166120ae5760405162461bcd60e51b815260040161098f90613a9f565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f8f49a182922022d9119a1a6aeeca151b4a5665e86bd61c1ff32e152d459558b291610a3591613864565b6121026114d7565b1561211f5760405162461bcd60e51b815260040161098f90613a47565b600082118061212e5750600081115b61216f5760405162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015260640161098f565b61205a8282336127a6565b336121836117cd565b6001600160a01b0316146121a95760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166121cf5760405162461bcd60e51b815260040161098f90613a9f565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea08691610a3591613864565b336122246117cd565b6001600160a01b03161461224a5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166122af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161098f565b610f8b81612e73565b6008546001600160a01b031633146122e25760405162461bcd60e51b815260040161098f906138e1565b6305265c0081111561235c5760405162461bcd60e51b815260206004820152603d60248201527f4d41585f4c4f434b5f4455524154494f4e2063616e6e6f74206265206d6f726560448201527f207468616e204d41585f4c4f434b5f4455524154494f4e5f4c494d4954000000606482015260840161098f565b600f8190556040518181527fcab2f3455b51b6ca5377e84fccd0f890b6f6ca36c02e18b6d36cb34f469fe4fe90602001610a35565b6040516001600160a01b03808516602483015283166044820152606481018290526123fc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f53565b50505050565b600061240d826118ad565b61241683611d9f565b610f0f91906139d7565b33600090815260036020526040902080548311156124805760405162461bcd60e51b815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015260640161098f565b428160050154106124c35760405162461bcd60e51b815260206004820152600d60248201526c5374696c6c20696e206c6f636b60981b604482015260640161098f565b6002546001600160a01b031615612537576002546040516351cff8d960e01b81526001600160a01b03909116906351cff8d990612504903390600401613864565b600060405180830381600087803b15801561251e57600080fd5b505af1158015612532573d6000803e3d6000fd5b505050505b805483906000906125546b204fce5e3e25026110000000846139ef565b61255e9190613a0e565b9050612568613025565b612571336131a3565b8415801561257f5750600084115b156125c057600061258e611644565b9050806007548661259f91906139ef565b6125a99190613a0e565b84549093508311156125ba57835492505b506125e7565b82546b204fce5e3e25026110000000906125da90836139ef565b6125e49190613a0e565b91505b6000600754836125f5611644565b6125ff91906139ef565b6126099190613a0e565b90508284600001600082825461261f9190613a30565b9250508190555082600760008282546126389190613a30565b90915550503360009081526005602052604090205460ff1615801561266d5750601854846001015461266a91906139d7565b42105b156126e657601554333b1561268157506016545b600061271061269083856139ef565b61269a9190613a0e565b6009549091506126d7906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6126e18184613a30565b925050505b61271a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612f23565b83541561274c5760075461272c611644565b855461273891906139ef565b6127429190613a0e565b6002850155612754565b600060028501555b4260038501556127633361359e565b604080518281526020810185905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a2505050505050565b6001600160a01b0381166000908152600360205260409020805415806127cc5750600084115b15612845576509184e72a00084116128455760405162461bcd60e51b815260206004820152603660248201527f4465706f73697420616d6f756e74206d757374206265206772656174657220746044820152751a185b8813525397d1115413d4d25517d05353d5539560521b606482015260840161098f565b6005810154839042116128a3578415612882574260048301556008820154600d8054600090612875908490613a30565b9091555050600060088301555b816004015482600501546128969190613a30565b6128a090826139d7565b90505b8315806128b3575062093a808110155b6128ff5760405162461bcd60e51b815260206004820152601f60248201527f4d696e696d756d206c6f636b20706572696f64206973206f6e65207765656b00604482015260640161098f565b600f548111156129515760405162461bcd60e51b815260206004820152601c60248201527f4d6178696d756d206c6f636b20706572696f6420657863656564656400000000604482015260640161098f565b6002546001600160a01b0316156129d057600254604051630efe6a8b60e01b81526001600160a01b038581166004830152602482018890526044820187905290911690630efe6a8b90606401600060405180830381600087803b1580156129b757600080fd5b505af11580156129cb573d6000803e3d6000fd5b505050505b6129d8613025565b600754612a285760006129e9611272565b600954909150612a26906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b505b612a31836131a3565b8315612a8a574282600501541015612a60574260048301819055612a569085906139d7565b6005830155612a7a565b83826005016000828254612a7491906139d7565b90915550505b60078201805460ff191660011790555b600080600080612a98611644565b90508815612ad957612ad56001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001688308c612391565b8892505b855415801590612aed5750600786015460ff165b15612b66576007548654612b0190836139ef565b612b0b9190613a0e565b9150612b1782846139d7565b9250856000015460076000828254612b2f9190613a30565b9091555050600086556004860154421415612b665760088601829055600d8054839190600090612b609084906139d7565b90915550505b60075415612b9657612b788282613a30565b600754612b8590856139ef565b612b8f9190613a0e565b9350612b9a565b8293505b856004015486600501541115612d1b57600060105460125488600401548960050154612bc69190613a30565b612bd091906139ef565b612bda9190613a0e565b9050600064e8d4a51000612bee87846139ef565b612bf89190613a0e565b9050612c0481876139d7565b955085886000016000828254612c1a91906139d7565b909155506000905064e8d4a51000612c3287856139ef565b612c3c9190613a0e565b905080896006016000828254612c5291906139d7565b9250508190555080600c6000828254612c6b91906139d7565b925050819055508b896008016000828254612c8691906139d7565b925050819055508b600d6000828254612c9f91906139d7565b92505081905550896001600160a01b03167f2b943276e5d747f6f7dd46d3b880d8874cb8d6b9b88ca1903990a2738e7dc7a18a600801548b600001548c600401548d60050154612cef9190613a30565b6040805193845260208401929092529082015242606082015260800160405180910390a2505050612d35565b83866000016000828254612d2f91906139d7565b90915550505b6000891180612d445750600088115b15612d50574260018701555b8360076000828254612d6291906139d7565b90915550506006860154600754612d77611644565b8854612d8391906139ef565b612d8d9190613a0e565b612d979190613a30565b6002870155426003870155612dab8761359e565b604080518a8152602081018690529081018990524260608201526001600160a01b038816907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060800160405180910390a2505050505050505050565b612e106114d7565b612e2c5760405162461bcd60e51b815260040161098f90613a71565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051612e699190613864565b60405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612ecb6114d7565b15612ee85760405162461bcd60e51b815260040161098f90613a47565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e5c3390565b6040516001600160a01b03831660248201526044810182905261109c90849063a9059cbb60e01b906064016123c5565b6000612fa8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661366a9092919063ffffffff16565b80519091501561109c5780806020019051810190612fc691906139a4565b61109c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161098f565b600b54604051631175a1dd60e01b815260048101919091523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631175a1dd90604401602060405180830381865afa158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb919061398b565b90508015610f8b5760006130cd611272565b600b54604051630441a3e760e41b81526004810191909152600060248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b15801561313d57600080fd5b505af1158015613151573d6000803e3d6000fd5b50505050600061315f611272565b9050337fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba61318d8484613a30565b60405190815260200160405180910390a2505050565b6001600160a01b038116600090815260036020526040902080541561205a57600781015460ff1615613446576000816006015460075483600001546131e6611644565b6131f091906139ef565b6131fa9190613a0e565b6132049190613a30565b90508160060154600c600082825461321c9190613a30565b90915550506000600683018190558254600780549192909161323f908490613a30565b90915550506001600160a01b03831660009081526006602052604090205460ff1615801561327d575042600e54836005015461327b91906139d7565b105b1561334f5760008260080154826132949190613a30565b90506000600e548460050154426132ab9190613a30565b6132b59190613a30565b90506011548111156132c657506011545b6000601154601754836132d991906139ef565b6132e39190613a0e565b9050600064e8d4a510006132f783866139ef565b6133019190613a0e565b60095490915061333e906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6133488186613a30565b9450505050505b6000613359611644565b9050600060075460001461338f576133718383613a30565b60075461337e90856139ef565b6133889190613a0e565b9050613392565b50815b808455600780548291906000906133aa9084906139d7565b9091555050600584015442111561343f5760078401805460ff19169055600060048501819055600585018190556008850154600d8054919290916133ef908490613a30565b909155505060006008850155604080518481524260208201526001600160a01b038716917ff7870c5b224cbc19873599e46ccfc7103934650509b1af0c3ce90138377c2004910160405180910390a25b5050505050565b6001600160a01b03821660009081526004602052604090205460ff1661205a576000600754613473611644565b835461347f91906139ef565b6134899190613a0e565b90508160000154600760008282546134a19190613a30565b9091555050600080835560028301546134ba9083613a30565b601354909150843b156134cc57506014545b60006127106134db83856139ef565b6134e59190613a0e565b9050801561353457600954613527906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6135318185613a30565b93505b600061353e611644565b90506000600754600014613574576135568683613a30565b60075461356390886139ef565b61356d9190613a0e565b9050613577565b50845b8087556007805482919060009061358f9084906139d7565b90915550505050505050505050565b6001546001600160a01b031615610f8b576001600160a01b0381166000908152600360205260408120600481015460058201549192916135de9190613a30565b6001546008840154600d5460105460405163e874fdaf60e01b81526001600160a01b03898116600483015260248201949094526044810186905260648101929092526084820152929350169063e874fdaf9060a401600060405180830381600087803b15801561364d57600080fd5b505af1158015613661573d6000803e3d6000fd5b50505050505050565b60606136798484600085613683565b90505b9392505050565b6060824710156136e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161098f565b6001600160a01b0385163b61373b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161098f565b600080866001600160a01b031685876040516137579190613b51565b60006040518083038185875af1925050503d8060008114613794576040519150601f19603f3d011682016040523d82523d6000602084013e613799565b606091505b50915091506137a98282866137b4565b979650505050505050565b606083156137c357508161367c565b8251156137d35782518084602001fd5b8160405162461bcd60e51b815260040161098f9190613b6d565b6000602082840312156137ff57600080fd5b5035919050565b6001600160a01b0381168114610f8b57600080fd5b60006020828403121561382d57600080fd5b813561367c81613806565b6000806040838503121561384b57600080fd5b823561385681613806565b946020939093013593505050565b6001600160a01b0391909116815260200190565b8015158114610f8b57600080fd5b6000806040838503121561389957600080fd5b82356138a481613806565b915060208301356138b481613878565b809150509250929050565b600080604083850312156138d257600080fd5b50508035926020909101359150565b6020808252600b908201526a61646d696e3a207775743f60a81b604082015260600190565b60208082526030908201527f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060408201526f4d41585f57495448445241575f46454560801b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561399d57600080fd5b5051919050565b6000602082840312156139b657600080fd5b815161367c81613878565b634e487b7160e01b600052601160045260246000fd5b600082198211156139ea576139ea6139c1565b500190565b6000816000190483118215151615613a0957613a096139c1565b500290565b600082613a2b57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613a4257613a426139c1565b500390565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526016908201527543616e6e6f74206265207a65726f206164647265737360501b604082015260600190565b60208082526036908201527f706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468604082015275616e204d41585f504552464f524d414e43455f46454560501b606082015260800190565b60005b83811015613b40578181015183820152602001613b28565b838111156123fc5750506000910152565b60008251613b63818460208701613b25565b9190910192915050565b6020815260008251806020840152613b8c816040850160208701613b25565b601f01601f1916919091016040019291505056fe3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d44a26469706673582212208fac60e48eb35e29f7a743c638638371e8b2fc9dffb4ce7b25ae133d7651c44a64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/CakeToken.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/CakeToken.json new file mode 100644 index 00000000..4e56ee43 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/CakeToken.json @@ -0,0 +1,639 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CakeToken", + "sourceName": "contracts/test/CakeToken.sol", + "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": "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": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "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" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b50604051806040016040528060118152602001702830b731b0b5b2a9bbb0b8102a37b5b2b760791b8152506040518060400160405280600481526020016343616b6560e01b81525060006200006b620000f660201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000ca906004906020850190620000fa565b508051620000e0906005906020840190620000fa565b50506006805460ff191660121790555062000196565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200013d57805160ff19168380011785556200016d565b828001600101855582156200016d579182015b828111156200016d57825182559160200191906001019062000150565b506200017b9291506200017f565b5090565b5b808211156200017b576000815560010162000180565b61237e80620001a66000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c8063782d6fe1116100f9578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e1461062f578063e7a324dc1461066a578063f1127ed814610672578063f2fde38b146106d1576101b9565b8063a9059cbb1461056f578063b4b5ea57146105a8578063c3cda520146105db576101b9565b80638da5cb5b116100d35780638da5cb5b1461050957806395d89b4114610511578063a0712d6814610519578063a457c2d714610536576101b9565b8063782d6fe1146104955780637ecebe00146104ce578063893d20e814610501576101b9565b806339509351116101665780635c19a95c116101405780635c19a95c146103db5780636fcfff451461040e57806370a082311461045a578063715018a61461048d576101b9565b8063395093511461030b57806340c10f1914610344578063587cde1e1461037f576101b9565b806320606b701161019757806320606b70146102a257806323b872dd146102aa578063313ce567146102ed576101b9565b806306fdde03146101be578063095ea7b31461023b57806318160ddd14610288575b600080fd5b6101c6610704565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356107b8565b604080519115158252519081900360200190f35b6102906107d6565b60408051918252519081900360200190f35b6102906107dc565b610274600480360360608110156102c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610800565b6102f56108a1565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108aa565b61037d6004803603604081101561035a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610905565b005b6103b26004803603602081101561039557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109ed565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61037d600480360360208110156103f157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a18565b6104416004803603602081101561042457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a25565b6040805163ffffffff9092168252519081900360200190f35b6102906004803603602081101561047057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a3d565b61037d610a65565b610290600480360360408110156104ab57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610b7c565b610290600480360360208110156104e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e46565b6103b2610e58565b6103b2610e67565b6101c6610e83565b6102746004803603602081101561052f57600080fd5b5035610f02565b6102746004803603604081101561054c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fc5565b6102746004803603604081101561058557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561103a565b610290600480360360208110156105be57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661104e565b61037d600480360360c08110156105f157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356110ea565b6102906004803603604081101561064557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611429565b610290611461565b6106b16004803603604081101561068857600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611485565b6040805163ffffffff909316835260208301919091528051918290030190f35b61037d600480360360208110156106e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114b2565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b820191906000526020600020905b81548152906001019060200180831161079157829003601f168201915b5050505050905090565b60006107cc6107c5611653565b8484611657565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b600061080d84848461179e565b61089784610819611653565b610892856040518060600160405280602881526020016121ee6028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610864611653565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611965565b611657565b5060019392505050565b60065460ff1690565b60006107cc6108b7611653565b8461089285600260006108c8611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611a16565b61090d611653565b73ffffffffffffffffffffffffffffffffffffffff1661092b610e67565b73ffffffffffffffffffffffffffffffffffffffff16146109ad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6109b78282611a8a565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600760205260408120546109e9921683611bb1565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610a223382611d97565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610a6d611653565b73ffffffffffffffffffffffffffffffffffffffff16610a8b610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610b0d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610bd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806122706027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610c115760009150506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610cd65773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff168352929052206001015490506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610d1e5760009150506107d0565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e0257600282820363ffffffff16048103610d6e612141565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610ddd576020015194506107d09350505050565b805163ffffffff16871115610df457819350610dfb565b6001820392505b5050610d44565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610e62610e67565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b6000610f0c611653565b73ffffffffffffffffffffffffffffffffffffffff16610f2a610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610fac57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610fbd610fb7611653565b83611a8a565b506001919050565b60006107cc610fd2611653565b84610892856040518060600160405280602581526020016123026025913960026000610ffc611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611965565b60006107cc611047611653565b848461179e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff16806110865760006110e3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611115610704565b80519060200120611124611e5e565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa15801561129d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806122166026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146113b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806122bd6022913960400191505060405180910390fd5b87421115611412576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121c86026913960400191505060405180910390fd5b61141c818b611d97565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6114ba611653565b73ffffffffffffffffffffffffffffffffffffffff166114d8610e67565b73ffffffffffffffffffffffffffffffffffffffff161461155a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166115c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121a26026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff83166116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061217e6024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821661172f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806123276022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661180a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806121596025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611876576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806122df6023913960400191505060405180910390fd5b6118c0816040518060600160405280602681526020016122976026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611965565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602052604080822093909355908416815220546118fc9082611a16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611a0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119d35781810151838201526020016119bb565b50505050905090810190601f168015611a005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156110e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b0c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611b199082611a16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611b4c9082611a16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bed5750600081115b15611d925773ffffffffffffffffffffffffffffffffffffffff831615611cc45773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff169081611c47576000611ca4565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611cb28285611e62565b9050611cc086848484611ed9565b5050505b73ffffffffffffffffffffffffffffffffffffffff821615611d925773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff169081611d19576000611d76565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611d848285611a16565b905061142185848484611ed9565b505050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526007602052604081205490911690611dcb84610a3d565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611e58828483611bb1565b50505050565b4690565b600082821115611ed357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611efd4360405180606001604052806034815260200161223c603491396120c9565b905060008463ffffffff16118015611f71575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15611fd95773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612072565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156119d35781810151838201526020016119bb565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a20617070726f766520746f20746865207a65726f2061646472657373a2646970667358221220878bcaf3d45de55293e9d5d1b586861a43290aaa00bc428b8c26b2b0c77d4ef164736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101b95760003560e01c8063782d6fe1116100f9578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e1461062f578063e7a324dc1461066a578063f1127ed814610672578063f2fde38b146106d1576101b9565b8063a9059cbb1461056f578063b4b5ea57146105a8578063c3cda520146105db576101b9565b80638da5cb5b116100d35780638da5cb5b1461050957806395d89b4114610511578063a0712d6814610519578063a457c2d714610536576101b9565b8063782d6fe1146104955780637ecebe00146104ce578063893d20e814610501576101b9565b806339509351116101665780635c19a95c116101405780635c19a95c146103db5780636fcfff451461040e57806370a082311461045a578063715018a61461048d576101b9565b8063395093511461030b57806340c10f1914610344578063587cde1e1461037f576101b9565b806320606b701161019757806320606b70146102a257806323b872dd146102aa578063313ce567146102ed576101b9565b806306fdde03146101be578063095ea7b31461023b57806318160ddd14610288575b600080fd5b6101c6610704565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356107b8565b604080519115158252519081900360200190f35b6102906107d6565b60408051918252519081900360200190f35b6102906107dc565b610274600480360360608110156102c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610800565b6102f56108a1565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108aa565b61037d6004803603604081101561035a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610905565b005b6103b26004803603602081101561039557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109ed565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61037d600480360360208110156103f157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a18565b6104416004803603602081101561042457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a25565b6040805163ffffffff9092168252519081900360200190f35b6102906004803603602081101561047057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a3d565b61037d610a65565b610290600480360360408110156104ab57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610b7c565b610290600480360360208110156104e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e46565b6103b2610e58565b6103b2610e67565b6101c6610e83565b6102746004803603602081101561052f57600080fd5b5035610f02565b6102746004803603604081101561054c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fc5565b6102746004803603604081101561058557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561103a565b610290600480360360208110156105be57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661104e565b61037d600480360360c08110156105f157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356110ea565b6102906004803603604081101561064557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611429565b610290611461565b6106b16004803603604081101561068857600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611485565b6040805163ffffffff909316835260208301919091528051918290030190f35b61037d600480360360208110156106e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114b2565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b820191906000526020600020905b81548152906001019060200180831161079157829003601f168201915b5050505050905090565b60006107cc6107c5611653565b8484611657565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b600061080d84848461179e565b61089784610819611653565b610892856040518060600160405280602881526020016121ee6028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610864611653565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611965565b611657565b5060019392505050565b60065460ff1690565b60006107cc6108b7611653565b8461089285600260006108c8611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611a16565b61090d611653565b73ffffffffffffffffffffffffffffffffffffffff1661092b610e67565b73ffffffffffffffffffffffffffffffffffffffff16146109ad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6109b78282611a8a565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600760205260408120546109e9921683611bb1565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610a223382611d97565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610a6d611653565b73ffffffffffffffffffffffffffffffffffffffff16610a8b610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610b0d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610bd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806122706027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610c115760009150506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610cd65773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff168352929052206001015490506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610d1e5760009150506107d0565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e0257600282820363ffffffff16048103610d6e612141565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610ddd576020015194506107d09350505050565b805163ffffffff16871115610df457819350610dfb565b6001820392505b5050610d44565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610e62610e67565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b6000610f0c611653565b73ffffffffffffffffffffffffffffffffffffffff16610f2a610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610fac57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610fbd610fb7611653565b83611a8a565b506001919050565b60006107cc610fd2611653565b84610892856040518060600160405280602581526020016123026025913960026000610ffc611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611965565b60006107cc611047611653565b848461179e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff16806110865760006110e3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611115610704565b80519060200120611124611e5e565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa15801561129d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806122166026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146113b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806122bd6022913960400191505060405180910390fd5b87421115611412576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121c86026913960400191505060405180910390fd5b61141c818b611d97565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6114ba611653565b73ffffffffffffffffffffffffffffffffffffffff166114d8610e67565b73ffffffffffffffffffffffffffffffffffffffff161461155a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166115c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121a26026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff83166116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061217e6024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821661172f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806123276022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661180a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806121596025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611876576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806122df6023913960400191505060405180910390fd5b6118c0816040518060600160405280602681526020016122976026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611965565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602052604080822093909355908416815220546118fc9082611a16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611a0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119d35781810151838201526020016119bb565b50505050905090810190601f168015611a005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156110e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b0c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611b199082611a16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611b4c9082611a16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bed5750600081115b15611d925773ffffffffffffffffffffffffffffffffffffffff831615611cc45773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff169081611c47576000611ca4565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611cb28285611e62565b9050611cc086848484611ed9565b5050505b73ffffffffffffffffffffffffffffffffffffffff821615611d925773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff169081611d19576000611d76565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611d848285611a16565b905061142185848484611ed9565b505050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526007602052604081205490911690611dcb84610a3d565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611e58828483611bb1565b50505050565b4690565b600082821115611ed357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611efd4360405180606001604052806034815260200161223c603491396120c9565b905060008463ffffffff16118015611f71575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15611fd95773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612072565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156119d35781810151838201526020016119bb565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a20617070726f766520746f20746865207a65726f2061646472657373a2646970667358221220878bcaf3d45de55293e9d5d1b586861a43290aaa00bc428b8c26b2b0c77d4ef164736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/Delegator.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/Delegator.json new file mode 100644 index 00000000..90c6b8a8 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/Delegator.json @@ -0,0 +1,446 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Delegator", + "sourceName": "contracts/test/Delegator.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IVECake", + "name": "_VECake", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "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": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "contract IVECake", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockEndTime", + "type": "uint256" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "earlyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "increaseLockAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newUnlockTime", + "type": "uint256" + } + ], + "name": "increaseUnlockTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IRevenueSharingPool", + "name": "_pool", + "type": "address" + }, + { + "internalType": "address", + "name": "_recipient", + "type": "address" + } + ], + "name": "setRecipient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60c06040523480156200001157600080fd5b5060405162001fb338038062001fb3833981016040819052620000349162000574565b6040518060400160405280601681526020017f564543616b652044656c656761746f7220546f6b656e000000000000000000008152506040518060400160405280600381526020016215911560ea1b81525081600390805190602001906200009e929190620004b5565b508051620000b4906004906020840190620004b5565b5050506001600160a01b0382811660a05281166080819052620000e79083600019620000ef602090811b620009eb17901c565b5050620006b4565b8015806200016d5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801562000145573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016b9190620005b3565b155b620001e55760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091526200023d9185916200024216565b505050565b60006200029e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200032060201b62000beb179092919060201c565b8051909150156200023d5780806020019051810190620002bf9190620005cd565b6200023d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401620001dc565b60606200033184846000856200033b565b90505b9392505050565b6060824710156200039e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401620001dc565b6001600160a01b0385163b620003f75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001dc565b600080866001600160a01b0316858760405162000415919062000624565b60006040518083038185875af1925050503d806000811462000454576040519150601f19603f3d011682016040523d82523d6000602084013e62000459565b606091505b5090925090506200046c82828662000477565b979650505050505050565b606083156200048857508162000334565b825115620004995782518084602001fd5b8160405162461bcd60e51b8152600401620001dc919062000642565b828054620004c39062000677565b90600052602060002090601f016020900481019282620004e7576000855562000532565b82601f106200050257805160ff191683800117855562000532565b8280016001018555821562000532579182015b828111156200053257825182559160200191906001019062000515565b506200054092915062000544565b5090565b5b8082111562000540576000815560010162000545565b6001600160a01b03811681146200057157600080fd5b50565b600080604083850312156200058857600080fd5b825162000595816200055b565b6020840151909250620005a8816200055b565b809150509250929050565b600060208284031215620005c657600080fd5b5051919050565b600060208284031215620005e057600080fd5b815180151581146200033457600080fd5b60005b838110156200060e578181015183820152602001620005f4565b838111156200061e576000848401525b50505050565b6000825162000638818460208701620005f1565b9190910192915050565b602081526000825180602084015262000663816040850160208701620005f1565b601f01601f19169190910160400192915050565b600181811c908216806200068c57607f821691505b60208210811415620006ae57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a0516118a162000712600039600081816102310152818161054c0152818161060d0152818161069d015281816108b1015281816108f701526109bc01526000818161038e015281816104f5015261085301526118a16000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063a9059cbb1161008c578063dd62ed3e11610066578063dd62ed3e14610330578063fa09e63014610376578063fc0c546a1461038957600080fd5b8063a9059cbb14610302578063b52c05fe14610315578063db2e21bc1461032857600080fd5b80638bc8407a116100bd5780638bc8407a146102d457806395d89b41146102e7578063a457c2d7146102ef57600080fd5b806370a082311461028b5780637c616fe6146102c157600080fd5b8063313ce5671161012f578063403f444711610114578063403f44471461021957806362534e791461022c5780636574deb71461027857600080fd5b8063313ce567146101f7578063395093511461020657600080fd5b8063095ea7b311610160578063095ea7b3146101af57806318160ddd146101d257806323b872dd146101e457600080fd5b80630185921e1461017c57806306fdde0314610191575b600080fd5b61018f61018a3660046115d1565b6103b0565b005b6101996103bf565b6040516101a69190611632565b60405180910390f35b6101c26101bd366004611683565b610451565b60405190151581526020016101a6565b6002545b6040519081526020016101a6565b6101c26101f23660046116af565b610469565b604051601281526020016101a6565b6101c2610214366004611683565b61048f565b61018f6102273660046116f0565b6104db565b6102537f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a6565b61018f610286366004611683565b6105c1565b6101d6610299366004611709565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b61018f6102cf3660046116f0565b61066e565b61018f6102e2366004611726565b6106e1565b61019961073b565b6101c26102fd366004611683565b61074a565b6101c2610310366004611683565b61082b565b61018f61032336600461175f565b610839565b61018f6108f5565b6101d661033e366004611726565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b61018f610384366004611709565b610977565b6102537f000000000000000000000000000000000000000000000000000000000000000081565b6103ba8383610c02565b505050565b6060600380546103ce90611781565b80601f01602080910402602001604051908101604052809291908181526020018280546103fa90611781565b80156104475780601f1061041c57610100808354040283529160200191610447565b820191906000526020600020905b81548152906001019060200180831161042a57829003601f168201915b5050505050905090565b60003361045f818585610d22565b5060019392505050565b600033610477858285610ed5565b610482858585610fa6565b60019150505b9392505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061045f90829086906104d69087906117d5565b610d22565b61051d73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084611259565b6040517f403f4447000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063403f4447906024015b600060405180830381600087803b1580156105a657600080fd5b505af11580156105ba573d6000803e3d6000fd5b5050505050565b6040517f6574deb700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690636574deb7906044015b600060405180830381600087803b15801561065257600080fd5b505af1158015610666573d6000803e3d6000fd5b505050505050565b6040517f7c616fe6000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690637c616fe69060240161058c565b6040517f8bc8407a00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8281166024830152831690638bc8407a90604401610638565b6060600480546103ce90611781565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6108208286868403610d22565b506001949350505050565b60003361045f818585610fa6565b61087b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333085611259565b6040517fb52c05fe00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063b52c05fe90604401610638565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663db2e21bc6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561095d57600080fd5b505af1158015610971573d6000803e3d6000fd5b50505050565b6040517ffa09e63000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fa09e6309060240161058c565b801580610a8b57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a899190611814565b155b610b17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840161080a565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526103ba9084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526112b7565b6060610bfa84846000856113c3565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff8216610c7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161080a565b8060026000828254610c9191906117d5565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610ccb9084906117d5565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff8316610dc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff8216610e67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146109715781811015610f99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161080a565b6109718484848403610d22565b73ffffffffffffffffffffffffffffffffffffffff8316611049576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff82166110ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902054818110156111a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152602081905260408082208585039055918516815290812080548492906111e69084906117d5565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161124c91815260200190565b60405180910390a3610971565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526109719085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610b69565b6000611319826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610beb9092919063ffffffff16565b8051909150156103ba5780806020019051810190611337919061182d565b6103ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161080a565b606082471015611455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff85163b6114d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161080a565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114fc919061184f565b60006040518083038185875af1925050503d8060008114611539576040519150601f19603f3d011682016040523d82523d6000602084013e61153e565b606091505b509150915061154e828286611559565b979650505050505050565b60608315611568575081610488565b8251156115785782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080a9190611632565b73ffffffffffffffffffffffffffffffffffffffff811681146115ce57600080fd5b50565b6000806000606084860312156115e657600080fd5b83356115f1816115ac565b95602085013595506040909401359392505050565b60005b83811015611621578181015183820152602001611609565b838111156109715750506000910152565b6020815260008251806020840152611651816040850160208701611606565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000806040838503121561169657600080fd5b82356116a1816115ac565b946020939093013593505050565b6000806000606084860312156116c457600080fd5b83356116cf816115ac565b925060208401356116df816115ac565b929592945050506040919091013590565b60006020828403121561170257600080fd5b5035919050565b60006020828403121561171b57600080fd5b8135610488816115ac565b6000806040838503121561173957600080fd5b8235611744816115ac565b91506020830135611754816115ac565b809150509250929050565b6000806040838503121561177257600080fd5b50508035926020909101359150565b600181811c9082168061179557607f821691505b602082108114156117cf577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000821982111561180f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b60006020828403121561182657600080fd5b5051919050565b60006020828403121561183f57600080fd5b8151801515811461048857600080fd5b60008251611861818460208701611606565b919091019291505056fea26469706673582212204fe46389bdd124a6ca2fb8c65c74de23a5f6e64dfbfcf352ab57af3e4445d34364736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063a9059cbb1161008c578063dd62ed3e11610066578063dd62ed3e14610330578063fa09e63014610376578063fc0c546a1461038957600080fd5b8063a9059cbb14610302578063b52c05fe14610315578063db2e21bc1461032857600080fd5b80638bc8407a116100bd5780638bc8407a146102d457806395d89b41146102e7578063a457c2d7146102ef57600080fd5b806370a082311461028b5780637c616fe6146102c157600080fd5b8063313ce5671161012f578063403f444711610114578063403f44471461021957806362534e791461022c5780636574deb71461027857600080fd5b8063313ce567146101f7578063395093511461020657600080fd5b8063095ea7b311610160578063095ea7b3146101af57806318160ddd146101d257806323b872dd146101e457600080fd5b80630185921e1461017c57806306fdde0314610191575b600080fd5b61018f61018a3660046115d1565b6103b0565b005b6101996103bf565b6040516101a69190611632565b60405180910390f35b6101c26101bd366004611683565b610451565b60405190151581526020016101a6565b6002545b6040519081526020016101a6565b6101c26101f23660046116af565b610469565b604051601281526020016101a6565b6101c2610214366004611683565b61048f565b61018f6102273660046116f0565b6104db565b6102537f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a6565b61018f610286366004611683565b6105c1565b6101d6610299366004611709565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b61018f6102cf3660046116f0565b61066e565b61018f6102e2366004611726565b6106e1565b61019961073b565b6101c26102fd366004611683565b61074a565b6101c2610310366004611683565b61082b565b61018f61032336600461175f565b610839565b61018f6108f5565b6101d661033e366004611726565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b61018f610384366004611709565b610977565b6102537f000000000000000000000000000000000000000000000000000000000000000081565b6103ba8383610c02565b505050565b6060600380546103ce90611781565b80601f01602080910402602001604051908101604052809291908181526020018280546103fa90611781565b80156104475780601f1061041c57610100808354040283529160200191610447565b820191906000526020600020905b81548152906001019060200180831161042a57829003601f168201915b5050505050905090565b60003361045f818585610d22565b5060019392505050565b600033610477858285610ed5565b610482858585610fa6565b60019150505b9392505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061045f90829086906104d69087906117d5565b610d22565b61051d73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084611259565b6040517f403f4447000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063403f4447906024015b600060405180830381600087803b1580156105a657600080fd5b505af11580156105ba573d6000803e3d6000fd5b5050505050565b6040517f6574deb700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690636574deb7906044015b600060405180830381600087803b15801561065257600080fd5b505af1158015610666573d6000803e3d6000fd5b505050505050565b6040517f7c616fe6000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690637c616fe69060240161058c565b6040517f8bc8407a00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8281166024830152831690638bc8407a90604401610638565b6060600480546103ce90611781565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6108208286868403610d22565b506001949350505050565b60003361045f818585610fa6565b61087b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333085611259565b6040517fb52c05fe00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063b52c05fe90604401610638565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663db2e21bc6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561095d57600080fd5b505af1158015610971573d6000803e3d6000fd5b50505050565b6040517ffa09e63000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fa09e6309060240161058c565b801580610a8b57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a899190611814565b155b610b17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840161080a565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526103ba9084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526112b7565b6060610bfa84846000856113c3565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff8216610c7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161080a565b8060026000828254610c9191906117d5565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610ccb9084906117d5565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff8316610dc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff8216610e67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146109715781811015610f99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161080a565b6109718484848403610d22565b73ffffffffffffffffffffffffffffffffffffffff8316611049576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff82166110ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902054818110156111a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152602081905260408082208585039055918516815290812080548492906111e69084906117d5565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161124c91815260200190565b60405180910390a3610971565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526109719085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610b69565b6000611319826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610beb9092919063ffffffff16565b8051909150156103ba5780806020019051810190611337919061182d565b6103ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161080a565b606082471015611455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161080a565b73ffffffffffffffffffffffffffffffffffffffff85163b6114d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161080a565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114fc919061184f565b60006040518083038185875af1925050503d8060008114611539576040519150601f19603f3d011682016040523d82523d6000602084013e61153e565b606091505b509150915061154e828286611559565b979650505050505050565b60608315611568575081610488565b8251156115785782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080a9190611632565b73ffffffffffffffffffffffffffffffffffffffff811681146115ce57600080fd5b50565b6000806000606084860312156115e657600080fd5b83356115f1816115ac565b95602085013595506040909401359392505050565b60005b83811015611621578181015183820152602001611609565b838111156109715750506000910152565b6020815260008251806020840152611651816040850160208701611606565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000806040838503121561169657600080fd5b82356116a1816115ac565b946020939093013593505050565b6000806000606084860312156116c457600080fd5b83356116cf816115ac565b925060208401356116df816115ac565b929592945050506040919091013590565b60006020828403121561170257600080fd5b5035919050565b60006020828403121561171b57600080fd5b8135610488816115ac565b6000806040838503121561173957600080fd5b8235611744816115ac565b91506020830135611754816115ac565b809150509250929050565b6000806040838503121561177257600080fd5b50508035926020909101359150565b600181811c9082168061179557607f821691505b602082108114156117cf577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000821982111561180f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b60006020828403121561182657600080fd5b5051919050565b60006020828403121561183f57600080fd5b8151801515811461048857600080fd5b60008251611861818460208701611606565b919091019291505056fea26469706673582212204fe46389bdd124a6ca2fb8c65c74de23a5f6e64dfbfcf352ab57af3e4445d34364736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/ERC20Mock.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/ERC20Mock.json new file mode 100644 index 00000000..506a3546 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/ERC20Mock.json @@ -0,0 +1,315 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Mock", + "sourceName": "contracts/mocks/ERC20Mock.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "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": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c2c38038062000c2c8339810160408190526200003491620001e1565b8151829082906200004d9060039060208501906200006e565b508051620000639060049060208401906200006e565b505050505062000288565b8280546200007c906200024b565b90600052602060002090601f016020900481019282620000a05760008555620000eb565b82601f10620000bb57805160ff1916838001178555620000eb565b82800160010185558215620000eb579182015b82811115620000eb578251825591602001919060010190620000ce565b50620000f9929150620000fd565b5090565b5b80821115620000f95760008155600101620000fe565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013c57600080fd5b81516001600160401b038082111562000159576200015962000114565b604051601f8301601f19908116603f0116810190828211818310171562000184576200018462000114565b81604052838152602092508683858801011115620001a157600080fd5b600091505b83821015620001c55785820183015181830184015290820190620001a6565b83821115620001d75760008385830101525b9695505050505050565b60008060408385031215620001f557600080fd5b82516001600160401b03808211156200020d57600080fd5b6200021b868387016200012a565b935060208501519150808211156200023257600080fd5b5062000241858286016200012a565b9150509250929050565b600181811c908216806200026057607f821691505b602082108114156200028257634e487b7160e01b600052602260045260246000fd5b50919050565b61099480620002986000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d1565b60405180910390f35b6100ea6100e5366004610842565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461086c565b61026a565b604051601281526020016100ce565b6100ea61013c366004610842565b61028e565b61015461014f366004610842565b6102b0565b005b6100fe6101643660046108a8565b6001600160a01b031660009081526020819052604090205490565b6100c16102be565b6100ea610195366004610842565b6102cd565b6100ea6101a8366004610842565b61034d565b6100fe6101bb3660046108ca565b61035b565b6060600380546101cf906108fd565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108fd565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610386565b5060019392505050565b6000336102788582856104aa565b610283858585610524565b506001949350505050565b6000336102608185856102a1838361035b565b6102ab9190610938565b610386565b6102ba82826106f2565b5050565b6060600480546101cf906108fd565b600033816102db828661035b565b9050838110156103405760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102838286868403610386565b600033610260818585610524565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103e85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610337565b6001600160a01b0382166104495760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610337565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b6848461035b565b9050600019811461051e57818110156105115760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610337565b61051e8484848403610386565b50505050565b6001600160a01b0383166105885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610337565b6001600160a01b0382166105ea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610337565b6001600160a01b038316600090815260208190526040902054818110156106625760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610337565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610699908490610938565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e591815260200190565b60405180910390a361051e565b6001600160a01b0382166107485760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610337565b806002600082825461075a9190610938565b90915550506001600160a01b03821660009081526020819052604081208054839290610787908490610938565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b818110156107fe578581018301518582016040015282016107e2565b81811115610810576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461083d57600080fd5b919050565b6000806040838503121561085557600080fd5b61085e83610826565b946020939093013593505050565b60008060006060848603121561088157600080fd5b61088a84610826565b925061089860208501610826565b9150604084013590509250925092565b6000602082840312156108ba57600080fd5b6108c382610826565b9392505050565b600080604083850312156108dd57600080fd5b6108e683610826565b91506108f460208401610826565b90509250929050565b600181811c9082168061091157607f821691505b6020821081141561093257634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561095957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220c9116e967a89bacdcb5d5cacab54540303b3650686f16fea49473cd777d6624764736f6c634300080c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d1565b60405180910390f35b6100ea6100e5366004610842565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461086c565b61026a565b604051601281526020016100ce565b6100ea61013c366004610842565b61028e565b61015461014f366004610842565b6102b0565b005b6100fe6101643660046108a8565b6001600160a01b031660009081526020819052604090205490565b6100c16102be565b6100ea610195366004610842565b6102cd565b6100ea6101a8366004610842565b61034d565b6100fe6101bb3660046108ca565b61035b565b6060600380546101cf906108fd565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108fd565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610386565b5060019392505050565b6000336102788582856104aa565b610283858585610524565b506001949350505050565b6000336102608185856102a1838361035b565b6102ab9190610938565b610386565b6102ba82826106f2565b5050565b6060600480546101cf906108fd565b600033816102db828661035b565b9050838110156103405760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102838286868403610386565b600033610260818585610524565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103e85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610337565b6001600160a01b0382166104495760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610337565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b6848461035b565b9050600019811461051e57818110156105115760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610337565b61051e8484848403610386565b50505050565b6001600160a01b0383166105885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610337565b6001600160a01b0382166105ea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610337565b6001600160a01b038316600090815260208190526040902054818110156106625760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610337565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610699908490610938565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e591815260200190565b60405180910390a361051e565b6001600160a01b0382166107485760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610337565b806002600082825461075a9190610938565b90915550506001600160a01b03821660009081526020819052604081208054839290610787908490610938565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b818110156107fe578581018301518582016040015282016107e2565b81811115610810576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461083d57600080fd5b919050565b6000806040838503121561085557600080fd5b61085e83610826565b946020939093013593505050565b60008060006060848603121561088157600080fd5b61088a84610826565b925061089860208501610826565b9150604084013590509250925092565b6000602082840312156108ba57600080fd5b6108c382610826565b9392505050565b600080604083850312156108dd57600080fd5b6108e683610826565b91506108f460208401610826565b90509250929050565b600181811c9082168061091157607f821691505b6020821081141561093257634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561095957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220c9116e967a89bacdcb5d5cacab54540303b3650686f16fea49473cd777d6624764736f6c634300080c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/MasterChef.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/MasterChef.json new file mode 100644 index 00000000..3824474e --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/MasterChef.json @@ -0,0 +1,590 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MasterChef", + "sourceName": "contracts/test/MasterChef.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract CakeToken", + "name": "_cake", + "type": "address" + }, + { + "internalType": "contract SyrupBar", + "name": "_syrup", + "type": "address" + }, + { + "internalType": "address", + "name": "_devaddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_cakePerBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_startBlock", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BONUS_MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_lpToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "add", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cake", + "outputs": [ + { + "internalType": "contract CakeToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_devaddr", + "type": "address" + } + ], + "name": "dev", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "devaddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "enterStaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_to", + "type": "uint256" + } + ], + "name": "getMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "leaveStaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "migrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrator", + "outputs": [ + { + "internalType": "contract IMigratorChef", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingCake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "lpToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IMigratorChef", + "name": "_migrator", + "type": "address" + } + ], + "name": "setMigrator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "syrup", + "outputs": [ + { + "internalType": "contract SyrupBar", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "multiplierNumber", + "type": "uint256" + } + ], + "name": "updateMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040526001600555600060095534801561001a57600080fd5b5060405162002b0a38038062002b0a833981810160405260a081101561003f57600080fd5b5080516020820151604083015160608401516080909401519293919290919060006100686101e2565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b03199081166001600160a01b03978816908117835560028054831697891697909717909655600380548216958816959095179094556004928355600a829055604080516080810182529586526103e86020870181815291870193845260006060880181815260078054958601815590915296517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688939095029283018054909616949097169390931790935590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a82015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b909101556009556101e6565b3390565b61291480620001f66000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635ffe6146116101045780638d88a90e116100a2578063d49e77cd11610071578063d49e77cd1461050c578063dce1748414610514578063e2bbb1581461051c578063f2fde38b1461053f576101cf565b80638d88a90e1461045c5780638da5cb5b1461048f5780638dbb1e3a1461049757806393f1a40b146104ba576101cf565b8063715018a6116100de578063715018a6146104135780637cd07e471461041b57806386a952c41461044c5780638aa2855014610454576101cf565b80635ffe6146146103c3578063630b5ba1146103e057806364482f79146103e8576101cf565b806323cf311811610171578063454b06081161014b578063454b06081461036457806348cd4cb11461038157806351eb05a6146103895780635312ea8e146103a6576101cf565b806323cf3118146102f157806341441d3b14610324578063441a3e7014610341576101cf565b80631175a1dd116101ad5780631175a1dd146102155780631526fe271461024e57806317caf6f1146102a85780631eaaa045146102b0576101cf565b80630755e0b6146101d4578063081e3eda146101ee5780631058d281146101f6575b600080fd5b6101dc610572565b60408051918252519081900360200190f35b6101dc610578565b6102136004803603602081101561020c57600080fd5b503561057e565b005b6101dc6004803603604081101561022b57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166107ba565b61026b6004803603602081101561026457600080fd5b503561094a565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526020850193909352838301919091526060830152519081900360800190f35b6101dc610998565b610213600480360360608110156102c657600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135151561099e565b6102136004803603602081101561030757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b99565b6102136004803603602081101561033a57600080fd5b5035610c88565b6102136004803603604081101561035757600080fd5b5080359060200135610e4f565b6102136004803603602081101561037a57600080fd5b5035611040565b6101dc61139b565b6102136004803603602081101561039f57600080fd5b50356113a1565b610213600480360360208110156103bc57600080fd5b503561162d565b610213600480360360208110156103d957600080fd5b50356116d5565b610213611782565b610213600480360360608110156103fe57600080fd5b508035906020810135906040013515156117a5565b6102136118d2565b6104236119e9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610423611a05565b6101dc611a21565b6102136004803603602081101561047257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a27565b610423611af4565b6101dc600480360360408110156104ad57600080fd5b5080359060200135611b10565b6104f3600480360360408110156104d057600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16611b2b565b6040805192835260208301919091528051918290030190f35b610423611b4f565b610423611b6b565b6102136004803603604081101561053257600080fd5b5080359060200135611b87565b6102136004803603602081101561055557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d12565b60045481565b60075490565b6000600760008154811061058e57fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7909152604090922080546004909202909201925083111561063e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b61064860006113a1565b6000610682826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90611f26565b90611fa7565b9050801561069457610694338261201e565b83156106cb5781546106a69085611fa7565b825582546106cb9073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b600383015482546106e69164e8d4a510009161067691611eb3565b6001830155600254604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101879052905173ffffffffffffffffffffffffffffffffffffffff90921691639dc29fac9160448082019260009290919082900301818387803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b5050604080518781529051600093503392507ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350505050565b600080600784815481106107ca57fe5b6000918252602080832087845260088252604080852073ffffffffffffffffffffffffffffffffffffffff898116875290845281862060049586029093016003810154815484517f70a082310000000000000000000000000000000000000000000000000000000081523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b50516002850154909150431180156108af57508015155b156109155760006108c4856002015443611b10565b905060006108f160095461067688600101546108eb60045487611eb390919063ffffffff16565b90611eb3565b9050610910610909846106768464e8d4a51000611eb3565b8590612147565b935050505b61093d836001015461067c64e8d4a51000610676868860000154611eb390919063ffffffff16565b9450505050505b92915050565b6007818154811061095757fe5b6000918252602090912060049091020180546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff9092169350919084565b60095481565b6109a66121bb565b73ffffffffffffffffffffffffffffffffffffffff166109c4611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610a4657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8015610a5457610a54611782565b6000600a544311610a6757600a54610a69565b435b600954909150610a799085612147565b6009556040805160808101825273ffffffffffffffffffffffffffffffffffffffff85811682526020820187815292820184815260006060840181815260078054600181018255925293517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490920291820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919094161790925592517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b90910155610b936121bf565b50505050565b610ba16121bb565b73ffffffffffffffffffffffffffffffffffffffff16610bbf611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610c4157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006007600081548110610c9857fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c790915260408320600490920201925090610cdf906113a1565b805415610d28576000610d14826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610d2657610d26338261201e565b505b8215610d61578154610d529073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054610d5e9084612147565b81555b60038201548154610d7c9164e8d4a510009161067691611eb3565b6001820155600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff909216916340c10f199160448082019260009290919082900301818387803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b5050604080518681529051600093503392507f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505050565b81610ebb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77697468647261772043414b4520627920756e7374616b696e67000000000000604482015290519081900360640190fd5b600060078381548110610eca57fe5b600091825260208083208684526008825260408085203386529092529220805460049092029092019250831115610f6257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b610f6b846113a1565b6000610f99826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610fab57610fab338261201e565b8315610fe2578154610fbd9085611fa7565b82558254610fe29073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b60038301548254610ffd9164e8d4a510009161067691611eb3565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60065473ffffffffffffffffffffffffffffffffffffffff166110c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6d6967726174653a206e6f206d69677261746f72000000000000000000000000604482015290519081900360640190fd5b6000600782815481106110d357fe5b600091825260208083206004928302018054604080517f70a0823100000000000000000000000000000000000000000000000000000000815230958101959095525191955073ffffffffffffffffffffffffffffffffffffffff16939284926370a0823192602480840193829003018186803b15801561115257600080fd5b505afa158015611166573d6000803e3d6000fd5b505050506040513d602081101561117c57600080fd5b50516006549091506111a89073ffffffffffffffffffffffffffffffffffffffff848116911683612319565b600654604080517fce5494bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b1580156112bc57600080fd5b505afa1580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b5051821461135557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d6967726174653a206261640000000000000000000000000000000000000000604482015290519081900360640190fd5b83547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9190911617909255505050565b600a5481565b6000600782815481106113b057fe5b90600052602060002090600402019050806002015443116113d1575061162a565b8054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561144157600080fd5b505afa158015611455573d6000803e3d6000fd5b505050506040513d602081101561146b57600080fd5b505190508061148157504360029091015561162a565b6000611491836002015443611b10565b905060006114b860095461067686600101546108eb60045487611eb390919063ffffffff16565b60015460035491925073ffffffffffffffffffffffffffffffffffffffff908116916340c10f1991166114ec84600a611f26565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561153f57600080fd5b505af1158015611553573d6000803e3d6000fd5b5050600154600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201526024810187905290519190921693506340c10f199250604480830192600092919082900301818387803b1580156115d557600080fd5b505af11580156115e9573d6000803e3d6000fd5b5050505061161761160c8461067664e8d4a5100085611eb390919063ffffffff16565b600386015490612147565b6003850155505043600290920191909155505b50565b60006007828154811061163c57fe5b6000918252602080832085845260088252604080852033808752935290932080546004909302909301805490945061168e9273ffffffffffffffffffffffffffffffffffffffff9190911691906120b5565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b6116dd6121bb565b73ffffffffffffffffffffffffffffffffffffffff166116fb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461177d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600555565b60075460005b818110156117a157611799816113a1565b600101611788565b5050565b6117ad6121bb565b73ffffffffffffffffffffffffffffffffffffffff166117cb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461184d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b801561185b5761185b611782565b60006007848154811061186a57fe5b9060005260206000209060040201600101549050826007858154811061188c57fe5b906000526020600020906004020160010181905550828114610b93576118c7836118c183600954611fa790919063ffffffff16565b90612147565b600955610b936121bf565b6118da6121bb565b73ffffffffffffffffffffffffffffffffffffffff166118f8611af4565b73ffffffffffffffffffffffffffffffffffffffff161461197a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff163314611aad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6465763a207775743f0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600554600090611b24906108eb8486611fa7565b9392505050565b60086020908152600092835260408084209091529082529020805460019091015482565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b81611bf357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6465706f7369742043414b45206279207374616b696e67000000000000000000604482015290519081900360640190fd5b600060078381548110611c0257fe5b60009182526020808320868452600882526040808520338652909252922060049091029091019150611c33846113a1565b805415611c7c576000611c68826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015611c7a57611c7a338261201e565b505b8215611cb5578154611ca69073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054611cb29084612147565b81555b60038201548154611cd09164e8d4a510009161067691611eb3565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b611d1a6121bb565b73ffffffffffffffffffffffffffffffffffffffff16611d38611af4565b73ffffffffffffffffffffffffffffffffffffffff1614611dba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116611e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061283c6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600082611ec257506000610944565b82820282848281611ecf57fe5b0414611b24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128886021913960400191505060405180910390fd5b6000808211611f9657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f9f57fe5b049392505050565b60008282111561201857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600254604080517fa2e6ddcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529151919092169163a2e6ddcc91604480830192600092919082900301818387803b15801561209957600080fd5b505af11580156120ad573d6000803e3d6000fd5b505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526121429084906124a3565b505050565b600082820183811015611b2457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600754600060015b8281101561220a57612200600782815481106121df57fe5b9060005260206000209060040201600101548361214790919063ffffffff16565b91506001016121c7565b5080156117a15761221c816003611f26565b9050612256816118c1600760008154811061223357fe5b906000526020600020906004020160010154600954611fa790919063ffffffff16565b60098190555080600760008154811061226b57fe5b9060005260206000209060040201600101819055505050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b939085906124a3565b8015806123c55750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561239757600080fd5b505afa1580156123ab573d6000803e3d6000fd5b505050506040513d60208110156123c157600080fd5b5051155b61241a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806128a96036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526121429084905b6060612505826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661257b9092919063ffffffff16565b8051909150156121425780806020019051602081101561252457600080fd5b5051612142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612812602a913960400191505060405180910390fd5b606061258a8484600085612592565b949350505050565b6060824710156125ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806128626026913960400191505060405180910390fd5b6125f68561274d565b61266157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106126cb57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161268e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461272d576040519150601f19603f3d011682016040523d82523d6000602084013e612732565b606091505b5091509150612742828286612753565b979650505050505050565b3b151590565b60608315612762575081611b24565b8251156127725782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156127d65781810151838201526020016127be565b50505050905090810190601f1680156128035780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666542455032303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212204a998361f0f5665374d8aaeb4227a26c5a52a806a0be4997372508cb9e5e1e7c64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635ffe6146116101045780638d88a90e116100a2578063d49e77cd11610071578063d49e77cd1461050c578063dce1748414610514578063e2bbb1581461051c578063f2fde38b1461053f576101cf565b80638d88a90e1461045c5780638da5cb5b1461048f5780638dbb1e3a1461049757806393f1a40b146104ba576101cf565b8063715018a6116100de578063715018a6146104135780637cd07e471461041b57806386a952c41461044c5780638aa2855014610454576101cf565b80635ffe6146146103c3578063630b5ba1146103e057806364482f79146103e8576101cf565b806323cf311811610171578063454b06081161014b578063454b06081461036457806348cd4cb11461038157806351eb05a6146103895780635312ea8e146103a6576101cf565b806323cf3118146102f157806341441d3b14610324578063441a3e7014610341576101cf565b80631175a1dd116101ad5780631175a1dd146102155780631526fe271461024e57806317caf6f1146102a85780631eaaa045146102b0576101cf565b80630755e0b6146101d4578063081e3eda146101ee5780631058d281146101f6575b600080fd5b6101dc610572565b60408051918252519081900360200190f35b6101dc610578565b6102136004803603602081101561020c57600080fd5b503561057e565b005b6101dc6004803603604081101561022b57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166107ba565b61026b6004803603602081101561026457600080fd5b503561094a565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526020850193909352838301919091526060830152519081900360800190f35b6101dc610998565b610213600480360360608110156102c657600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135151561099e565b6102136004803603602081101561030757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b99565b6102136004803603602081101561033a57600080fd5b5035610c88565b6102136004803603604081101561035757600080fd5b5080359060200135610e4f565b6102136004803603602081101561037a57600080fd5b5035611040565b6101dc61139b565b6102136004803603602081101561039f57600080fd5b50356113a1565b610213600480360360208110156103bc57600080fd5b503561162d565b610213600480360360208110156103d957600080fd5b50356116d5565b610213611782565b610213600480360360608110156103fe57600080fd5b508035906020810135906040013515156117a5565b6102136118d2565b6104236119e9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610423611a05565b6101dc611a21565b6102136004803603602081101561047257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a27565b610423611af4565b6101dc600480360360408110156104ad57600080fd5b5080359060200135611b10565b6104f3600480360360408110156104d057600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16611b2b565b6040805192835260208301919091528051918290030190f35b610423611b4f565b610423611b6b565b6102136004803603604081101561053257600080fd5b5080359060200135611b87565b6102136004803603602081101561055557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d12565b60045481565b60075490565b6000600760008154811061058e57fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7909152604090922080546004909202909201925083111561063e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b61064860006113a1565b6000610682826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90611f26565b90611fa7565b9050801561069457610694338261201e565b83156106cb5781546106a69085611fa7565b825582546106cb9073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b600383015482546106e69164e8d4a510009161067691611eb3565b6001830155600254604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101879052905173ffffffffffffffffffffffffffffffffffffffff90921691639dc29fac9160448082019260009290919082900301818387803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b5050604080518781529051600093503392507ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350505050565b600080600784815481106107ca57fe5b6000918252602080832087845260088252604080852073ffffffffffffffffffffffffffffffffffffffff898116875290845281862060049586029093016003810154815484517f70a082310000000000000000000000000000000000000000000000000000000081523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b50516002850154909150431180156108af57508015155b156109155760006108c4856002015443611b10565b905060006108f160095461067688600101546108eb60045487611eb390919063ffffffff16565b90611eb3565b9050610910610909846106768464e8d4a51000611eb3565b8590612147565b935050505b61093d836001015461067c64e8d4a51000610676868860000154611eb390919063ffffffff16565b9450505050505b92915050565b6007818154811061095757fe5b6000918252602090912060049091020180546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff9092169350919084565b60095481565b6109a66121bb565b73ffffffffffffffffffffffffffffffffffffffff166109c4611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610a4657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8015610a5457610a54611782565b6000600a544311610a6757600a54610a69565b435b600954909150610a799085612147565b6009556040805160808101825273ffffffffffffffffffffffffffffffffffffffff85811682526020820187815292820184815260006060840181815260078054600181018255925293517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490920291820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919094161790925592517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b90910155610b936121bf565b50505050565b610ba16121bb565b73ffffffffffffffffffffffffffffffffffffffff16610bbf611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610c4157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006007600081548110610c9857fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c790915260408320600490920201925090610cdf906113a1565b805415610d28576000610d14826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610d2657610d26338261201e565b505b8215610d61578154610d529073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054610d5e9084612147565b81555b60038201548154610d7c9164e8d4a510009161067691611eb3565b6001820155600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff909216916340c10f199160448082019260009290919082900301818387803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b5050604080518681529051600093503392507f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505050565b81610ebb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77697468647261772043414b4520627920756e7374616b696e67000000000000604482015290519081900360640190fd5b600060078381548110610eca57fe5b600091825260208083208684526008825260408085203386529092529220805460049092029092019250831115610f6257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b610f6b846113a1565b6000610f99826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610fab57610fab338261201e565b8315610fe2578154610fbd9085611fa7565b82558254610fe29073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b60038301548254610ffd9164e8d4a510009161067691611eb3565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60065473ffffffffffffffffffffffffffffffffffffffff166110c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6d6967726174653a206e6f206d69677261746f72000000000000000000000000604482015290519081900360640190fd5b6000600782815481106110d357fe5b600091825260208083206004928302018054604080517f70a0823100000000000000000000000000000000000000000000000000000000815230958101959095525191955073ffffffffffffffffffffffffffffffffffffffff16939284926370a0823192602480840193829003018186803b15801561115257600080fd5b505afa158015611166573d6000803e3d6000fd5b505050506040513d602081101561117c57600080fd5b50516006549091506111a89073ffffffffffffffffffffffffffffffffffffffff848116911683612319565b600654604080517fce5494bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b1580156112bc57600080fd5b505afa1580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b5051821461135557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d6967726174653a206261640000000000000000000000000000000000000000604482015290519081900360640190fd5b83547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9190911617909255505050565b600a5481565b6000600782815481106113b057fe5b90600052602060002090600402019050806002015443116113d1575061162a565b8054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561144157600080fd5b505afa158015611455573d6000803e3d6000fd5b505050506040513d602081101561146b57600080fd5b505190508061148157504360029091015561162a565b6000611491836002015443611b10565b905060006114b860095461067686600101546108eb60045487611eb390919063ffffffff16565b60015460035491925073ffffffffffffffffffffffffffffffffffffffff908116916340c10f1991166114ec84600a611f26565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561153f57600080fd5b505af1158015611553573d6000803e3d6000fd5b5050600154600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201526024810187905290519190921693506340c10f199250604480830192600092919082900301818387803b1580156115d557600080fd5b505af11580156115e9573d6000803e3d6000fd5b5050505061161761160c8461067664e8d4a5100085611eb390919063ffffffff16565b600386015490612147565b6003850155505043600290920191909155505b50565b60006007828154811061163c57fe5b6000918252602080832085845260088252604080852033808752935290932080546004909302909301805490945061168e9273ffffffffffffffffffffffffffffffffffffffff9190911691906120b5565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b6116dd6121bb565b73ffffffffffffffffffffffffffffffffffffffff166116fb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461177d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600555565b60075460005b818110156117a157611799816113a1565b600101611788565b5050565b6117ad6121bb565b73ffffffffffffffffffffffffffffffffffffffff166117cb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461184d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b801561185b5761185b611782565b60006007848154811061186a57fe5b9060005260206000209060040201600101549050826007858154811061188c57fe5b906000526020600020906004020160010181905550828114610b93576118c7836118c183600954611fa790919063ffffffff16565b90612147565b600955610b936121bf565b6118da6121bb565b73ffffffffffffffffffffffffffffffffffffffff166118f8611af4565b73ffffffffffffffffffffffffffffffffffffffff161461197a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff163314611aad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6465763a207775743f0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600554600090611b24906108eb8486611fa7565b9392505050565b60086020908152600092835260408084209091529082529020805460019091015482565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b81611bf357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6465706f7369742043414b45206279207374616b696e67000000000000000000604482015290519081900360640190fd5b600060078381548110611c0257fe5b60009182526020808320868452600882526040808520338652909252922060049091029091019150611c33846113a1565b805415611c7c576000611c68826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015611c7a57611c7a338261201e565b505b8215611cb5578154611ca69073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054611cb29084612147565b81555b60038201548154611cd09164e8d4a510009161067691611eb3565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b611d1a6121bb565b73ffffffffffffffffffffffffffffffffffffffff16611d38611af4565b73ffffffffffffffffffffffffffffffffffffffff1614611dba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116611e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061283c6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600082611ec257506000610944565b82820282848281611ecf57fe5b0414611b24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128886021913960400191505060405180910390fd5b6000808211611f9657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f9f57fe5b049392505050565b60008282111561201857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600254604080517fa2e6ddcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529151919092169163a2e6ddcc91604480830192600092919082900301818387803b15801561209957600080fd5b505af11580156120ad573d6000803e3d6000fd5b505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526121429084906124a3565b505050565b600082820183811015611b2457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600754600060015b8281101561220a57612200600782815481106121df57fe5b9060005260206000209060040201600101548361214790919063ffffffff16565b91506001016121c7565b5080156117a15761221c816003611f26565b9050612256816118c1600760008154811061223357fe5b906000526020600020906004020160010154600954611fa790919063ffffffff16565b60098190555080600760008154811061226b57fe5b9060005260206000209060040201600101819055505050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b939085906124a3565b8015806123c55750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561239757600080fd5b505afa1580156123ab573d6000803e3d6000fd5b505050506040513d60208110156123c157600080fd5b5051155b61241a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806128a96036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526121429084905b6060612505826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661257b9092919063ffffffff16565b8051909150156121425780806020019051602081101561252457600080fd5b5051612142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612812602a913960400191505060405180910390fd5b606061258a8484600085612592565b949350505050565b6060824710156125ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806128626026913960400191505060405180910390fd5b6125f68561274d565b61266157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106126cb57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161268e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461272d576040519150601f19603f3d011682016040523d82523d6000602084013e612732565b606091505b5091509150612742828286612753565b979650505050505050565b3b151590565b60608315612762575081611b24565b8251156127725782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156127d65781810151838201526020016127be565b50505050905090810190601f1680156128035780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666542455032303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212204a998361f0f5665374d8aaeb4227a26c5a52a806a0be4997372508cb9e5e1e7c64736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/MasterChefV2.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/MasterChefV2.json new file mode 100644 index 00000000..8e63e6b4 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/MasterChefV2.json @@ -0,0 +1,1051 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MasterChefV2", + "sourceName": "contracts/MasterChefV2.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IMasterChef", + "name": "_MASTER_CHEF", + "type": "address" + }, + { + "internalType": "contract IBEP20", + "name": "_CAKE", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_MASTER_PID", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_burnAdmin", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IBEP20", + "name": "lpToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "name": "AddPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Init", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + } + ], + "name": "SetPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "boostContract", + "type": "address" + } + ], + "name": "UpdateBoostContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMultiplier", + "type": "uint256" + } + ], + "name": "UpdateBoostMultiplier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "UpdateBurnAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "burnRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "regularFarmRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "specialFarmRate", + "type": "uint256" + } + ], + "name": "UpdateCakeRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lpSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + } + ], + "name": "UpdatePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isValid", + "type": "bool" + } + ], + "name": "UpdateWhiteList", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "ACC_CAKE_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CAKE", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CAKE_RATE_TOTAL_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTERCHEF_CAKE_PER_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER_CHEF", + "outputs": [ + { + "internalType": "contract IMasterChef", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER_PID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_lpToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isRegular", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "add", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "boostContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "burnAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "burnCake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_isRegular", + "type": "bool" + } + ], + "name": "cakePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePerBlockToBurn", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToBurn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToRegularFarm", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToSpecialFarm", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "getBoostMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvestFromMasterChef", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBEP20", + "name": "dummyToken", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastBurnedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "lpToken", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingCake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "pools", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalRegularAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSpecialAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newBoostContract", + "type": "address" + } + ], + "name": "updateBoostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newMultiplier", + "type": "uint256" + } + ], + "name": "updateBoostMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newAdmin", + "type": "address" + } + ], + "name": "updateBurnAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_burnRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_regularFarmRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_specialFarmRate", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "updateCakeRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "internalType": "struct MasterChefV2.PoolInfo", + "name": "pool", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isValid", + "type": "bool" + } + ], + "name": "updateWhiteList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "boostMultiplier", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whiteList", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60e060405264ae9f7bcc00600a5564174876e800600b556422ecb25c00600c553480156200002c57600080fd5b5060405162003e6538038062003e658339810160408190526200004f91620000f3565b60006200005b620000ef565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055606093841b6001600160601b03199081166080529290931b90911660a05260c052600280546001600160a01b0319166001600160a01b0390921691909117905562000167565b3390565b6000806000806080858703121562000109578384fd5b845162000116816200014e565b602086015190945062000129816200014e565b60408601516060870151919450925062000143816200014e565b939692955090935050565b6001600160a01b03811681146200016457600080fd5b50565b60805160601c60a05160601c60c051613c9e620001c760003980610f7c528061133552806116925250806112a95280611f7e5280612c0a5280612cdd5280612d8a525080610e955280610f4f5280611308528061278d5250613c9e6000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c80637398b7ea11610191578063ac1d0609116100e3578063dfcedeee11610097578063e39e132311610071578063e39e13231461052b578063edd8b17014610569578063f2fde38b14610571576102e9565b8063dfcedeee14610546578063e0f91f6c1461054e578063e2bbb15814610556576102e9565b8063c507aeaa116100c8578063c507aeaa14610518578063cc6db2da1461052b578063dc6363df14610533576102e9565b8063ac1d0609146104fd578063c40d337b14610510576102e9565b80638da5cb5b116101455780639dcc1b5f1161011f5780639dcc1b5f146104da5780639dd2fcc3146104e2578063aa47bc8e146104f5576102e9565b80638da5cb5b146104a857806393f1a40b146104b057806399d7e84a146104d2576102e9565b806378db4c341161017657806378db4c341461048557806378ed5d1f1461048d57806381bdf98c146104a0576102e9565b80637398b7ea1461046a578063777a97f814610472576102e9565b806339aae5ba1161024a5780635312ea8e116101fe57806364482f79116101d857806364482f791461044757806369b021281461045a578063715018a614610462576102e9565b80635312ea8e1461042457806361621aaa14610437578063630b5ba11461043f576102e9565b80634ca6ef281161022f5780634ca6ef28146103e75780634f70b15a146103fc57806351eb05a614610404576102e9565b806339aae5ba146103cc578063441a3e70146103d4576102e9565b80631526fe27116102a15780631ce06d57116102865780631ce06d57146103915780631e9b828b14610399578063372c12b1146103ac576102e9565b80631526fe271461035a57806319ab453c1461037e576102e9565b8063081e3eda116102d2578063081e3eda1461032c5780630bb844bc146103345780631175a1dd14610347576102e9565b8063033186e8146102ee578063041a84c914610317575b600080fd5b6103016102fc366004613081565b610584565b60405161030e9190613ba7565b60405180910390f35b61032a6103253660046130ac565b6105da565b005b610301610952565b61032a61034236600461302d565b610958565b610301610355366004613148565b610ae4565b61036d610368366004613118565b610c97565b60405161030e959493929190613be4565b61032a61038c36600461302d565b610cd8565b610301611009565b6103016103a73660046130e0565b61100f565b6103bf6103ba36600461302d565b611074565b60405161030e91906132e0565b610301611089565b61032a6103e23660046131be565b611096565b6103ef6112a7565b60405161030e9190613268565b61032a6112cb565b610417610412366004613118565b611394565b60405161030e9190613b6b565b61032a610432366004613118565b611562565b610301611690565b61032a6116b4565b61032a6104553660046131df565b611748565b6103016118d6565b61032a6118e0565b6103016119c2565b61032a6104803660046130e0565b6119ce565b610301611aab565b6103ef61049b366004613118565b611ab1565b6103ef611ae5565b6103ef611b01565b6104c36104be366004613148565b611b1d565b60405161030e93929190613bce565b610301611b49565b610301611b4f565b61032a6104f036600461302d565b611b7d565b610301611cd5565b61032a61050b366004613049565b611cdb565b610301611e26565b61032a61052636600461316c565b611e2c565b61030161221c565b61032a610541366004613217565b612225565b6103ef61239e565b6103016123ba565b61032a6105643660046131be565b6123c0565b6103ef61278b565b61032a61057f36600461302d565b6127af565b600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281206002015464e8d4a5100081116105ce5764e8d4a510006105d0565b805b9150505b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff163314610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061384c565b60405180910390fd5b60026001541415610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015573ffffffffffffffffffffffffffffffffffffffff83166106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906135b2565b600482815481106106d057fe5b600091825260209091206004600590920201015460ff1661071d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613906565b64e8d4a51000811015801561073857506501d1a94a20008111155b61076e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613399565b610776612fdb565b61077f83611394565b600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8916845290915281209192506107bb8686610584565b90506107c88686836128fc565b610808670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8a89600001546129d990919063ffffffff16565b90612a2d565b906129d9565b60018301558154610854906108289064e8d4a51000906107fc90886129d9565b835461084e906108439064e8d4a51000906107fc90876129d9565b606087015190612a79565b90612abb565b6060840152600480548491908790811061086a57fe5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608601516003850155608090950151600490930180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016931515939093179092558883526006815281832073ffffffffffffffffffffffffffffffffffffffff8b1680855291529181902090920186905590517f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba9061093e90889085908990613bce565b60405180910390a250506001805550505050565b60045490565b610960612afa565b73ffffffffffffffffffffffffffffffffffffffff1661097e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8116610a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061360f565b60025473ffffffffffffffffffffffffffffffffffffffff82811691161415610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a8b565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b6000610aee612fdb565b60048481548110610afb57fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301939093526002830154908201526003820154606082015260049091015460ff16151560808201529050610b5561300c565b50600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845282529182902082516060808201855282548252600183015482850152600290920154938101939093528351908401519184015190919043118015610bc357508015155b15610c43576000610be1856020015143612a7990919063ffffffff16565b90506000610c1c8660800151610bf957600954610bfd565b6008545b6107fc8860400151610802610c158b6080015161100f565b87906129d9565b9050610c3e610c37846107fc84670de0b6b3a76400006129d9565b8590612abb565b935050505b6000610c6364e8d4a510006107fc610c5b8a8c610584565b8751906129d9565b6020850151909150610c8b90610c85670de0b6b3a76400006107fc85886129d9565b90612a79565b98975050505050505050565b60048181548110610ca457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610ce0612afa565b73ffffffffffffffffffffffffffffffffffffffff16610cfe611b01565b73ffffffffffffffffffffffffffffffffffffffff1614610d4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610da0903390600401613268565b60206040518083038186803b158015610db857600080fd5b505afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df09190613130565b905080610e29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061333c565b610e4b73ffffffffffffffffffffffffffffffffffffffff8316333084612afe565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610ebf907f00000000000000000000000000000000000000000000000000000000000000009085906004016132ba565b602060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1191906130fc565b506040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890610fa6907f0000000000000000000000000000000000000000000000000000000000000000908590600401613bc0565b600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b505043600d5550506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a15050565b600c5481565b600081156110455761103e64e8d4a510006107fc600b5468022b1c8c1227a000006129d990919063ffffffff16565b905061106f565b61106c64e8d4a510006107fc600c5468022b1c8c1227a000006129d990919063ffffffff16565b90505b919050565b60076020526000908152604090205460ff1681565b68022b1c8c1227a0000081565b600260015414156110d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001556110e0612fdb565b6110e983611394565b60008481526006602090815260408083203384529091529020805491925090831115611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137a9565b600061114d3386610584565b905061115a3386836128fc565b83156111af57815461116c9085612a79565b82600001819055506111af33856005888154811061118657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169190612ba1565b6111e3670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b600183015561122b6111fe64e8d4a510006107fc87856129d9565b6004878154811061120b57fe5b906000526020600020906005020160030154612a7990919063ffffffff16565b6004868154811061123857fe5b906000526020600020906005020160030181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516112949190613ba7565b60405180910390a3505060018055505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890611360907f000000000000000000000000000000000000000000000000000000000000000090600090600401613bc0565b600060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b50505050565b61139c612fdb565b600482815481106113a957fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561106f576060810151608082015160009061141b5760095461141f565b6008545b90506000821180156114315750600081115b1561149757600061144f846020015143612a7990919063ffffffff16565b9050600061146f836107fc8760400151610802610c158a6080015161100f565b905061149261148a856107fc84670de0b6b3a76400006129d9565b865190612abb565b855250505b43602084015260048054849190869081106114ae57fe5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608401516003830155608090930151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558401518451915186927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926115539290918791613bce565b60405180910390a25050919050565b6002600154141561159f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001819055506000600482815481106115b657fe5b60009182526020808320858452600682526040808520338087529352842080548582556001820186905560059094029091019450929061160c9064e8d4a51000906107fc906116059089610584565b85906129d9565b90508084600301541161162057600061162f565b600384015461162f9082612a79565b846003018190555061164933836005888154811061118657fe5b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595846040516112949190613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045460005b81811015611744576116ca612fdb565b600482815481106116d757fe5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff161515608082015291501561173b5761173982611394565b505b506001016116ba565b5050565b611750612afa565b73ffffffffffffffffffffffffffffffffffffffff1661176e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146117bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6117c483611394565b5080156117d3576117d36116b4565b600483815481106117e057fe5b600091825260209091206004600590920201015460ff161561183b576118338261084e6004868154811061181057fe5b906000526020600020906005020160020154600854612a7990919063ffffffff16565b600855611876565b6118728261084e6004868154811061184f57fe5b906000526020600020906005020160020154600954612a7990919063ffffffff16565b6009555b816004848154811061188457fe5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516118c99190613ba7565b60405180910390a2505050565b6501d1a94a200081565b6118e8612afa565b73ffffffffffffffffffffffffffffffffffffffff16611906611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b670de0b6b3a764000081565b6119d6612afa565b73ffffffffffffffffffffffffffffffffffffffff166119f4611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b8015611a4f57611a4f6116b4565b6000611a66600d5443612a7990919063ffffffff16565b90506000611a7c611a75611b4f565b83906129d9565b600254909150611aa29073ffffffffffffffffffffffffffffffffffffffff1682612bc5565b505043600d5550565b600d5481565b60058181548110611abe57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60095481565b6000611b7864e8d4a510006107fc600a5468022b1c8c1227a000006129d990919063ffffffff16565b905090565b611b85612afa565b73ffffffffffffffffffffffffffffffffffffffff16611ba3611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811615801590611c30575060035473ffffffffffffffffffffffffffffffffffffffff828116911614155b611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613b0e565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b600b5481565b611ce3612afa565b73ffffffffffffffffffffffffffffffffffffffff16611d01611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8216611d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613963565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600760205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055517fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d5190611e1a9084906132e0565b60405180910390a25050565b60085481565b611e34612afa565b73ffffffffffffffffffffffffffffffffffffffff16611e52611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611e9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190611ef4903090600401613268565b60206040518083038186803b158015611f0c57600080fd5b505afa158015611f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f449190613130565b1015611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906138a9565b8015612010576120106116b4565b811561202b576008546120239085612abb565b60085561203c565b6009546120389085612abb565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905591546121dd91612a79565b7f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa868560405161220e929190613bb0565b60405180910390a350505050565b64e8d4a5100081565b61222d612afa565b73ffffffffffffffffffffffffffffffffffffffff1661224b611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000841180156122a85750600083115b80156122b45750600082115b6122ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061366c565b64e8d4a510006122fe8361084e8787612abb565b14612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139f7565b8015612343576123436116b4565b61234d60006119ce565b600a849055600b839055600c8290556040517fae2d2e7d1ae84564fc72227253ce0f36a007209f7fd5ec414dea80e5af2fb5b09061239090869086908690613bce565b60405180910390a150505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600260015414156123fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015561240a612fdb565b61241383611394565b600084815260066020908152604080832033845290915290206080820151919250908061244f57503360009081526007602052604090205460ff165b612485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906136c9565b60006124913386610584565b8254909150156124a6576124a63386836128fc565b83156126a2576000600586815481106124bb57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a082319061251a903090600401613268565b60206040518083038186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256a9190613130565b90506125a933308760058a8154811061257f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16929190612afe565b61266981600588815481106125ba57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190612619903090600401613268565b60206040518083038186803b15801561263157600080fd5b505afa158015612645573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c859190613130565b83549095506126789086612abb565b835561269b61269064e8d4a510006107fc88866129d9565b606086015190612abb565b6060850152505b6126d6670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b826001018190555082600486815481106126ec57fe5b6000918252602091829020835160059290920201908155908201516001820155604080830151600283015560608301516003830155608090920151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905551859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611294908890613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b6127b7612afa565b73ffffffffffffffffffffffffffffffffffffffff166127d5611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811661286f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613453565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61290461300c565b50600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906129719064e8d4a51000906107fc90866129d9565b905060006129a9670de0b6b3a76400006107fc6004888154811061299157fe5b600091825260209091206005909102015485906129d9565b905060006129c4846020015183612a7990919063ffffffff16565b90506129d08782612bc5565b50505050505050565b6000826129e8575060006105d4565b828202828482816129f557fe5b04146105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061374c565b6000808211612a68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061357b565b818381612a7157fe5b049392505050565b600082821115612ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134e7565b50900390565b6000828201838110156105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134b0565b3390565b61138e846323b872dd60e01b858585604051602401612b1f93929190613289565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612db1565b612bc08363a9059cbb60e01b8484604051602401612b1f9291906132ba565b505050565b8015611744576040517f70a08231000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612c3f903090600401613268565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190613130565b1015612c9d57612c9d6112cb565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612d12903090600401613268565b60206040518083038186803b158015612d2a57600080fd5b505afa158015612d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d629190613130565b905081811015612d70578091505b612bc073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168484612ba1565b6060612e13826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e679092919063ffffffff16565b805190915015612bc05780806020019051810190612e3191906130fc565b612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906133f6565b6060612e768484600085612e80565b90505b9392505050565b606082471015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061351e565b612ec585612f82565b612efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139c0565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612f25919061324c565b60006040518083038185875af1925050503d8060008114612f62576040519150601f19603f3d011682016040523d82523d6000602084013e612f67565b606091505b5091509150612f77828286612f88565b979650505050505050565b3b151590565b60608315612f97575081612e79565b825115612fa75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b91906132eb565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60405180606001604052806000815260200160008152602001600081525090565b60006020828403121561303e578081fd5b81356105ce81613c35565b6000806040838503121561305b578081fd5b823561306681613c35565b9150602083013561307681613c5a565b809150509250929050565b60008060408385031215613093578182fd5b823561309e81613c35565b946020939093013593505050565b6000806000606084860312156130c0578081fd5b83356130cb81613c35565b95602085013595506040909401359392505050565b6000602082840312156130f1578081fd5b81356105ce81613c5a565b60006020828403121561310d578081fd5b81516105ce81613c5a565b600060208284031215613129578081fd5b5035919050565b600060208284031215613141578081fd5b5051919050565b6000806040838503121561315a578182fd5b82359150602083013561307681613c35565b60008060008060808587031215613181578081fd5b84359350602085013561319381613c35565b925060408501356131a381613c5a565b915060608501356131b381613c5a565b939692955090935050565b600080604083850312156131d0578182fd5b50508035926020909101359150565b6000806000606084860312156131f3578283fd5b8335925060208401359150604084013561320c81613c5a565b809150509250925092565b6000806000806080858703121561322c578384fd5b84359350602085013592506040850135915060608501356131b381613c5a565b6000825161325e818460208701613c09565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261330a816040850160208701613c09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526023908201527f4d61737465724368656656323a2042616c616e6365206d75737420657863656560408201527f6420300000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060408201527f6d756c7469706c69657200000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4d61737465724368656656323a2054686520757365722061646472657373206d60408201527f7573742062652076616c69640000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206d7573742062652076616c6964000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a2043616b652072617465206d7573742062652060408201527f67726561746572207468616e2030000000000000000000000000000000000000606082015260800190565b60208082526042908201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460408201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f60608201527f6f6c000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f77697468647261773a20496e73756666696369656e7400000000000000000000604082015260600190565b60208082526011908201527f4e6f6e6520424550323020746f6b656e73000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f737460408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f43414b4520746f6b656e2063616e277420626520616464656420746f2066617260408201527f6d20706f6f6c7300000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060408201527f636f756c6420626520626f6f7374656400000000000000000000000000000000606082015260800190565b60208082526032908201527f4d61737465724368656656323a20546865207768697465206c6973742061646460408201527f72657373206d7573742062652076616c69640000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526025908201527f4d61737465724368656656323a20546f74616c2072617465206d75737420626560408201527f2031653132000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526041908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206973207468652073616d6520776974682063757272656e742061646472657360608201527f7300000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f4d61737465724368656656323a204e657720626f6f737420636f6e747261637460408201527f2061646472657373206d7573742062652076616c696400000000000000000000606082015260800190565b600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b83811015613c24578181015183820152602001613c0c565b8381111561138e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114613c5757600080fd5b50565b8015158114613c5757600080fdfea2646970667358221220f3bdc87a312c1f6922cc6efd7e791ccbfcc6b4d3913517316c9bb61280affda264736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102e95760003560e01c80637398b7ea11610191578063ac1d0609116100e3578063dfcedeee11610097578063e39e132311610071578063e39e13231461052b578063edd8b17014610569578063f2fde38b14610571576102e9565b8063dfcedeee14610546578063e0f91f6c1461054e578063e2bbb15814610556576102e9565b8063c507aeaa116100c8578063c507aeaa14610518578063cc6db2da1461052b578063dc6363df14610533576102e9565b8063ac1d0609146104fd578063c40d337b14610510576102e9565b80638da5cb5b116101455780639dcc1b5f1161011f5780639dcc1b5f146104da5780639dd2fcc3146104e2578063aa47bc8e146104f5576102e9565b80638da5cb5b146104a857806393f1a40b146104b057806399d7e84a146104d2576102e9565b806378db4c341161017657806378db4c341461048557806378ed5d1f1461048d57806381bdf98c146104a0576102e9565b80637398b7ea1461046a578063777a97f814610472576102e9565b806339aae5ba1161024a5780635312ea8e116101fe57806364482f79116101d857806364482f791461044757806369b021281461045a578063715018a614610462576102e9565b80635312ea8e1461042457806361621aaa14610437578063630b5ba11461043f576102e9565b80634ca6ef281161022f5780634ca6ef28146103e75780634f70b15a146103fc57806351eb05a614610404576102e9565b806339aae5ba146103cc578063441a3e70146103d4576102e9565b80631526fe27116102a15780631ce06d57116102865780631ce06d57146103915780631e9b828b14610399578063372c12b1146103ac576102e9565b80631526fe271461035a57806319ab453c1461037e576102e9565b8063081e3eda116102d2578063081e3eda1461032c5780630bb844bc146103345780631175a1dd14610347576102e9565b8063033186e8146102ee578063041a84c914610317575b600080fd5b6103016102fc366004613081565b610584565b60405161030e9190613ba7565b60405180910390f35b61032a6103253660046130ac565b6105da565b005b610301610952565b61032a61034236600461302d565b610958565b610301610355366004613148565b610ae4565b61036d610368366004613118565b610c97565b60405161030e959493929190613be4565b61032a61038c36600461302d565b610cd8565b610301611009565b6103016103a73660046130e0565b61100f565b6103bf6103ba36600461302d565b611074565b60405161030e91906132e0565b610301611089565b61032a6103e23660046131be565b611096565b6103ef6112a7565b60405161030e9190613268565b61032a6112cb565b610417610412366004613118565b611394565b60405161030e9190613b6b565b61032a610432366004613118565b611562565b610301611690565b61032a6116b4565b61032a6104553660046131df565b611748565b6103016118d6565b61032a6118e0565b6103016119c2565b61032a6104803660046130e0565b6119ce565b610301611aab565b6103ef61049b366004613118565b611ab1565b6103ef611ae5565b6103ef611b01565b6104c36104be366004613148565b611b1d565b60405161030e93929190613bce565b610301611b49565b610301611b4f565b61032a6104f036600461302d565b611b7d565b610301611cd5565b61032a61050b366004613049565b611cdb565b610301611e26565b61032a61052636600461316c565b611e2c565b61030161221c565b61032a610541366004613217565b612225565b6103ef61239e565b6103016123ba565b61032a6105643660046131be565b6123c0565b6103ef61278b565b61032a61057f36600461302d565b6127af565b600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281206002015464e8d4a5100081116105ce5764e8d4a510006105d0565b805b9150505b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff163314610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061384c565b60405180910390fd5b60026001541415610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015573ffffffffffffffffffffffffffffffffffffffff83166106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906135b2565b600482815481106106d057fe5b600091825260209091206004600590920201015460ff1661071d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613906565b64e8d4a51000811015801561073857506501d1a94a20008111155b61076e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613399565b610776612fdb565b61077f83611394565b600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8916845290915281209192506107bb8686610584565b90506107c88686836128fc565b610808670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8a89600001546129d990919063ffffffff16565b90612a2d565b906129d9565b60018301558154610854906108289064e8d4a51000906107fc90886129d9565b835461084e906108439064e8d4a51000906107fc90876129d9565b606087015190612a79565b90612abb565b6060840152600480548491908790811061086a57fe5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608601516003850155608090950151600490930180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016931515939093179092558883526006815281832073ffffffffffffffffffffffffffffffffffffffff8b1680855291529181902090920186905590517f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba9061093e90889085908990613bce565b60405180910390a250506001805550505050565b60045490565b610960612afa565b73ffffffffffffffffffffffffffffffffffffffff1661097e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8116610a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061360f565b60025473ffffffffffffffffffffffffffffffffffffffff82811691161415610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a8b565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b6000610aee612fdb565b60048481548110610afb57fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301939093526002830154908201526003820154606082015260049091015460ff16151560808201529050610b5561300c565b50600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845282529182902082516060808201855282548252600183015482850152600290920154938101939093528351908401519184015190919043118015610bc357508015155b15610c43576000610be1856020015143612a7990919063ffffffff16565b90506000610c1c8660800151610bf957600954610bfd565b6008545b6107fc8860400151610802610c158b6080015161100f565b87906129d9565b9050610c3e610c37846107fc84670de0b6b3a76400006129d9565b8590612abb565b935050505b6000610c6364e8d4a510006107fc610c5b8a8c610584565b8751906129d9565b6020850151909150610c8b90610c85670de0b6b3a76400006107fc85886129d9565b90612a79565b98975050505050505050565b60048181548110610ca457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610ce0612afa565b73ffffffffffffffffffffffffffffffffffffffff16610cfe611b01565b73ffffffffffffffffffffffffffffffffffffffff1614610d4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610da0903390600401613268565b60206040518083038186803b158015610db857600080fd5b505afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df09190613130565b905080610e29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061333c565b610e4b73ffffffffffffffffffffffffffffffffffffffff8316333084612afe565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610ebf907f00000000000000000000000000000000000000000000000000000000000000009085906004016132ba565b602060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1191906130fc565b506040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890610fa6907f0000000000000000000000000000000000000000000000000000000000000000908590600401613bc0565b600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b505043600d5550506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a15050565b600c5481565b600081156110455761103e64e8d4a510006107fc600b5468022b1c8c1227a000006129d990919063ffffffff16565b905061106f565b61106c64e8d4a510006107fc600c5468022b1c8c1227a000006129d990919063ffffffff16565b90505b919050565b60076020526000908152604090205460ff1681565b68022b1c8c1227a0000081565b600260015414156110d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001556110e0612fdb565b6110e983611394565b60008481526006602090815260408083203384529091529020805491925090831115611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137a9565b600061114d3386610584565b905061115a3386836128fc565b83156111af57815461116c9085612a79565b82600001819055506111af33856005888154811061118657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169190612ba1565b6111e3670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b600183015561122b6111fe64e8d4a510006107fc87856129d9565b6004878154811061120b57fe5b906000526020600020906005020160030154612a7990919063ffffffff16565b6004868154811061123857fe5b906000526020600020906005020160030181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516112949190613ba7565b60405180910390a3505060018055505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890611360907f000000000000000000000000000000000000000000000000000000000000000090600090600401613bc0565b600060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b50505050565b61139c612fdb565b600482815481106113a957fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561106f576060810151608082015160009061141b5760095461141f565b6008545b90506000821180156114315750600081115b1561149757600061144f846020015143612a7990919063ffffffff16565b9050600061146f836107fc8760400151610802610c158a6080015161100f565b905061149261148a856107fc84670de0b6b3a76400006129d9565b865190612abb565b855250505b43602084015260048054849190869081106114ae57fe5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608401516003830155608090930151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558401518451915186927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926115539290918791613bce565b60405180910390a25050919050565b6002600154141561159f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001819055506000600482815481106115b657fe5b60009182526020808320858452600682526040808520338087529352842080548582556001820186905560059094029091019450929061160c9064e8d4a51000906107fc906116059089610584565b85906129d9565b90508084600301541161162057600061162f565b600384015461162f9082612a79565b846003018190555061164933836005888154811061118657fe5b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595846040516112949190613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045460005b81811015611744576116ca612fdb565b600482815481106116d757fe5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff161515608082015291501561173b5761173982611394565b505b506001016116ba565b5050565b611750612afa565b73ffffffffffffffffffffffffffffffffffffffff1661176e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146117bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6117c483611394565b5080156117d3576117d36116b4565b600483815481106117e057fe5b600091825260209091206004600590920201015460ff161561183b576118338261084e6004868154811061181057fe5b906000526020600020906005020160020154600854612a7990919063ffffffff16565b600855611876565b6118728261084e6004868154811061184f57fe5b906000526020600020906005020160020154600954612a7990919063ffffffff16565b6009555b816004848154811061188457fe5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516118c99190613ba7565b60405180910390a2505050565b6501d1a94a200081565b6118e8612afa565b73ffffffffffffffffffffffffffffffffffffffff16611906611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b670de0b6b3a764000081565b6119d6612afa565b73ffffffffffffffffffffffffffffffffffffffff166119f4611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b8015611a4f57611a4f6116b4565b6000611a66600d5443612a7990919063ffffffff16565b90506000611a7c611a75611b4f565b83906129d9565b600254909150611aa29073ffffffffffffffffffffffffffffffffffffffff1682612bc5565b505043600d5550565b600d5481565b60058181548110611abe57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60095481565b6000611b7864e8d4a510006107fc600a5468022b1c8c1227a000006129d990919063ffffffff16565b905090565b611b85612afa565b73ffffffffffffffffffffffffffffffffffffffff16611ba3611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811615801590611c30575060035473ffffffffffffffffffffffffffffffffffffffff828116911614155b611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613b0e565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b600b5481565b611ce3612afa565b73ffffffffffffffffffffffffffffffffffffffff16611d01611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8216611d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613963565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600760205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055517fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d5190611e1a9084906132e0565b60405180910390a25050565b60085481565b611e34612afa565b73ffffffffffffffffffffffffffffffffffffffff16611e52611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611e9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190611ef4903090600401613268565b60206040518083038186803b158015611f0c57600080fd5b505afa158015611f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f449190613130565b1015611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906138a9565b8015612010576120106116b4565b811561202b576008546120239085612abb565b60085561203c565b6009546120389085612abb565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905591546121dd91612a79565b7f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa868560405161220e929190613bb0565b60405180910390a350505050565b64e8d4a5100081565b61222d612afa565b73ffffffffffffffffffffffffffffffffffffffff1661224b611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000841180156122a85750600083115b80156122b45750600082115b6122ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061366c565b64e8d4a510006122fe8361084e8787612abb565b14612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139f7565b8015612343576123436116b4565b61234d60006119ce565b600a849055600b839055600c8290556040517fae2d2e7d1ae84564fc72227253ce0f36a007209f7fd5ec414dea80e5af2fb5b09061239090869086908690613bce565b60405180910390a150505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600260015414156123fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015561240a612fdb565b61241383611394565b600084815260066020908152604080832033845290915290206080820151919250908061244f57503360009081526007602052604090205460ff165b612485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906136c9565b60006124913386610584565b8254909150156124a6576124a63386836128fc565b83156126a2576000600586815481106124bb57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a082319061251a903090600401613268565b60206040518083038186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256a9190613130565b90506125a933308760058a8154811061257f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16929190612afe565b61266981600588815481106125ba57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190612619903090600401613268565b60206040518083038186803b15801561263157600080fd5b505afa158015612645573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c859190613130565b83549095506126789086612abb565b835561269b61269064e8d4a510006107fc88866129d9565b606086015190612abb565b6060850152505b6126d6670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b826001018190555082600486815481106126ec57fe5b6000918252602091829020835160059290920201908155908201516001820155604080830151600283015560608301516003830155608090920151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905551859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611294908890613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b6127b7612afa565b73ffffffffffffffffffffffffffffffffffffffff166127d5611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811661286f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613453565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61290461300c565b50600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906129719064e8d4a51000906107fc90866129d9565b905060006129a9670de0b6b3a76400006107fc6004888154811061299157fe5b600091825260209091206005909102015485906129d9565b905060006129c4846020015183612a7990919063ffffffff16565b90506129d08782612bc5565b50505050505050565b6000826129e8575060006105d4565b828202828482816129f557fe5b04146105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061374c565b6000808211612a68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061357b565b818381612a7157fe5b049392505050565b600082821115612ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134e7565b50900390565b6000828201838110156105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134b0565b3390565b61138e846323b872dd60e01b858585604051602401612b1f93929190613289565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612db1565b612bc08363a9059cbb60e01b8484604051602401612b1f9291906132ba565b505050565b8015611744576040517f70a08231000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612c3f903090600401613268565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190613130565b1015612c9d57612c9d6112cb565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612d12903090600401613268565b60206040518083038186803b158015612d2a57600080fd5b505afa158015612d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d629190613130565b905081811015612d70578091505b612bc073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168484612ba1565b6060612e13826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e679092919063ffffffff16565b805190915015612bc05780806020019051810190612e3191906130fc565b612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906133f6565b6060612e768484600085612e80565b90505b9392505050565b606082471015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061351e565b612ec585612f82565b612efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139c0565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612f25919061324c565b60006040518083038185875af1925050503d8060008114612f62576040519150601f19603f3d011682016040523d82523d6000602084013e612f67565b606091505b5091509150612f77828286612f88565b979650505050505050565b3b151590565b60608315612f97575081612e79565b825115612fa75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b91906132eb565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60405180606001604052806000815260200160008152602001600081525090565b60006020828403121561303e578081fd5b81356105ce81613c35565b6000806040838503121561305b578081fd5b823561306681613c35565b9150602083013561307681613c5a565b809150509250929050565b60008060408385031215613093578182fd5b823561309e81613c35565b946020939093013593505050565b6000806000606084860312156130c0578081fd5b83356130cb81613c35565b95602085013595506040909401359392505050565b6000602082840312156130f1578081fd5b81356105ce81613c5a565b60006020828403121561310d578081fd5b81516105ce81613c5a565b600060208284031215613129578081fd5b5035919050565b600060208284031215613141578081fd5b5051919050565b6000806040838503121561315a578182fd5b82359150602083013561307681613c35565b60008060008060808587031215613181578081fd5b84359350602085013561319381613c35565b925060408501356131a381613c5a565b915060608501356131b381613c5a565b939692955090935050565b600080604083850312156131d0578182fd5b50508035926020909101359150565b6000806000606084860312156131f3578283fd5b8335925060208401359150604084013561320c81613c5a565b809150509250925092565b6000806000806080858703121561322c578384fd5b84359350602085013592506040850135915060608501356131b381613c5a565b6000825161325e818460208701613c09565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261330a816040850160208701613c09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526023908201527f4d61737465724368656656323a2042616c616e6365206d75737420657863656560408201527f6420300000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060408201527f6d756c7469706c69657200000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4d61737465724368656656323a2054686520757365722061646472657373206d60408201527f7573742062652076616c69640000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206d7573742062652076616c6964000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a2043616b652072617465206d7573742062652060408201527f67726561746572207468616e2030000000000000000000000000000000000000606082015260800190565b60208082526042908201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460408201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f60608201527f6f6c000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f77697468647261773a20496e73756666696369656e7400000000000000000000604082015260600190565b60208082526011908201527f4e6f6e6520424550323020746f6b656e73000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f737460408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f43414b4520746f6b656e2063616e277420626520616464656420746f2066617260408201527f6d20706f6f6c7300000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060408201527f636f756c6420626520626f6f7374656400000000000000000000000000000000606082015260800190565b60208082526032908201527f4d61737465724368656656323a20546865207768697465206c6973742061646460408201527f72657373206d7573742062652076616c69640000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526025908201527f4d61737465724368656656323a20546f74616c2072617465206d75737420626560408201527f2031653132000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526041908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206973207468652073616d6520776974682063757272656e742061646472657360608201527f7300000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f4d61737465724368656656323a204e657720626f6f737420636f6e747261637460408201527f2061646472657373206d7573742062652076616c696400000000000000000000606082015260800190565b600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b83811015613c24578181015183820152602001613c0c565b8381111561138e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114613c5757600080fd5b50565b8015158114613c5757600080fdfea2646970667358221220f3bdc87a312c1f6922cc6efd7e791ccbfcc6b4d3913517316c9bb61280affda264736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/ProxyForCakePool.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/ProxyForCakePool.json new file mode 100644 index 00000000..d6cd9c1b --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/ProxyForCakePool.json @@ -0,0 +1,67 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ProxyForCakePool", + "sourceName": "contracts/ProxyForCakePool.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "contract IVECake", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePoolUser", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLockForProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60c060405234801561001057600080fd5b50600080336001600160a01b031663890357306040518163ffffffff1660e01b81526004016040805180830381865afa158015610051573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061007591906100ab565b6001600160a01b039182166080521660a052506100de9050565b80516001600160a01b03811681146100a657600080fd5b919050565b600080604083850312156100be57600080fd5b6100c78361008f565b91506100d56020840161008f565b90509250929050565b60805160a0516103cc61011c6000396000605601526000818160bb0152818160fd015281816101bf0152818161024c015261030101526103cc6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea2646970667358221220fb6b5243c5bb972f8430878c3136381885b23a1d97726f744783b5012322a6dc64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea2646970667358221220fb6b5243c5bb972f8430878c3136381885b23a1d97726f744783b5012322a6dc64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/ProxyForCakePoolFactory.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/ProxyForCakePoolFactory.json new file mode 100644 index 00000000..8c7628fa --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/ProxyForCakePoolFactory.json @@ -0,0 +1,163 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ProxyForCakePoolFactory", + "sourceName": "contracts/ProxyForCakePoolFactory.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "NewProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialization", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_VECake", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parameters", + "outputs": [ + { + "internalType": "address", + "name": "VECake", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610c108061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b14610148578063c172085e14610166578063c4d66de81461019b578063f2fde38b146101ae57600080fd5b80634c96a3891461008d57806362534e79146100ca578063715018a6146100ea57806389035730146100f4575b600080fd5b6100a061009b3660046106b5565b6101c1565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6003546100a09073ffffffffffffffffffffffffffffffffffffffff1681565b6100f2610392565b005b60015460025461011b9173ffffffffffffffffffffffffffffffffffffffff908116911682565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152016100c1565b60005473ffffffffffffffffffffffffffffffffffffffff166100a0565b60035461018b9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016100c1565b6100f26101a93660046106b5565b61041f565b6100f26101bc3660046106b5565b610503565b60035460009073ffffffffffffffffffffffffffffffffffffffff16331461024a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60408051808201825260035473ffffffffffffffffffffffffffffffffffffffff9081168083529085166020928301819052600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168417909155600280549091168217905583519283019190915291810191909152426060820152608001604051602081830303815290604052805190602001206040516102ef906106a8565b8190604051809103906000f590508015801561030f573d6000803e3d6000fd5b50600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560028054909116905560405190915073ffffffffffffffffffffffffffffffffffffffff83811691908316907fa94ca626c15b5acbc6f820b88b794bce0d7a9198f2ed3e248aa0a362e2bdd60b90600090a3919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610413576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b61041d6000610633565b565b60035474010000000000000000000000000000000000000000900460ff16156104a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610241565b6003805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffff0000000000000000000000000000000000000000009092169190911774010000000000000000000000000000000000000000179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b73ffffffffffffffffffffffffffffffffffffffff8116610627576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610241565b61063081610633565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104e8806106f383390190565b6000602082840312156106c757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146106eb57600080fd5b939250505056fe60c060405234801561001057600080fd5b50600080336001600160a01b031663890357306040518163ffffffff1660e01b81526004016040805180830381865afa158015610051573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061007591906100ab565b6001600160a01b039182166080521660a052506100de9050565b80516001600160a01b03811681146100a657600080fd5b919050565b600080604083850312156100be57600080fd5b6100c78361008f565b91506100d56020840161008f565b90509250929050565b60805160a0516103cc61011c6000396000605601526000818160bb0152818160fd015281816101bf0152818161024c015261030101526103cc6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea26469706673582212201cdfd20073bab94f4cd09fd17babc94971d2402071f6a1620ff7f93144cbac8b64736f6c634300080a0033a2646970667358221220517aa35980d2a494b6e838dc941dea196956d68517cc88a8363cb31705e197dc64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b14610148578063c172085e14610166578063c4d66de81461019b578063f2fde38b146101ae57600080fd5b80634c96a3891461008d57806362534e79146100ca578063715018a6146100ea57806389035730146100f4575b600080fd5b6100a061009b3660046106b5565b6101c1565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6003546100a09073ffffffffffffffffffffffffffffffffffffffff1681565b6100f2610392565b005b60015460025461011b9173ffffffffffffffffffffffffffffffffffffffff908116911682565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152016100c1565b60005473ffffffffffffffffffffffffffffffffffffffff166100a0565b60035461018b9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016100c1565b6100f26101a93660046106b5565b61041f565b6100f26101bc3660046106b5565b610503565b60035460009073ffffffffffffffffffffffffffffffffffffffff16331461024a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60408051808201825260035473ffffffffffffffffffffffffffffffffffffffff9081168083529085166020928301819052600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168417909155600280549091168217905583519283019190915291810191909152426060820152608001604051602081830303815290604052805190602001206040516102ef906106a8565b8190604051809103906000f590508015801561030f573d6000803e3d6000fd5b50600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560028054909116905560405190915073ffffffffffffffffffffffffffffffffffffffff83811691908316907fa94ca626c15b5acbc6f820b88b794bce0d7a9198f2ed3e248aa0a362e2bdd60b90600090a3919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610413576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b61041d6000610633565b565b60035474010000000000000000000000000000000000000000900460ff16156104a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610241565b6003805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffff0000000000000000000000000000000000000000009092169190911774010000000000000000000000000000000000000000179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b73ffffffffffffffffffffffffffffffffffffffff8116610627576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610241565b61063081610633565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104e8806106f383390190565b6000602082840312156106c757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146106eb57600080fd5b939250505056fe60c060405234801561001057600080fd5b50600080336001600160a01b031663890357306040518163ffffffff1660e01b81526004016040805180830381865afa158015610051573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061007591906100ab565b6001600160a01b039182166080521660a052506100de9050565b80516001600160a01b03811681146100a657600080fd5b919050565b600080604083850312156100be57600080fd5b6100c78361008f565b91506100d56020840161008f565b90509250929050565b60805160a0516103cc61011c6000396000605601526000818160bb0152818160fd015281816101bf0152818161024c015261030101526103cc6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea26469706673582212201cdfd20073bab94f4cd09fd17babc94971d2402071f6a1620ff7f93144cbac8b64736f6c634300080a0033a2646970667358221220517aa35980d2a494b6e838dc941dea196956d68517cc88a8363cb31705e197dc64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/RevenueSharingPool.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/RevenueSharingPool.json new file mode 100644 index 00000000..a6d00ee9 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/RevenueSharingPool.json @@ -0,0 +1,788 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RevenueSharingPool", + "sourceName": "contracts/RevenueSharingPool.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokens", + "type": "uint256" + } + ], + "name": "CheckpointToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_claimEpoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_maxEpoch", + "type": "uint256" + } + ], + "name": "Claimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Feed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Killed", + "type": "event" + }, + { + "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": "bool", + "name": "_toggleFlag", + "type": "bool" + } + ], + "name": "SetCanCheckpointToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_ok", + "type": "bool" + } + ], + "name": "SetWhitelistedCheckpointCallers", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_oldRecipient", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newRecipient", + "type": "address" + } + ], + "name": "UpdateRecipient", + "type": "event" + }, + { + "inputs": [], + "name": "TOKEN_CHECKPOINT_DEADLINE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WEEK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "balanceOfAtProxy", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "balanceOfAtUser", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canCheckpointToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpointToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "checkpointTotalSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "claim", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "claimForUser", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_users", + "type": "address[]" + } + ], + "name": "claimMany", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + } + ], + "name": "claimTo", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyReturn", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "everSetRecipient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "feed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getRecipient", + "outputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "injectReward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "injectRewardForCurrentWeek", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isKilled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "kill", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastTokenTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "recipient", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_newCanCheckpointToken", + "type": "bool" + } + ], + "name": "setCanCheckpointToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "address", + "name": "_recipient", + "type": "address" + } + ], + "name": "setRecipient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_callers", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "_ok", + "type": "bool" + } + ], + "name": "setWhitelistedCheckpointCallers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startWeekCursor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokensPerWeek", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalDistributed", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userEpochOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "weekCursor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "weekCursorOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedCheckpointCallers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b506200001d3362000124565b600180819055506000806000806000336001600160a01b031663890357306040518163ffffffff1660e01b815260040160a060405180830381865afa1580156200006b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000919190620001b5565b945094509450945094506000620000ae856200017460201b60201c565b600281905560068190556003819055600980546001600160a01b038088166001600160a01b031992831617909255600880548a84169216919091179055600f8054918616620100000262010000600160b01b03199092169190911790559050620001188262000124565b5050505050506200026d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062093a806200018681846200021c565b6200019291906200023f565b92915050565b80516001600160a01b0381168114620001b057600080fd5b919050565b600080600080600060a08688031215620001ce57600080fd5b620001d98662000198565b945060208601519350620001f06040870162000198565b9250620002006060870162000198565b9150620002106080870162000198565b90509295509295909350565b6000826200023a57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156200026857634e487b7160e01b600052601160045260246000fd5b500290565b613a55806200027d6000396000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c806388eec93e1161017b578063b3651eea116100d8578063efca2eed1161008c578063f4359ce511610071578063f4359ce5146105dc578063f59dfdfb146105e6578063f7c618c1146105f957600080fd5b8063efca2eed146105c0578063f2fde38b146105c957600080fd5b8063cce277c5116100bd578063cce277c514610591578063e1ebb9f0146105a4578063ec5570d0146105ad57600080fd5b8063b3651eea14610553578063bee5dc321461058957600080fd5b8063981b24d01161012f578063a2ab2a4611610114578063a2ab2a461461052d578063a31254d114610536578063a5420e981461054957600080fd5b8063981b24d0146104fa578063a262f5f81461051a57600080fd5b80638bc8407a116101605780638bc8407a146104b75780638da5cb5b146104ca5780638fe8a101146104e857600080fd5b806388eec93e14610474578063899519be1461049757600080fd5b80635a4b8c1d11610229578063786479cd116101dd5780638147b0dd116101c25780638147b0dd14610435578063862a9f2f1461045857806386f17a361461046157600080fd5b8063786479cd146104025780637e686e011461042257600080fd5b806362534e791161020e57806362534e79146103c757806362812a39146103e7578063715018a6146103fa57600080fd5b80635a4b8c1d1461037357806361ac407d146103be57600080fd5b80631fe063bd116102805780633758716111610265578063375871611461034557806341c0e1b5146103585780634ee2cd7e1461036057600080fd5b80631fe063bd1461031d578063326a94071461033d57600080fd5b806303df738d146102b2578063097cd232146102d85780630cc672e4146102ed5780631e83409a1461030a575b600080fd5b6102c56102c036600461339b565b610619565b6040519081526020015b60405180910390f35b6102eb6102e63660046133c7565b610706565b005b600f546102fa9060ff1681565b60405190151581526020016102cf565b6102c56103183660046133e9565b61079a565b6102c561032b3660046133e9565b60046020526000908152604090205481565b6102eb610895565b6102eb610353366004613414565b610915565b6102eb6109fb565b6102c561036e36600461339b565b610b93565b600f546103999062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102cf565b6102c560025481565b6008546103999073ffffffffffffffffffffffffffffffffffffffff1681565b6103996103f53660046133e9565b610c8e565b6102eb610dd9565b6102c56104103660046133e9565b60056020526000908152604090205481565b6102fa61043036600461347d565b610e66565b6102fa6104433660046133e9565b60106020526000908152604090205460ff1681565b6102c5600a5481565b6102eb61046f3660046134bf565b611233565b6102fa6104823660046133e9565b600e6020526000908152604090205460ff1681565b6102c56104a5366004613516565b60076020526000908152604090205481565b6102eb6104c536600461352f565b6113e5565b60005473ffffffffffffffffffffffffffffffffffffffff16610399565b600f546102fa90610100900460ff1681565b6102c5610508366004613516565b600c6020526000908152604090205481565b6102c56105283660046133e9565b61160c565b6102c560035481565b6102c56105443660046133e9565b6116fc565b6102c56201518081565b6103996105613660046133e9565b600d6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6102eb611891565b6102eb61059f366004613516565b6119cd565b6102c560065481565b6102c56105bb36600461339b565b611a5b565b6102c5600b5481565b6102eb6105d73660046133e9565b611a6e565b6102c562093a8081565b6102fa6105f4366004613516565b611b9b565b6009546103999073ffffffffffffffffffffffffffffffffffffffff1681565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526000928392911690631959a0029060240160c060405180830381865afa15801561068d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b19190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106fe576106f68184611d11565b915050610700565b505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461078c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107968282611ed1565b5050565b600060026001541415610809576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615610880576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b61088b826000611f61565b6001805592915050565b60026001541415610902576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b600260015561090f612114565b60018055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f3248d3607ebf8e63cb453d48ee2eac13a94abe9606149e791b3527de6c1b18239060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010017908190556009546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152610b689273ffffffffffffffffffffffffffffffffffffffff6201000090910481169216906370a0823190602401602060405180830381865afa158015610b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b489190613623565b60095473ffffffffffffffffffffffffffffffffffffffff169190612311565b6040517f0f8eeedbc400fd6686703559f58d1e6143fdaed533f19a86c93d67a2fe4fb33190600090a1565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526000928392911690631959a0029060240160c060405180830381865afa158015610c07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2b9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610c8457610c708184611d11565b610c7a8585611d11565b6106f6919061366b565b6106f68484611d11565b6008546040517fc0dd84bd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8084166004830152839260009291169063c0dd84bd90602401602060405180830381865afa158015610d02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d269190613683565b90508015610da0578273ffffffffffffffffffffffffffffffffffffffff166305a1192b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9d91906136a0565b91505b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600d6020526040902054168015610dd2578092505b5050919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b610e6460006123ea565b565b600060026001541415610ed5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615610f4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b6014821115610fb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f216f7665722032302075736572730000000000000000000000000000000000006044820152606401610783565b6003544210610fc857610fc8612114565b600654600f5460ff168015610fe85750610fe5620151808261366b565b42115b15610ff857610ff561245f565b50425b611001816126c5565b90506000805b8481101561120c576000868683818110611023576110236136bd565b905060200201602081019061103891906133e9565b905073ffffffffffffffffffffffffffffffffffffffff81166110b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f62616420757365720000000000000000000000000000000000000000000000006044820152606401610783565b60006110c282610c8e565b905060006110d18383886126df565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015292935060009290911690631959a0029060240160c060405180830381865afa158015611147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116b9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111be576111b18184896126df565b6111bb908361366b565b91505b81156111f5576009546111e89073ffffffffffffffffffffffffffffffffffffffff168484612311565b6111f2828761366b565b95505b505050508080611204906136ec565b915050611007565b5080156112255780600a546112219190613725565b600a555b505060018080559392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b60005b828110156113df5781601060008686858181106112d6576112d66136bd565b90506020020160208101906112eb91906133e9565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055838382818110611350576113506136bd565b905060200201602081019061136591906133e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4623145569be6765dcff916cbe3a00bd0d2706802c4111e09d24e8e038661490846040516113c5911515815260200190565b60405180910390a3806113d7816136ec565b9150506112b7565b50505050565b6000823b1515801561141d575073ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604090205460ff16155b15611426575060015b60005473ffffffffffffffffffffffffffffffffffffffff90811690841633148061146e575081801561146e57503373ffffffffffffffffffffffffffffffffffffffff8216145b6114d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f5065726d697373696f6e2064656e6965640000000000000000000000000000006044820152606401610783565b3373ffffffffffffffffffffffffffffffffffffffff821614801590611520575073ffffffffffffffffffffffffffffffffffffffff84166000908152600e602052604090205460ff16155b156115745773ffffffffffffffffffffffffffffffffffffffff84166000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b73ffffffffffffffffffffffffffffffffffffffff8481166000818152600d602090815260409182902080548886167fffffffffffffffffffffffff0000000000000000000000000000000000000000821681179092559251338152929094169392849290917f41174a535d9c86cb1bf669d347dcb44c01505b053b2a2ea186a69887859352ae910160405180910390a45050505050565b60006002600154141561167b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff16156116f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b61088b3383611f61565b60006002600154141561176b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff16156117e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b60035442106117f3576117f3612114565b600654600f5460ff1680156118135750611810620151808261366b565b42115b156118235761182061245f565b50425b61182c816126c5565b9050600061183984610c8e565b905060006118488583856126df565b905080156118855780600a5461185e9190613725565b600a556009546118859073ffffffffffffffffffffffffffffffffffffffff168383612311565b60018055949350505050565b600260015414156118fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b600260015560005473ffffffffffffffffffffffffffffffffffffffff1633148061193857503360009081526010602052604090205460ff165b8061195f5750600f5460ff16801561195f57506201518060065461195c919061366b565b42115b6119c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21616c6c6f7700000000000000000000000000000000000000000000000000006044820152606401610783565b61090f61245f565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b611a584282611ed1565b50565b6000611a678383611d11565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611aef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b73ffffffffffffffffffffffffffffffffffffffff8116611b92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610783565b611a58816123ea565b600060026001541415611c0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615611c81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b600954611ca69073ffffffffffffffffffffffffffffffffffffffff16333085612be2565b600f5460ff168015611cc7575062015180600654611cc4919061366b565b42115b15611cd457611cd461245f565b6040518281527faee7b00ca0359ab0727fb54b350e15a1ed46fb12dc0d04ca9bb5f4e7c313249a9060200160405180910390a15050600180805590565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283929116906381fc83bb90602401602060405180830381865afa158015611d85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da99190613623565b905080611dba576000915050610700565b6000611dc7858584612c40565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015611e44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e68919061374e565b90506000611e84826040015187611e7f9190613725565b612d62565b8260200151611e9391906137e7565b8251611e9f919061389d565b9050600081600f0b1215611eba576000945050505050610700565b611ec681600f0b612e34565b979650505050505050565b600954611ef69073ffffffffffffffffffffffffffffffffffffffff16333084612be2565b80600a6000828254611f08919061366b565b9250508190555080600b6000828254611f21919061366b565b9091555060009050611f32836126c5565b905081600760008381526020019081526020016000206000828254611f57919061366b565b9091555050505050565b60006003544210611f7457611f74612114565b600654600f5460ff168015611f945750611f91620151808261366b565b42115b15611fa457611fa161245f565b50425b611fad816126c5565b905073ffffffffffffffffffffffffffffffffffffffff8316611fd657611fd384610c8e565b92505b6000611fe38585846126df565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015292935060009290911690631959a0029060240160c060405180830381865afa158015612059573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207d9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120d0576120c38186856126df565b6120cd908361366b565b91505b811561210b5781600a546120e49190613725565b600a5560095461210b9073ffffffffffffffffffffffffffffffffffffffff168684612311565b50949350505050565b6003546000612122426126c5565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561218e57600080fd5b505af11580156121a2573d6000803e3d6000fd5b5050505060005b603481101561230a57818311156121bf5761230a565b60006121ca84612ea0565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa15801561223f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612263919061374e565b90506000816040015186111561228957612286826040015187611e7f9190613725565b90505b600081836020015161229b91906137e7565b83516122a7919061389d565b9050600081600f0b12156122c9576000878152600c60205260408120556122e5565b6122d581600f0b612e34565b6000888152600c60205260409020555b505050506122f662093a808461366b565b925080612302816136ec565b9150506121a9565b5050600355565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526123e59084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152613051565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156124ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f29190613623565b90506000600a54826125049190613725565b905081600a8190555080600b600082825461251f919061366b565b909155505060065460006125338242613725565b90506000612540836126c5565b4260065590506000805b60348110156126835761256062093a808461366b565b9150814210156125e2578315801561257757508442145b156125aa5760008381526007602052604090205461259690879061366b565b600084815260076020526040902055612683565b836125b58642613725565b6125bf908861390e565b6125c9919061394b565b600084815260076020526040902054612596919061366b565b831580156125ef57508482145b156126225760008381526007602052604090205461260e90879061366b565b60008481526007602052604090205561266a565b8361262d8684613725565b612637908861390e565b612641919061394b565b60008481526007602052604090205461265a919061366b565b6000848152600760205260409020555b819450819250808061267b906136ec565b91505061254a565b5060408051428152602081018790527fce749457b74e10f393f2c6b1ce4261b78791376db5a3f501477a809f03f500d6910160405180910390a1505050505050565b600062093a806126d5818461394b565b610700919061390e565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015260009283928392839216906381fc83bb90602401602060405180830381865afa158015612756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061277a9190613623565b60025490915081612792576000945050505050611a67565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260046020526040902054806127cf576127c8898385612c40565b94506127f8565b73ffffffffffffffffffffffffffffffffffffffff891660009081526005602052604090205494505b8461280257600194505b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301526024820188905260009216906334d901a490604401608060405180830381865afa15801561287a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061289e919061374e565b9050816128e05762093a8080600162093a8084604001516128bf919061366b565b6128c99190613725565b6128d3919061394b565b6128dd919061390e565b91505b8782106128f65760009650505050505050611a67565b82821015612902578291505b6040805160808101825260008082526020820181905291810182905260608101829052905b6034811015612b425789841061293c57612b42565b826040015184101580156129505750858811155b15612a775761296088600161366b565b975060405180608001604052808460000151600f0b81526020018460200151600f0b81526020018460400151815260200184606001518152509150858811156129d55760405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509250612b30565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8e81166004830152602482018b9052909116906334d901a490604401608060405180830381865afa158015612a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a70919061374e565b9250612b30565b6000612a8c836040015186611e7f9190613725565b90506000612ac1612ab9856020015184612aa691906137e7565b8651612ab2919061389d565b600061315d565b600f0b612e34565b905080158015612ad05750878a115b15612adc575050612b42565b8015612b1e576000868152600c6020908152604080832054600790925290912054612b07908361390e565b612b11919061394b565b612b1b908a61366b565b98505b612b2b62093a808761366b565b955050505b80612b3a816136ec565b915050612927565b50612b5785612b5260018a613725565b61317a565b73ffffffffffffffffffffffffffffffffffffffff8c81166000818152600560209081526040808320869055600482529182902088905581518b8152908101859052908101899052929950908c16917fd795915374024be1f03204e052bd584b33bb85c9128ede9c54adbe0bbdc220959060600160405180910390a350939998505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526113df9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612363565b60008082815b6080811015612d5757818310612c5b57612d57565b60006002612c69848661366b565b612c7490600161366b565b612c7e919061394b565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015612cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1f919061374e565b905087816040015111612d3457819450612d42565b612d3f600183613725565b93505b50508080612d4f906136ec565b915050612c46565b509095945050505050565b60007fffffffffffffffffffffffffffffffff800000000000000000000000000000008212801590612da457506f7fffffffffffffffffffffffffffffff8213155b612e30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610783565b5090565b600080821215612e30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610783565b600080600090506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f3a9190613623565b905060005b608081101561304857818310612f5457613048565b60006002612f62848661366b565b612f6d90600161366b565b612f77919061394b565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa158015612fec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613010919061374e565b90508681604001511161302557819450613033565b613030600183613725565b93505b50508080613040906136ec565b915050612f3f565b50909392505050565b60006130b3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166131899092919063ffffffff16565b8051909150156123e557808060200190518101906130d19190613683565b6123e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610783565b600081600f0b83600f0b12156131735781611a67565b5090919050565b60008183106131735781611a67565b606061319884846000856131a0565b949350505050565b606082471015613232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610783565b73ffffffffffffffffffffffffffffffffffffffff85163b6132b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610783565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516132d991906139b2565b60006040518083038185875af1925050503d8060008114613316576040519150601f19603f3d011682016040523d82523d6000602084013e61331b565b606091505b5091509150611ec682828660608315613335575081611a67565b8251156133455782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078391906139ce565b73ffffffffffffffffffffffffffffffffffffffff81168114611a5857600080fd5b600080604083850312156133ae57600080fd5b82356133b981613379565b946020939093013593505050565b600080604083850312156133da57600080fd5b50508035926020909101359150565b6000602082840312156133fb57600080fd5b8135611a6781613379565b8015158114611a5857600080fd5b60006020828403121561342657600080fd5b8135611a6781613406565b60008083601f84011261344357600080fd5b50813567ffffffffffffffff81111561345b57600080fd5b6020830191508360208260051b850101111561347657600080fd5b9250929050565b6000806020838503121561349057600080fd5b823567ffffffffffffffff8111156134a757600080fd5b6134b385828601613431565b90969095509350505050565b6000806000604084860312156134d457600080fd5b833567ffffffffffffffff8111156134eb57600080fd5b6134f786828701613431565b909450925050602084013561350b81613406565b809150509250925092565b60006020828403121561352857600080fd5b5035919050565b6000806040838503121561354257600080fd5b823561354d81613379565b9150602083013561355d81613379565b809150509250929050565b805165ffffffffffff8116811461357e57600080fd5b919050565b805161ffff8116811461357e57600080fd5b60008060008060008060c087890312156135ae57600080fd5b86516135b981613379565b60208801519096506fffffffffffffffffffffffffffffffff811681146135df57600080fd5b94506135ed60408801613568565b93506135fb60608801613568565b925061360960808801613583565b915061361760a08801613583565b90509295509295509295565b60006020828403121561363557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561367e5761367e61363c565b500190565b60006020828403121561369557600080fd5b8151611a6781613406565b6000602082840312156136b257600080fd5b8151611a6781613379565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561371e5761371e61363c565b5060010190565b6000828210156137375761373761363c565b500390565b8051600f81900b811461357e57600080fd5b60006080828403121561376057600080fd5b6040516080810181811067ffffffffffffffff821117156137aa577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040526137b68361373c565b81526137c46020840161373c565b602082015260408301516040820152606083015160608201528091505092915050565b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff6000821360008413838304851182821616156138205761382061363c565b7fffffffffffffffffffffffffffffffff80000000000000000000000000000000600085128682058612818416161561385b5761385b61363c565b600087129250858205871284841616156138775761387761363c565b8585058712818416161561388d5761388d61363c565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff80000000000000000000000000000000018312811516156138e0576138e061363c565b816f7fffffffffffffffffffffffffffffff0183138116156139045761390461363c565b5090039392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139465761394661363c565b500290565b600082613981577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60005b838110156139a1578181015183820152602001613989565b838111156113df5750506000910152565b600082516139c4818460208701613986565b9190910192915050565b60208152600082518060208401526139ed816040850160208701613986565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212208398aeb741d2790aa53ca956c623532d7e3d78c06fa237aa5a43112284c5635964736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102ad5760003560e01c806388eec93e1161017b578063b3651eea116100d8578063efca2eed1161008c578063f4359ce511610071578063f4359ce5146105dc578063f59dfdfb146105e6578063f7c618c1146105f957600080fd5b8063efca2eed146105c0578063f2fde38b146105c957600080fd5b8063cce277c5116100bd578063cce277c514610591578063e1ebb9f0146105a4578063ec5570d0146105ad57600080fd5b8063b3651eea14610553578063bee5dc321461058957600080fd5b8063981b24d01161012f578063a2ab2a4611610114578063a2ab2a461461052d578063a31254d114610536578063a5420e981461054957600080fd5b8063981b24d0146104fa578063a262f5f81461051a57600080fd5b80638bc8407a116101605780638bc8407a146104b75780638da5cb5b146104ca5780638fe8a101146104e857600080fd5b806388eec93e14610474578063899519be1461049757600080fd5b80635a4b8c1d11610229578063786479cd116101dd5780638147b0dd116101c25780638147b0dd14610435578063862a9f2f1461045857806386f17a361461046157600080fd5b8063786479cd146104025780637e686e011461042257600080fd5b806362534e791161020e57806362534e79146103c757806362812a39146103e7578063715018a6146103fa57600080fd5b80635a4b8c1d1461037357806361ac407d146103be57600080fd5b80631fe063bd116102805780633758716111610265578063375871611461034557806341c0e1b5146103585780634ee2cd7e1461036057600080fd5b80631fe063bd1461031d578063326a94071461033d57600080fd5b806303df738d146102b2578063097cd232146102d85780630cc672e4146102ed5780631e83409a1461030a575b600080fd5b6102c56102c036600461339b565b610619565b6040519081526020015b60405180910390f35b6102eb6102e63660046133c7565b610706565b005b600f546102fa9060ff1681565b60405190151581526020016102cf565b6102c56103183660046133e9565b61079a565b6102c561032b3660046133e9565b60046020526000908152604090205481565b6102eb610895565b6102eb610353366004613414565b610915565b6102eb6109fb565b6102c561036e36600461339b565b610b93565b600f546103999062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102cf565b6102c560025481565b6008546103999073ffffffffffffffffffffffffffffffffffffffff1681565b6103996103f53660046133e9565b610c8e565b6102eb610dd9565b6102c56104103660046133e9565b60056020526000908152604090205481565b6102fa61043036600461347d565b610e66565b6102fa6104433660046133e9565b60106020526000908152604090205460ff1681565b6102c5600a5481565b6102eb61046f3660046134bf565b611233565b6102fa6104823660046133e9565b600e6020526000908152604090205460ff1681565b6102c56104a5366004613516565b60076020526000908152604090205481565b6102eb6104c536600461352f565b6113e5565b60005473ffffffffffffffffffffffffffffffffffffffff16610399565b600f546102fa90610100900460ff1681565b6102c5610508366004613516565b600c6020526000908152604090205481565b6102c56105283660046133e9565b61160c565b6102c560035481565b6102c56105443660046133e9565b6116fc565b6102c56201518081565b6103996105613660046133e9565b600d6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6102eb611891565b6102eb61059f366004613516565b6119cd565b6102c560065481565b6102c56105bb36600461339b565b611a5b565b6102c5600b5481565b6102eb6105d73660046133e9565b611a6e565b6102c562093a8081565b6102fa6105f4366004613516565b611b9b565b6009546103999073ffffffffffffffffffffffffffffffffffffffff1681565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526000928392911690631959a0029060240160c060405180830381865afa15801561068d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b19190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106fe576106f68184611d11565b915050610700565b505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461078c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107968282611ed1565b5050565b600060026001541415610809576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615610880576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b61088b826000611f61565b6001805592915050565b60026001541415610902576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b600260015561090f612114565b60018055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f3248d3607ebf8e63cb453d48ee2eac13a94abe9606149e791b3527de6c1b18239060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010017908190556009546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152610b689273ffffffffffffffffffffffffffffffffffffffff6201000090910481169216906370a0823190602401602060405180830381865afa158015610b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b489190613623565b60095473ffffffffffffffffffffffffffffffffffffffff169190612311565b6040517f0f8eeedbc400fd6686703559f58d1e6143fdaed533f19a86c93d67a2fe4fb33190600090a1565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526000928392911690631959a0029060240160c060405180830381865afa158015610c07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2b9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610c8457610c708184611d11565b610c7a8585611d11565b6106f6919061366b565b6106f68484611d11565b6008546040517fc0dd84bd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8084166004830152839260009291169063c0dd84bd90602401602060405180830381865afa158015610d02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d269190613683565b90508015610da0578273ffffffffffffffffffffffffffffffffffffffff166305a1192b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9d91906136a0565b91505b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600d6020526040902054168015610dd2578092505b5050919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b610e6460006123ea565b565b600060026001541415610ed5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615610f4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b6014821115610fb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f216f7665722032302075736572730000000000000000000000000000000000006044820152606401610783565b6003544210610fc857610fc8612114565b600654600f5460ff168015610fe85750610fe5620151808261366b565b42115b15610ff857610ff561245f565b50425b611001816126c5565b90506000805b8481101561120c576000868683818110611023576110236136bd565b905060200201602081019061103891906133e9565b905073ffffffffffffffffffffffffffffffffffffffff81166110b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f62616420757365720000000000000000000000000000000000000000000000006044820152606401610783565b60006110c282610c8e565b905060006110d18383886126df565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015292935060009290911690631959a0029060240160c060405180830381865afa158015611147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116b9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111be576111b18184896126df565b6111bb908361366b565b91505b81156111f5576009546111e89073ffffffffffffffffffffffffffffffffffffffff168484612311565b6111f2828761366b565b95505b505050508080611204906136ec565b915050611007565b5080156112255780600a546112219190613725565b600a555b505060018080559392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b60005b828110156113df5781601060008686858181106112d6576112d66136bd565b90506020020160208101906112eb91906133e9565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055838382818110611350576113506136bd565b905060200201602081019061136591906133e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4623145569be6765dcff916cbe3a00bd0d2706802c4111e09d24e8e038661490846040516113c5911515815260200190565b60405180910390a3806113d7816136ec565b9150506112b7565b50505050565b6000823b1515801561141d575073ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604090205460ff16155b15611426575060015b60005473ffffffffffffffffffffffffffffffffffffffff90811690841633148061146e575081801561146e57503373ffffffffffffffffffffffffffffffffffffffff8216145b6114d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f5065726d697373696f6e2064656e6965640000000000000000000000000000006044820152606401610783565b3373ffffffffffffffffffffffffffffffffffffffff821614801590611520575073ffffffffffffffffffffffffffffffffffffffff84166000908152600e602052604090205460ff16155b156115745773ffffffffffffffffffffffffffffffffffffffff84166000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b73ffffffffffffffffffffffffffffffffffffffff8481166000818152600d602090815260409182902080548886167fffffffffffffffffffffffff0000000000000000000000000000000000000000821681179092559251338152929094169392849290917f41174a535d9c86cb1bf669d347dcb44c01505b053b2a2ea186a69887859352ae910160405180910390a45050505050565b60006002600154141561167b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff16156116f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b61088b3383611f61565b60006002600154141561176b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff16156117e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b60035442106117f3576117f3612114565b600654600f5460ff1680156118135750611810620151808261366b565b42115b156118235761182061245f565b50425b61182c816126c5565b9050600061183984610c8e565b905060006118488583856126df565b905080156118855780600a5461185e9190613725565b600a556009546118859073ffffffffffffffffffffffffffffffffffffffff168383612311565b60018055949350505050565b600260015414156118fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b600260015560005473ffffffffffffffffffffffffffffffffffffffff1633148061193857503360009081526010602052604090205460ff165b8061195f5750600f5460ff16801561195f57506201518060065461195c919061366b565b42115b6119c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21616c6c6f7700000000000000000000000000000000000000000000000000006044820152606401610783565b61090f61245f565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b611a584282611ed1565b50565b6000611a678383611d11565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611aef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b73ffffffffffffffffffffffffffffffffffffffff8116611b92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610783565b611a58816123ea565b600060026001541415611c0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615611c81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b600954611ca69073ffffffffffffffffffffffffffffffffffffffff16333085612be2565b600f5460ff168015611cc7575062015180600654611cc4919061366b565b42115b15611cd457611cd461245f565b6040518281527faee7b00ca0359ab0727fb54b350e15a1ed46fb12dc0d04ca9bb5f4e7c313249a9060200160405180910390a15050600180805590565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283929116906381fc83bb90602401602060405180830381865afa158015611d85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da99190613623565b905080611dba576000915050610700565b6000611dc7858584612c40565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015611e44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e68919061374e565b90506000611e84826040015187611e7f9190613725565b612d62565b8260200151611e9391906137e7565b8251611e9f919061389d565b9050600081600f0b1215611eba576000945050505050610700565b611ec681600f0b612e34565b979650505050505050565b600954611ef69073ffffffffffffffffffffffffffffffffffffffff16333084612be2565b80600a6000828254611f08919061366b565b9250508190555080600b6000828254611f21919061366b565b9091555060009050611f32836126c5565b905081600760008381526020019081526020016000206000828254611f57919061366b565b9091555050505050565b60006003544210611f7457611f74612114565b600654600f5460ff168015611f945750611f91620151808261366b565b42115b15611fa457611fa161245f565b50425b611fad816126c5565b905073ffffffffffffffffffffffffffffffffffffffff8316611fd657611fd384610c8e565b92505b6000611fe38585846126df565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015292935060009290911690631959a0029060240160c060405180830381865afa158015612059573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207d9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120d0576120c38186856126df565b6120cd908361366b565b91505b811561210b5781600a546120e49190613725565b600a5560095461210b9073ffffffffffffffffffffffffffffffffffffffff168684612311565b50949350505050565b6003546000612122426126c5565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561218e57600080fd5b505af11580156121a2573d6000803e3d6000fd5b5050505060005b603481101561230a57818311156121bf5761230a565b60006121ca84612ea0565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa15801561223f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612263919061374e565b90506000816040015186111561228957612286826040015187611e7f9190613725565b90505b600081836020015161229b91906137e7565b83516122a7919061389d565b9050600081600f0b12156122c9576000878152600c60205260408120556122e5565b6122d581600f0b612e34565b6000888152600c60205260409020555b505050506122f662093a808461366b565b925080612302816136ec565b9150506121a9565b5050600355565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526123e59084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152613051565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156124ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f29190613623565b90506000600a54826125049190613725565b905081600a8190555080600b600082825461251f919061366b565b909155505060065460006125338242613725565b90506000612540836126c5565b4260065590506000805b60348110156126835761256062093a808461366b565b9150814210156125e2578315801561257757508442145b156125aa5760008381526007602052604090205461259690879061366b565b600084815260076020526040902055612683565b836125b58642613725565b6125bf908861390e565b6125c9919061394b565b600084815260076020526040902054612596919061366b565b831580156125ef57508482145b156126225760008381526007602052604090205461260e90879061366b565b60008481526007602052604090205561266a565b8361262d8684613725565b612637908861390e565b612641919061394b565b60008481526007602052604090205461265a919061366b565b6000848152600760205260409020555b819450819250808061267b906136ec565b91505061254a565b5060408051428152602081018790527fce749457b74e10f393f2c6b1ce4261b78791376db5a3f501477a809f03f500d6910160405180910390a1505050505050565b600062093a806126d5818461394b565b610700919061390e565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015260009283928392839216906381fc83bb90602401602060405180830381865afa158015612756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061277a9190613623565b60025490915081612792576000945050505050611a67565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260046020526040902054806127cf576127c8898385612c40565b94506127f8565b73ffffffffffffffffffffffffffffffffffffffff891660009081526005602052604090205494505b8461280257600194505b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301526024820188905260009216906334d901a490604401608060405180830381865afa15801561287a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061289e919061374e565b9050816128e05762093a8080600162093a8084604001516128bf919061366b565b6128c99190613725565b6128d3919061394b565b6128dd919061390e565b91505b8782106128f65760009650505050505050611a67565b82821015612902578291505b6040805160808101825260008082526020820181905291810182905260608101829052905b6034811015612b425789841061293c57612b42565b826040015184101580156129505750858811155b15612a775761296088600161366b565b975060405180608001604052808460000151600f0b81526020018460200151600f0b81526020018460400151815260200184606001518152509150858811156129d55760405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509250612b30565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8e81166004830152602482018b9052909116906334d901a490604401608060405180830381865afa158015612a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a70919061374e565b9250612b30565b6000612a8c836040015186611e7f9190613725565b90506000612ac1612ab9856020015184612aa691906137e7565b8651612ab2919061389d565b600061315d565b600f0b612e34565b905080158015612ad05750878a115b15612adc575050612b42565b8015612b1e576000868152600c6020908152604080832054600790925290912054612b07908361390e565b612b11919061394b565b612b1b908a61366b565b98505b612b2b62093a808761366b565b955050505b80612b3a816136ec565b915050612927565b50612b5785612b5260018a613725565b61317a565b73ffffffffffffffffffffffffffffffffffffffff8c81166000818152600560209081526040808320869055600482529182902088905581518b8152908101859052908101899052929950908c16917fd795915374024be1f03204e052bd584b33bb85c9128ede9c54adbe0bbdc220959060600160405180910390a350939998505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526113df9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612363565b60008082815b6080811015612d5757818310612c5b57612d57565b60006002612c69848661366b565b612c7490600161366b565b612c7e919061394b565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015612cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1f919061374e565b905087816040015111612d3457819450612d42565b612d3f600183613725565b93505b50508080612d4f906136ec565b915050612c46565b509095945050505050565b60007fffffffffffffffffffffffffffffffff800000000000000000000000000000008212801590612da457506f7fffffffffffffffffffffffffffffff8213155b612e30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610783565b5090565b600080821215612e30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610783565b600080600090506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f3a9190613623565b905060005b608081101561304857818310612f5457613048565b60006002612f62848661366b565b612f6d90600161366b565b612f77919061394b565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa158015612fec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613010919061374e565b90508681604001511161302557819450613033565b613030600183613725565b93505b50508080613040906136ec565b915050612f3f565b50909392505050565b60006130b3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166131899092919063ffffffff16565b8051909150156123e557808060200190518101906130d19190613683565b6123e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610783565b600081600f0b83600f0b12156131735781611a67565b5090919050565b60008183106131735781611a67565b606061319884846000856131a0565b949350505050565b606082471015613232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610783565b73ffffffffffffffffffffffffffffffffffffffff85163b6132b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610783565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516132d991906139b2565b60006040518083038185875af1925050503d8060008114613316576040519150601f19603f3d011682016040523d82523d6000602084013e61331b565b606091505b5091509150611ec682828660608315613335575081611a67565b8251156133455782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078391906139ce565b73ffffffffffffffffffffffffffffffffffffffff81168114611a5857600080fd5b600080604083850312156133ae57600080fd5b82356133b981613379565b946020939093013593505050565b600080604083850312156133da57600080fd5b50508035926020909101359150565b6000602082840312156133fb57600080fd5b8135611a6781613379565b8015158114611a5857600080fd5b60006020828403121561342657600080fd5b8135611a6781613406565b60008083601f84011261344357600080fd5b50813567ffffffffffffffff81111561345b57600080fd5b6020830191508360208260051b850101111561347657600080fd5b9250929050565b6000806020838503121561349057600080fd5b823567ffffffffffffffff8111156134a757600080fd5b6134b385828601613431565b90969095509350505050565b6000806000604084860312156134d457600080fd5b833567ffffffffffffffff8111156134eb57600080fd5b6134f786828701613431565b909450925050602084013561350b81613406565b809150509250925092565b60006020828403121561352857600080fd5b5035919050565b6000806040838503121561354257600080fd5b823561354d81613379565b9150602083013561355d81613379565b809150509250929050565b805165ffffffffffff8116811461357e57600080fd5b919050565b805161ffff8116811461357e57600080fd5b60008060008060008060c087890312156135ae57600080fd5b86516135b981613379565b60208801519096506fffffffffffffffffffffffffffffffff811681146135df57600080fd5b94506135ed60408801613568565b93506135fb60608801613568565b925061360960808801613583565b915061361760a08801613583565b90509295509295509295565b60006020828403121561363557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561367e5761367e61363c565b500190565b60006020828403121561369557600080fd5b8151611a6781613406565b6000602082840312156136b257600080fd5b8151611a6781613379565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561371e5761371e61363c565b5060010190565b6000828210156137375761373761363c565b500390565b8051600f81900b811461357e57600080fd5b60006080828403121561376057600080fd5b6040516080810181811067ffffffffffffffff821117156137aa577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040526137b68361373c565b81526137c46020840161373c565b602082015260408301516040820152606083015160608201528091505092915050565b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff6000821360008413838304851182821616156138205761382061363c565b7fffffffffffffffffffffffffffffffff80000000000000000000000000000000600085128682058612818416161561385b5761385b61363c565b600087129250858205871284841616156138775761387761363c565b8585058712818416161561388d5761388d61363c565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff80000000000000000000000000000000018312811516156138e0576138e061363c565b816f7fffffffffffffffffffffffffffffff0183138116156139045761390461363c565b5090039392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139465761394661363c565b500290565b600082613981577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60005b838110156139a1578181015183820152602001613989565b838111156113df5750506000910152565b600082516139c4818460208701613986565b9190910192915050565b60208152600082518060208401526139ed816040850160208701613986565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212208398aeb741d2790aa53ca956c623532d7e3d78c06fa237aa5a43112284c5635964736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/RevenueSharingPoolFactory.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/RevenueSharingPoolFactory.json new file mode 100644 index 00000000..b2d2d110 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/RevenueSharingPoolFactory.json @@ -0,0 +1,225 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RevenueSharingPoolFactory", + "sourceName": "contracts/RevenueSharingPoolFactory.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_VECake", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "startTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "poolsIndex", + "type": "uint256" + } + ], + "name": "NewRevenueSharingPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_STARTTIME_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_startTime", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_emergencyReturn", + "type": "address" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parameters", + "outputs": [ + { + "internalType": "address", + "name": "VECake", + "type": "address" + }, + { + "internalType": "uint256", + "name": "startTime", + "type": "uint256" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "address", + "name": "emergencyReturn", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pools", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5060405161465738038061465783398101604081905261002f916100ad565b6100383361005d565b600680546001600160a01b0319166001600160a01b03929092169190911790556100dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100bf57600080fd5b81516001600160a01b03811681146100d657600080fd5b9392505050565b61456b806100ec6000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c806389035730116100765780639442fd621161005b5780639442fd62146101b9578063ac4afa38146101cc578063f2fde38b1461020257600080fd5b8063890357301461011d5780638da5cb5b1461019b57600080fd5b8063081e3eda146100a857806362534e79146100c4578063715018a6146101095780637434c73c14610113575b600080fd5b6100b160075481565b6040519081526020015b60405180910390f35b6006546100e49073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bb565b610111610215565b005b6100b16224ea0081565b6001546002546003546004546005546101549473ffffffffffffffffffffffffffffffffffffffff90811694938116928116911685565b6040805173ffffffffffffffffffffffffffffffffffffffff968716815260208101959095529285169284019290925283166060830152909116608082015260a0016100bb565b60005473ffffffffffffffffffffffffffffffffffffffff166100e4565b6100e46101c736600461076c565b6102a7565b6100e46101da3660046107a8565b60086020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6101116102103660046107c1565b610591565b60005473ffffffffffffffffffffffffffffffffffffffff16331461029b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102a560006106c1565b565b6000805473ffffffffffffffffffffffffffffffffffffffff163314610329576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610292565b6103366224ea0042610812565b84111561039f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c696420737461727454696d650000000000000000000000000000006044820152606401610292565b6040805160a0808201835260065473ffffffffffffffffffffffffffffffffffffffff90811680845260208085018a90528883168587018190529288166060808701829052336080978801819052600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000908116909617905560028d9055600380548616871790556004805486168417905560058054909516179093558651808301949094528387015290820189905242828501528451808303909401845291019283905281519101209061047590610736565b8190604051809103906000f5905080158015610495573d6000803e3d6000fd5b50600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560006002819055600380548316905560048054831690556005805490921690915560078054929350906104f38361082a565b90915550506007805460009081526008602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8681169182179092559354835189815292830152861692917f63ed8263a7e646147254557c1caa689153b829ae2eb99f74878c84f12897c8c0910160405180910390a39392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610612576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610292565b73ffffffffffffffffffffffffffffffffffffffff81166106b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610292565b6106be816106c1565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b613cd28061086483390190565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60008060006060848603121561078157600080fd5b8335925061079160208501610743565b915061079f60408501610743565b90509250925092565b6000602082840312156107ba57600080fd5b5035919050565b6000602082840312156107d357600080fd5b6107dc82610743565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115610825576108256107e3565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561085c5761085c6107e3565b506001019056fe60806040523480156200001157600080fd5b506200001d3362000124565b600180819055506000806000806000336001600160a01b031663890357306040518163ffffffff1660e01b815260040160a060405180830381865afa1580156200006b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000919190620001b5565b945094509450945094506000620000ae856200017460201b60201c565b600281905560068190556003819055600980546001600160a01b038088166001600160a01b031992831617909255600880548a84169216919091179055600f8054918616620100000262010000600160b01b03199092169190911790559050620001188262000124565b5050505050506200026d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062093a806200018681846200021c565b6200019291906200023f565b92915050565b80516001600160a01b0381168114620001b057600080fd5b919050565b600080600080600060a08688031215620001ce57600080fd5b620001d98662000198565b945060208601519350620001f06040870162000198565b9250620002006060870162000198565b9150620002106080870162000198565b90509295509295909350565b6000826200023a57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156200026857634e487b7160e01b600052601160045260246000fd5b500290565b613a55806200027d6000396000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c806388eec93e1161017b578063b3651eea116100d8578063efca2eed1161008c578063f4359ce511610071578063f4359ce5146105dc578063f59dfdfb146105e6578063f7c618c1146105f957600080fd5b8063efca2eed146105c0578063f2fde38b146105c957600080fd5b8063cce277c5116100bd578063cce277c514610591578063e1ebb9f0146105a4578063ec5570d0146105ad57600080fd5b8063b3651eea14610553578063bee5dc321461058957600080fd5b8063981b24d01161012f578063a2ab2a4611610114578063a2ab2a461461052d578063a31254d114610536578063a5420e981461054957600080fd5b8063981b24d0146104fa578063a262f5f81461051a57600080fd5b80638bc8407a116101605780638bc8407a146104b75780638da5cb5b146104ca5780638fe8a101146104e857600080fd5b806388eec93e14610474578063899519be1461049757600080fd5b80635a4b8c1d11610229578063786479cd116101dd5780638147b0dd116101c25780638147b0dd14610435578063862a9f2f1461045857806386f17a361461046157600080fd5b8063786479cd146104025780637e686e011461042257600080fd5b806362534e791161020e57806362534e79146103c757806362812a39146103e7578063715018a6146103fa57600080fd5b80635a4b8c1d1461037357806361ac407d146103be57600080fd5b80631fe063bd116102805780633758716111610265578063375871611461034557806341c0e1b5146103585780634ee2cd7e1461036057600080fd5b80631fe063bd1461031d578063326a94071461033d57600080fd5b806303df738d146102b2578063097cd232146102d85780630cc672e4146102ed5780631e83409a1461030a575b600080fd5b6102c56102c036600461339b565b610619565b6040519081526020015b60405180910390f35b6102eb6102e63660046133c7565b610706565b005b600f546102fa9060ff1681565b60405190151581526020016102cf565b6102c56103183660046133e9565b61079a565b6102c561032b3660046133e9565b60046020526000908152604090205481565b6102eb610895565b6102eb610353366004613414565b610915565b6102eb6109fb565b6102c561036e36600461339b565b610b93565b600f546103999062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102cf565b6102c560025481565b6008546103999073ffffffffffffffffffffffffffffffffffffffff1681565b6103996103f53660046133e9565b610c8e565b6102eb610dd9565b6102c56104103660046133e9565b60056020526000908152604090205481565b6102fa61043036600461347d565b610e66565b6102fa6104433660046133e9565b60106020526000908152604090205460ff1681565b6102c5600a5481565b6102eb61046f3660046134bf565b611233565b6102fa6104823660046133e9565b600e6020526000908152604090205460ff1681565b6102c56104a5366004613516565b60076020526000908152604090205481565b6102eb6104c536600461352f565b6113e5565b60005473ffffffffffffffffffffffffffffffffffffffff16610399565b600f546102fa90610100900460ff1681565b6102c5610508366004613516565b600c6020526000908152604090205481565b6102c56105283660046133e9565b61160c565b6102c560035481565b6102c56105443660046133e9565b6116fc565b6102c56201518081565b6103996105613660046133e9565b600d6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6102eb611891565b6102eb61059f366004613516565b6119cd565b6102c560065481565b6102c56105bb36600461339b565b611a5b565b6102c5600b5481565b6102eb6105d73660046133e9565b611a6e565b6102c562093a8081565b6102fa6105f4366004613516565b611b9b565b6009546103999073ffffffffffffffffffffffffffffffffffffffff1681565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526000928392911690631959a0029060240160c060405180830381865afa15801561068d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b19190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106fe576106f68184611d11565b915050610700565b505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461078c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107968282611ed1565b5050565b600060026001541415610809576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615610880576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b61088b826000611f61565b6001805592915050565b60026001541415610902576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b600260015561090f612114565b60018055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f3248d3607ebf8e63cb453d48ee2eac13a94abe9606149e791b3527de6c1b18239060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010017908190556009546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152610b689273ffffffffffffffffffffffffffffffffffffffff6201000090910481169216906370a0823190602401602060405180830381865afa158015610b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b489190613623565b60095473ffffffffffffffffffffffffffffffffffffffff169190612311565b6040517f0f8eeedbc400fd6686703559f58d1e6143fdaed533f19a86c93d67a2fe4fb33190600090a1565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526000928392911690631959a0029060240160c060405180830381865afa158015610c07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2b9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610c8457610c708184611d11565b610c7a8585611d11565b6106f6919061366b565b6106f68484611d11565b6008546040517fc0dd84bd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8084166004830152839260009291169063c0dd84bd90602401602060405180830381865afa158015610d02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d269190613683565b90508015610da0578273ffffffffffffffffffffffffffffffffffffffff166305a1192b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9d91906136a0565b91505b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600d6020526040902054168015610dd2578092505b5050919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b610e6460006123ea565b565b600060026001541415610ed5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615610f4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b6014821115610fb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f216f7665722032302075736572730000000000000000000000000000000000006044820152606401610783565b6003544210610fc857610fc8612114565b600654600f5460ff168015610fe85750610fe5620151808261366b565b42115b15610ff857610ff561245f565b50425b611001816126c5565b90506000805b8481101561120c576000868683818110611023576110236136bd565b905060200201602081019061103891906133e9565b905073ffffffffffffffffffffffffffffffffffffffff81166110b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f62616420757365720000000000000000000000000000000000000000000000006044820152606401610783565b60006110c282610c8e565b905060006110d18383886126df565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015292935060009290911690631959a0029060240160c060405180830381865afa158015611147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116b9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111be576111b18184896126df565b6111bb908361366b565b91505b81156111f5576009546111e89073ffffffffffffffffffffffffffffffffffffffff168484612311565b6111f2828761366b565b95505b505050508080611204906136ec565b915050611007565b5080156112255780600a546112219190613725565b600a555b505060018080559392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b60005b828110156113df5781601060008686858181106112d6576112d66136bd565b90506020020160208101906112eb91906133e9565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055838382818110611350576113506136bd565b905060200201602081019061136591906133e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4623145569be6765dcff916cbe3a00bd0d2706802c4111e09d24e8e038661490846040516113c5911515815260200190565b60405180910390a3806113d7816136ec565b9150506112b7565b50505050565b6000823b1515801561141d575073ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604090205460ff16155b15611426575060015b60005473ffffffffffffffffffffffffffffffffffffffff90811690841633148061146e575081801561146e57503373ffffffffffffffffffffffffffffffffffffffff8216145b6114d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f5065726d697373696f6e2064656e6965640000000000000000000000000000006044820152606401610783565b3373ffffffffffffffffffffffffffffffffffffffff821614801590611520575073ffffffffffffffffffffffffffffffffffffffff84166000908152600e602052604090205460ff16155b156115745773ffffffffffffffffffffffffffffffffffffffff84166000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b73ffffffffffffffffffffffffffffffffffffffff8481166000818152600d602090815260409182902080548886167fffffffffffffffffffffffff0000000000000000000000000000000000000000821681179092559251338152929094169392849290917f41174a535d9c86cb1bf669d347dcb44c01505b053b2a2ea186a69887859352ae910160405180910390a45050505050565b60006002600154141561167b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff16156116f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b61088b3383611f61565b60006002600154141561176b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff16156117e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b60035442106117f3576117f3612114565b600654600f5460ff1680156118135750611810620151808261366b565b42115b156118235761182061245f565b50425b61182c816126c5565b9050600061183984610c8e565b905060006118488583856126df565b905080156118855780600a5461185e9190613725565b600a556009546118859073ffffffffffffffffffffffffffffffffffffffff168383612311565b60018055949350505050565b600260015414156118fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b600260015560005473ffffffffffffffffffffffffffffffffffffffff1633148061193857503360009081526010602052604090205460ff165b8061195f5750600f5460ff16801561195f57506201518060065461195c919061366b565b42115b6119c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21616c6c6f7700000000000000000000000000000000000000000000000000006044820152606401610783565b61090f61245f565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b611a584282611ed1565b50565b6000611a678383611d11565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611aef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b73ffffffffffffffffffffffffffffffffffffffff8116611b92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610783565b611a58816123ea565b600060026001541415611c0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615611c81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b600954611ca69073ffffffffffffffffffffffffffffffffffffffff16333085612be2565b600f5460ff168015611cc7575062015180600654611cc4919061366b565b42115b15611cd457611cd461245f565b6040518281527faee7b00ca0359ab0727fb54b350e15a1ed46fb12dc0d04ca9bb5f4e7c313249a9060200160405180910390a15050600180805590565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283929116906381fc83bb90602401602060405180830381865afa158015611d85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da99190613623565b905080611dba576000915050610700565b6000611dc7858584612c40565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015611e44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e68919061374e565b90506000611e84826040015187611e7f9190613725565b612d62565b8260200151611e9391906137e7565b8251611e9f919061389d565b9050600081600f0b1215611eba576000945050505050610700565b611ec681600f0b612e34565b979650505050505050565b600954611ef69073ffffffffffffffffffffffffffffffffffffffff16333084612be2565b80600a6000828254611f08919061366b565b9250508190555080600b6000828254611f21919061366b565b9091555060009050611f32836126c5565b905081600760008381526020019081526020016000206000828254611f57919061366b565b9091555050505050565b60006003544210611f7457611f74612114565b600654600f5460ff168015611f945750611f91620151808261366b565b42115b15611fa457611fa161245f565b50425b611fad816126c5565b905073ffffffffffffffffffffffffffffffffffffffff8316611fd657611fd384610c8e565b92505b6000611fe38585846126df565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015292935060009290911690631959a0029060240160c060405180830381865afa158015612059573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207d9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120d0576120c38186856126df565b6120cd908361366b565b91505b811561210b5781600a546120e49190613725565b600a5560095461210b9073ffffffffffffffffffffffffffffffffffffffff168684612311565b50949350505050565b6003546000612122426126c5565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561218e57600080fd5b505af11580156121a2573d6000803e3d6000fd5b5050505060005b603481101561230a57818311156121bf5761230a565b60006121ca84612ea0565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa15801561223f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612263919061374e565b90506000816040015186111561228957612286826040015187611e7f9190613725565b90505b600081836020015161229b91906137e7565b83516122a7919061389d565b9050600081600f0b12156122c9576000878152600c60205260408120556122e5565b6122d581600f0b612e34565b6000888152600c60205260409020555b505050506122f662093a808461366b565b925080612302816136ec565b9150506121a9565b5050600355565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526123e59084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152613051565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156124ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f29190613623565b90506000600a54826125049190613725565b905081600a8190555080600b600082825461251f919061366b565b909155505060065460006125338242613725565b90506000612540836126c5565b4260065590506000805b60348110156126835761256062093a808461366b565b9150814210156125e2578315801561257757508442145b156125aa5760008381526007602052604090205461259690879061366b565b600084815260076020526040902055612683565b836125b58642613725565b6125bf908861390e565b6125c9919061394b565b600084815260076020526040902054612596919061366b565b831580156125ef57508482145b156126225760008381526007602052604090205461260e90879061366b565b60008481526007602052604090205561266a565b8361262d8684613725565b612637908861390e565b612641919061394b565b60008481526007602052604090205461265a919061366b565b6000848152600760205260409020555b819450819250808061267b906136ec565b91505061254a565b5060408051428152602081018790527fce749457b74e10f393f2c6b1ce4261b78791376db5a3f501477a809f03f500d6910160405180910390a1505050505050565b600062093a806126d5818461394b565b610700919061390e565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015260009283928392839216906381fc83bb90602401602060405180830381865afa158015612756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061277a9190613623565b60025490915081612792576000945050505050611a67565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260046020526040902054806127cf576127c8898385612c40565b94506127f8565b73ffffffffffffffffffffffffffffffffffffffff891660009081526005602052604090205494505b8461280257600194505b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301526024820188905260009216906334d901a490604401608060405180830381865afa15801561287a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061289e919061374e565b9050816128e05762093a8080600162093a8084604001516128bf919061366b565b6128c99190613725565b6128d3919061394b565b6128dd919061390e565b91505b8782106128f65760009650505050505050611a67565b82821015612902578291505b6040805160808101825260008082526020820181905291810182905260608101829052905b6034811015612b425789841061293c57612b42565b826040015184101580156129505750858811155b15612a775761296088600161366b565b975060405180608001604052808460000151600f0b81526020018460200151600f0b81526020018460400151815260200184606001518152509150858811156129d55760405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509250612b30565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8e81166004830152602482018b9052909116906334d901a490604401608060405180830381865afa158015612a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a70919061374e565b9250612b30565b6000612a8c836040015186611e7f9190613725565b90506000612ac1612ab9856020015184612aa691906137e7565b8651612ab2919061389d565b600061315d565b600f0b612e34565b905080158015612ad05750878a115b15612adc575050612b42565b8015612b1e576000868152600c6020908152604080832054600790925290912054612b07908361390e565b612b11919061394b565b612b1b908a61366b565b98505b612b2b62093a808761366b565b955050505b80612b3a816136ec565b915050612927565b50612b5785612b5260018a613725565b61317a565b73ffffffffffffffffffffffffffffffffffffffff8c81166000818152600560209081526040808320869055600482529182902088905581518b8152908101859052908101899052929950908c16917fd795915374024be1f03204e052bd584b33bb85c9128ede9c54adbe0bbdc220959060600160405180910390a350939998505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526113df9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612363565b60008082815b6080811015612d5757818310612c5b57612d57565b60006002612c69848661366b565b612c7490600161366b565b612c7e919061394b565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015612cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1f919061374e565b905087816040015111612d3457819450612d42565b612d3f600183613725565b93505b50508080612d4f906136ec565b915050612c46565b509095945050505050565b60007fffffffffffffffffffffffffffffffff800000000000000000000000000000008212801590612da457506f7fffffffffffffffffffffffffffffff8213155b612e30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610783565b5090565b600080821215612e30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610783565b600080600090506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f3a9190613623565b905060005b608081101561304857818310612f5457613048565b60006002612f62848661366b565b612f6d90600161366b565b612f77919061394b565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa158015612fec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613010919061374e565b90508681604001511161302557819450613033565b613030600183613725565b93505b50508080613040906136ec565b915050612f3f565b50909392505050565b60006130b3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166131899092919063ffffffff16565b8051909150156123e557808060200190518101906130d19190613683565b6123e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610783565b600081600f0b83600f0b12156131735781611a67565b5090919050565b60008183106131735781611a67565b606061319884846000856131a0565b949350505050565b606082471015613232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610783565b73ffffffffffffffffffffffffffffffffffffffff85163b6132b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610783565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516132d991906139b2565b60006040518083038185875af1925050503d8060008114613316576040519150601f19603f3d011682016040523d82523d6000602084013e61331b565b606091505b5091509150611ec682828660608315613335575081611a67565b8251156133455782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078391906139ce565b73ffffffffffffffffffffffffffffffffffffffff81168114611a5857600080fd5b600080604083850312156133ae57600080fd5b82356133b981613379565b946020939093013593505050565b600080604083850312156133da57600080fd5b50508035926020909101359150565b6000602082840312156133fb57600080fd5b8135611a6781613379565b8015158114611a5857600080fd5b60006020828403121561342657600080fd5b8135611a6781613406565b60008083601f84011261344357600080fd5b50813567ffffffffffffffff81111561345b57600080fd5b6020830191508360208260051b850101111561347657600080fd5b9250929050565b6000806020838503121561349057600080fd5b823567ffffffffffffffff8111156134a757600080fd5b6134b385828601613431565b90969095509350505050565b6000806000604084860312156134d457600080fd5b833567ffffffffffffffff8111156134eb57600080fd5b6134f786828701613431565b909450925050602084013561350b81613406565b809150509250925092565b60006020828403121561352857600080fd5b5035919050565b6000806040838503121561354257600080fd5b823561354d81613379565b9150602083013561355d81613379565b809150509250929050565b805165ffffffffffff8116811461357e57600080fd5b919050565b805161ffff8116811461357e57600080fd5b60008060008060008060c087890312156135ae57600080fd5b86516135b981613379565b60208801519096506fffffffffffffffffffffffffffffffff811681146135df57600080fd5b94506135ed60408801613568565b93506135fb60608801613568565b925061360960808801613583565b915061361760a08801613583565b90509295509295509295565b60006020828403121561363557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561367e5761367e61363c565b500190565b60006020828403121561369557600080fd5b8151611a6781613406565b6000602082840312156136b257600080fd5b8151611a6781613379565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561371e5761371e61363c565b5060010190565b6000828210156137375761373761363c565b500390565b8051600f81900b811461357e57600080fd5b60006080828403121561376057600080fd5b6040516080810181811067ffffffffffffffff821117156137aa577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040526137b68361373c565b81526137c46020840161373c565b602082015260408301516040820152606083015160608201528091505092915050565b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff6000821360008413838304851182821616156138205761382061363c565b7fffffffffffffffffffffffffffffffff80000000000000000000000000000000600085128682058612818416161561385b5761385b61363c565b600087129250858205871284841616156138775761387761363c565b8585058712818416161561388d5761388d61363c565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff80000000000000000000000000000000018312811516156138e0576138e061363c565b816f7fffffffffffffffffffffffffffffff0183138116156139045761390461363c565b5090039392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139465761394661363c565b500290565b600082613981577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60005b838110156139a1578181015183820152602001613989565b838111156113df5750506000910152565b600082516139c4818460208701613986565b9190910192915050565b60208152600082518060208401526139ed816040850160208701613986565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212208398aeb741d2790aa53ca956c623532d7e3d78c06fa237aa5a43112284c5635964736f6c634300080a0033a26469706673582212202ecd84ba32fd07985418c34ab6d74f4e479fd4bce5bed7c8f603b26ee468264664736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a35760003560e01c806389035730116100765780639442fd621161005b5780639442fd62146101b9578063ac4afa38146101cc578063f2fde38b1461020257600080fd5b8063890357301461011d5780638da5cb5b1461019b57600080fd5b8063081e3eda146100a857806362534e79146100c4578063715018a6146101095780637434c73c14610113575b600080fd5b6100b160075481565b6040519081526020015b60405180910390f35b6006546100e49073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bb565b610111610215565b005b6100b16224ea0081565b6001546002546003546004546005546101549473ffffffffffffffffffffffffffffffffffffffff90811694938116928116911685565b6040805173ffffffffffffffffffffffffffffffffffffffff968716815260208101959095529285169284019290925283166060830152909116608082015260a0016100bb565b60005473ffffffffffffffffffffffffffffffffffffffff166100e4565b6100e46101c736600461076c565b6102a7565b6100e46101da3660046107a8565b60086020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6101116102103660046107c1565b610591565b60005473ffffffffffffffffffffffffffffffffffffffff16331461029b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102a560006106c1565b565b6000805473ffffffffffffffffffffffffffffffffffffffff163314610329576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610292565b6103366224ea0042610812565b84111561039f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c696420737461727454696d650000000000000000000000000000006044820152606401610292565b6040805160a0808201835260065473ffffffffffffffffffffffffffffffffffffffff90811680845260208085018a90528883168587018190529288166060808701829052336080978801819052600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000908116909617905560028d9055600380548616871790556004805486168417905560058054909516179093558651808301949094528387015290820189905242828501528451808303909401845291019283905281519101209061047590610736565b8190604051809103906000f5905080158015610495573d6000803e3d6000fd5b50600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560006002819055600380548316905560048054831690556005805490921690915560078054929350906104f38361082a565b90915550506007805460009081526008602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8681169182179092559354835189815292830152861692917f63ed8263a7e646147254557c1caa689153b829ae2eb99f74878c84f12897c8c0910160405180910390a39392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610612576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610292565b73ffffffffffffffffffffffffffffffffffffffff81166106b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610292565b6106be816106c1565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b613cd28061086483390190565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076757600080fd5b919050565b60008060006060848603121561078157600080fd5b8335925061079160208501610743565b915061079f60408501610743565b90509250925092565b6000602082840312156107ba57600080fd5b5035919050565b6000602082840312156107d357600080fd5b6107dc82610743565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115610825576108256107e3565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561085c5761085c6107e3565b506001019056fe60806040523480156200001157600080fd5b506200001d3362000124565b600180819055506000806000806000336001600160a01b031663890357306040518163ffffffff1660e01b815260040160a060405180830381865afa1580156200006b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000919190620001b5565b945094509450945094506000620000ae856200017460201b60201c565b600281905560068190556003819055600980546001600160a01b038088166001600160a01b031992831617909255600880548a84169216919091179055600f8054918616620100000262010000600160b01b03199092169190911790559050620001188262000124565b5050505050506200026d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062093a806200018681846200021c565b6200019291906200023f565b92915050565b80516001600160a01b0381168114620001b057600080fd5b919050565b600080600080600060a08688031215620001ce57600080fd5b620001d98662000198565b945060208601519350620001f06040870162000198565b9250620002006060870162000198565b9150620002106080870162000198565b90509295509295909350565b6000826200023a57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156200026857634e487b7160e01b600052601160045260246000fd5b500290565b613a55806200027d6000396000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c806388eec93e1161017b578063b3651eea116100d8578063efca2eed1161008c578063f4359ce511610071578063f4359ce5146105dc578063f59dfdfb146105e6578063f7c618c1146105f957600080fd5b8063efca2eed146105c0578063f2fde38b146105c957600080fd5b8063cce277c5116100bd578063cce277c514610591578063e1ebb9f0146105a4578063ec5570d0146105ad57600080fd5b8063b3651eea14610553578063bee5dc321461058957600080fd5b8063981b24d01161012f578063a2ab2a4611610114578063a2ab2a461461052d578063a31254d114610536578063a5420e981461054957600080fd5b8063981b24d0146104fa578063a262f5f81461051a57600080fd5b80638bc8407a116101605780638bc8407a146104b75780638da5cb5b146104ca5780638fe8a101146104e857600080fd5b806388eec93e14610474578063899519be1461049757600080fd5b80635a4b8c1d11610229578063786479cd116101dd5780638147b0dd116101c25780638147b0dd14610435578063862a9f2f1461045857806386f17a361461046157600080fd5b8063786479cd146104025780637e686e011461042257600080fd5b806362534e791161020e57806362534e79146103c757806362812a39146103e7578063715018a6146103fa57600080fd5b80635a4b8c1d1461037357806361ac407d146103be57600080fd5b80631fe063bd116102805780633758716111610265578063375871611461034557806341c0e1b5146103585780634ee2cd7e1461036057600080fd5b80631fe063bd1461031d578063326a94071461033d57600080fd5b806303df738d146102b2578063097cd232146102d85780630cc672e4146102ed5780631e83409a1461030a575b600080fd5b6102c56102c036600461339b565b610619565b6040519081526020015b60405180910390f35b6102eb6102e63660046133c7565b610706565b005b600f546102fa9060ff1681565b60405190151581526020016102cf565b6102c56103183660046133e9565b61079a565b6102c561032b3660046133e9565b60046020526000908152604090205481565b6102eb610895565b6102eb610353366004613414565b610915565b6102eb6109fb565b6102c561036e36600461339b565b610b93565b600f546103999062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102cf565b6102c560025481565b6008546103999073ffffffffffffffffffffffffffffffffffffffff1681565b6103996103f53660046133e9565b610c8e565b6102eb610dd9565b6102c56104103660046133e9565b60056020526000908152604090205481565b6102fa61043036600461347d565b610e66565b6102fa6104433660046133e9565b60106020526000908152604090205460ff1681565b6102c5600a5481565b6102eb61046f3660046134bf565b611233565b6102fa6104823660046133e9565b600e6020526000908152604090205460ff1681565b6102c56104a5366004613516565b60076020526000908152604090205481565b6102eb6104c536600461352f565b6113e5565b60005473ffffffffffffffffffffffffffffffffffffffff16610399565b600f546102fa90610100900460ff1681565b6102c5610508366004613516565b600c6020526000908152604090205481565b6102c56105283660046133e9565b61160c565b6102c560035481565b6102c56105443660046133e9565b6116fc565b6102c56201518081565b6103996105613660046133e9565b600d6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6102eb611891565b6102eb61059f366004613516565b6119cd565b6102c560065481565b6102c56105bb36600461339b565b611a5b565b6102c5600b5481565b6102eb6105d73660046133e9565b611a6e565b6102c562093a8081565b6102fa6105f4366004613516565b611b9b565b6009546103999073ffffffffffffffffffffffffffffffffffffffff1681565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526000928392911690631959a0029060240160c060405180830381865afa15801561068d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b19190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106fe576106f68184611d11565b915050610700565b505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461078c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107968282611ed1565b5050565b600060026001541415610809576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615610880576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b61088b826000611f61565b6001805592915050565b60026001541415610902576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b600260015561090f612114565b60018055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f3248d3607ebf8e63cb453d48ee2eac13a94abe9606149e791b3527de6c1b18239060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b600f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010017908190556009546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152610b689273ffffffffffffffffffffffffffffffffffffffff6201000090910481169216906370a0823190602401602060405180830381865afa158015610b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b489190613623565b60095473ffffffffffffffffffffffffffffffffffffffff169190612311565b6040517f0f8eeedbc400fd6686703559f58d1e6143fdaed533f19a86c93d67a2fe4fb33190600090a1565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526000928392911690631959a0029060240160c060405180830381865afa158015610c07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2b9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610c8457610c708184611d11565b610c7a8585611d11565b6106f6919061366b565b6106f68484611d11565b6008546040517fc0dd84bd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8084166004830152839260009291169063c0dd84bd90602401602060405180830381865afa158015610d02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d269190613683565b90508015610da0578273ffffffffffffffffffffffffffffffffffffffff166305a1192b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9d91906136a0565b91505b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600d6020526040902054168015610dd2578092505b5050919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b610e6460006123ea565b565b600060026001541415610ed5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615610f4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b6014821115610fb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f216f7665722032302075736572730000000000000000000000000000000000006044820152606401610783565b6003544210610fc857610fc8612114565b600654600f5460ff168015610fe85750610fe5620151808261366b565b42115b15610ff857610ff561245f565b50425b611001816126c5565b90506000805b8481101561120c576000868683818110611023576110236136bd565b905060200201602081019061103891906133e9565b905073ffffffffffffffffffffffffffffffffffffffff81166110b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f62616420757365720000000000000000000000000000000000000000000000006044820152606401610783565b60006110c282610c8e565b905060006110d18383886126df565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015292935060009290911690631959a0029060240160c060405180830381865afa158015611147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116b9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111be576111b18184896126df565b6111bb908361366b565b91505b81156111f5576009546111e89073ffffffffffffffffffffffffffffffffffffffff168484612311565b6111f2828761366b565b95505b505050508080611204906136ec565b915050611007565b5080156112255780600a546112219190613725565b600a555b505060018080559392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b60005b828110156113df5781601060008686858181106112d6576112d66136bd565b90506020020160208101906112eb91906133e9565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055838382818110611350576113506136bd565b905060200201602081019061136591906133e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4623145569be6765dcff916cbe3a00bd0d2706802c4111e09d24e8e038661490846040516113c5911515815260200190565b60405180910390a3806113d7816136ec565b9150506112b7565b50505050565b6000823b1515801561141d575073ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604090205460ff16155b15611426575060015b60005473ffffffffffffffffffffffffffffffffffffffff90811690841633148061146e575081801561146e57503373ffffffffffffffffffffffffffffffffffffffff8216145b6114d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f5065726d697373696f6e2064656e6965640000000000000000000000000000006044820152606401610783565b3373ffffffffffffffffffffffffffffffffffffffff821614801590611520575073ffffffffffffffffffffffffffffffffffffffff84166000908152600e602052604090205460ff16155b156115745773ffffffffffffffffffffffffffffffffffffffff84166000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b73ffffffffffffffffffffffffffffffffffffffff8481166000818152600d602090815260409182902080548886167fffffffffffffffffffffffff0000000000000000000000000000000000000000821681179092559251338152929094169392849290917f41174a535d9c86cb1bf669d347dcb44c01505b053b2a2ea186a69887859352ae910160405180910390a45050505050565b60006002600154141561167b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff16156116f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b61088b3383611f61565b60006002600154141561176b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff16156117e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b60035442106117f3576117f3612114565b600654600f5460ff1680156118135750611810620151808261366b565b42115b156118235761182061245f565b50425b61182c816126c5565b9050600061183984610c8e565b905060006118488583856126df565b905080156118855780600a5461185e9190613725565b600a556009546118859073ffffffffffffffffffffffffffffffffffffffff168383612311565b60018055949350505050565b600260015414156118fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b600260015560005473ffffffffffffffffffffffffffffffffffffffff1633148061193857503360009081526010602052604090205460ff165b8061195f5750600f5460ff16801561195f57506201518060065461195c919061366b565b42115b6119c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21616c6c6f7700000000000000000000000000000000000000000000000000006044820152606401610783565b61090f61245f565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b611a584282611ed1565b50565b6000611a678383611d11565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611aef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610783565b73ffffffffffffffffffffffffffffffffffffffff8116611b92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610783565b611a58816123ea565b600060026001541415611c0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610783565b6002600155600f54610100900460ff1615611c81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6b696c6c656400000000000000000000000000000000000000000000000000006044820152606401610783565b600954611ca69073ffffffffffffffffffffffffffffffffffffffff16333085612be2565b600f5460ff168015611cc7575062015180600654611cc4919061366b565b42115b15611cd457611cd461245f565b6040518281527faee7b00ca0359ab0727fb54b350e15a1ed46fb12dc0d04ca9bb5f4e7c313249a9060200160405180910390a15050600180805590565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260009283929116906381fc83bb90602401602060405180830381865afa158015611d85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da99190613623565b905080611dba576000915050610700565b6000611dc7858584612c40565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015611e44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e68919061374e565b90506000611e84826040015187611e7f9190613725565b612d62565b8260200151611e9391906137e7565b8251611e9f919061389d565b9050600081600f0b1215611eba576000945050505050610700565b611ec681600f0b612e34565b979650505050505050565b600954611ef69073ffffffffffffffffffffffffffffffffffffffff16333084612be2565b80600a6000828254611f08919061366b565b9250508190555080600b6000828254611f21919061366b565b9091555060009050611f32836126c5565b905081600760008381526020019081526020016000206000828254611f57919061366b565b9091555050505050565b60006003544210611f7457611f74612114565b600654600f5460ff168015611f945750611f91620151808261366b565b42115b15611fa457611fa161245f565b50425b611fad816126c5565b905073ffffffffffffffffffffffffffffffffffffffff8316611fd657611fd384610c8e565b92505b6000611fe38585846126df565b6008546040517f1959a00200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015292935060009290911690631959a0029060240160c060405180830381865afa158015612059573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207d9190613595565b50505050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120d0576120c38186856126df565b6120cd908361366b565b91505b811561210b5781600a546120e49190613725565b600a5560095461210b9073ffffffffffffffffffffffffffffffffffffffff168684612311565b50949350505050565b6003546000612122426126c5565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561218e57600080fd5b505af11580156121a2573d6000803e3d6000fd5b5050505060005b603481101561230a57818311156121bf5761230a565b60006121ca84612ea0565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa15801561223f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612263919061374e565b90506000816040015186111561228957612286826040015187611e7f9190613725565b90505b600081836020015161229b91906137e7565b83516122a7919061389d565b9050600081600f0b12156122c9576000878152600c60205260408120556122e5565b6122d581600f0b612e34565b6000888152600c60205260409020555b505050506122f662093a808461366b565b925080612302816136ec565b9150506121a9565b5050600355565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526123e59084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152613051565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156124ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f29190613623565b90506000600a54826125049190613725565b905081600a8190555080600b600082825461251f919061366b565b909155505060065460006125338242613725565b90506000612540836126c5565b4260065590506000805b60348110156126835761256062093a808461366b565b9150814210156125e2578315801561257757508442145b156125aa5760008381526007602052604090205461259690879061366b565b600084815260076020526040902055612683565b836125b58642613725565b6125bf908861390e565b6125c9919061394b565b600084815260076020526040902054612596919061366b565b831580156125ef57508482145b156126225760008381526007602052604090205461260e90879061366b565b60008481526007602052604090205561266a565b8361262d8684613725565b612637908861390e565b612641919061394b565b60008481526007602052604090205461265a919061366b565b6000848152600760205260409020555b819450819250808061267b906136ec565b91505061254a565b5060408051428152602081018790527fce749457b74e10f393f2c6b1ce4261b78791376db5a3f501477a809f03f500d6910160405180910390a1505050505050565b600062093a806126d5818461394b565b610700919061390e565b6008546040517f81fc83bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015260009283928392839216906381fc83bb90602401602060405180830381865afa158015612756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061277a9190613623565b60025490915081612792576000945050505050611a67565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260046020526040902054806127cf576127c8898385612c40565b94506127f8565b73ffffffffffffffffffffffffffffffffffffffff891660009081526005602052604090205494505b8461280257600194505b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301526024820188905260009216906334d901a490604401608060405180830381865afa15801561287a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061289e919061374e565b9050816128e05762093a8080600162093a8084604001516128bf919061366b565b6128c99190613725565b6128d3919061394b565b6128dd919061390e565b91505b8782106128f65760009650505050505050611a67565b82821015612902578291505b6040805160808101825260008082526020820181905291810182905260608101829052905b6034811015612b425789841061293c57612b42565b826040015184101580156129505750858811155b15612a775761296088600161366b565b975060405180608001604052808460000151600f0b81526020018460200151600f0b81526020018460400151815260200184606001518152509150858811156129d55760405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509250612b30565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8e81166004830152602482018b9052909116906334d901a490604401608060405180830381865afa158015612a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a70919061374e565b9250612b30565b6000612a8c836040015186611e7f9190613725565b90506000612ac1612ab9856020015184612aa691906137e7565b8651612ab2919061389d565b600061315d565b600f0b612e34565b905080158015612ad05750878a115b15612adc575050612b42565b8015612b1e576000868152600c6020908152604080832054600790925290912054612b07908361390e565b612b11919061394b565b612b1b908a61366b565b98505b612b2b62093a808761366b565b955050505b80612b3a816136ec565b915050612927565b50612b5785612b5260018a613725565b61317a565b73ffffffffffffffffffffffffffffffffffffffff8c81166000818152600560209081526040808320869055600482529182902088905581518b8152908101859052908101899052929950908c16917fd795915374024be1f03204e052bd584b33bb85c9128ede9c54adbe0bbdc220959060600160405180910390a350939998505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526113df9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612363565b60008082815b6080811015612d5757818310612c5b57612d57565b60006002612c69848661366b565b612c7490600161366b565b612c7e919061394b565b6008546040517f34d901a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201849052929350600092909116906334d901a490604401608060405180830381865afa158015612cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1f919061374e565b905087816040015111612d3457819450612d42565b612d3f600183613725565b93505b50508080612d4f906136ec565b915050612c46565b509095945050505050565b60007fffffffffffffffffffffffffffffffff800000000000000000000000000000008212801590612da457506f7fffffffffffffffffffffffffffffff8213155b612e30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610783565b5090565b600080821215612e30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610783565b600080600090506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f3a9190613623565b905060005b608081101561304857818310612f5457613048565b60006002612f62848661366b565b612f6d90600161366b565b612f77919061394b565b6008546040517f8ad4c4470000000000000000000000000000000000000000000000000000000081526004810183905291925060009173ffffffffffffffffffffffffffffffffffffffff90911690638ad4c44790602401608060405180830381865afa158015612fec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613010919061374e565b90508681604001511161302557819450613033565b613030600183613725565b93505b50508080613040906136ec565b915050612f3f565b50909392505050565b60006130b3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166131899092919063ffffffff16565b8051909150156123e557808060200190518101906130d19190613683565b6123e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610783565b600081600f0b83600f0b12156131735781611a67565b5090919050565b60008183106131735781611a67565b606061319884846000856131a0565b949350505050565b606082471015613232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610783565b73ffffffffffffffffffffffffffffffffffffffff85163b6132b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610783565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516132d991906139b2565b60006040518083038185875af1925050503d8060008114613316576040519150601f19603f3d011682016040523d82523d6000602084013e61331b565b606091505b5091509150611ec682828660608315613335575081611a67565b8251156133455782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078391906139ce565b73ffffffffffffffffffffffffffffffffffffffff81168114611a5857600080fd5b600080604083850312156133ae57600080fd5b82356133b981613379565b946020939093013593505050565b600080604083850312156133da57600080fd5b50508035926020909101359150565b6000602082840312156133fb57600080fd5b8135611a6781613379565b8015158114611a5857600080fd5b60006020828403121561342657600080fd5b8135611a6781613406565b60008083601f84011261344357600080fd5b50813567ffffffffffffffff81111561345b57600080fd5b6020830191508360208260051b850101111561347657600080fd5b9250929050565b6000806020838503121561349057600080fd5b823567ffffffffffffffff8111156134a757600080fd5b6134b385828601613431565b90969095509350505050565b6000806000604084860312156134d457600080fd5b833567ffffffffffffffff8111156134eb57600080fd5b6134f786828701613431565b909450925050602084013561350b81613406565b809150509250925092565b60006020828403121561352857600080fd5b5035919050565b6000806040838503121561354257600080fd5b823561354d81613379565b9150602083013561355d81613379565b809150509250929050565b805165ffffffffffff8116811461357e57600080fd5b919050565b805161ffff8116811461357e57600080fd5b60008060008060008060c087890312156135ae57600080fd5b86516135b981613379565b60208801519096506fffffffffffffffffffffffffffffffff811681146135df57600080fd5b94506135ed60408801613568565b93506135fb60608801613568565b925061360960808801613583565b915061361760a08801613583565b90509295509295509295565b60006020828403121561363557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561367e5761367e61363c565b500190565b60006020828403121561369557600080fd5b8151611a6781613406565b6000602082840312156136b257600080fd5b8151611a6781613379565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561371e5761371e61363c565b5060010190565b6000828210156137375761373761363c565b500390565b8051600f81900b811461357e57600080fd5b60006080828403121561376057600080fd5b6040516080810181811067ffffffffffffffff821117156137aa577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040526137b68361373c565b81526137c46020840161373c565b602082015260408301516040820152606083015160608201528091505092915050565b600081600f0b83600f0b6f7fffffffffffffffffffffffffffffff6000821360008413838304851182821616156138205761382061363c565b7fffffffffffffffffffffffffffffffff80000000000000000000000000000000600085128682058612818416161561385b5761385b61363c565b600087129250858205871284841616156138775761387761363c565b8585058712818416161561388d5761388d61363c565b5050509290910295945050505050565b600081600f0b83600f0b60008112817fffffffffffffffffffffffffffffffff80000000000000000000000000000000018312811516156138e0576138e061363c565b816f7fffffffffffffffffffffffffffffff0183138116156139045761390461363c565b5090039392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139465761394661363c565b500290565b600082613981577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60005b838110156139a1578181015183820152602001613989565b838111156113df5750506000910152565b600082516139c4818460208701613986565b9190910192915050565b60208152600082518060208401526139ed816040850160208701613986565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212208398aeb741d2790aa53ca956c623532d7e3d78c06fa237aa5a43112284c5635964736f6c634300080a0033a26469706673582212202ecd84ba32fd07985418c34ab6d74f4e479fd4bce5bed7c8f603b26ee468264664736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/SyrupBar.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/SyrupBar.json new file mode 100644 index 00000000..b0ed0f78 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/SyrupBar.json @@ -0,0 +1,699 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SyrupBar", + "sourceName": "contracts/test/SyrupBar.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract CakeToken", + "name": "_cake", + "type": "address" + } + ], + "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": "value", + "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": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cake", + "outputs": [ + { + "internalType": "contract CakeToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "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" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "safeCakeTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002b0a38038062002b0a833981810160405260208110156200003757600080fd5b5051604080518082018252600e81526d29bcb93ab82130b9102a37b5b2b760911b60208281019190915282518084019093526005835264053595255560dc1b908301529060006200008762000136565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000e69060049060208501906200013a565b508051620000fc9060059060208401906200013a565b5050600680546001600160a01b0390931661010002610100600160a81b031960ff19909416601217939093169290921790915550620001d6565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200017d57805160ff1916838001178555620001ad565b82800160010185558215620001ad579182015b82811115620001ad57825182559160200191906001019062000190565b50620001bb929150620001bf565b5090565b5b80821115620001bb5760008155600101620001c0565b61292480620001e66000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063893d20e811610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146106ca578063e7a324dc14610705578063f1127ed81461070d578063f2fde38b1461076c576101da565b8063a9059cbb14610602578063b4b5ea571461063b578063c3cda5201461066e578063dce17484146106c2576101da565b80639dc29fac116100de5780639dc29fac1461053a578063a0712d6814610573578063a2e6ddcc14610590578063a457c2d7146105c9576101da565b8063893d20e8146105225780638da5cb5b1461052a57806395d89b4114610532576101da565b806340c10f191161017c57806370a082311161014b57806370a082311461047b578063715018a6146104ae578063782d6fe1146104b65780637ecebe00146104ef576101da565b806340c10f1914610365578063587cde1e146103a05780635c19a95c146103fc5780636fcfff451461042f576101da565b806320606b70116101b857806320606b70146102c357806323b872dd146102cb578063313ce5671461030e578063395093511461032c576101da565b806306fdde03146101df578063095ea7b31461025c57806318160ddd146102a9575b600080fd5b6101e761079f565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610221578181015183820152602001610209565b50505050905090810190601f16801561024e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102956004803603604081101561027257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610853565b604080519115158252519081900360200190f35b6102b1610871565b60408051918252519081900360200190f35b6102b1610877565b610295600480360360608110156102e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561089b565b61031661093c565b6040805160ff9092168252519081900360200190f35b6102956004803603604081101561034257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610945565b61039e6004803603604081101561037b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109a0565b005b6103d3600480360360208110156103b657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a88565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039e6004803603602081101561041257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ab3565b6104626004803603602081101561044557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ac0565b6040805163ffffffff9092168252519081900360200190f35b6102b16004803603602081101561049157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ad8565b61039e610b00565b6102b1600480360360408110156104cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c17565b6102b16004803603602081101561050557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ee1565b6103d3610ef3565b6103d3610f02565b6101e7610f1e565b61039e6004803603604081101561055057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f9d565b6102956004803603602081101561058957600080fd5b503561104f565b61039e600480360360408110156105a657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611112565b610295600480360360408110156105df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113ce565b6102956004803603604081101561061857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611443565b6102b16004803603602081101561065157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611457565b61039e600480360360c081101561068457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356114f3565b6103d3611832565b6102b1600480360360408110156106e057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611853565b6102b161188b565b61074c6004803603604081101561072357600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff166118af565b6040805163ffffffff909316835260208301919091528051918290030190f35b61039e6004803603602081101561078257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118dc565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b820191906000526020600020905b81548152906001019060200180831161082c57829003601f168201915b5050505050905090565b6000610867610860611a7d565b8484611a81565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b60006108a8848484611bc8565b610932846108b4611a7d565b61092d856040518060600160405280602881526020016127516028913973ffffffffffffffffffffffffffffffffffffffff8a166000908152600260205260408120906108ff611a7d565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611d8f565b611a81565b5060019392505050565b60065460ff1690565b6000610867610952611a7d565b8461092d8560026000610963611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611e40565b6109a8611a7d565b73ffffffffffffffffffffffffffffffffffffffff166109c6610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610a4857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282611eb4565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054610a84921683611fdb565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610abd33826121bc565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610b08611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610b26610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610ba857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610c71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806127d36027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610cac57600091505061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610d715773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff1683529290522060010154905061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610db957600091505061086b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e9d57600282820363ffffffff16048103610e096126a4565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610e785760200151945061086b9350505050565b805163ffffffff16871115610e8f57819350610e96565b6001820392505b5050610ddf565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610efd610f02565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b610fa5611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610fc3610f02565b73ffffffffffffffffffffffffffffffffffffffff161461104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282612283565b6000611059611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611077610f02565b73ffffffffffffffffffffffffffffffffffffffff16146110f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61110a611104611a7d565b83611eb4565b506001919050565b61111a611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611138610f02565b73ffffffffffffffffffffffffffffffffffffffff16146111ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092610100900473ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561123057600080fd5b505afa158015611244573d6000803e3d6000fd5b505050506040513d602081101561125a57600080fd5b505190508082111561131a57600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b1580156112e857600080fd5b505af11580156112fc573d6000803e3d6000fd5b505050506040513d602081101561131257600080fd5b506113c99050565b600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820186905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b15801561139c57600080fd5b505af11580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b50505b505050565b60006108676113db611a7d565b8461092d856040518060600160405280602581526020016128656025913960026000611405611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611d8f565b6000610867611450611a7d565b8484611bc8565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff168061148f5760006114ec565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86661151e61079f565b8051906020012061152d6123c1565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa1580156116a6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661173d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127796026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146117c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128206022913960400191505060405180910390fd5b8742111561181b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061272b6026913960400191505060405180910390fd5b611825818b6121bc565b505050505b505050505050565b600654610100900473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6118e4611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611902610f02565b73ffffffffffffffffffffffffffffffffffffffff161461198457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166119f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127056026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611aed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806126e16024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128cd6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316611c34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806126bc6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611ca0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806128426023913960400191505060405180910390fd5b611cea816040518060600160405280602681526020016127fa6026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611d269082611e40565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611e38576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dfd578181015183820152602001611de5565b50505050905090810190601f168015611e2a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156114ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611f439082611e40565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611f769082611e40565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120175750600081115b156113c95773ffffffffffffffffffffffffffffffffffffffff8316156120ee5773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff1690816120715760006120ce565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006120dc82856123c5565b90506120ea8684848461243c565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156113c95773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff1690816121435760006121a0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006121ae8285611e40565b905061182a8584848461243c565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054909116906121f084610ad8565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461227d828483611fdb565b50505050565b73ffffffffffffffffffffffffffffffffffffffff82166122ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061288a6021913960400191505060405180910390fd5b612339816040518060600160405280602281526020016128ab6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205560035461236c90826123c5565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b4690565b60008282111561243657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006124604360405180606001604052806034815260200161279f6034913961262c565b905060008463ffffffff161180156124d4575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b1561253c5773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff890116845290915290206001018290556125d5565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b600081640100000000841061269c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611dfd578181015183820152602001611de5565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a206275726e2066726f6d20746865207a65726f206164647265737342455032303a206275726e20616d6f756e7420657863656564732062616c616e636542455032303a20617070726f766520746f20746865207a65726f2061646472657373a26469706673582212201422e88a0353871be13774eb48012ed80d303ace501a54c167b5111bd7069bd664736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063893d20e811610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146106ca578063e7a324dc14610705578063f1127ed81461070d578063f2fde38b1461076c576101da565b8063a9059cbb14610602578063b4b5ea571461063b578063c3cda5201461066e578063dce17484146106c2576101da565b80639dc29fac116100de5780639dc29fac1461053a578063a0712d6814610573578063a2e6ddcc14610590578063a457c2d7146105c9576101da565b8063893d20e8146105225780638da5cb5b1461052a57806395d89b4114610532576101da565b806340c10f191161017c57806370a082311161014b57806370a082311461047b578063715018a6146104ae578063782d6fe1146104b65780637ecebe00146104ef576101da565b806340c10f1914610365578063587cde1e146103a05780635c19a95c146103fc5780636fcfff451461042f576101da565b806320606b70116101b857806320606b70146102c357806323b872dd146102cb578063313ce5671461030e578063395093511461032c576101da565b806306fdde03146101df578063095ea7b31461025c57806318160ddd146102a9575b600080fd5b6101e761079f565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610221578181015183820152602001610209565b50505050905090810190601f16801561024e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102956004803603604081101561027257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610853565b604080519115158252519081900360200190f35b6102b1610871565b60408051918252519081900360200190f35b6102b1610877565b610295600480360360608110156102e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561089b565b61031661093c565b6040805160ff9092168252519081900360200190f35b6102956004803603604081101561034257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610945565b61039e6004803603604081101561037b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109a0565b005b6103d3600480360360208110156103b657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a88565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039e6004803603602081101561041257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ab3565b6104626004803603602081101561044557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ac0565b6040805163ffffffff9092168252519081900360200190f35b6102b16004803603602081101561049157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ad8565b61039e610b00565b6102b1600480360360408110156104cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c17565b6102b16004803603602081101561050557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ee1565b6103d3610ef3565b6103d3610f02565b6101e7610f1e565b61039e6004803603604081101561055057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f9d565b6102956004803603602081101561058957600080fd5b503561104f565b61039e600480360360408110156105a657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611112565b610295600480360360408110156105df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113ce565b6102956004803603604081101561061857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611443565b6102b16004803603602081101561065157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611457565b61039e600480360360c081101561068457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356114f3565b6103d3611832565b6102b1600480360360408110156106e057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611853565b6102b161188b565b61074c6004803603604081101561072357600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff166118af565b6040805163ffffffff909316835260208301919091528051918290030190f35b61039e6004803603602081101561078257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118dc565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b820191906000526020600020905b81548152906001019060200180831161082c57829003601f168201915b5050505050905090565b6000610867610860611a7d565b8484611a81565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b60006108a8848484611bc8565b610932846108b4611a7d565b61092d856040518060600160405280602881526020016127516028913973ffffffffffffffffffffffffffffffffffffffff8a166000908152600260205260408120906108ff611a7d565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611d8f565b611a81565b5060019392505050565b60065460ff1690565b6000610867610952611a7d565b8461092d8560026000610963611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611e40565b6109a8611a7d565b73ffffffffffffffffffffffffffffffffffffffff166109c6610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610a4857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282611eb4565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054610a84921683611fdb565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610abd33826121bc565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610b08611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610b26610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610ba857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610c71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806127d36027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610cac57600091505061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610d715773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff1683529290522060010154905061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610db957600091505061086b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e9d57600282820363ffffffff16048103610e096126a4565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610e785760200151945061086b9350505050565b805163ffffffff16871115610e8f57819350610e96565b6001820392505b5050610ddf565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610efd610f02565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b610fa5611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610fc3610f02565b73ffffffffffffffffffffffffffffffffffffffff161461104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282612283565b6000611059611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611077610f02565b73ffffffffffffffffffffffffffffffffffffffff16146110f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61110a611104611a7d565b83611eb4565b506001919050565b61111a611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611138610f02565b73ffffffffffffffffffffffffffffffffffffffff16146111ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092610100900473ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561123057600080fd5b505afa158015611244573d6000803e3d6000fd5b505050506040513d602081101561125a57600080fd5b505190508082111561131a57600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b1580156112e857600080fd5b505af11580156112fc573d6000803e3d6000fd5b505050506040513d602081101561131257600080fd5b506113c99050565b600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820186905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b15801561139c57600080fd5b505af11580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b50505b505050565b60006108676113db611a7d565b8461092d856040518060600160405280602581526020016128656025913960026000611405611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611d8f565b6000610867611450611a7d565b8484611bc8565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff168061148f5760006114ec565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86661151e61079f565b8051906020012061152d6123c1565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa1580156116a6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661173d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127796026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146117c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128206022913960400191505060405180910390fd5b8742111561181b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061272b6026913960400191505060405180910390fd5b611825818b6121bc565b505050505b505050505050565b600654610100900473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6118e4611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611902610f02565b73ffffffffffffffffffffffffffffffffffffffff161461198457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166119f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127056026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611aed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806126e16024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128cd6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316611c34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806126bc6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611ca0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806128426023913960400191505060405180910390fd5b611cea816040518060600160405280602681526020016127fa6026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611d269082611e40565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611e38576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dfd578181015183820152602001611de5565b50505050905090810190601f168015611e2a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156114ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611f439082611e40565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611f769082611e40565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120175750600081115b156113c95773ffffffffffffffffffffffffffffffffffffffff8316156120ee5773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff1690816120715760006120ce565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006120dc82856123c5565b90506120ea8684848461243c565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156113c95773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff1690816121435760006121a0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006121ae8285611e40565b905061182a8584848461243c565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054909116906121f084610ad8565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461227d828483611fdb565b50505050565b73ffffffffffffffffffffffffffffffffffffffff82166122ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061288a6021913960400191505060405180910390fd5b612339816040518060600160405280602281526020016128ab6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205560035461236c90826123c5565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b4690565b60008282111561243657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006124604360405180606001604052806034815260200161279f6034913961262c565b905060008463ffffffff161180156124d4575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b1561253c5773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff890116845290915290206001018290556125d5565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b600081640100000000841061269c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611dfd578181015183820152602001611de5565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a206275726e2066726f6d20746865207a65726f206164647265737342455032303a206275726e20616d6f756e7420657863656564732062616c616e636542455032303a20617070726f766520746f20746865207a65726f2061646472657373a26469706673582212201422e88a0353871be13774eb48012ed80d303ace501a54c167b5111bd7069bd664736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/test/artifactsFile/VECake.json b/projects/revenue-sharing-pool/v2/test/artifactsFile/VECake.json new file mode 100644 index 00000000..3181f97c --- /dev/null +++ b/projects/revenue-sharing-pool/v2/test/artifactsFile/VECake.json @@ -0,0 +1,1955 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VECake", + "sourceName": "contracts/VECake.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICakePool", + "name": "_cakePool", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IProxyForCakePoolFactory", + "name": "_ProxyForCakePoolFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "DelegateFromCakePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lockTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "penalty", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "EarlyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InjectToDelegator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "MigrateFromCakePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "MigrationConvertToDelegation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "farmBooster", + "type": "address" + } + ], + "name": "NewFarmBooster", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Redistribute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "previousBreaker", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "breaker", + "type": "uint256" + } + ], + "name": "SetBreaker", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "oldEarlyWithdrawFeeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newEarlyWithdrawFeeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "oldRedistributeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newRedistribiteBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldTreasuryAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasuryAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldRedistributeAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newRedistributeAddr", + "type": "address" + } + ], + "name": "SetEarlyWithdrawConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetEarlyWithdrawSwitch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetEmergencyWithdrawSwitch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "SetLimitTimeOfConvert", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetNoPenaltyForEarlyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "SetWhitelistedCaller", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "SetWhitelistedRedistributors", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "previousSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supply", + "type": "uint256" + } + ], + "name": "Supply", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isDelegator", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint40", + "name": "limitTimestampForEarlyWithdraw", + "type": "uint40" + } + ], + "name": "UpdateDelegator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "WithdrawAll", + "type": "event" + }, + { + "inputs": [], + "name": "ACTION_CREATE_LOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_DEPOSIT_FOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_INCREASE_LOCK_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_INCREASE_UNLOCK_TIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CakePool", + "outputs": [ + { + "internalType": "contract ICakePool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DELEGATION_FROM_CAKE_POOL_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DELEGATOR_FLAG", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FarmBooster", + "outputs": [ + { + "internalType": "contract IFarmBooster", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIGRATION_FROM_CAKE_POOL_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NOT_DELEGATOR_FLAG", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NOT_WITHDRAW_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ProxyForCakePoolFactory", + "outputs": [ + { + "internalType": "contract IProxyForCakePoolFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WEEK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WITHDREW_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accumRedistribute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAtForProxy", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAtUser", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOfForProxy", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOfUser", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "breaker", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpoint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLockForProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + } + ], + "name": "delegateFromCakePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegator", + "outputs": [ + { + "internalType": "uint104", + "name": "delegatedCakeAmount", + "type": "uint104" + }, + { + "internalType": "uint104", + "name": "notInjectedCakeAmount", + "type": "uint104" + }, + { + "internalType": "uint40", + "name": "limitTimestampForEarlyWithdraw", + "type": "uint40" + }, + { + "internalType": "uint8", + "name": "isDelegator", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockDuration", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_for", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "depositFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "earlyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "earlyWithdrawBpsPerWeek", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "earlyWithdrawSwitch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdrawSwitch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "everEmergencyWithdraw", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getUserInfo", + "outputs": [ + { + "internalType": "int128", + "name": "amount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + }, + { + "internalType": "address", + "name": "cakePoolProxy", + "type": "address" + }, + { + "internalType": "uint128", + "name": "cakeAmount", + "type": "uint128" + }, + { + "internalType": "uint48", + "name": "lockEndTime", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "migrationTime", + "type": "uint48" + }, + { + "internalType": "uint16", + "name": "cakePoolType", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "withdrawFlag", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "increaseLockAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newUnlockTime", + "type": "uint256" + } + ], + "name": "increaseUnlockTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "inilization", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initializeCakePoolMigration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "injectToDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isCakePoolProxy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "limitTimeOfConvert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "locks", + "outputs": [ + { + "internalType": "int128", + "name": "amount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFromCakePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + } + ], + "name": "migrationConvertToDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "noPenaltyForEarlyWithdraw", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redistribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "redistributeAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redistributeBps", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_breaker", + "type": "uint256" + } + ], + "name": "setBreaker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "_newEarlyWithdrawBpsPerWeek", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "_newRedistributeBps", + "type": "uint64" + }, + { + "internalType": "address", + "name": "_newTreasuryAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_newRedistributeAddr", + "type": "address" + } + ], + "name": "setEarlyWithdrawConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_earlyWithdrawSwitch", + "type": "bool" + } + ], + "name": "setEarlyWithdrawSwitch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_emergencyWithdrawSwitch", + "type": "bool" + } + ], + "name": "setEmergencyWithdrawSwitch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_farmBooster", + "type": "address" + } + ], + "name": "setFarmBooster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_limitTime", + "type": "uint256" + } + ], + "name": "setLimitTimeOfConvert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_status", + "type": "bool" + } + ], + "name": "setNoPenaltyForEarlyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "callers", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "setWhitelistedCallers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "callers", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "setWhitelistedRedistributors", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "slopeChanges", + "outputs": [ + { + "internalType": "int128", + "name": "", + "type": "int128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "supply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isDelegator", + "type": "bool" + }, + { + "internalType": "uint40", + "name": "_limitTimestampForEarlyWithdraw", + "type": "uint40" + } + ], + "name": "updateDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "address", + "name": "cakePoolProxy", + "type": "address" + }, + { + "internalType": "uint128", + "name": "cakeAmount", + "type": "uint128" + }, + { + "internalType": "uint48", + "name": "lockEndTime", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "migrationTime", + "type": "uint48" + }, + { + "internalType": "uint16", + "name": "cakePoolType", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "withdrawFlag", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userPointEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "userPointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedCallers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedRedistributors", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60e0604052621275006004553480156200001857600080fd5b5060405162006376380380620063768339810160408190526200003b91620002b8565b6200004633620001a9565b60018080556001600160a01b0380851660a052838116608090815290831660c05260408051918201815260008083526020838101828152428585019081524360608701908152600d80549889018155909452945190516001600160801b03908116600160801b0291161760039095027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019590955592517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb6850155517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb7909301929092556014805460ff19166012908117909155825180840190935280835271566f74652d657363726f7765642043616b6560701b929091019182526200016f9181620001f9565b5060408051808201909152600680825265766543616b6560d01b60209092019182526200019f91601391620001f9565b5050505062000349565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805462000207906200030c565b90600052602060002090601f0160209004810192826200022b576000855562000276565b82601f106200024657805160ff191683800117855562000276565b8280016001018555821562000276579182015b828111156200027657825182559160200191906001019062000259565b506200028492915062000288565b5090565b5b8082111562000284576000815560010162000289565b6001600160a01b0381168114620002b557600080fd5b50565b600080600060608486031215620002ce57600080fd5b8351620002db816200029f565b6020850151909350620002ee816200029f565b604085015190925062000301816200029f565b809150509250925092565b600181811c908216806200032157607f821691505b602082108114156200034357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c051615f8d620003e960003960008181610ae90152612166015260008181610ba00152818161144901528181611d2901528181611f140152818161203a015281816120b001528181612f7901528181613097015281816131150152613478015260008181610d3701528181610e75015281816126d601528181613ae101528181613da101528181613eae01526142930152615f8d6000f3fe608060405234801561001057600080fd5b50600436106104a05760003560e01c8063705096c71161026d578063b225bb5f11610151578063d73f98a3116100ce578063f4359ce511610092578063f4359ce514610cd7578063f52a36f714610ce1578063fa09e63014610d17578063fb489a7b14610d2a578063fc0c546a14610d32578063ffc97ce914610d5957600080fd5b8063d73f98a314610c8e578063db2e21bc14610ca1578063ec5570d014610ca9578063f2c7a81b14610cbc578063f2fde38b14610cc457600080fd5b8063c12ebb5f11610115578063c12ebb5f14610c33578063c1d1192914610c46578063c2c4c5c114610c4f578063cfee396f14610c57578063d4eda63f14610c6b57600080fd5b8063b225bb5f14610bc2578063b52c05fe14610bd6578063b6bbbcd114610be9578063b6e45a4e14610c03578063c0dd84bd14610c1057600080fd5b80638e900530116101ea5780639d4b4ba1116101ae5780639d4b4ba114610b52578063a621440414610b65578063a63dce7114610b6d578063a7ccf1e014610b75578063a88a885514610b88578063aa94ab5914610b9b57600080fd5b80638e90053014610b26578063900cf0cf14610b2e57806395d89b4114610b37578063981b24d014610b3f5780639c490f19146104f557600080fd5b80637c616fe6116102315780637c616fe614610ab157806381fc83bb14610ac4578063827e8e0c14610ae45780638ad4c44714610b0b5780638da5cb5b14610b1e57600080fd5b8063705096c714610a4d57806370a0823114610a60578063715018a614610a7357806375cd6c6714610a7b5780637c5acb2514610a8e57600080fd5b806330d9a62a1161039457806355ed0a78116103115780636386c1c7116102d55780636386c1c7146108d15780636574deb714610a045780636582a8c014610a1757806365a5d5f014610a2a57806365f9008a14610a3257806367e7a7cb14610a4557600080fd5b806355ed0a781461083357806358fca6a51461083b578063598085ae146108435780635de9a137146108565780635e8bb48e1461089e57600080fd5b80633d5c78bd116103585780633d5c78bd1461075d578063403f4447146107705780634ee2cd7e1461078357806351cff8d914610796578063539e5082146107a957600080fd5b806330d9a62a146106a0578063313ce567146106c057806334d901a4146106df57806336a583911461071a578063399f3a4f1461074a57600080fd5b80630efe6a8b1161042257806319577c6e116103e657806319577c6e146105935780631959a002146105a65780631bb8c61d146106675780632ea1fe7a1461067a5780632f4f21e21461068d57600080fd5b80630efe6a8b146105495780630f41e0d21461055c57806312c470e91461056557806312cae7af1461057857806318160ddd1461058b57600080fd5b806306a4da7e1161046957806306a4da7e146104f557806306fdde031461051057806308154df01461052557806308c3dea71461052d5780630a6373b31461053657600080fd5b8062b79fd4146104a557806302641632146104c0578063047fc9aa146104c8578063052b726f146104d1578063059f8b16146104e6575b600080fd5b6104ad600081565b6040519081526020015b60405180910390f35b6104ad600381565b6104ad60025481565b6104e46104df366004615646565b610d7c565b005b6104ad670de0b6b3a764000081565b6104fd600181565b60405161ffff90911681526020016104b7565b610518610ef2565b6040516104b7919061569e565b6104fd600081565b6104ad60155481565b6104e46105443660046156d1565b610f80565b6104e46105573660046156ee565b61143e565b6104ad60115481565b6104ad610573366004615646565b61151e565b6104ad6105863660046156d1565b6115ea565b6104ad6115f5565b6104e46105a1366004615731565b611665565b6106156105b43660046156d1565b600860205260009081526040902080546001909101546001600160a01b03909116906001600160801b0381169065ffffffffffff600160801b8204811691600160b01b81049091169061ffff600160e01b8204811691600160f01b90041686565b604080516001600160a01b0390971687526001600160801b03909516602087015265ffffffffffff938416948601949094529116606084015261ffff90811660808401521660a082015260c0016104b7565b6104e461067536600461576a565b6116eb565b6104e46106883660046157ef565b611800565b6104e461069b366004615646565b611879565b6016546106b3906001600160a01b031681565b6040516104b7919061580c565b6014546106cd9060ff1681565b60405160ff90911681526020016104b7565b6106f26106ed366004615646565b6119b6565b60408051600f95860b81529390940b60208401529282015260608101919091526080016104b7565b6014546107329061010090046001600160401b031681565b6040516001600160401b0390911681526020016104b7565b6104e4610758366004615820565b611a06565b6104e461076b366004615842565b611a5d565b6104e461077e366004615842565b611b18565b6104ad610791366004615646565b611c44565b6104e46107a43660046156d1565b611d1e565b6107f96107b73660046156d1565b6009602052600090815260409020546001600160681b0380821691600160681b810490911690600160d01b810464ffffffffff1690600160f81b900460ff1684565b604080516001600160681b03958616815294909316602085015264ffffffffff9091169183019190915260ff1660608201526080016104b7565b6104e4611ebc565b6104fd600281565b6104e46108513660046157ef565b612329565b6108846108643660046156d1565b60076020526000908152604090208054600190910154600f9190910b9082565b60408051600f9390930b83526020830191909152016104b7565b6108c16108ac3660046156d1565b600b6020526000908152604090205460ff1681565b60405190151581526020016104b7565b61099f6108df3660046156d1565b6001600160a01b039081166000818152600760209081526040808320815180830183528154600f0b81526001918201548185019081529585526008845293829020825160c08101845281549097168088529101546001600160801b03811693870184905265ffffffffffff600160801b82048116938801849052600160b01b8204166060880181905261ffff600160e01b8304811660808a01819052600160f01b9093041660a09098018890529451955195979596919593949293909190565b60408051600f9990990b895260208901979097526001600160a01b03909516958701959095526001600160801b03909216606086015265ffffffffffff90811660808601521660a084015261ffff91821660c08401521660e0820152610100016104b7565b6104e4610a12366004615646565b6123a7565b6017546106b3906001600160a01b031681565b6104ad612766565b6003546106b3906001600160a01b031681565b6104ad600181565b6104e4610a5b366004615842565b612783565b6104ad610a6e3660046156d1565b6127e9565b6104e46128af565b6104e4610a89366004615877565b6128ea565b6108c1610a9c3660046156d1565b60196020526000908152604090205460ff1681565b6104e4610abf366004615842565b612ab8565b6104ad610ad23660046156d1565b600f6020526000908152604090205481565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6106f2610b19366004615842565b612c83565b6106b3612cc7565b6106cd600081565b6104ad600c5481565b610518612cd6565b6104ad610b4d366004615842565b612ce3565b6104e4610b603660046156d1565b612ede565b6104e46133f5565b6106cd600181565b6104e4610b833660046156d1565b613554565b6104ad610b963660046156d1565b61361c565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6003546108c190600160a01b900460ff1681565b6104e4610be4366004615820565b6136b9565b60145461073290600160481b90046001600160401b031681565b6005546108c19060ff1681565b6108c1610c1e3660046156d1565b600a6020526000908152604090205460ff1681565b6104e4610c4136600461576a565b61373f565b6104ad60045481565b6104e4613854565b6017546108c190600160a01b900460ff1681565b6108c1610c793660046156d1565b60066020526000908152604090205460ff1681565b6104e4610c9c3660046158cf565b613878565b6104e4613957565b6104ad610cb7366004615646565b613b4d565b6104ad600281565b6104e4610cd23660046156d1565b613b59565b6104ad62093a8081565b610d04610cef366004615842565b601060205260009081526040902054600f0b81565b604051600f9190910b81526020016104b7565b6104e4610d253660046156d1565b613bf6565b6104e4613e17565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6108c1610d673660046156d1565b60186020526000908152604090205460ff1681565b33610d85612cc7565b6001600160a01b031614610db45760405162461bcd60e51b8152600401610dab90615919565b60405180910390fd5b6001600160a01b03821660009081526009602052604090208054600160f81b900460ff16600114610df75760405162461bcd60e51b8152600401610dab9061594e565b8054600160681b90046001600160681b0316821115610e25578054600160681b90046001600160681b031691505b805482908290600d90610e49908490600160681b90046001600160681b0316615989565b92506101000a8154816001600160681b0302191690836001600160681b03160217905550610ead3330847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613f26909392919063ffffffff16565b6040518281526001600160a01b0384169033907f7b85c81b5ab23faed50cf05b116ebb10456ca6320721e00b6513babed009b9e29060200160405180910390a3505050565b60128054610eff906159b1565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2b906159b1565b8015610f785780601f10610f4d57610100808354040283529160200191610f78565b820191906000526020600020905b815481529060010190602001808311610f5b57829003601f168201915b505050505081565b60026001541415610fa35760405162461bcd60e51b8152600401610dab906159e6565b600260019081556001600160a01b038216600090815260096020526040902080549091600160f81b90910460ff1614610fee5760405162461bcd60e51b8152600401610dab9061594e565b336000908152600860205260408120600181015490919061101d90600160801b900465ffffffffffff16613f91565b90504281116110625760405162461bcd60e51b8152602060048201526011602482015270155cd95c881b1bd8dac8195e1c1a5c9959607a1b6044820152606401610dab565b60045461106f9042615a1d565b6001830154600160b01b900465ffffffffffff16116110a05760405162461bcd60e51b8152600401610dab90615a34565b600182810154600160e01b900461ffff16146110eb5760405162461bcd60e51b815260206004820152600a60248201526908481b5a59dc985d195960b21b6044820152606401610dab565b6001820154600160f01b900461ffff161561113b5760405162461bcd60e51b815260206004820152601060248201526f416c726561647920776974686472617760801b6044820152606401610dab565b6001828101805461ffff60e01b1916600160e11b17905582546001600160a01b0316600090815260076020908152604080832081518083019092528054600f0b808352940154918101919091529161119290613fab565b84549091506111ab906001600160a01b03168383614001565b6040805180820182526001600160a01b0388166000818152600760208181529482208054600f90810b865293835290855260010154938301939093528151919291900b1361120b5760405162461bcd60e51b8152600401610dab90615a56565b4281602001511161122e5760405162461bcd60e51b8152600401610dab90615a84565b6001808601546112509189916001600160801b031690600090859082906141d5565b600185015486546001600160801b0390911690879060009061127c9084906001600160681b0316615ab4565b82546101009290920a6001600160681b03818102199093169183160217909155600187015488546001600160801b0390911692508891600d916112c8918591600160681b900416615ab4565b82546101009290920a6001600160681b0381810219909316919092169190910217905550600185015460405162c2c90f60e11b81523360048201526001600160801b0382166024820152600160801b90910465ffffffffffff1660448201526001600160a01b03881690630185921e90606401600060405180830381600087803b15801561135557600080fd5b505af1158015611369573d6000803e3d6000fd5b505050506001850154604080516001600160801b0383168152600160801b90920465ffffffffffff1660208301526001600160a01b0389169133917f7a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96910160405180910390a36001850154604080516001600160801b0383168152600160801b90920465ffffffffffff1660208301526001600160a01b0389169133917f4af697c81385693e6ee5d15ccb781170dc8241f81c4983bf87cdf268d2fca5f5910160405180910390a35050600180555050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114865760405162461bcd60e51b8152600401610dab90615adf565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a08301521561151857600080fd5b50505050565b6000438211156115405760405162461bcd60e51b8152600401610dab90615b04565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a0830152156115e25780516115da90846143fa565b9150506115e4565b505b92915050565b60006115e482614676565b6000611660600d600c548154811061160f5761160f615b2e565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015242614768565b905090565b3361166e612cc7565b6001600160a01b0316146116945760405162461bcd60e51b8152600401610dab90615919565b6001600160a01b0382166000818152600b6020526040808220805460ff1916851515908117909155905190929133917f4f4d55f3b98fe4b3fbc9fb5e8ed05483cc8d794638edd690545eb5779e234a499190a45050565b336116f4612cc7565b6001600160a01b03161461171a5760405162461bcd60e51b8152600401610dab90615919565b60005b8281101561151857816018600086868581811061173c5761173c615b2e565b905060200201602081019061175191906156d1565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905583838281811061178b5761178b615b2e565b90506020020160208101906117a091906156d1565b6001600160a01b0316336001600160a01b03167fdfad9b83c215ff1a36483cf1688e5aeae2ac60f1c3f62f5229641234748f13b7846040516117e6911515815260200190565b60405180910390a3806117f881615b44565b91505061171d565b33611809612cc7565b6001600160a01b03161461182f5760405162461bcd60e51b8152600401610dab90615919565b6005805460ff191682151590811790915560405190815233907f539ba344188cde95583cd695fe9a73d66f53c83a48e3d66e5b42a12650d93ecc906020015b60405180910390a250565b6002600154141561189c5760405162461bcd60e51b8152600401610dab906159e6565b60026001556001600160a01b0382166000908152600a602052604090205460ff16156118fc5760405162461bcd60e51b815260206004820152600f60248201526e496e636f72726563742070726f787960881b6044820152606401610dab565b6040805180820182526001600160a01b0384166000818152600760208181529482208054600f0b85529290915283526001015491810191909152816119535760405162461bcd60e51b8152600401610dab90615b5f565b60008160000151600f0b1361197a5760405162461bcd60e51b8152600401610dab90615b84565b4281602001511161199d5760405162461bcd60e51b8152600401610dab90615bab565b6119ad83836000846000806141d5565b50506001805550565b600e60205281600052604060002081815481106119d257600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9550600160801b90920490910b925084565b336000908152600a602052604090205460ff16611a4f5760405162461bcd60e51b8152602060048201526007602482015266212070726f787960c81b6044820152606401610dab565b611a598282614860565b5050565b33611a66612cc7565b6001600160a01b031614611a8c5760405162461bcd60e51b8152600401610dab90615919565b801580611a995750806001145b611ad35760405162461bcd60e51b815260206004820152600b60248201526a4f6e6c792030206f72203160a81b6044820152606401610dab565b601180549082905560408051828152602081018490527f5238fc635590cf5e76ed0f591df4d7f3021d20f58e6d3405390197dd72a575fe910160405180910390a15050565b3360009081526018602052604090205460ff16158015611b485750336000908152600a602052604090205460ff16155b15611b6c57333214611b6c5760405162461bcd60e51b8152600401610dab90615bd1565b60026001541415611b8f5760405162461bcd60e51b8152600401610dab906159e6565b60026001908155604080518082018252336000818152600760208181529482208054600f0b8552929091528352909201549082015281611be15760405162461bcd60e51b8152600401610dab90615b5f565b60008160000151600f0b13611c085760405162461bcd60e51b8152600401610dab90615b84565b42816020015111611c2b5760405162461bcd60e51b8152600401610dab90615bab565b611c3c3383600084600260006141d5565b505060018055565b600043821115611c665760405162461bcd60e51b8152600401610dab90615b04565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a083015215611d14578051611d0090846143fa565b611d0a85856143fa565b6115da9190615bfc565b6115da84846143fa565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611d665760405162461bcd60e51b8152600401610dab90615adf565b6001600160a01b03808216600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a083015260021415611dfb57600080fd5b80516001600160a01b031615801590611e1c5750608081015161ffff166001145b8015611e2e575060a081015161ffff16155b15611a595780600001516001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611e7257600080fd5b505af1158015611e86573d6000803e3d6000fd5b5050506001600160a01b038316600090815260086020526040902060010180546001600160f01b0316600160f01b179055505050565b60026001541415611edf5760405162461bcd60e51b8152600401610dab906159e6565b6002600155600354600160a01b900460ff16611f0d5760405162461bcd60e51b8152600401610dab90615c14565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401611f5e919061580c565b61012060405180830381865afa158015611f7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa09190615c3b565b505096509650505050509250428211611fcb5760405162461bcd60e51b8152600401610dab90615bab565b3360009081526008602052604090206001810154600160e01b900461ffff16156120075760405162461bcd60e51b8152600401610dab90615caf565b60018101805461ffff60e01b1916600160e01b17905560408051633a98ef3960e01b815290516000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691633a98ef39916004808201926020929091908290030181865afa158015612086573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120aa9190615cd9565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561210c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121309190615cd9565b9050600060018584612142858b615cf2565b61214c9190615d27565b6121569190615a1d565b6121609190615a1d565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634c96a389336040518263ffffffff1660e01b81526004016121b0919061580c565b6020604051808303816000875af11580156121cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f39190615d3b565b6001600160a01b0381166000818152600a602052604090819020805460ff1916600190811790915588546001600160a01b031916831789558801805465ffffffffffff8c8116600160801b026001600160b01b03194292909216600160b01b02919091166001600160e01b0319909216919091176001600160801b038816171790555163399f3a4f60e01b81529192509063399f3a4f906122a39085908b90600401918252602082015260400190565b600060405180830381600087803b1580156122bd57600080fd5b505af11580156122d1573d6000803e3d6000fd5b505060408051858152602081018b90526001600160a01b03851693503392507f8519b84e949c6333da21ddea64e2c29ef66709e465ec9b0f24fb32eb2c003843910160405180910390a3505060018055505050505050565b33612332612cc7565b6001600160a01b0316146123585760405162461bcd60e51b8152600401610dab90615919565b60178054821515600160a01b0260ff60a01b1990911617905560405133907fdcc751463da04455ac459756e92d5ea118dd0dd631422cbf8353132417a52d9f9061186e90841515815260200190565b600260015414156123ca5760405162461bcd60e51b8152600401610dab906159e6565b6002600155601754600160a01b900460ff166123f85760405162461bcd60e51b8152600401610dab90615d58565b6001600160a01b03821661240a573391505b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152816124515760405162461bcd60e51b8152600401610dab90615b5f565b806020015142106124745760405162461bcd60e51b8152600401610dab90615a34565b601154156124945760405162461bcd60e51b8152600401610dab90615d58565b33600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b82041692820192909252600160d01b820464ffffffffff1692810192909252600160f81b900460ff1660608201819052600114156125c65742816040015164ffffffffff161061254c5760405162461bcd60e51b8152602060048201526014602482015273466f72626964206561726c79576974686472617760601b6044820152606401610dab565b600061255e8360000151600f0b613fab565b60208301519091506001600160681b03166125798583615a1d565b10156125c45760405162461bcd60e51b815260206004820152601a60248201527911195b1959d85d1bdc8818985b185b98d948195e18d95959195960321b6044820152606401610dab565b505b60208201516125d6338486614001565b336000908152600b602052604081205460ff16158015612605575060145461010090046001600160401b031615155b1561270057600062093a804261261b8286615bfc565b6126259190615a1d565b61262f9190615d27565b60145490915061271090879061265490849061010090046001600160401b0316615cf2565b61265e9190615cf2565b6126689190615d27565b6014549092506000906127109061268f90600160481b90046001600160401b031685615cf2565b6126999190615d27565b905080601560008282546126ad9190615bfc565b90915550506016546126fd906001600160a01b03166126cc8386615a1d565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190614a00565b50505b61270e866126cc8388615a1d565b6040805186815260208101839052428183015290516001600160a01b0388169133917f08b526d7537cea7e5a629eb0495b5932c78911fd0bdeb02b822d69a6e25792549181900360600190a350506001805550505050565b600161277662093a806035615cf2565b6127809190615a1d565b81565b3361278c612cc7565b6001600160a01b0316146127b25760405162461bcd60e51b8152600401610dab90615919565b600481905560405181815233907fde15bb8e73a1f43abe6021a8ad5a5d79caf815a4d74e6dbd7d88cd57f06fdd899060200161186e565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a0840152909190156128a057805161288690614676565b61288f84614676565b6128999190615bfc565b9392505050565b61289983614676565b50919050565b336128b8612cc7565b6001600160a01b0316146128de5760405162461bcd60e51b8152600401610dab90615919565b6128e86000614a30565b565b336128f3612cc7565b6001600160a01b0316146129195760405162461bcd60e51b8152600401610dab90615919565b60c0846001600160401b031611156129625760405162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606401610dab565b612710836001600160401b031611156129ac5760405162461bcd60e51b815260206004820152600c60248201526b0c4e0e640e8dede40d0d2ced60a31b6044820152606401610dab565b601480546001600160401b03858116600160481b81810267ffffffffffffffff60481b198a8516610100818102928316610100600160881b031989161793909317909755601680546001600160a01b038b81166001600160a01b03198084168217909455601780548d8416958116861790915560408051888d048c16808252602082019e909e5268ffffffffffffffff0019909c1690961797909704909816938901849052606089019690965285166080880181905260a08801969096529290931660c0860181905260e08601929092529193909133917f3de6c016cd3debec574d13c9966e6c847e64ac424da0b1eb70d3c93b68ec0537910160405180910390a25050505050505050565b3360009081526018602052604090205460ff16158015612ae85750336000908152600a602052604090205460ff16155b15612b0c57333214612b0c5760405162461bcd60e51b8152600401610dab90615bd1565b60026001541415612b2f5760405162461bcd60e51b8152600401610dab906159e6565b60026001908155604080518082018252336000818152600760208181529482208054600f0b85529290915283529092015490820152612b6d82613f91565b915060008160000151600f0b13612b965760405162461bcd60e51b8152600401610dab90615b84565b42816020015111612bb95760405162461bcd60e51b8152600401610dab90615bab565b80602001518211612c055760405162461bcd60e51b815260206004820152601660248201527517db995dd55b9b1bd8dad51a5b59481d1bdbc81bdb1960521b6044820152606401610dab565b6001612c1562093a806035615cf2565b612c1f9190615a1d565b612c299042615bfc565b821115612c725760405162461bcd60e51b81526020600482015260176024820152765f6e6577556e6c6f636b54696d6520746f6f206c6f6e6760481b6044820152606401610dab565b611c3c3360008484600360006141d5565b600d8181548110612c9357600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9450600160801b90920490910b919084565b6000546001600160a01b031690565b60138054610eff906159b1565b600043821115612d285760405162461bcd60e51b815260206004820152601060248201526f2130b2102fb13637b1b5a73ab6b132b960811b6044820152606401610dab565b600c546000612d378483614a80565b90506000600d8281548110612d4e57612d4e615b2e565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915083831015612e6c576000600d612daf856001615bfc565b81548110612dbf57612dbf615b2e565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905285015191925014612e665782606001518160600151612e2c9190615a1d565b83604001518260400151612e409190615a1d565b6060850151612e4f908a615a1d565b612e599190615cf2565b612e639190615d27565b91505b50612ebb565b43826060015114612ebb576060820151612e869043615a1d565b6040830151612e959042615a1d565b6060840151612ea49089615a1d565b612eae9190615cf2565b612eb89190615d27565b90505b612ed482828460400151612ecf9190615bfc565b614768565b9695505050505050565b60026001541415612f015760405162461bcd60e51b8152600401610dab906159e6565b6002600155600354600160a01b900460ff16612f2f5760405162461bcd60e51b8152600401610dab90615c14565b6001600160a01b03811660009081526009602052604090208054600160f81b900460ff16600114612f725760405162461bcd60e51b8152600401610dab9061594e565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401612fc3919061580c565b61012060405180830381865afa158015612fe1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130059190615c3b565b5050965096505050505092504282116130305760405162461bcd60e51b8152600401610dab90615bab565b3360009081526008602052604090206001810154600160e01b900461ffff161561306c5760405162461bcd60e51b8152600401610dab90615caf565b60018101805461ffff60e01b1916600160e11b17905560408051633a98ef3960e01b815290516000917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691633a98ef39916004808201926020929091908290030181865afa1580156130eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061310f9190615cd9565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015613171573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131959190615cd9565b90506000600185846131a7858b615cf2565b6131b19190615d27565b6131bb9190615a1d565b6131c59190615a1d565b600185810180546001600160b01b031916600160801b65ffffffffffff8b16026001600160801b031916176001600160801b0384161790556040805180820182526001600160a01b038d166000818152600760208181529482208054600f0b85529290915283529092015490820152909150816132545760405162461bcd60e51b8152600401610dab90615b5f565b60008160000151600f0b1361327b5760405162461bcd60e51b8152600401610dab90615a56565b4281602001511161329e5760405162461bcd60e51b8152600401610dab90615a84565b6132af8a83600084600060016141d5565b885482908a906000906132cc9084906001600160681b0316615ab4565b92506101000a8154816001600160681b0302191690836001600160681b031602179055508189600001600d8282829054906101000a90046001600160681b03166133169190615ab4565b82546001600160681b039182166101009390930a92830291909202199091161790555060405162c2c90f60e11b815233600482015260248101839052604481018890526001600160a01b038b1690630185921e90606401600060405180830381600087803b15801561338757600080fd5b505af115801561339b573d6000803e3d6000fd5b505060408051858152602081018b90526001600160a01b038e1693503392507f7a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96910160405180910390a35050600180555050505050505050565b336133fe612cc7565b6001600160a01b0316146134245760405162461bcd60e51b8152600401610dab90615919565b600354600160a01b900460ff16156134745760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610dab565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632d19b9826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156134d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f89190615d3b565b90506001600160a01b038116301461353e5760405162461bcd60e51b8152602060048201526009602482015268426164205643616b6560b81b6044820152606401610dab565b506003805460ff60a01b1916600160a01b179055565b3361355d612cc7565b6001600160a01b0316146135835760405162461bcd60e51b8152600401610dab90615919565b6001600160a01b0381166135d25760405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606401610dab565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fd1879d19b7e07327f8e491d8c5e05a4048155b7ee8f97f61e2b2233ae0e3a88890600090a250565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a0840152909190156128a957805161289990614676565b3360009081526018602052604090205460ff161580156136e95750336000908152600a602052604090205460ff16155b1561370d5733321461370d5760405162461bcd60e51b8152600401610dab90615bd1565b600260015414156137305760405162461bcd60e51b8152600401610dab906159e6565b6002600155611c3c8282614860565b33613748612cc7565b6001600160a01b03161461376e5760405162461bcd60e51b8152600401610dab90615919565b60005b8281101561151857816019600086868581811061379057613790615b2e565b90506020020160208101906137a591906156d1565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106137df576137df615b2e565b90506020020160208101906137f491906156d1565b6001600160a01b0316336001600160a01b03167f0c5e5180b1be108ebc3c1c5939cd6b59ca30067d07c5405f94304bf603c621428460405161383a911515815260200190565b60405180910390a38061384c81615b44565b915050613771565b60408051808201909152600080825260208201819052613875908280614b1e565b50565b33613881612cc7565b6001600160a01b0316146138a75760405162461bcd60e51b8152600401610dab90615919565b6001600160a01b0383166000908152600960205260409020826138cb5760006138ce565b60015b81546001600160d01b0316600160f81b60ff929092169190910264ffffffffff60d01b191617600160d01b64ffffffffff841690810291909117825560408051851515815260208101929092526001600160a01b038616917f3fd4b992bc54a5edaa3b29f337c4048b314667d454123fbd81b327aaeea7df67910160405180910390a250505050565b6002600154141561397a5760405162461bcd60e51b8152600401610dab906159e6565b600260015560055460ff166139cd5760405162461bcd60e51b8152602060048201526019602482015278466f7262696420656d657267656e637920776974686472617760381b6044820152606401610dab565b3360009081526006602052604090205460ff16156139fd5760405162461bcd60e51b8152600401610dab90615d78565b336000908152600660209081526040808320805460ff191660019081179091556007835281842082518084019093528054600f0b808452910154928201929092529112613a7f5760405162461bcd60e51b815260206004820152601060248201526f139bc81b1bd8dad95908185b5bdd5b9d60821b6044820152606401610dab565b6000613a918260000151600f0b613fab565b33600090815260076020908152604080832080546001600160801b0319168155600101839055600e9091528120919250613acb91906155f3565b336000818152600f6020526040812055613b10907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083614a00565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505060018055565b600061289983836143fa565b33613b62612cc7565b6001600160a01b031614613b885760405162461bcd60e51b8152600401610dab90615919565b6001600160a01b038116613bed5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dab565b61387581614a30565b60026001541415613c195760405162461bcd60e51b8152600401610dab906159e6565b600260015533600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b820416928201839052600160d01b810464ffffffffff1693820193909352600160f81b90920460ff16606083015215613cd45760405162461bcd60e51b8152602060048201526024808201527f496e73756666696369656e7420696e6a656374696f6e20666f722064656c656760448201526330ba37b960e11b6064820152608401610dab565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152601154613d4c578060200151421015613d4c5760405162461bcd60e51b815260206004820152601060248201526f131bd8dac81b9bdd08195e1c1a5c995960821b6044820152606401610dab565b6001600160a01b038316613d5e573392505b6000613d708260000151600f0b613fab565b9050613d7d338383614001565b336000908152600a602052604090205460ff16613dc857613dc86001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168583614a00565b604080518281524260208201526001600160a01b0386169133917f55e21b0674b8095feb63d5336fb7b5b004d267585bfbb58005e8126a8ad7bc54910160405180910390a35050600180555050565b3360009081526019602052604090205460ff16613e6c5760405162461bcd60e51b81526020600482015260136024820152722120776c2072656469737472696275746f727360681b6044820152606401610dab565b60026001541415613e8f5760405162461bcd60e51b8152600401610dab906159e6565b6002600155601580546000909155601754613ed7906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683614a00565b601754604080516001600160a01b0390921682526020820183905233917f73dad76107243dbd9d398020575b5e3ad26d50fe161c81088dc8592a394855b7910160405180910390a25060018055565b6040516001600160a01b03808516602483015283166044820152606481018290526115189085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526152cc565b600062093a80613fa18184615d27565b6115e49190615cf2565b600080821215613ffd5760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610dab565b5090565b60006140138360000151600f0b613fab565b9050808211156140585760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610dab565b604080518082019091528351600f0b815260208085015190820152818314614084578360200151614087565b60005b602085015261409e6140998484615a1d565b61539e565b600f0b84526001600160a01b0385166000908152600760209081526040909120855181546001600160801b0319166001600160801b03909116178155908501516001909101556002546140f18482615a1d565b6002556140ff868387614b1e565b6003546001600160a01b0316156141905760035482516020840151604051630f28a72960e31b81526001600160a01b038a81166004830152600f9390930b6024820152604481019190915260648101879052911690637945394890608401600060405180830381600087803b15801561417757600080fd5b505af115801561418b573d6000803e3d6000fd5b505050505b6002546040805183815260208101929092527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c910160405180910390a1505050505050565b6002546141e28682615bfc565b600255604080518082019091528451600f0b8152602080860151908201526142098761539e565b81516142159190615dab565b600f0b8152851561422857602081018690525b6001600160a01b0388166000908152600760209081526040909120825181546001600160801b0319166001600160801b0390911617815590820151600190910155614274888683614b1e565b8615801590614281575082155b156142bb576142bb6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308a613f26565b6003546001600160a01b0316156143625760035485516020870151604051636e85ee4760e01b81526001600160a01b038c81166004830152602482018c9052604482018b9052600f9390930b6064820152608481019190915260a4810187905285151560c4820152911690636e85ee479060e401600060405180830381600087803b15801561434957600080fd5b505af115801561435d573d6000803e3d6000fd5b505050505b602080820151604080518a81529283018790524290830152906001600160a01b038a16907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060600160405180910390a36002546040805184815260208101929092527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c910160405180910390a15050505050505050565b600080614407848461541b565b9050806144185760009150506115e4565b6001600160a01b0384166000908152600e6020526040812080548390811061444257614442615b2e565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152600c549092509061449b8683614a80565b90506000600d82815481106144b2576144b2615b2e565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915080848410156145a0576000600d614514866001615bfc565b8154811061452457614524615b2e565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b9383019390935260018301549082015260029091015460608083018290528601519192506145829190615a1d565b9250836040015181604001516145989190615a1d565b9150506145c4565b60608301516145af9043615a1d565b91508260400151426145c19190615a1d565b90505b60408301518215614601578284606001518b6145e09190615a1d565b6145ea9084615cf2565b6145f49190615d27565b6145fe9082615bfc565b90505b6146148760400151826140999190615a1d565b87602001516146239190615dfc565b87518890614632908390615e90565b600f90810b90915288516000910b12159050614659576000985050505050505050506115e4565b865161466790600f0b613fab565b9b9a5050505050505050505050565b6001600160a01b0381166000908152600f60205260408120548061469d5750600092915050565b6001600160a01b0383166000908152600e602052604081208054839081106146c7576146c7615b2e565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820181905260029092015460608201529150614724906140999042615a1d565b81602001516147339190615dfc565b815161473f9190615e90565b600f0b8082526000131561475257600081525b805161476090600f0b613fab565b949350505050565b600080839050600061477d8560400151613f91565b905060005b60ff8110156148335761479862093a8083615bfc565b91506000858311156147ac578592506147c0565b50600082815260106020526040902054600f0b5b6147d38460400151846140999190615a1d565b84602001516147e29190615dfc565b84516147ee9190615e90565b600f0b8452828614156148015750614833565b8084602001516148119190615dab565b600f0b602085015250604083018290528061482b81615b44565b915050614782565b5060008260000151600f0b121561484957600082525b815161485790600f0b613fab565b95945050505050565b3360009081526006602052604090205460ff16156148905760405162461bcd60e51b8152600401610dab90615d78565b61489981613f91565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152909150826148e35760405162461bcd60e51b8152600401610dab90615b5f565b8051600f0b156149265760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b1bd8dad95960921b6044820152606401610dab565b42821161496b5760405162461bcd60e51b815260206004820152601360248201527217dd5b9b1bd8dad51a5b59481d1bdbc81bdb19606a1b6044820152606401610dab565b600161497b62093a806035615cf2565b6149859190615a1d565b61498f9042615bfc565b8211156149d55760405162461bcd60e51b81526020600482015260146024820152735f756e6c6f636b54696d6520746f6f206c6f6e6760601b6044820152606401610dab565b336000818152600a60205260409020546149fb919085908590859060019060ff166141d5565b505050565b6040516001600160a01b0383166024820152604481018290526149fb90849063a9059cbb60e01b90606401613f5a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008082815b6080811015614b1457818310614a9b57614b14565b60006002614aa98486615bfc565b614ab4906001615bfc565b614abe9190615d27565b905086600d8281548110614ad457614ad4615b2e565b90600052602060002090600302016002015411614af357809350614b01565b614afe600182615a1d565b92505b5080614b0c81615b44565b915050614a86565b5090949350505050565b604080516080808201835260008083526020808401829052838501829052606080850183905285519384018652828452908301829052938201819052928101839052600c549192909181906001600160a01b03881615614dbe57428760200151118015614b92575060008760000151600f0b135b15614bf357614bb46001614baa62093a806035615cf2565b6140999190615a1d565b8751614bc09190615ee0565b600f0b602080870191909152870151614bde90614099904290615a1d565b8560200151614bed9190615dfc565b600f0b85525b428660200151118015614c0d575060008660000151600f0b135b15614c6457614c256001614baa62093a806035615cf2565b8651614c319190615ee0565b600f0b602080860191909152860151614c4f90614099904290615a1d565b8460200151614c5e9190615dfc565b600f0b84525b6001600160a01b0388166000908152600f602052604090205480614ce8576001600160a01b0389166000908152600e60209081526040808320805460018181018355918552938390208a51938b01516001600160801b03908116600160801b0294169390931760039094029092019283558801519082015560608701516002909101555b614cf3816001615bfc565b6001600160a01b038a166000818152600f6020818152604080842095909555428a86019081524360608c01908152948452600e82528584208054600181810183559186528386208d518e8601516001600160801b03908116600160801b0291161760039092020190815591519082015593516002909401939093558b8301518252601083529290205490890151910b945015614dbc57876020015187602001511415614da157839250614dbc565b602080880151600090815260109091526040902054600f0b92505b505b604080516080810182526000808252602082015242918101919091524360608201528115614e4757600d8281548110614df957614df9615b2e565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015290505b604080820180518251608081018452600080825260208201819052835194820194909452606080860151908201529151909290421115614ebe576040840151614e909042615a1d565b6060850151614e9f9043615a1d565b614eb190670de0b6b3a7640000615cf2565b614ebb9190615d27565b90505b6000614ec984613f91565b905060005b60ff8110156150af57614ee462093a8083615bfc565b9150600042831115614ef857429250614f0c565b50600082815260106020526040902054600f0b5b6000614f1b6140998886615a1d565b8860200151614f2a9190615dfc565b8851909150614f3a908290615e90565b600f0b88526020880151614f4f908390615dab565b600f90810b60208a015288516000910b1215614f6a57600088525b60008860200151600f0b1215614f8257600060208901525b60408089018590528601519396508693670de0b6b3a764000090614fa69086615a1d565b614fb09087615cf2565b614fba9190615d27565b8660600151614fc99190615bfc565b6060890152614fd9896001615bfc565b985042841415614ff05750504360608701526150af565b600d8054600181018255600091909152885160208a01516001600160801b03908116600160801b0291161760039091027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019190915560408901517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb682015560608901517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb790910155505080806150a790615b44565b915050614ece565b50600c8690556001600160a01b038d161561513c578960200151896020015186602001516150dd9190615dab565b6150e79190615e90565b600f0b60208601528951895186516150ff9190615dab565b6151099190615e90565b600f90810b865260208601516000910b121561512757600060208601525b60008560000151600f0b121561513c57600085525b600d8054600181018255600091909152855160208701516001600160801b03908116600160801b0291161760039091027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019190915560408601517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb682015560608601517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb7909101556001600160a01b038d16156152bd57428c6020015111156152625760208a01516152109089615dab565b97508b602001518b6020015114156152345760208901516152319089615e90565b97505b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b038a161790555b428b6020015111156152bd578b602001518b6020015111156152bd57602089015161528d9088615e90565b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b03831617905596505b50505050505050505050505050565b6000615321826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166154df9092919063ffffffff16565b8051909150156149fb578080602001905181019061533f9190615f1e565b6149fb5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610dab565b600060016001607f1b031982128015906153bf575060016001607f1b038213155b613ffd5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401610dab565b6001600160a01b0382166000908152600f60205260408120548190815b6080811015614b145781831061544d57614b14565b6000600261545b8486615bfc565b615466906001615bfc565b6154709190615d27565b6001600160a01b0388166000908152600e60205260409020805491925087918390811061549f5761549f615b2e565b906000526020600020906003020160020154116154be578093506154cc565b6154c9600182615a1d565b92505b50806154d781615b44565b915050615438565b60606147608484600085856001600160a01b0385163b6155415760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610dab565b600080866001600160a01b0316858760405161555d9190615f3b565b60006040518083038185875af1925050503d806000811461559a576040519150601f19603f3d011682016040523d82523d6000602084013e61559f565b606091505b50915091506155af8282866155ba565b979650505050505050565b606083156155c9575081612899565b8251156155d95782518084602001fd5b8160405162461bcd60e51b8152600401610dab919061569e565b508054600082556003029060005260206000209081019061387591905b80821115613ffd576000808255600182018190556002820155600301615610565b6001600160a01b038116811461387557600080fd5b6000806040838503121561565957600080fd5b823561566481615631565b946020939093013593505050565b60005b8381101561568d578181015183820152602001615675565b838111156115185750506000910152565b60208152600082518060208401526156bd816040850160208701615672565b601f01601f19169190910160400192915050565b6000602082840312156156e357600080fd5b813561289981615631565b60008060006060848603121561570357600080fd5b833561570e81615631565b95602085013595506040909401359392505050565b801515811461387557600080fd5b6000806040838503121561574457600080fd5b823561574f81615631565b9150602083013561575f81615723565b809150509250929050565b60008060006040848603121561577f57600080fd5b83356001600160401b038082111561579657600080fd5b818601915086601f8301126157aa57600080fd5b8135818111156157b957600080fd5b8760208260051b85010111156157ce57600080fd5b602092830195509350508401356157e481615723565b809150509250925092565b60006020828403121561580157600080fd5b813561289981615723565b6001600160a01b0391909116815260200190565b6000806040838503121561583357600080fd5b50508035926020909101359150565b60006020828403121561585457600080fd5b5035919050565b80356001600160401b038116811461587257600080fd5b919050565b6000806000806080858703121561588d57600080fd5b6158968561585b565b93506158a46020860161585b565b925060408501356158b481615631565b915060608501356158c481615631565b939692955090935050565b6000806000606084860312156158e457600080fd5b83356158ef81615631565b925060208401356158ff81615723565b9150604084013564ffffffffff811681146157e457600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600b908201526a10903232b632b3b0ba37b960a91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001600160681b03838116908316818110156159a9576159a9615973565b039392505050565b600181811c908216806159c557607f821691505b602082108114156128a957634e487b7160e01b600052602260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082821015615a2f57615a2f615973565b500390565b602080825260089082015267546f6f206c61746560c01b604082015260600190565b6020808252601490820152732737903637b1b59037b7103232b632b3b0ba37b960611b604082015260600190565b60208082526016908201527511195b1959d85d1bdc881b1bd8dac8195e1c1a5c995960521b604082015260600190565b60006001600160681b03828116848216808303821115615ad657615ad6615973565b01949350505050565b6020808252600b908201526a084818d85ad9481c1bdbdb60aa1b604082015260600190565b60208082526010908201526f3130b2102fb13637b1b5a73ab6b132b960811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615b5857615b58615973565b5060010190565b6020808252600b908201526a1098590817d85b5bdd5b9d60aa1b604082015260600190565b6020808252600d908201526c139bc81b1bd8dac8199bdd5b99609a1b604082015260600190565b6020808252600c908201526b131bd8dac8195e1c1a5c995960a21b604082015260600190565b6020808252601190820152702120656f61206f7220776c2070726f787960781b604082015260600190565b60008219821115615c0f57615c0f615973565b500190565b6020808252600d908201526c08481a5b9a5d1a585b1a5e9959609a1b604082015260600190565b60008060008060008060008060006101208a8c031215615c5a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a0151615c9681615723565b809250506101008a015190509295985092959850929598565b60208082526010908201526f105b1c9958591e481b5a59dc985d195960821b604082015260600190565b600060208284031215615ceb57600080fd5b5051919050565b6000816000190483118215151615615d0c57615d0c615973565b500290565b634e487b7160e01b600052601260045260246000fd5b600082615d3657615d36615d11565b500490565b600060208284031215615d4d57600080fd5b815161289981615631565b602080825260069082015265119bdc989a5960d21b604082015260600190565b602080825260199082015278416c726561647920656d657267656e6379576974686472617760381b604082015260600190565b6000600f82810b9084900b828212801560016001607f1b0384900383131615615dd657615dd6615973565b60016001607f1b03198390038212811615615df357615df3615973565b50019392505050565b6000600f82810b9084900b60016001607f1b0383821384841380821684840486111615615e2b57615e2b615973565b60016001607f1b03196000851282811687830587121615615e4e57615e4e615973565b60008712925085820587128484161615615e6a57615e6a615973565b85850587128184161615615e8057615e80615973565b5050509290910295945050505050565b6000600f82810b9084900b828112801560016001607f1b0319830184121615615ebb57615ebb615973565b60016001607f1b0382018313811615615ed657615ed6615973565b5090039392505050565b600081600f0b83600f0b80615ef757615ef7615d11565b60016001607f1b0319821460001982141615615f1557615f15615973565b90059392505050565b600060208284031215615f3057600080fd5b815161289981615723565b60008251615f4d818460208701615672565b919091019291505056fea26469706673582212200dc95f932f22cdc0e021900ec5bb1f900b1f4226b8728bab1c0774fd54515e1d64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106104a05760003560e01c8063705096c71161026d578063b225bb5f11610151578063d73f98a3116100ce578063f4359ce511610092578063f4359ce514610cd7578063f52a36f714610ce1578063fa09e63014610d17578063fb489a7b14610d2a578063fc0c546a14610d32578063ffc97ce914610d5957600080fd5b8063d73f98a314610c8e578063db2e21bc14610ca1578063ec5570d014610ca9578063f2c7a81b14610cbc578063f2fde38b14610cc457600080fd5b8063c12ebb5f11610115578063c12ebb5f14610c33578063c1d1192914610c46578063c2c4c5c114610c4f578063cfee396f14610c57578063d4eda63f14610c6b57600080fd5b8063b225bb5f14610bc2578063b52c05fe14610bd6578063b6bbbcd114610be9578063b6e45a4e14610c03578063c0dd84bd14610c1057600080fd5b80638e900530116101ea5780639d4b4ba1116101ae5780639d4b4ba114610b52578063a621440414610b65578063a63dce7114610b6d578063a7ccf1e014610b75578063a88a885514610b88578063aa94ab5914610b9b57600080fd5b80638e90053014610b26578063900cf0cf14610b2e57806395d89b4114610b37578063981b24d014610b3f5780639c490f19146104f557600080fd5b80637c616fe6116102315780637c616fe614610ab157806381fc83bb14610ac4578063827e8e0c14610ae45780638ad4c44714610b0b5780638da5cb5b14610b1e57600080fd5b8063705096c714610a4d57806370a0823114610a60578063715018a614610a7357806375cd6c6714610a7b5780637c5acb2514610a8e57600080fd5b806330d9a62a1161039457806355ed0a78116103115780636386c1c7116102d55780636386c1c7146108d15780636574deb714610a045780636582a8c014610a1757806365a5d5f014610a2a57806365f9008a14610a3257806367e7a7cb14610a4557600080fd5b806355ed0a781461083357806358fca6a51461083b578063598085ae146108435780635de9a137146108565780635e8bb48e1461089e57600080fd5b80633d5c78bd116103585780633d5c78bd1461075d578063403f4447146107705780634ee2cd7e1461078357806351cff8d914610796578063539e5082146107a957600080fd5b806330d9a62a146106a0578063313ce567146106c057806334d901a4146106df57806336a583911461071a578063399f3a4f1461074a57600080fd5b80630efe6a8b1161042257806319577c6e116103e657806319577c6e146105935780631959a002146105a65780631bb8c61d146106675780632ea1fe7a1461067a5780632f4f21e21461068d57600080fd5b80630efe6a8b146105495780630f41e0d21461055c57806312c470e91461056557806312cae7af1461057857806318160ddd1461058b57600080fd5b806306a4da7e1161046957806306a4da7e146104f557806306fdde031461051057806308154df01461052557806308c3dea71461052d5780630a6373b31461053657600080fd5b8062b79fd4146104a557806302641632146104c0578063047fc9aa146104c8578063052b726f146104d1578063059f8b16146104e6575b600080fd5b6104ad600081565b6040519081526020015b60405180910390f35b6104ad600381565b6104ad60025481565b6104e46104df366004615646565b610d7c565b005b6104ad670de0b6b3a764000081565b6104fd600181565b60405161ffff90911681526020016104b7565b610518610ef2565b6040516104b7919061569e565b6104fd600081565b6104ad60155481565b6104e46105443660046156d1565b610f80565b6104e46105573660046156ee565b61143e565b6104ad60115481565b6104ad610573366004615646565b61151e565b6104ad6105863660046156d1565b6115ea565b6104ad6115f5565b6104e46105a1366004615731565b611665565b6106156105b43660046156d1565b600860205260009081526040902080546001909101546001600160a01b03909116906001600160801b0381169065ffffffffffff600160801b8204811691600160b01b81049091169061ffff600160e01b8204811691600160f01b90041686565b604080516001600160a01b0390971687526001600160801b03909516602087015265ffffffffffff938416948601949094529116606084015261ffff90811660808401521660a082015260c0016104b7565b6104e461067536600461576a565b6116eb565b6104e46106883660046157ef565b611800565b6104e461069b366004615646565b611879565b6016546106b3906001600160a01b031681565b6040516104b7919061580c565b6014546106cd9060ff1681565b60405160ff90911681526020016104b7565b6106f26106ed366004615646565b6119b6565b60408051600f95860b81529390940b60208401529282015260608101919091526080016104b7565b6014546107329061010090046001600160401b031681565b6040516001600160401b0390911681526020016104b7565b6104e4610758366004615820565b611a06565b6104e461076b366004615842565b611a5d565b6104e461077e366004615842565b611b18565b6104ad610791366004615646565b611c44565b6104e46107a43660046156d1565b611d1e565b6107f96107b73660046156d1565b6009602052600090815260409020546001600160681b0380821691600160681b810490911690600160d01b810464ffffffffff1690600160f81b900460ff1684565b604080516001600160681b03958616815294909316602085015264ffffffffff9091169183019190915260ff1660608201526080016104b7565b6104e4611ebc565b6104fd600281565b6104e46108513660046157ef565b612329565b6108846108643660046156d1565b60076020526000908152604090208054600190910154600f9190910b9082565b60408051600f9390930b83526020830191909152016104b7565b6108c16108ac3660046156d1565b600b6020526000908152604090205460ff1681565b60405190151581526020016104b7565b61099f6108df3660046156d1565b6001600160a01b039081166000818152600760209081526040808320815180830183528154600f0b81526001918201548185019081529585526008845293829020825160c08101845281549097168088529101546001600160801b03811693870184905265ffffffffffff600160801b82048116938801849052600160b01b8204166060880181905261ffff600160e01b8304811660808a01819052600160f01b9093041660a09098018890529451955195979596919593949293909190565b60408051600f9990990b895260208901979097526001600160a01b03909516958701959095526001600160801b03909216606086015265ffffffffffff90811660808601521660a084015261ffff91821660c08401521660e0820152610100016104b7565b6104e4610a12366004615646565b6123a7565b6017546106b3906001600160a01b031681565b6104ad612766565b6003546106b3906001600160a01b031681565b6104ad600181565b6104e4610a5b366004615842565b612783565b6104ad610a6e3660046156d1565b6127e9565b6104e46128af565b6104e4610a89366004615877565b6128ea565b6108c1610a9c3660046156d1565b60196020526000908152604090205460ff1681565b6104e4610abf366004615842565b612ab8565b6104ad610ad23660046156d1565b600f6020526000908152604090205481565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6106f2610b19366004615842565b612c83565b6106b3612cc7565b6106cd600081565b6104ad600c5481565b610518612cd6565b6104ad610b4d366004615842565b612ce3565b6104e4610b603660046156d1565b612ede565b6104e46133f5565b6106cd600181565b6104e4610b833660046156d1565b613554565b6104ad610b963660046156d1565b61361c565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6003546108c190600160a01b900460ff1681565b6104e4610be4366004615820565b6136b9565b60145461073290600160481b90046001600160401b031681565b6005546108c19060ff1681565b6108c1610c1e3660046156d1565b600a6020526000908152604090205460ff1681565b6104e4610c4136600461576a565b61373f565b6104ad60045481565b6104e4613854565b6017546108c190600160a01b900460ff1681565b6108c1610c793660046156d1565b60066020526000908152604090205460ff1681565b6104e4610c9c3660046158cf565b613878565b6104e4613957565b6104ad610cb7366004615646565b613b4d565b6104ad600281565b6104e4610cd23660046156d1565b613b59565b6104ad62093a8081565b610d04610cef366004615842565b601060205260009081526040902054600f0b81565b604051600f9190910b81526020016104b7565b6104e4610d253660046156d1565b613bf6565b6104e4613e17565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6108c1610d673660046156d1565b60186020526000908152604090205460ff1681565b33610d85612cc7565b6001600160a01b031614610db45760405162461bcd60e51b8152600401610dab90615919565b60405180910390fd5b6001600160a01b03821660009081526009602052604090208054600160f81b900460ff16600114610df75760405162461bcd60e51b8152600401610dab9061594e565b8054600160681b90046001600160681b0316821115610e25578054600160681b90046001600160681b031691505b805482908290600d90610e49908490600160681b90046001600160681b0316615989565b92506101000a8154816001600160681b0302191690836001600160681b03160217905550610ead3330847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613f26909392919063ffffffff16565b6040518281526001600160a01b0384169033907f7b85c81b5ab23faed50cf05b116ebb10456ca6320721e00b6513babed009b9e29060200160405180910390a3505050565b60128054610eff906159b1565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2b906159b1565b8015610f785780601f10610f4d57610100808354040283529160200191610f78565b820191906000526020600020905b815481529060010190602001808311610f5b57829003601f168201915b505050505081565b60026001541415610fa35760405162461bcd60e51b8152600401610dab906159e6565b600260019081556001600160a01b038216600090815260096020526040902080549091600160f81b90910460ff1614610fee5760405162461bcd60e51b8152600401610dab9061594e565b336000908152600860205260408120600181015490919061101d90600160801b900465ffffffffffff16613f91565b90504281116110625760405162461bcd60e51b8152602060048201526011602482015270155cd95c881b1bd8dac8195e1c1a5c9959607a1b6044820152606401610dab565b60045461106f9042615a1d565b6001830154600160b01b900465ffffffffffff16116110a05760405162461bcd60e51b8152600401610dab90615a34565b600182810154600160e01b900461ffff16146110eb5760405162461bcd60e51b815260206004820152600a60248201526908481b5a59dc985d195960b21b6044820152606401610dab565b6001820154600160f01b900461ffff161561113b5760405162461bcd60e51b815260206004820152601060248201526f416c726561647920776974686472617760801b6044820152606401610dab565b6001828101805461ffff60e01b1916600160e11b17905582546001600160a01b0316600090815260076020908152604080832081518083019092528054600f0b808352940154918101919091529161119290613fab565b84549091506111ab906001600160a01b03168383614001565b6040805180820182526001600160a01b0388166000818152600760208181529482208054600f90810b865293835290855260010154938301939093528151919291900b1361120b5760405162461bcd60e51b8152600401610dab90615a56565b4281602001511161122e5760405162461bcd60e51b8152600401610dab90615a84565b6001808601546112509189916001600160801b031690600090859082906141d5565b600185015486546001600160801b0390911690879060009061127c9084906001600160681b0316615ab4565b82546101009290920a6001600160681b03818102199093169183160217909155600187015488546001600160801b0390911692508891600d916112c8918591600160681b900416615ab4565b82546101009290920a6001600160681b0381810219909316919092169190910217905550600185015460405162c2c90f60e11b81523360048201526001600160801b0382166024820152600160801b90910465ffffffffffff1660448201526001600160a01b03881690630185921e90606401600060405180830381600087803b15801561135557600080fd5b505af1158015611369573d6000803e3d6000fd5b505050506001850154604080516001600160801b0383168152600160801b90920465ffffffffffff1660208301526001600160a01b0389169133917f7a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96910160405180910390a36001850154604080516001600160801b0383168152600160801b90920465ffffffffffff1660208301526001600160a01b0389169133917f4af697c81385693e6ee5d15ccb781170dc8241f81c4983bf87cdf268d2fca5f5910160405180910390a35050600180555050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114865760405162461bcd60e51b8152600401610dab90615adf565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a08301521561151857600080fd5b50505050565b6000438211156115405760405162461bcd60e51b8152600401610dab90615b04565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a0830152156115e25780516115da90846143fa565b9150506115e4565b505b92915050565b60006115e482614676565b6000611660600d600c548154811061160f5761160f615b2e565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015242614768565b905090565b3361166e612cc7565b6001600160a01b0316146116945760405162461bcd60e51b8152600401610dab90615919565b6001600160a01b0382166000818152600b6020526040808220805460ff1916851515908117909155905190929133917f4f4d55f3b98fe4b3fbc9fb5e8ed05483cc8d794638edd690545eb5779e234a499190a45050565b336116f4612cc7565b6001600160a01b03161461171a5760405162461bcd60e51b8152600401610dab90615919565b60005b8281101561151857816018600086868581811061173c5761173c615b2e565b905060200201602081019061175191906156d1565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905583838281811061178b5761178b615b2e565b90506020020160208101906117a091906156d1565b6001600160a01b0316336001600160a01b03167fdfad9b83c215ff1a36483cf1688e5aeae2ac60f1c3f62f5229641234748f13b7846040516117e6911515815260200190565b60405180910390a3806117f881615b44565b91505061171d565b33611809612cc7565b6001600160a01b03161461182f5760405162461bcd60e51b8152600401610dab90615919565b6005805460ff191682151590811790915560405190815233907f539ba344188cde95583cd695fe9a73d66f53c83a48e3d66e5b42a12650d93ecc906020015b60405180910390a250565b6002600154141561189c5760405162461bcd60e51b8152600401610dab906159e6565b60026001556001600160a01b0382166000908152600a602052604090205460ff16156118fc5760405162461bcd60e51b815260206004820152600f60248201526e496e636f72726563742070726f787960881b6044820152606401610dab565b6040805180820182526001600160a01b0384166000818152600760208181529482208054600f0b85529290915283526001015491810191909152816119535760405162461bcd60e51b8152600401610dab90615b5f565b60008160000151600f0b1361197a5760405162461bcd60e51b8152600401610dab90615b84565b4281602001511161199d5760405162461bcd60e51b8152600401610dab90615bab565b6119ad83836000846000806141d5565b50506001805550565b600e60205281600052604060002081815481106119d257600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9550600160801b90920490910b925084565b336000908152600a602052604090205460ff16611a4f5760405162461bcd60e51b8152602060048201526007602482015266212070726f787960c81b6044820152606401610dab565b611a598282614860565b5050565b33611a66612cc7565b6001600160a01b031614611a8c5760405162461bcd60e51b8152600401610dab90615919565b801580611a995750806001145b611ad35760405162461bcd60e51b815260206004820152600b60248201526a4f6e6c792030206f72203160a81b6044820152606401610dab565b601180549082905560408051828152602081018490527f5238fc635590cf5e76ed0f591df4d7f3021d20f58e6d3405390197dd72a575fe910160405180910390a15050565b3360009081526018602052604090205460ff16158015611b485750336000908152600a602052604090205460ff16155b15611b6c57333214611b6c5760405162461bcd60e51b8152600401610dab90615bd1565b60026001541415611b8f5760405162461bcd60e51b8152600401610dab906159e6565b60026001908155604080518082018252336000818152600760208181529482208054600f0b8552929091528352909201549082015281611be15760405162461bcd60e51b8152600401610dab90615b5f565b60008160000151600f0b13611c085760405162461bcd60e51b8152600401610dab90615b84565b42816020015111611c2b5760405162461bcd60e51b8152600401610dab90615bab565b611c3c3383600084600260006141d5565b505060018055565b600043821115611c665760405162461bcd60e51b8152600401610dab90615b04565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a083015215611d14578051611d0090846143fa565b611d0a85856143fa565b6115da9190615bfc565b6115da84846143fa565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611d665760405162461bcd60e51b8152600401610dab90615adf565b6001600160a01b03808216600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a083015260021415611dfb57600080fd5b80516001600160a01b031615801590611e1c5750608081015161ffff166001145b8015611e2e575060a081015161ffff16155b15611a595780600001516001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611e7257600080fd5b505af1158015611e86573d6000803e3d6000fd5b5050506001600160a01b038316600090815260086020526040902060010180546001600160f01b0316600160f01b179055505050565b60026001541415611edf5760405162461bcd60e51b8152600401610dab906159e6565b6002600155600354600160a01b900460ff16611f0d5760405162461bcd60e51b8152600401610dab90615c14565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401611f5e919061580c565b61012060405180830381865afa158015611f7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa09190615c3b565b505096509650505050509250428211611fcb5760405162461bcd60e51b8152600401610dab90615bab565b3360009081526008602052604090206001810154600160e01b900461ffff16156120075760405162461bcd60e51b8152600401610dab90615caf565b60018101805461ffff60e01b1916600160e01b17905560408051633a98ef3960e01b815290516000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691633a98ef39916004808201926020929091908290030181865afa158015612086573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120aa9190615cd9565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561210c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121309190615cd9565b9050600060018584612142858b615cf2565b61214c9190615d27565b6121569190615a1d565b6121609190615a1d565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634c96a389336040518263ffffffff1660e01b81526004016121b0919061580c565b6020604051808303816000875af11580156121cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f39190615d3b565b6001600160a01b0381166000818152600a602052604090819020805460ff1916600190811790915588546001600160a01b031916831789558801805465ffffffffffff8c8116600160801b026001600160b01b03194292909216600160b01b02919091166001600160e01b0319909216919091176001600160801b038816171790555163399f3a4f60e01b81529192509063399f3a4f906122a39085908b90600401918252602082015260400190565b600060405180830381600087803b1580156122bd57600080fd5b505af11580156122d1573d6000803e3d6000fd5b505060408051858152602081018b90526001600160a01b03851693503392507f8519b84e949c6333da21ddea64e2c29ef66709e465ec9b0f24fb32eb2c003843910160405180910390a3505060018055505050505050565b33612332612cc7565b6001600160a01b0316146123585760405162461bcd60e51b8152600401610dab90615919565b60178054821515600160a01b0260ff60a01b1990911617905560405133907fdcc751463da04455ac459756e92d5ea118dd0dd631422cbf8353132417a52d9f9061186e90841515815260200190565b600260015414156123ca5760405162461bcd60e51b8152600401610dab906159e6565b6002600155601754600160a01b900460ff166123f85760405162461bcd60e51b8152600401610dab90615d58565b6001600160a01b03821661240a573391505b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152816124515760405162461bcd60e51b8152600401610dab90615b5f565b806020015142106124745760405162461bcd60e51b8152600401610dab90615a34565b601154156124945760405162461bcd60e51b8152600401610dab90615d58565b33600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b82041692820192909252600160d01b820464ffffffffff1692810192909252600160f81b900460ff1660608201819052600114156125c65742816040015164ffffffffff161061254c5760405162461bcd60e51b8152602060048201526014602482015273466f72626964206561726c79576974686472617760601b6044820152606401610dab565b600061255e8360000151600f0b613fab565b60208301519091506001600160681b03166125798583615a1d565b10156125c45760405162461bcd60e51b815260206004820152601a60248201527911195b1959d85d1bdc8818985b185b98d948195e18d95959195960321b6044820152606401610dab565b505b60208201516125d6338486614001565b336000908152600b602052604081205460ff16158015612605575060145461010090046001600160401b031615155b1561270057600062093a804261261b8286615bfc565b6126259190615a1d565b61262f9190615d27565b60145490915061271090879061265490849061010090046001600160401b0316615cf2565b61265e9190615cf2565b6126689190615d27565b6014549092506000906127109061268f90600160481b90046001600160401b031685615cf2565b6126999190615d27565b905080601560008282546126ad9190615bfc565b90915550506016546126fd906001600160a01b03166126cc8386615a1d565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190614a00565b50505b61270e866126cc8388615a1d565b6040805186815260208101839052428183015290516001600160a01b0388169133917f08b526d7537cea7e5a629eb0495b5932c78911fd0bdeb02b822d69a6e25792549181900360600190a350506001805550505050565b600161277662093a806035615cf2565b6127809190615a1d565b81565b3361278c612cc7565b6001600160a01b0316146127b25760405162461bcd60e51b8152600401610dab90615919565b600481905560405181815233907fde15bb8e73a1f43abe6021a8ad5a5d79caf815a4d74e6dbd7d88cd57f06fdd899060200161186e565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a0840152909190156128a057805161288690614676565b61288f84614676565b6128999190615bfc565b9392505050565b61289983614676565b50919050565b336128b8612cc7565b6001600160a01b0316146128de5760405162461bcd60e51b8152600401610dab90615919565b6128e86000614a30565b565b336128f3612cc7565b6001600160a01b0316146129195760405162461bcd60e51b8152600401610dab90615919565b60c0846001600160401b031611156129625760405162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606401610dab565b612710836001600160401b031611156129ac5760405162461bcd60e51b815260206004820152600c60248201526b0c4e0e640e8dede40d0d2ced60a31b6044820152606401610dab565b601480546001600160401b03858116600160481b81810267ffffffffffffffff60481b198a8516610100818102928316610100600160881b031989161793909317909755601680546001600160a01b038b81166001600160a01b03198084168217909455601780548d8416958116861790915560408051888d048c16808252602082019e909e5268ffffffffffffffff0019909c1690961797909704909816938901849052606089019690965285166080880181905260a08801969096529290931660c0860181905260e08601929092529193909133917f3de6c016cd3debec574d13c9966e6c847e64ac424da0b1eb70d3c93b68ec0537910160405180910390a25050505050505050565b3360009081526018602052604090205460ff16158015612ae85750336000908152600a602052604090205460ff16155b15612b0c57333214612b0c5760405162461bcd60e51b8152600401610dab90615bd1565b60026001541415612b2f5760405162461bcd60e51b8152600401610dab906159e6565b60026001908155604080518082018252336000818152600760208181529482208054600f0b85529290915283529092015490820152612b6d82613f91565b915060008160000151600f0b13612b965760405162461bcd60e51b8152600401610dab90615b84565b42816020015111612bb95760405162461bcd60e51b8152600401610dab90615bab565b80602001518211612c055760405162461bcd60e51b815260206004820152601660248201527517db995dd55b9b1bd8dad51a5b59481d1bdbc81bdb1960521b6044820152606401610dab565b6001612c1562093a806035615cf2565b612c1f9190615a1d565b612c299042615bfc565b821115612c725760405162461bcd60e51b81526020600482015260176024820152765f6e6577556e6c6f636b54696d6520746f6f206c6f6e6760481b6044820152606401610dab565b611c3c3360008484600360006141d5565b600d8181548110612c9357600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9450600160801b90920490910b919084565b6000546001600160a01b031690565b60138054610eff906159b1565b600043821115612d285760405162461bcd60e51b815260206004820152601060248201526f2130b2102fb13637b1b5a73ab6b132b960811b6044820152606401610dab565b600c546000612d378483614a80565b90506000600d8281548110612d4e57612d4e615b2e565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915083831015612e6c576000600d612daf856001615bfc565b81548110612dbf57612dbf615b2e565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905285015191925014612e665782606001518160600151612e2c9190615a1d565b83604001518260400151612e409190615a1d565b6060850151612e4f908a615a1d565b612e599190615cf2565b612e639190615d27565b91505b50612ebb565b43826060015114612ebb576060820151612e869043615a1d565b6040830151612e959042615a1d565b6060840151612ea49089615a1d565b612eae9190615cf2565b612eb89190615d27565b90505b612ed482828460400151612ecf9190615bfc565b614768565b9695505050505050565b60026001541415612f015760405162461bcd60e51b8152600401610dab906159e6565b6002600155600354600160a01b900460ff16612f2f5760405162461bcd60e51b8152600401610dab90615c14565b6001600160a01b03811660009081526009602052604090208054600160f81b900460ff16600114612f725760405162461bcd60e51b8152600401610dab9061594e565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401612fc3919061580c565b61012060405180830381865afa158015612fe1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130059190615c3b565b5050965096505050505092504282116130305760405162461bcd60e51b8152600401610dab90615bab565b3360009081526008602052604090206001810154600160e01b900461ffff161561306c5760405162461bcd60e51b8152600401610dab90615caf565b60018101805461ffff60e01b1916600160e11b17905560408051633a98ef3960e01b815290516000917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691633a98ef39916004808201926020929091908290030181865afa1580156130eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061310f9190615cd9565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015613171573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131959190615cd9565b90506000600185846131a7858b615cf2565b6131b19190615d27565b6131bb9190615a1d565b6131c59190615a1d565b600185810180546001600160b01b031916600160801b65ffffffffffff8b16026001600160801b031916176001600160801b0384161790556040805180820182526001600160a01b038d166000818152600760208181529482208054600f0b85529290915283529092015490820152909150816132545760405162461bcd60e51b8152600401610dab90615b5f565b60008160000151600f0b1361327b5760405162461bcd60e51b8152600401610dab90615a56565b4281602001511161329e5760405162461bcd60e51b8152600401610dab90615a84565b6132af8a83600084600060016141d5565b885482908a906000906132cc9084906001600160681b0316615ab4565b92506101000a8154816001600160681b0302191690836001600160681b031602179055508189600001600d8282829054906101000a90046001600160681b03166133169190615ab4565b82546001600160681b039182166101009390930a92830291909202199091161790555060405162c2c90f60e11b815233600482015260248101839052604481018890526001600160a01b038b1690630185921e90606401600060405180830381600087803b15801561338757600080fd5b505af115801561339b573d6000803e3d6000fd5b505060408051858152602081018b90526001600160a01b038e1693503392507f7a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96910160405180910390a35050600180555050505050505050565b336133fe612cc7565b6001600160a01b0316146134245760405162461bcd60e51b8152600401610dab90615919565b600354600160a01b900460ff16156134745760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610dab565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632d19b9826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156134d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f89190615d3b565b90506001600160a01b038116301461353e5760405162461bcd60e51b8152602060048201526009602482015268426164205643616b6560b81b6044820152606401610dab565b506003805460ff60a01b1916600160a01b179055565b3361355d612cc7565b6001600160a01b0316146135835760405162461bcd60e51b8152600401610dab90615919565b6001600160a01b0381166135d25760405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606401610dab565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fd1879d19b7e07327f8e491d8c5e05a4048155b7ee8f97f61e2b2233ae0e3a88890600090a250565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a0840152909190156128a957805161289990614676565b3360009081526018602052604090205460ff161580156136e95750336000908152600a602052604090205460ff16155b1561370d5733321461370d5760405162461bcd60e51b8152600401610dab90615bd1565b600260015414156137305760405162461bcd60e51b8152600401610dab906159e6565b6002600155611c3c8282614860565b33613748612cc7565b6001600160a01b03161461376e5760405162461bcd60e51b8152600401610dab90615919565b60005b8281101561151857816019600086868581811061379057613790615b2e565b90506020020160208101906137a591906156d1565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106137df576137df615b2e565b90506020020160208101906137f491906156d1565b6001600160a01b0316336001600160a01b03167f0c5e5180b1be108ebc3c1c5939cd6b59ca30067d07c5405f94304bf603c621428460405161383a911515815260200190565b60405180910390a38061384c81615b44565b915050613771565b60408051808201909152600080825260208201819052613875908280614b1e565b50565b33613881612cc7565b6001600160a01b0316146138a75760405162461bcd60e51b8152600401610dab90615919565b6001600160a01b0383166000908152600960205260409020826138cb5760006138ce565b60015b81546001600160d01b0316600160f81b60ff929092169190910264ffffffffff60d01b191617600160d01b64ffffffffff841690810291909117825560408051851515815260208101929092526001600160a01b038616917f3fd4b992bc54a5edaa3b29f337c4048b314667d454123fbd81b327aaeea7df67910160405180910390a250505050565b6002600154141561397a5760405162461bcd60e51b8152600401610dab906159e6565b600260015560055460ff166139cd5760405162461bcd60e51b8152602060048201526019602482015278466f7262696420656d657267656e637920776974686472617760381b6044820152606401610dab565b3360009081526006602052604090205460ff16156139fd5760405162461bcd60e51b8152600401610dab90615d78565b336000908152600660209081526040808320805460ff191660019081179091556007835281842082518084019093528054600f0b808452910154928201929092529112613a7f5760405162461bcd60e51b815260206004820152601060248201526f139bc81b1bd8dad95908185b5bdd5b9d60821b6044820152606401610dab565b6000613a918260000151600f0b613fab565b33600090815260076020908152604080832080546001600160801b0319168155600101839055600e9091528120919250613acb91906155f3565b336000818152600f6020526040812055613b10907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083614a00565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505060018055565b600061289983836143fa565b33613b62612cc7565b6001600160a01b031614613b885760405162461bcd60e51b8152600401610dab90615919565b6001600160a01b038116613bed5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dab565b61387581614a30565b60026001541415613c195760405162461bcd60e51b8152600401610dab906159e6565b600260015533600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b820416928201839052600160d01b810464ffffffffff1693820193909352600160f81b90920460ff16606083015215613cd45760405162461bcd60e51b8152602060048201526024808201527f496e73756666696369656e7420696e6a656374696f6e20666f722064656c656760448201526330ba37b960e11b6064820152608401610dab565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152601154613d4c578060200151421015613d4c5760405162461bcd60e51b815260206004820152601060248201526f131bd8dac81b9bdd08195e1c1a5c995960821b6044820152606401610dab565b6001600160a01b038316613d5e573392505b6000613d708260000151600f0b613fab565b9050613d7d338383614001565b336000908152600a602052604090205460ff16613dc857613dc86001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168583614a00565b604080518281524260208201526001600160a01b0386169133917f55e21b0674b8095feb63d5336fb7b5b004d267585bfbb58005e8126a8ad7bc54910160405180910390a35050600180555050565b3360009081526019602052604090205460ff16613e6c5760405162461bcd60e51b81526020600482015260136024820152722120776c2072656469737472696275746f727360681b6044820152606401610dab565b60026001541415613e8f5760405162461bcd60e51b8152600401610dab906159e6565b6002600155601580546000909155601754613ed7906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683614a00565b601754604080516001600160a01b0390921682526020820183905233917f73dad76107243dbd9d398020575b5e3ad26d50fe161c81088dc8592a394855b7910160405180910390a25060018055565b6040516001600160a01b03808516602483015283166044820152606481018290526115189085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526152cc565b600062093a80613fa18184615d27565b6115e49190615cf2565b600080821215613ffd5760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610dab565b5090565b60006140138360000151600f0b613fab565b9050808211156140585760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610dab565b604080518082019091528351600f0b815260208085015190820152818314614084578360200151614087565b60005b602085015261409e6140998484615a1d565b61539e565b600f0b84526001600160a01b0385166000908152600760209081526040909120855181546001600160801b0319166001600160801b03909116178155908501516001909101556002546140f18482615a1d565b6002556140ff868387614b1e565b6003546001600160a01b0316156141905760035482516020840151604051630f28a72960e31b81526001600160a01b038a81166004830152600f9390930b6024820152604481019190915260648101879052911690637945394890608401600060405180830381600087803b15801561417757600080fd5b505af115801561418b573d6000803e3d6000fd5b505050505b6002546040805183815260208101929092527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c910160405180910390a1505050505050565b6002546141e28682615bfc565b600255604080518082019091528451600f0b8152602080860151908201526142098761539e565b81516142159190615dab565b600f0b8152851561422857602081018690525b6001600160a01b0388166000908152600760209081526040909120825181546001600160801b0319166001600160801b0390911617815590820151600190910155614274888683614b1e565b8615801590614281575082155b156142bb576142bb6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308a613f26565b6003546001600160a01b0316156143625760035485516020870151604051636e85ee4760e01b81526001600160a01b038c81166004830152602482018c9052604482018b9052600f9390930b6064820152608481019190915260a4810187905285151560c4820152911690636e85ee479060e401600060405180830381600087803b15801561434957600080fd5b505af115801561435d573d6000803e3d6000fd5b505050505b602080820151604080518a81529283018790524290830152906001600160a01b038a16907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060600160405180910390a36002546040805184815260208101929092527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c910160405180910390a15050505050505050565b600080614407848461541b565b9050806144185760009150506115e4565b6001600160a01b0384166000908152600e6020526040812080548390811061444257614442615b2e565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152600c549092509061449b8683614a80565b90506000600d82815481106144b2576144b2615b2e565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915080848410156145a0576000600d614514866001615bfc565b8154811061452457614524615b2e565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b9383019390935260018301549082015260029091015460608083018290528601519192506145829190615a1d565b9250836040015181604001516145989190615a1d565b9150506145c4565b60608301516145af9043615a1d565b91508260400151426145c19190615a1d565b90505b60408301518215614601578284606001518b6145e09190615a1d565b6145ea9084615cf2565b6145f49190615d27565b6145fe9082615bfc565b90505b6146148760400151826140999190615a1d565b87602001516146239190615dfc565b87518890614632908390615e90565b600f90810b90915288516000910b12159050614659576000985050505050505050506115e4565b865161466790600f0b613fab565b9b9a5050505050505050505050565b6001600160a01b0381166000908152600f60205260408120548061469d5750600092915050565b6001600160a01b0383166000908152600e602052604081208054839081106146c7576146c7615b2e565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820181905260029092015460608201529150614724906140999042615a1d565b81602001516147339190615dfc565b815161473f9190615e90565b600f0b8082526000131561475257600081525b805161476090600f0b613fab565b949350505050565b600080839050600061477d8560400151613f91565b905060005b60ff8110156148335761479862093a8083615bfc565b91506000858311156147ac578592506147c0565b50600082815260106020526040902054600f0b5b6147d38460400151846140999190615a1d565b84602001516147e29190615dfc565b84516147ee9190615e90565b600f0b8452828614156148015750614833565b8084602001516148119190615dab565b600f0b602085015250604083018290528061482b81615b44565b915050614782565b5060008260000151600f0b121561484957600082525b815161485790600f0b613fab565b95945050505050565b3360009081526006602052604090205460ff16156148905760405162461bcd60e51b8152600401610dab90615d78565b61489981613f91565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152909150826148e35760405162461bcd60e51b8152600401610dab90615b5f565b8051600f0b156149265760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b1bd8dad95960921b6044820152606401610dab565b42821161496b5760405162461bcd60e51b815260206004820152601360248201527217dd5b9b1bd8dad51a5b59481d1bdbc81bdb19606a1b6044820152606401610dab565b600161497b62093a806035615cf2565b6149859190615a1d565b61498f9042615bfc565b8211156149d55760405162461bcd60e51b81526020600482015260146024820152735f756e6c6f636b54696d6520746f6f206c6f6e6760601b6044820152606401610dab565b336000818152600a60205260409020546149fb919085908590859060019060ff166141d5565b505050565b6040516001600160a01b0383166024820152604481018290526149fb90849063a9059cbb60e01b90606401613f5a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008082815b6080811015614b1457818310614a9b57614b14565b60006002614aa98486615bfc565b614ab4906001615bfc565b614abe9190615d27565b905086600d8281548110614ad457614ad4615b2e565b90600052602060002090600302016002015411614af357809350614b01565b614afe600182615a1d565b92505b5080614b0c81615b44565b915050614a86565b5090949350505050565b604080516080808201835260008083526020808401829052838501829052606080850183905285519384018652828452908301829052938201819052928101839052600c549192909181906001600160a01b03881615614dbe57428760200151118015614b92575060008760000151600f0b135b15614bf357614bb46001614baa62093a806035615cf2565b6140999190615a1d565b8751614bc09190615ee0565b600f0b602080870191909152870151614bde90614099904290615a1d565b8560200151614bed9190615dfc565b600f0b85525b428660200151118015614c0d575060008660000151600f0b135b15614c6457614c256001614baa62093a806035615cf2565b8651614c319190615ee0565b600f0b602080860191909152860151614c4f90614099904290615a1d565b8460200151614c5e9190615dfc565b600f0b84525b6001600160a01b0388166000908152600f602052604090205480614ce8576001600160a01b0389166000908152600e60209081526040808320805460018181018355918552938390208a51938b01516001600160801b03908116600160801b0294169390931760039094029092019283558801519082015560608701516002909101555b614cf3816001615bfc565b6001600160a01b038a166000818152600f6020818152604080842095909555428a86019081524360608c01908152948452600e82528584208054600181810183559186528386208d518e8601516001600160801b03908116600160801b0291161760039092020190815591519082015593516002909401939093558b8301518252601083529290205490890151910b945015614dbc57876020015187602001511415614da157839250614dbc565b602080880151600090815260109091526040902054600f0b92505b505b604080516080810182526000808252602082015242918101919091524360608201528115614e4757600d8281548110614df957614df9615b2e565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015290505b604080820180518251608081018452600080825260208201819052835194820194909452606080860151908201529151909290421115614ebe576040840151614e909042615a1d565b6060850151614e9f9043615a1d565b614eb190670de0b6b3a7640000615cf2565b614ebb9190615d27565b90505b6000614ec984613f91565b905060005b60ff8110156150af57614ee462093a8083615bfc565b9150600042831115614ef857429250614f0c565b50600082815260106020526040902054600f0b5b6000614f1b6140998886615a1d565b8860200151614f2a9190615dfc565b8851909150614f3a908290615e90565b600f0b88526020880151614f4f908390615dab565b600f90810b60208a015288516000910b1215614f6a57600088525b60008860200151600f0b1215614f8257600060208901525b60408089018590528601519396508693670de0b6b3a764000090614fa69086615a1d565b614fb09087615cf2565b614fba9190615d27565b8660600151614fc99190615bfc565b6060890152614fd9896001615bfc565b985042841415614ff05750504360608701526150af565b600d8054600181018255600091909152885160208a01516001600160801b03908116600160801b0291161760039091027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019190915560408901517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb682015560608901517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb790910155505080806150a790615b44565b915050614ece565b50600c8690556001600160a01b038d161561513c578960200151896020015186602001516150dd9190615dab565b6150e79190615e90565b600f0b60208601528951895186516150ff9190615dab565b6151099190615e90565b600f90810b865260208601516000910b121561512757600060208601525b60008560000151600f0b121561513c57600085525b600d8054600181018255600091909152855160208701516001600160801b03908116600160801b0291161760039091027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019190915560408601517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb682015560608601517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb7909101556001600160a01b038d16156152bd57428c6020015111156152625760208a01516152109089615dab565b97508b602001518b6020015114156152345760208901516152319089615e90565b97505b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b038a161790555b428b6020015111156152bd578b602001518b6020015111156152bd57602089015161528d9088615e90565b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b03831617905596505b50505050505050505050505050565b6000615321826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166154df9092919063ffffffff16565b8051909150156149fb578080602001905181019061533f9190615f1e565b6149fb5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610dab565b600060016001607f1b031982128015906153bf575060016001607f1b038213155b613ffd5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401610dab565b6001600160a01b0382166000908152600f60205260408120548190815b6080811015614b145781831061544d57614b14565b6000600261545b8486615bfc565b615466906001615bfc565b6154709190615d27565b6001600160a01b0388166000908152600e60205260409020805491925087918390811061549f5761549f615b2e565b906000526020600020906003020160020154116154be578093506154cc565b6154c9600182615a1d565b92505b50806154d781615b44565b915050615438565b60606147608484600085856001600160a01b0385163b6155415760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610dab565b600080866001600160a01b0316858760405161555d9190615f3b565b60006040518083038185875af1925050503d806000811461559a576040519150601f19603f3d011682016040523d82523d6000602084013e61559f565b606091505b50915091506155af8282866155ba565b979650505050505050565b606083156155c9575081612899565b8251156155d95782518084602001fd5b8160405162461bcd60e51b8152600401610dab919061569e565b508054600082556003029060005260206000209081019061387591905b80821115613ffd576000808255600182018190556002820155600301615610565b6001600160a01b038116811461387557600080fd5b6000806040838503121561565957600080fd5b823561566481615631565b946020939093013593505050565b60005b8381101561568d578181015183820152602001615675565b838111156115185750506000910152565b60208152600082518060208401526156bd816040850160208701615672565b601f01601f19169190910160400192915050565b6000602082840312156156e357600080fd5b813561289981615631565b60008060006060848603121561570357600080fd5b833561570e81615631565b95602085013595506040909401359392505050565b801515811461387557600080fd5b6000806040838503121561574457600080fd5b823561574f81615631565b9150602083013561575f81615723565b809150509250929050565b60008060006040848603121561577f57600080fd5b83356001600160401b038082111561579657600080fd5b818601915086601f8301126157aa57600080fd5b8135818111156157b957600080fd5b8760208260051b85010111156157ce57600080fd5b602092830195509350508401356157e481615723565b809150509250925092565b60006020828403121561580157600080fd5b813561289981615723565b6001600160a01b0391909116815260200190565b6000806040838503121561583357600080fd5b50508035926020909101359150565b60006020828403121561585457600080fd5b5035919050565b80356001600160401b038116811461587257600080fd5b919050565b6000806000806080858703121561588d57600080fd5b6158968561585b565b93506158a46020860161585b565b925060408501356158b481615631565b915060608501356158c481615631565b939692955090935050565b6000806000606084860312156158e457600080fd5b83356158ef81615631565b925060208401356158ff81615723565b9150604084013564ffffffffff811681146157e457600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600b908201526a10903232b632b3b0ba37b960a91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001600160681b03838116908316818110156159a9576159a9615973565b039392505050565b600181811c908216806159c557607f821691505b602082108114156128a957634e487b7160e01b600052602260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082821015615a2f57615a2f615973565b500390565b602080825260089082015267546f6f206c61746560c01b604082015260600190565b6020808252601490820152732737903637b1b59037b7103232b632b3b0ba37b960611b604082015260600190565b60208082526016908201527511195b1959d85d1bdc881b1bd8dac8195e1c1a5c995960521b604082015260600190565b60006001600160681b03828116848216808303821115615ad657615ad6615973565b01949350505050565b6020808252600b908201526a084818d85ad9481c1bdbdb60aa1b604082015260600190565b60208082526010908201526f3130b2102fb13637b1b5a73ab6b132b960811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615b5857615b58615973565b5060010190565b6020808252600b908201526a1098590817d85b5bdd5b9d60aa1b604082015260600190565b6020808252600d908201526c139bc81b1bd8dac8199bdd5b99609a1b604082015260600190565b6020808252600c908201526b131bd8dac8195e1c1a5c995960a21b604082015260600190565b6020808252601190820152702120656f61206f7220776c2070726f787960781b604082015260600190565b60008219821115615c0f57615c0f615973565b500190565b6020808252600d908201526c08481a5b9a5d1a585b1a5e9959609a1b604082015260600190565b60008060008060008060008060006101208a8c031215615c5a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a0151615c9681615723565b809250506101008a015190509295985092959850929598565b60208082526010908201526f105b1c9958591e481b5a59dc985d195960821b604082015260600190565b600060208284031215615ceb57600080fd5b5051919050565b6000816000190483118215151615615d0c57615d0c615973565b500290565b634e487b7160e01b600052601260045260246000fd5b600082615d3657615d36615d11565b500490565b600060208284031215615d4d57600080fd5b815161289981615631565b602080825260069082015265119bdc989a5960d21b604082015260600190565b602080825260199082015278416c726561647920656d657267656e6379576974686472617760381b604082015260600190565b6000600f82810b9084900b828212801560016001607f1b0384900383131615615dd657615dd6615973565b60016001607f1b03198390038212811615615df357615df3615973565b50019392505050565b6000600f82810b9084900b60016001607f1b0383821384841380821684840486111615615e2b57615e2b615973565b60016001607f1b03196000851282811687830587121615615e4e57615e4e615973565b60008712925085820587128484161615615e6a57615e6a615973565b85850587128184161615615e8057615e80615973565b5050509290910295945050505050565b6000600f82810b9084900b828112801560016001607f1b0319830184121615615ebb57615ebb615973565b60016001607f1b0382018313811615615ed657615ed6615973565b5090039392505050565b600081600f0b83600f0b80615ef757615ef7615d11565b60016001607f1b0319821460001982141615615f1557615f15615973565b90059392505050565b600060208284031215615f3057600080fd5b815161289981615723565b60008251615f4d818460208701615672565b919091019291505056fea26469706673582212200dc95f932f22cdc0e021900ec5bb1f900b1f4226b8728bab1c0774fd54515e1d64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/revenue-sharing-pool/v2/tsconfig.json b/projects/revenue-sharing-pool/v2/tsconfig.json new file mode 100644 index 00000000..dd966549 --- /dev/null +++ b/projects/revenue-sharing-pool/v2/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "noImplicitAny": false + } +} diff --git a/projects/stable-swap/README.md b/projects/stable-swap/README.md new file mode 100644 index 00000000..f08f95a0 --- /dev/null +++ b/projects/stable-swap/README.md @@ -0,0 +1,5 @@ +# Pancake Stable Swap + +## Description + +Pancakeswap Stable Swap. diff --git a/projects/stable-swap/config.ts b/projects/stable-swap/config.ts new file mode 100644 index 00000000..ee72bcc1 --- /dev/null +++ b/projects/stable-swap/config.ts @@ -0,0 +1,53 @@ +export default { + A: { + mainnet: 1000, + testnet: 1000, + }, + Fee: { + mainnet: 4000000, + testnet: 4000000, + }, + AdminFee: { + mainnet: 5000000000, + testnet: 5000000000, + }, + LPFactory: { + mainnet: "0x1179ADfa22dD0e5050C1c00C9f8543A77F75A2c0", + testnet: "0x17e7fEBaD84801b954e0076F8A8F1F66f4cD7Ad6", + goerli: "0xb224D46DD1e418588C8266F005E4bf9ff5f6b55c", + }, + SwapTwoPoolDeployer: { + mainnet: "0xdDFCDAacC836dd5A1AE2D375fFb153cE59DD09ff", + testnet: "0xb3E52e0956C6a1e9d2932AdE6B4AFf8748FEa4Da", + goerli: "0x2E564618dC39D2be3115dcF68b75e42bD8432087", + }, + SwapThreePoolDeployer: { + mainnet: "0x6AF7a605953C0B462EE9540217F5bD80878c6b2E", + testnet: "0x21AA173E1297cEb72b482297D9f7eE5a450b7606", + goerli: "0x534F89508FAc4b486c090e407bE204D6AC0462C0", + }, + Factory: { + mainnet: "0x25a55f9f2279A54951133D503490342b50E5cd15", + testnet: "0xe6A00f8b819244e8Ab9Ea930e46449C2F20B6609", + goerli: "0xB4AAc2AD66ab56CFFf03aD05f1D90ba889e5Aed7", + }, + TwoPoolInfo: { + mainnet: "0x150c8AbEB487137acCC541925408e73b92F39A50", + testnet: "0x0A548d59D04096Bc01206D58C3D63c478e1e06dB", + goerli: "0x13e9f6c87b1BF0D1d0e1D94c1DF9c51939CA591C", + }, + ThreePoolInfo: { + mainnet: "0x5950eF6bA8edd7Dd30E9bCd05061ADAb78C58f16", + testnet: "0x69d565bDf0E7f0224dFb6f7257108090387c5Fe7", + goerli: "0x5a09ED72Cbc6c4d024f7E3eAbE487b1A8413cFEf", + }, + Info: { + mainnet: "0x5A075D13469201cAd4Ac0c77aEFF31f2217A9448", + testnet: "0x734098fCB6ae5Cb0e249187f3657Cff05CEEf4F0", + goerli: "0x0a4922aD4400c920144adec825B8d4D814C48303", + }, + WBNB: { + mainnet: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", + testnet: "0x931Bf638fC27499506a4C1446e5f905b0EC73C81", + }, +}; diff --git a/projects/stable-swap/contracts/PancakeStableSwapFactory.sol b/projects/stable-swap/contracts/PancakeStableSwapFactory.sol new file mode 100644 index 00000000..0dd74a77 --- /dev/null +++ b/projects/stable-swap/contracts/PancakeStableSwapFactory.sol @@ -0,0 +1,211 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "./interfaces/IPancakeStableSwap.sol"; +import "./interfaces/IPancakeStableSwapLP.sol"; +import "./interfaces/IPancakeStableSwapDeployer.sol"; +import "./interfaces/IPancakeStableSwapLPFactory.sol"; + +contract PancakeStableSwapFactory is Ownable { + struct StableSwapPairInfo { + address swapContract; + address token0; + address token1; + address LPContract; + } + struct StableSwapThreePoolPairInfo { + address swapContract; + address token0; + address token1; + address token2; + address LPContract; + } + + mapping(address => mapping(address => mapping(address => StableSwapThreePoolPairInfo))) public stableSwapPairInfo; + // Query three pool pair infomation by two tokens. + mapping(address => mapping(address => StableSwapThreePoolPairInfo)) threePoolInfo; + mapping(uint256 => address) public swapPairContract; + + IPancakeStableSwapLPFactory public immutable LPFactory; + IPancakeStableSwapDeployer public immutable SwapTwoPoolDeployer; + IPancakeStableSwapDeployer public immutable SwapThreePoolDeployer; + + address constant ZEROADDRESS = address(0); + + uint256 public pairLength; + + event NewStableSwapPair(address indexed swapContract, address tokenA, address tokenB, address tokenC, address LP); + + /** + * @notice constructor + * _LPFactory: LP factory + * _SwapTwoPoolDeployer: Swap two pool deployer + * _SwapThreePoolDeployer: Swap three pool deployer + */ + constructor( + IPancakeStableSwapLPFactory _LPFactory, + IPancakeStableSwapDeployer _SwapTwoPoolDeployer, + IPancakeStableSwapDeployer _SwapThreePoolDeployer + ) { + LPFactory = _LPFactory; + SwapTwoPoolDeployer = _SwapTwoPoolDeployer; + SwapThreePoolDeployer = _SwapThreePoolDeployer; + } + + // returns sorted token addresses, used to handle return values from pairs sorted in this order + function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { + require(tokenA != tokenB, "IDENTICAL_ADDRESSES"); + (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); + } + + function sortTokens( + address tokenA, + address tokenB, + address tokenC + ) + internal + pure + returns ( + address, + address, + address + ) + { + require(tokenA != tokenB && tokenA != tokenC && tokenB != tokenC, "IDENTICAL_ADDRESSES"); + address tmp; + if (tokenA > tokenB) { + tmp = tokenA; + tokenA = tokenB; + tokenB = tmp; + } + if (tokenB > tokenC) { + tmp = tokenB; + tokenB = tokenC; + tokenC = tmp; + if (tokenA > tokenB) { + tmp = tokenA; + tokenA = tokenB; + tokenB = tmp; + } + } + return (tokenA, tokenB, tokenC); + } + + /** + * @notice createSwapPair + * @param _tokenA: Addresses of ERC20 conracts . + * @param _tokenB: Addresses of ERC20 conracts . + * @param _A: Amplification coefficient multiplied by n * (n - 1) + * @param _fee: Fee to charge for exchanges + * @param _admin_fee: Admin fee + */ + function createSwapPair( + address _tokenA, + address _tokenB, + uint256 _A, + uint256 _fee, + uint256 _admin_fee + ) external onlyOwner { + require(_tokenA != ZEROADDRESS && _tokenB != ZEROADDRESS && _tokenA != _tokenB, "Illegal token"); + (address t0, address t1) = sortTokens(_tokenA, _tokenB); + address LP = LPFactory.createSwapLP(t0, t1, ZEROADDRESS, address(this)); + address swapContract = SwapTwoPoolDeployer.createSwapPair(t0, t1, _A, _fee, _admin_fee, msg.sender, LP); + IPancakeStableSwapLP(LP).setMinter(swapContract); + addPairInfoInternal(swapContract, t0, t1, ZEROADDRESS, LP); + } + + /** + * @notice createThreePoolPair + * @param _tokenA: Addresses of ERC20 conracts . + * @param _tokenB: Addresses of ERC20 conracts . + * @param _tokenC: Addresses of ERC20 conracts . + * @param _A: Amplification coefficient multiplied by n * (n - 1) + * @param _fee: Fee to charge for exchanges + * @param _admin_fee: Admin fee + */ + function createThreePoolPair( + address _tokenA, + address _tokenB, + address _tokenC, + uint256 _A, + uint256 _fee, + uint256 _admin_fee + ) external onlyOwner { + require( + _tokenA != ZEROADDRESS && + _tokenB != ZEROADDRESS && + _tokenC != ZEROADDRESS && + _tokenA != _tokenB && + _tokenA != _tokenC && + _tokenB != _tokenC, + "Illegal token" + ); + (address t0, address t1, address t2) = sortTokens(_tokenA, _tokenB, _tokenC); + address LP = LPFactory.createSwapLP(t0, t1, t2, address(this)); + address swapContract = SwapThreePoolDeployer.createSwapPair(t0, t1, t2, _A, _fee, _admin_fee, msg.sender, LP); + IPancakeStableSwapLP(LP).setMinter(swapContract); + addPairInfoInternal(swapContract, t0, t1, t2, LP); + } + + function addPairInfoInternal( + address _swapContract, + address _t0, + address _t1, + address _t2, + address _LP + ) internal { + StableSwapThreePoolPairInfo storage info = stableSwapPairInfo[_t0][_t1][_t2]; + info.swapContract = _swapContract; + info.token0 = _t0; + info.token1 = _t1; + info.token2 = _t2; + info.LPContract = _LP; + swapPairContract[pairLength] = _swapContract; + pairLength += 1; + if (_t2 != ZEROADDRESS) { + addThreePoolPairInfo(_t0, _t1, _t2, info); + } + + emit NewStableSwapPair(_swapContract, _t0, _t1, _t2, _LP); + } + + function addThreePoolPairInfo( + address _t0, + address _t1, + address _t2, + StableSwapThreePoolPairInfo memory info + ) internal { + threePoolInfo[_t0][_t1] = info; + threePoolInfo[_t0][_t2] = info; + threePoolInfo[_t1][_t2] = info; + } + + function addPairInfo(address _swapContract) external onlyOwner { + IPancakeStableSwap swap = IPancakeStableSwap(_swapContract); + uint256 N_COINS = swap.N_COINS(); + if (N_COINS == 2) { + addPairInfoInternal(_swapContract, swap.coins(0), swap.coins(1), ZEROADDRESS, swap.token()); + } else if (N_COINS == 3) { + addPairInfoInternal(_swapContract, swap.coins(0), swap.coins(1), swap.coins(2), swap.token()); + } + } + + function getPairInfo(address _tokenA, address _tokenB) external view returns (StableSwapPairInfo memory info) { + (address t0, address t1) = sortTokens(_tokenA, _tokenB); + StableSwapThreePoolPairInfo memory pairInfo = stableSwapPairInfo[t0][t1][ZEROADDRESS]; + info.swapContract = pairInfo.swapContract; + info.token0 = pairInfo.token0; + info.token1 = pairInfo.token1; + info.LPContract = pairInfo.LPContract; + } + + function getThreePoolPairInfo(address _tokenA, address _tokenB) + external + view + returns (StableSwapThreePoolPairInfo memory info) + { + (address t0, address t1) = sortTokens(_tokenA, _tokenB); + info = threePoolInfo[t0][t1]; + } +} diff --git a/projects/stable-swap/contracts/PancakeStableSwapLP.sol b/projects/stable-swap/contracts/PancakeStableSwapLP.sol new file mode 100644 index 00000000..0338dc8b --- /dev/null +++ b/projects/stable-swap/contracts/PancakeStableSwapLP.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/token/ERC20/ERC20.sol"; + +contract PancakeStableSwapLP is ERC20 { + address public minter; + + constructor() ERC20("Pancake StableSwap LPs", "Stable-LP") { + minter = msg.sender; + } + + /** + * @notice Checks if the msg.sender is the minter address. + */ + modifier onlyMinter() { + require(msg.sender == minter, "Not minter"); + _; + } + + function setMinter(address _newMinter) external onlyMinter { + minter = _newMinter; + } + + function mint(address _to, uint256 _amount) external onlyMinter { + _mint(_to, _amount); + } + + function burnFrom(address _to, uint256 _amount) external onlyMinter { + _burn(_to, _amount); + } +} diff --git a/projects/stable-swap/contracts/PancakeStableSwapLPFactory.sol b/projects/stable-swap/contracts/PancakeStableSwapLPFactory.sol new file mode 100644 index 00000000..8135b3d8 --- /dev/null +++ b/projects/stable-swap/contracts/PancakeStableSwapLPFactory.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "./PancakeStableSwapLP.sol"; + +contract PancakeStableSwapLPFactory is Ownable { + event NewStableSwapLP(address indexed swapLPContract, address tokenA, address tokenB, address tokenC); + + constructor() {} + + /** + * @notice createSwapLP + * @param _tokenA: Addresses of ERC20 conracts . + * @param _tokenB: Addresses of ERC20 conracts . + * @param _tokenC: Addresses of ERC20 conracts . + * @param _minter: Minter address + */ + function createSwapLP( + address _tokenA, + address _tokenB, + address _tokenC, + address _minter + ) external onlyOwner returns (address) { + // create LP token + bytes memory bytecode = type(PancakeStableSwapLP).creationCode; + bytes32 salt = keccak256( + abi.encodePacked(_tokenA, _tokenB, _tokenC, msg.sender, block.timestamp, block.chainid) + ); + address lpToken; + assembly { + lpToken := create2(0, add(bytecode, 32), mload(bytecode), salt) + } + PancakeStableSwapLP(lpToken).setMinter(_minter); + emit NewStableSwapLP(lpToken, _tokenA, _tokenB, _tokenC); + return lpToken; + } +} diff --git a/projects/stable-swap/contracts/PancakeStableSwapThreePool.sol b/projects/stable-swap/contracts/PancakeStableSwapThreePool.sol new file mode 100644 index 00000000..a156dcf6 --- /dev/null +++ b/projects/stable-swap/contracts/PancakeStableSwapThreePool.sol @@ -0,0 +1,774 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/extensions/IERC20Metadata.sol"; +import "@openzeppelin-4.5.0/contracts/security/ReentrancyGuard.sol"; +import "./interfaces/IPancakeStableSwapLP.sol"; + +contract PancakeStableSwapThreePool is Ownable, ReentrancyGuard { + using SafeERC20 for IERC20; + + uint256 public constant N_COINS = 3; + + uint256 public constant MAX_DECIMAL = 18; + uint256 public constant FEE_DENOMINATOR = 1e10; + uint256 public constant PRECISION = 1e18; + uint256[N_COINS] public PRECISION_MUL; + uint256[N_COINS] public RATES; + + uint256 public constant MAX_ADMIN_FEE = 1e10; + uint256 public constant MAX_FEE = 5e9; + uint256 public constant MAX_A = 1e6; + uint256 public constant MAX_A_CHANGE = 10; + uint256 public constant MIN_BNB_GAS = 2300; + uint256 public constant MAX_BNB_GAS = 23000; + + uint256 public constant ADMIN_ACTIONS_DELAY = 3 days; + uint256 public constant MIN_RAMP_TIME = 1 days; + + address[N_COINS] public coins; + uint256[N_COINS] public balances; + uint256 public fee; // fee * 1e10. + uint256 public admin_fee; // admin_fee * 1e10. + uint256 public bnb_gas = 4029; // transfer bnb gas. + + IPancakeStableSwapLP public token; + + address constant BNB_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; + + bool support_BNB; + + uint256 public initial_A; + uint256 public future_A; + uint256 public initial_A_time; + uint256 public future_A_time; + + uint256 public admin_actions_deadline; + uint256 public future_fee; + uint256 public future_admin_fee; + + uint256 public kill_deadline; + uint256 public constant KILL_DEADLINE_DT = 2 * 30 days; + bool public is_killed; + + address public immutable STABLESWAP_FACTORY; + bool public isInitialized; + + event TokenExchange( + address indexed buyer, + uint256 sold_id, + uint256 tokens_sold, + uint256 bought_id, + uint256 tokens_bought + ); + event AddLiquidity( + address indexed provider, + uint256[N_COINS] token_amounts, + uint256[N_COINS] fees, + uint256 invariant, + uint256 token_supply + ); + event RemoveLiquidity( + address indexed provider, + uint256[N_COINS] token_amounts, + uint256[N_COINS] fees, + uint256 token_supply + ); + event RemoveLiquidityOne(address indexed provider, uint256 index, uint256 token_amount, uint256 coin_amount); + event RemoveLiquidityImbalance( + address indexed provider, + uint256[N_COINS] token_amounts, + uint256[N_COINS] fees, + uint256 invariant, + uint256 token_supply + ); + event CommitNewFee(uint256 indexed deadline, uint256 fee, uint256 admin_fee); + event NewFee(uint256 fee, uint256 admin_fee); + event RampA(uint256 old_A, uint256 new_A, uint256 initial_time, uint256 future_time); + event StopRampA(uint256 A, uint256 t); + event SetBNBGas(uint256 bnb_gas); + event RevertParameters(); + event DonateAdminFees(); + event Kill(); + event Unkill(); + + /** + * @notice constructor + */ + constructor() { + STABLESWAP_FACTORY = msg.sender; + } + + /** + * @notice initialize + * @param _coins: Addresses of ERC20 conracts of coins (c-tokens) involved + * @param _A: Amplification coefficient multiplied by n * (n - 1) + * @param _fee: Fee to charge for exchanges + * @param _admin_fee: Admin fee + * @param _owner: Owner + * @param _LP: LP address + */ + function initialize( + address[N_COINS] memory _coins, + uint256 _A, + uint256 _fee, + uint256 _admin_fee, + address _owner, + address _LP + ) external { + require(!isInitialized, "Operations: Already initialized"); + require(msg.sender == STABLESWAP_FACTORY, "Operations: Not factory"); + require(_A <= MAX_A, "_A exceeds maximum"); + require(_fee <= MAX_FEE, "_fee exceeds maximum"); + require(_admin_fee <= MAX_ADMIN_FEE, "_admin_fee exceeds maximum"); + isInitialized = true; + for (uint256 i = 0; i < N_COINS; i++) { + require(_coins[i] != address(0), "ZERO Address"); + uint256 coinDecimal; + if (_coins[i] == BNB_ADDRESS) { + coinDecimal = 18; + support_BNB = true; + } else { + coinDecimal = IERC20Metadata(_coins[i]).decimals(); + } + require(coinDecimal <= MAX_DECIMAL, "The maximum decimal cannot exceed 18"); + //set PRECISION_MUL and RATES + PRECISION_MUL[i] = 10**(MAX_DECIMAL - coinDecimal); + RATES[i] = PRECISION * PRECISION_MUL[i]; + } + coins = _coins; + initial_A = _A; + future_A = _A; + fee = _fee; + admin_fee = _admin_fee; + kill_deadline = block.timestamp + KILL_DEADLINE_DT; + token = IPancakeStableSwapLP(_LP); + + transferOwnership(_owner); + } + + function get_A() internal view returns (uint256) { + //Handle ramping A up or down + uint256 t1 = future_A_time; + uint256 A1 = future_A; + if (block.timestamp < t1) { + uint256 A0 = initial_A; + uint256 t0 = initial_A_time; + // Expressions in uint256 cannot have negative numbers, thus "if" + if (A1 > A0) { + return A0 + ((A1 - A0) * (block.timestamp - t0)) / (t1 - t0); + } else { + return A0 - ((A0 - A1) * (block.timestamp - t0)) / (t1 - t0); + } + } else { + // when t1 == 0 or block.timestamp >= t1 + return A1; + } + } + + function A() external view returns (uint256) { + return get_A(); + } + + function _xp() internal view returns (uint256[N_COINS] memory result) { + result = RATES; + for (uint256 i = 0; i < N_COINS; i++) { + result[i] = (result[i] * balances[i]) / PRECISION; + } + } + + function _xp_mem(uint256[N_COINS] memory _balances) internal view returns (uint256[N_COINS] memory result) { + result = RATES; + for (uint256 i = 0; i < N_COINS; i++) { + result[i] = (result[i] * _balances[i]) / PRECISION; + } + } + + function get_D(uint256[N_COINS] memory xp, uint256 amp) internal pure returns (uint256) { + uint256 S; + for (uint256 i = 0; i < N_COINS; i++) { + S += xp[i]; + } + if (S == 0) { + return 0; + } + + uint256 Dprev; + uint256 D = S; + uint256 Ann = amp * N_COINS; + for (uint256 j = 0; j < 255; j++) { + uint256 D_P = D; + for (uint256 k = 0; k < N_COINS; k++) { + D_P = (D_P * D) / (xp[k] * N_COINS); // If division by 0, this will be borked: only withdrawal will work. And that is good + } + Dprev = D; + D = ((Ann * S + D_P * N_COINS) * D) / ((Ann - 1) * D + (N_COINS + 1) * D_P); + // Equality with the precision of 1 + if (D > Dprev) { + if (D - Dprev <= 1) { + break; + } + } else { + if (Dprev - D <= 1) { + break; + } + } + } + return D; + } + + function get_D_mem(uint256[N_COINS] memory _balances, uint256 amp) internal view returns (uint256) { + return get_D(_xp_mem(_balances), amp); + } + + function get_virtual_price() external view returns (uint256) { + /** + Returns portfolio virtual price (for calculating profit) + scaled up by 1e18 + */ + uint256 D = get_D(_xp(), get_A()); + /** + D is in the units similar to DAI (e.g. converted to precision 1e18) + When balanced, D = n * x_u - total virtual value of the portfolio + */ + uint256 token_supply = token.totalSupply(); + return (D * PRECISION) / token_supply; + } + + function calc_token_amount(uint256[N_COINS] memory amounts, bool deposit) external view returns (uint256) { + /** + Simplified method to calculate addition or reduction in token supply at + deposit or withdrawal without taking fees into account (but looking at + slippage). + Needed to prevent front-running, not for precise calculations! + */ + uint256[N_COINS] memory _balances = balances; + uint256 amp = get_A(); + uint256 D0 = get_D_mem(_balances, amp); + for (uint256 i = 0; i < N_COINS; i++) { + if (deposit) { + _balances[i] += amounts[i]; + } else { + _balances[i] -= amounts[i]; + } + } + uint256 D1 = get_D_mem(_balances, amp); + uint256 token_amount = token.totalSupply(); + uint256 difference; + if (deposit) { + difference = D1 - D0; + } else { + difference = D0 - D1; + } + return (difference * token_amount) / D0; + } + + function add_liquidity(uint256[N_COINS] memory amounts, uint256 min_mint_amount) external payable nonReentrant { + //Amounts is amounts of c-tokens + require(!is_killed, "Killed"); + if (!support_BNB) { + require(msg.value == 0, "Inconsistent quantity"); // Avoid sending BNB by mistake. + } + uint256[N_COINS] memory fees; + uint256 _fee = (fee * N_COINS) / (4 * (N_COINS - 1)); + uint256 _admin_fee = admin_fee; + uint256 amp = get_A(); + + uint256 token_supply = token.totalSupply(); + //Initial invariant + uint256 D0; + uint256[N_COINS] memory old_balances = balances; + if (token_supply > 0) { + D0 = get_D_mem(old_balances, amp); + } + uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1], old_balances[2]]; + + for (uint256 i = 0; i < N_COINS; i++) { + if (token_supply == 0) { + require(amounts[i] > 0, "Initial deposit requires all coins"); + } + // balances store amounts of c-tokens + new_balances[i] = old_balances[i] + amounts[i]; + } + + // Invariant after change + uint256 D1 = get_D_mem(new_balances, amp); + require(D1 > D0, "D1 must be greater than D0"); + + // We need to recalculate the invariant accounting for fees + // to calculate fair user's share + uint256 D2 = D1; + if (token_supply > 0) { + // Only account for fees if we are not the first to deposit + for (uint256 i = 0; i < N_COINS; i++) { + uint256 ideal_balance = (D1 * old_balances[i]) / D0; + uint256 difference; + if (ideal_balance > new_balances[i]) { + difference = ideal_balance - new_balances[i]; + } else { + difference = new_balances[i] - ideal_balance; + } + + fees[i] = (_fee * difference) / FEE_DENOMINATOR; + balances[i] = new_balances[i] - ((fees[i] * _admin_fee) / FEE_DENOMINATOR); + new_balances[i] -= fees[i]; + } + D2 = get_D_mem(new_balances, amp); + } else { + balances = new_balances; + } + + // Calculate, how much pool tokens to mint + uint256 mint_amount; + if (token_supply == 0) { + mint_amount = D1; // Take the dust if there was any + } else { + mint_amount = (token_supply * (D2 - D0)) / D0; + } + require(mint_amount >= min_mint_amount, "Slippage screwed you"); + + // Take coins from the sender + for (uint256 i = 0; i < N_COINS; i++) { + uint256 amount = amounts[i]; + address coin = coins[i]; + transfer_in(coin, amount); + } + + // Mint pool tokens + token.mint(msg.sender, mint_amount); + + emit AddLiquidity(msg.sender, amounts, fees, D1, token_supply + mint_amount); + } + + function get_y( + uint256 i, + uint256 j, + uint256 x, + uint256[N_COINS] memory xp_ + ) internal view returns (uint256) { + // x in the input is converted to the same price/precision + require((i != j) && (i < N_COINS) && (j < N_COINS), "Illegal parameter"); + uint256 amp = get_A(); + uint256 D = get_D(xp_, amp); + uint256 c = D; + uint256 S_; + uint256 Ann = amp * N_COINS; + + uint256 _x; + for (uint256 k = 0; k < N_COINS; k++) { + if (k == i) { + _x = x; + } else if (k != j) { + _x = xp_[k]; + } else { + continue; + } + S_ += _x; + c = (c * D) / (_x * N_COINS); + } + c = (c * D) / (Ann * N_COINS); + uint256 b = S_ + D / Ann; // - D + uint256 y_prev; + uint256 y = D; + + for (uint256 m = 0; m < 255; m++) { + y_prev = y; + y = (y * y + c) / (2 * y + b - D); + // Equality with the precision of 1 + if (y > y_prev) { + if (y - y_prev <= 1) { + break; + } + } else { + if (y_prev - y <= 1) { + break; + } + } + } + return y; + } + + function get_dy( + uint256 i, + uint256 j, + uint256 dx + ) external view returns (uint256) { + // dx and dy in c-units + uint256[N_COINS] memory rates = RATES; + uint256[N_COINS] memory xp = _xp(); + + uint256 x = xp[i] + ((dx * rates[i]) / PRECISION); + uint256 y = get_y(i, j, x, xp); + uint256 dy = ((xp[j] - y - 1) * PRECISION) / rates[j]; + uint256 _fee = (fee * dy) / FEE_DENOMINATOR; + return dy - _fee; + } + + function get_dy_underlying( + uint256 i, + uint256 j, + uint256 dx + ) external view returns (uint256) { + // dx and dy in underlying units + uint256[N_COINS] memory xp = _xp(); + uint256[N_COINS] memory precisions = PRECISION_MUL; + + uint256 x = xp[i] + dx * precisions[i]; + uint256 y = get_y(i, j, x, xp); + uint256 dy = (xp[j] - y - 1) / precisions[j]; + uint256 _fee = (fee * dy) / FEE_DENOMINATOR; + return dy - _fee; + } + + function exchange( + uint256 i, + uint256 j, + uint256 dx, + uint256 min_dy + ) external payable nonReentrant { + require(!is_killed, "Killed"); + if (!support_BNB) { + require(msg.value == 0, "Inconsistent quantity"); // Avoid sending BNB by mistake. + } + + uint256[N_COINS] memory old_balances = balances; + uint256[N_COINS] memory xp = _xp_mem(old_balances); + + uint256 x = xp[i] + (dx * RATES[i]) / PRECISION; + uint256 y = get_y(i, j, x, xp); + + uint256 dy = xp[j] - y - 1; // -1 just in case there were some rounding errors + uint256 dy_fee = (dy * fee) / FEE_DENOMINATOR; + + // Convert all to real units + dy = ((dy - dy_fee) * PRECISION) / RATES[j]; + require(dy >= min_dy, "Exchange resulted in fewer coins than expected"); + + uint256 dy_admin_fee = (dy_fee * admin_fee) / FEE_DENOMINATOR; + dy_admin_fee = (dy_admin_fee * PRECISION) / RATES[j]; + + // Change balances exactly in same way as we change actual ERC20 coin amounts + balances[i] = old_balances[i] + dx; + // When rounding errors happen, we undercharge admin fee in favor of LP + balances[j] = old_balances[j] - dy - dy_admin_fee; + + address iAddress = coins[i]; + if (iAddress == BNB_ADDRESS) { + require(dx == msg.value, "Inconsistent quantity"); + } else { + IERC20(iAddress).safeTransferFrom(msg.sender, address(this), dx); + } + address jAddress = coins[j]; + transfer_out(jAddress, dy); + emit TokenExchange(msg.sender, i, dx, j, dy); + } + + function remove_liquidity(uint256 _amount, uint256[N_COINS] memory min_amounts) external nonReentrant { + uint256 total_supply = token.totalSupply(); + uint256[N_COINS] memory amounts; + uint256[N_COINS] memory fees; //Fees are unused but we've got them historically in event + + for (uint256 i = 0; i < N_COINS; i++) { + uint256 value = (balances[i] * _amount) / total_supply; + require(value >= min_amounts[i], "Withdrawal resulted in fewer coins than expected"); + balances[i] -= value; + amounts[i] = value; + transfer_out(coins[i], value); + } + + token.burnFrom(msg.sender, _amount); // dev: insufficient funds + + emit RemoveLiquidity(msg.sender, amounts, fees, total_supply - _amount); + } + + function remove_liquidity_imbalance(uint256[N_COINS] memory amounts, uint256 max_burn_amount) + external + nonReentrant + { + require(!is_killed, "Killed"); + + uint256 token_supply = token.totalSupply(); + require(token_supply > 0, "dev: zero total supply"); + uint256 _fee = (fee * N_COINS) / (4 * (N_COINS - 1)); + uint256 _admin_fee = admin_fee; + uint256 amp = get_A(); + + uint256[N_COINS] memory old_balances = balances; + uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1], old_balances[2]]; + uint256 D0 = get_D_mem(old_balances, amp); + for (uint256 i = 0; i < N_COINS; i++) { + new_balances[i] -= amounts[i]; + } + uint256 D1 = get_D_mem(new_balances, amp); + uint256[N_COINS] memory fees; + for (uint256 i = 0; i < N_COINS; i++) { + uint256 ideal_balance = (D1 * old_balances[i]) / D0; + uint256 difference; + if (ideal_balance > new_balances[i]) { + difference = ideal_balance - new_balances[i]; + } else { + difference = new_balances[i] - ideal_balance; + } + fees[i] = (_fee * difference) / FEE_DENOMINATOR; + balances[i] = new_balances[i] - ((fees[i] * _admin_fee) / FEE_DENOMINATOR); + new_balances[i] -= fees[i]; + } + uint256 D2 = get_D_mem(new_balances, amp); + + uint256 token_amount = ((D0 - D2) * token_supply) / D0; + require(token_amount > 0, "token_amount must be greater than 0"); + token_amount += 1; // In case of rounding errors - make it unfavorable for the "attacker" + require(token_amount <= max_burn_amount, "Slippage screwed you"); + + token.burnFrom(msg.sender, token_amount); // dev: insufficient funds + + for (uint256 i = 0; i < N_COINS; i++) { + if (amounts[i] > 0) { + transfer_out(coins[i], amounts[i]); + } + } + token_supply -= token_amount; + emit RemoveLiquidityImbalance(msg.sender, amounts, fees, D1, token_supply); + } + + function get_y_D( + uint256 A_, + uint256 i, + uint256[N_COINS] memory xp, + uint256 D + ) internal pure returns (uint256) { + /** + Calculate x[i] if one reduces D from being calculated for xp to D + + Done by solving quadratic equation iteratively. + x_1**2 + x1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n + 1) / (n ** (2 * n) * prod' * A) + x_1**2 + b*x_1 = c + + x_1 = (x_1**2 + c) / (2*x_1 + b) + */ + // x in the input is converted to the same price/precision + require(i < N_COINS, "dev: i above N_COINS"); + uint256 c = D; + uint256 S_; + uint256 Ann = A_ * N_COINS; + + uint256 _x; + for (uint256 k = 0; k < N_COINS; k++) { + if (k != i) { + _x = xp[k]; + } else { + continue; + } + S_ += _x; + c = (c * D) / (_x * N_COINS); + } + c = (c * D) / (Ann * N_COINS); + uint256 b = S_ + D / Ann; + uint256 y_prev; + uint256 y = D; + + for (uint256 k = 0; k < 255; k++) { + y_prev = y; + y = (y * y + c) / (2 * y + b - D); + // Equality with the precision of 1 + if (y > y_prev) { + if (y - y_prev <= 1) { + break; + } + } else { + if (y_prev - y <= 1) { + break; + } + } + } + return y; + } + + function _calc_withdraw_one_coin(uint256 _token_amount, uint256 i) internal view returns (uint256, uint256) { + // First, need to calculate + // * Get current D + // * Solve Eqn against y_i for D - _token_amount + uint256 amp = get_A(); + uint256 _fee = (fee * N_COINS) / (4 * (N_COINS - 1)); + uint256[N_COINS] memory precisions = PRECISION_MUL; + uint256 total_supply = token.totalSupply(); + + uint256[N_COINS] memory xp = _xp(); + + uint256 D0 = get_D(xp, amp); + uint256 D1 = D0 - (_token_amount * D0) / total_supply; + uint256[N_COINS] memory xp_reduced = xp; + + uint256 new_y = get_y_D(amp, i, xp, D1); + uint256 dy_0 = (xp[i] - new_y) / precisions[i]; // w/o fees + + for (uint256 k = 0; k < N_COINS; k++) { + uint256 dx_expected; + if (k == i) { + dx_expected = (xp[k] * D1) / D0 - new_y; + } else { + dx_expected = xp[k] - (xp[k] * D1) / D0; + } + xp_reduced[k] -= (_fee * dx_expected) / FEE_DENOMINATOR; + } + uint256 dy = xp_reduced[i] - get_y_D(amp, i, xp_reduced, D1); + dy = (dy - 1) / precisions[i]; // Withdraw less to account for rounding errors + + return (dy, dy_0 - dy); + } + + function calc_withdraw_one_coin(uint256 _token_amount, uint256 i) external view returns (uint256) { + (uint256 dy, ) = _calc_withdraw_one_coin(_token_amount, i); + return dy; + } + + function remove_liquidity_one_coin( + uint256 _token_amount, + uint256 i, + uint256 min_amount + ) external nonReentrant { + // Remove _amount of liquidity all in a form of coin i + require(!is_killed, "Killed"); + (uint256 dy, uint256 dy_fee) = _calc_withdraw_one_coin(_token_amount, i); + require(dy >= min_amount, "Not enough coins removed"); + + balances[i] -= (dy + (dy_fee * admin_fee) / FEE_DENOMINATOR); + token.burnFrom(msg.sender, _token_amount); // dev: insufficient funds + transfer_out(coins[i], dy); + + emit RemoveLiquidityOne(msg.sender, i, _token_amount, dy); + } + + function transfer_out(address coin_address, uint256 value) internal { + if (coin_address == BNB_ADDRESS) { + _safeTransferBNB(msg.sender, value); + } else { + IERC20(coin_address).safeTransfer(msg.sender, value); + } + } + + function transfer_in(address coin_address, uint256 value) internal { + if (coin_address == BNB_ADDRESS) { + require(value == msg.value, "Inconsistent quantity"); + } else { + IERC20(coin_address).safeTransferFrom(msg.sender, address(this), value); + } + } + + function _safeTransferBNB(address to, uint256 value) internal { + (bool success, ) = to.call{gas: bnb_gas, value: value}(""); + require(success, "BNB transfer failed"); + } + + // Admin functions + + function set_bnb_gas(uint256 _bnb_gas) external onlyOwner { + require(_bnb_gas >= MIN_BNB_GAS && _bnb_gas <= MAX_BNB_GAS, "Illegal gas"); + bnb_gas = _bnb_gas; + emit SetBNBGas(_bnb_gas); + } + + function ramp_A(uint256 _future_A, uint256 _future_time) external onlyOwner { + require(block.timestamp >= initial_A_time + MIN_RAMP_TIME, "dev : too early"); + require(_future_time >= block.timestamp + MIN_RAMP_TIME, "dev: insufficient time"); + + uint256 _initial_A = get_A(); + require(_future_A > 0 && _future_A < MAX_A, "_future_A must be between 0 and MAX_A"); + require( + (_future_A >= _initial_A && _future_A <= _initial_A * MAX_A_CHANGE) || + (_future_A < _initial_A && _future_A * MAX_A_CHANGE >= _initial_A), + "Illegal parameter _future_A" + ); + initial_A = _initial_A; + future_A = _future_A; + initial_A_time = block.timestamp; + future_A_time = _future_time; + + emit RampA(_initial_A, _future_A, block.timestamp, _future_time); + } + + function stop_rampget_A() external onlyOwner { + uint256 current_A = get_A(); + initial_A = current_A; + future_A = current_A; + initial_A_time = block.timestamp; + future_A_time = block.timestamp; + // now (block.timestamp < t1) is always False, so we return saved A + + emit StopRampA(current_A, block.timestamp); + } + + function commit_new_fee(uint256 new_fee, uint256 new_admin_fee) external onlyOwner { + require(admin_actions_deadline == 0, "admin_actions_deadline must be 0"); // dev: active action + require(new_fee <= MAX_FEE, "dev: fee exceeds maximum"); + require(new_admin_fee <= MAX_ADMIN_FEE, "dev: admin fee exceeds maximum"); + + admin_actions_deadline = block.timestamp + ADMIN_ACTIONS_DELAY; + future_fee = new_fee; + future_admin_fee = new_admin_fee; + + emit CommitNewFee(admin_actions_deadline, new_fee, new_admin_fee); + } + + function apply_new_fee() external onlyOwner { + require(block.timestamp >= admin_actions_deadline, "dev: insufficient time"); + require(admin_actions_deadline != 0, "admin_actions_deadline should not be 0"); + + admin_actions_deadline = 0; + fee = future_fee; + admin_fee = future_admin_fee; + + emit NewFee(fee, admin_fee); + } + + function revert_new_parameters() external onlyOwner { + admin_actions_deadline = 0; + emit RevertParameters(); + } + + function admin_balances(uint256 i) external view returns (uint256) { + if (coins[i] == BNB_ADDRESS) { + return address(this).balance - balances[i]; + } else { + return IERC20(coins[i]).balanceOf(address(this)) - balances[i]; + } + } + + function withdraw_admin_fees() external onlyOwner { + for (uint256 i = 0; i < N_COINS; i++) { + uint256 value; + if (coins[i] == BNB_ADDRESS) { + value = address(this).balance - balances[i]; + } else { + value = IERC20(coins[i]).balanceOf(address(this)) - balances[i]; + } + if (value > 0) { + transfer_out(coins[i], value); + } + } + } + + function donate_admin_fees() external onlyOwner { + for (uint256 i = 0; i < N_COINS; i++) { + if (coins[i] == BNB_ADDRESS) { + balances[i] = address(this).balance; + } else { + balances[i] = IERC20(coins[i]).balanceOf(address(this)); + } + } + emit DonateAdminFees(); + } + + function kill_me() external onlyOwner { + require(kill_deadline > block.timestamp, "Exceeded deadline"); + is_killed = true; + emit Kill(); + } + + function unkill_me() external onlyOwner { + is_killed = false; + emit Unkill(); + } +} diff --git a/projects/stable-swap/contracts/PancakeStableSwapThreePoolDeployer.sol b/projects/stable-swap/contracts/PancakeStableSwapThreePoolDeployer.sol new file mode 100644 index 00000000..c46ee672 --- /dev/null +++ b/projects/stable-swap/contracts/PancakeStableSwapThreePoolDeployer.sol @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "./PancakeStableSwapThreePool.sol"; + +contract PancakeStableSwapThreePoolDeployer is Ownable { + uint256 public constant N_COINS = 3; + + /** + * @notice constructor + */ + constructor() {} + + // returns sorted token addresses, used to handle return values from pairs sorted in this order + function sortTokens( + address tokenA, + address tokenB, + address tokenC + ) + internal + pure + returns ( + address, + address, + address + ) + { + require(tokenA != tokenB && tokenA != tokenC && tokenB != tokenC, "IDENTICAL_ADDRESSES"); + address tmp; + if (tokenA > tokenB) { + tmp = tokenA; + tokenA = tokenB; + tokenB = tmp; + } + if (tokenB > tokenC) { + tmp = tokenB; + tokenB = tokenC; + tokenC = tmp; + if (tokenA > tokenB) { + tmp = tokenA; + tokenA = tokenB; + tokenB = tmp; + } + } + return (tokenA, tokenB, tokenC); + } + + /** + * @notice createSwapPair + * @param _tokenA: Addresses of ERC20 conracts . + * @param _tokenB: Addresses of ERC20 conracts . + * @param _tokenC: Addresses of ERC20 conracts . + * @param _A: Amplification coefficient multiplied by n * (n - 1) + * @param _fee: Fee to charge for exchanges + * @param _admin_fee: Admin fee + * @param _admin: Admin + * @param _LP: LP + */ + function createSwapPair( + address _tokenA, + address _tokenB, + address _tokenC, + uint256 _A, + uint256 _fee, + uint256 _admin_fee, + address _admin, + address _LP + ) external onlyOwner returns (address) { + require(_tokenA != address(0) && _tokenB != address(0) && _tokenA != _tokenB, "Illegal token"); + (address t0, address t1, address t2) = sortTokens(_tokenA, _tokenB, _tokenC); + address[N_COINS] memory coins = [t0, t1, t2]; + // create swap contract + bytes memory bytecode = type(PancakeStableSwapThreePool).creationCode; + bytes32 salt = keccak256(abi.encodePacked(t0, t1, t2, msg.sender, block.timestamp, block.chainid)); + address swapContract; + assembly { + swapContract := create2(0, add(bytecode, 32), mload(bytecode), salt) + } + PancakeStableSwapThreePool(swapContract).initialize(coins, _A, _fee, _admin_fee, _admin, _LP); + + return swapContract; + } +} diff --git a/projects/stable-swap/contracts/PancakeStableSwapTwoPool.sol b/projects/stable-swap/contracts/PancakeStableSwapTwoPool.sol new file mode 100644 index 00000000..5cd71f11 --- /dev/null +++ b/projects/stable-swap/contracts/PancakeStableSwapTwoPool.sol @@ -0,0 +1,774 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/extensions/IERC20Metadata.sol"; +import "@openzeppelin-4.5.0/contracts/security/ReentrancyGuard.sol"; +import "./interfaces/IPancakeStableSwapLP.sol"; + +contract PancakeStableSwapTwoPool is Ownable, ReentrancyGuard { + using SafeERC20 for IERC20; + + uint256 public constant N_COINS = 2; + + uint256 public constant MAX_DECIMAL = 18; + uint256 public constant FEE_DENOMINATOR = 1e10; + uint256 public constant PRECISION = 1e18; + uint256[N_COINS] public PRECISION_MUL; + uint256[N_COINS] public RATES; + + uint256 public constant MAX_ADMIN_FEE = 1e10; + uint256 public constant MAX_FEE = 5e9; + uint256 public constant MAX_A = 1e6; + uint256 public constant MAX_A_CHANGE = 10; + uint256 public constant MIN_BNB_GAS = 2300; + uint256 public constant MAX_BNB_GAS = 23000; + + uint256 public constant ADMIN_ACTIONS_DELAY = 3 days; + uint256 public constant MIN_RAMP_TIME = 1 days; + + address[N_COINS] public coins; + uint256[N_COINS] public balances; + uint256 public fee; // fee * 1e10. + uint256 public admin_fee; // admin_fee * 1e10. + uint256 public bnb_gas = 4029; // transfer bnb gas. + + IPancakeStableSwapLP public token; + + address constant BNB_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; + + bool support_BNB; + + uint256 public initial_A; + uint256 public future_A; + uint256 public initial_A_time; + uint256 public future_A_time; + + uint256 public admin_actions_deadline; + uint256 public future_fee; + uint256 public future_admin_fee; + + uint256 public kill_deadline; + uint256 public constant KILL_DEADLINE_DT = 2 * 30 days; + bool public is_killed; + + address public immutable STABLESWAP_FACTORY; + bool public isInitialized; + + event TokenExchange( + address indexed buyer, + uint256 sold_id, + uint256 tokens_sold, + uint256 bought_id, + uint256 tokens_bought + ); + event AddLiquidity( + address indexed provider, + uint256[N_COINS] token_amounts, + uint256[N_COINS] fees, + uint256 invariant, + uint256 token_supply + ); + event RemoveLiquidity( + address indexed provider, + uint256[N_COINS] token_amounts, + uint256[N_COINS] fees, + uint256 token_supply + ); + event RemoveLiquidityOne(address indexed provider, uint256 index, uint256 token_amount, uint256 coin_amount); + event RemoveLiquidityImbalance( + address indexed provider, + uint256[N_COINS] token_amounts, + uint256[N_COINS] fees, + uint256 invariant, + uint256 token_supply + ); + event CommitNewFee(uint256 indexed deadline, uint256 fee, uint256 admin_fee); + event NewFee(uint256 fee, uint256 admin_fee); + event RampA(uint256 old_A, uint256 new_A, uint256 initial_time, uint256 future_time); + event StopRampA(uint256 A, uint256 t); + event SetBNBGas(uint256 bnb_gas); + event RevertParameters(); + event DonateAdminFees(); + event Kill(); + event Unkill(); + + /** + * @notice constructor + */ + constructor() { + STABLESWAP_FACTORY = msg.sender; + } + + /** + * @notice initialize + * @param _coins: Addresses of ERC20 conracts of coins (c-tokens) involved + * @param _A: Amplification coefficient multiplied by n * (n - 1) + * @param _fee: Fee to charge for exchanges + * @param _admin_fee: Admin fee + * @param _owner: Owner + * @param _LP: LP address + */ + function initialize( + address[N_COINS] memory _coins, + uint256 _A, + uint256 _fee, + uint256 _admin_fee, + address _owner, + address _LP + ) external { + require(!isInitialized, "Operations: Already initialized"); + require(msg.sender == STABLESWAP_FACTORY, "Operations: Not factory"); + require(_A <= MAX_A, "_A exceeds maximum"); + require(_fee <= MAX_FEE, "_fee exceeds maximum"); + require(_admin_fee <= MAX_ADMIN_FEE, "_admin_fee exceeds maximum"); + isInitialized = true; + for (uint256 i = 0; i < N_COINS; i++) { + require(_coins[i] != address(0), "ZERO Address"); + uint256 coinDecimal; + if (_coins[i] == BNB_ADDRESS) { + coinDecimal = 18; + support_BNB = true; + } else { + coinDecimal = IERC20Metadata(_coins[i]).decimals(); + } + require(coinDecimal <= MAX_DECIMAL, "The maximum decimal cannot exceed 18"); + //set PRECISION_MUL and RATES + PRECISION_MUL[i] = 10**(MAX_DECIMAL - coinDecimal); + RATES[i] = PRECISION * PRECISION_MUL[i]; + } + coins = _coins; + initial_A = _A; + future_A = _A; + fee = _fee; + admin_fee = _admin_fee; + kill_deadline = block.timestamp + KILL_DEADLINE_DT; + token = IPancakeStableSwapLP(_LP); + + transferOwnership(_owner); + } + + function get_A() internal view returns (uint256) { + //Handle ramping A up or down + uint256 t1 = future_A_time; + uint256 A1 = future_A; + if (block.timestamp < t1) { + uint256 A0 = initial_A; + uint256 t0 = initial_A_time; + // Expressions in uint256 cannot have negative numbers, thus "if" + if (A1 > A0) { + return A0 + ((A1 - A0) * (block.timestamp - t0)) / (t1 - t0); + } else { + return A0 - ((A0 - A1) * (block.timestamp - t0)) / (t1 - t0); + } + } else { + // when t1 == 0 or block.timestamp >= t1 + return A1; + } + } + + function A() external view returns (uint256) { + return get_A(); + } + + function _xp() internal view returns (uint256[N_COINS] memory result) { + result = RATES; + for (uint256 i = 0; i < N_COINS; i++) { + result[i] = (result[i] * balances[i]) / PRECISION; + } + } + + function _xp_mem(uint256[N_COINS] memory _balances) internal view returns (uint256[N_COINS] memory result) { + result = RATES; + for (uint256 i = 0; i < N_COINS; i++) { + result[i] = (result[i] * _balances[i]) / PRECISION; + } + } + + function get_D(uint256[N_COINS] memory xp, uint256 amp) internal pure returns (uint256) { + uint256 S; + for (uint256 i = 0; i < N_COINS; i++) { + S += xp[i]; + } + if (S == 0) { + return 0; + } + + uint256 Dprev; + uint256 D = S; + uint256 Ann = amp * N_COINS; + for (uint256 j = 0; j < 255; j++) { + uint256 D_P = D; + for (uint256 k = 0; k < N_COINS; k++) { + D_P = (D_P * D) / (xp[k] * N_COINS); // If division by 0, this will be borked: only withdrawal will work. And that is good + } + Dprev = D; + D = ((Ann * S + D_P * N_COINS) * D) / ((Ann - 1) * D + (N_COINS + 1) * D_P); + // Equality with the precision of 1 + if (D > Dprev) { + if (D - Dprev <= 1) { + break; + } + } else { + if (Dprev - D <= 1) { + break; + } + } + } + return D; + } + + function get_D_mem(uint256[N_COINS] memory _balances, uint256 amp) internal view returns (uint256) { + return get_D(_xp_mem(_balances), amp); + } + + function get_virtual_price() external view returns (uint256) { + /** + Returns portfolio virtual price (for calculating profit) + scaled up by 1e18 + */ + uint256 D = get_D(_xp(), get_A()); + /** + D is in the units similar to DAI (e.g. converted to precision 1e18) + When balanced, D = n * x_u - total virtual value of the portfolio + */ + uint256 token_supply = token.totalSupply(); + return (D * PRECISION) / token_supply; + } + + function calc_token_amount(uint256[N_COINS] memory amounts, bool deposit) external view returns (uint256) { + /** + Simplified method to calculate addition or reduction in token supply at + deposit or withdrawal without taking fees into account (but looking at + slippage). + Needed to prevent front-running, not for precise calculations! + */ + uint256[N_COINS] memory _balances = balances; + uint256 amp = get_A(); + uint256 D0 = get_D_mem(_balances, amp); + for (uint256 i = 0; i < N_COINS; i++) { + if (deposit) { + _balances[i] += amounts[i]; + } else { + _balances[i] -= amounts[i]; + } + } + uint256 D1 = get_D_mem(_balances, amp); + uint256 token_amount = token.totalSupply(); + uint256 difference; + if (deposit) { + difference = D1 - D0; + } else { + difference = D0 - D1; + } + return (difference * token_amount) / D0; + } + + function add_liquidity(uint256[N_COINS] memory amounts, uint256 min_mint_amount) external payable nonReentrant { + //Amounts is amounts of c-tokens + require(!is_killed, "Killed"); + if (!support_BNB) { + require(msg.value == 0, "Inconsistent quantity"); // Avoid sending BNB by mistake. + } + uint256[N_COINS] memory fees; + uint256 _fee = (fee * N_COINS) / (4 * (N_COINS - 1)); + uint256 _admin_fee = admin_fee; + uint256 amp = get_A(); + + uint256 token_supply = token.totalSupply(); + //Initial invariant + uint256 D0; + uint256[N_COINS] memory old_balances = balances; + if (token_supply > 0) { + D0 = get_D_mem(old_balances, amp); + } + uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1]]; + + for (uint256 i = 0; i < N_COINS; i++) { + if (token_supply == 0) { + require(amounts[i] > 0, "Initial deposit requires all coins"); + } + // balances store amounts of c-tokens + new_balances[i] = old_balances[i] + amounts[i]; + } + + // Invariant after change + uint256 D1 = get_D_mem(new_balances, amp); + require(D1 > D0, "D1 must be greater than D0"); + + // We need to recalculate the invariant accounting for fees + // to calculate fair user's share + uint256 D2 = D1; + if (token_supply > 0) { + // Only account for fees if we are not the first to deposit + for (uint256 i = 0; i < N_COINS; i++) { + uint256 ideal_balance = (D1 * old_balances[i]) / D0; + uint256 difference; + if (ideal_balance > new_balances[i]) { + difference = ideal_balance - new_balances[i]; + } else { + difference = new_balances[i] - ideal_balance; + } + + fees[i] = (_fee * difference) / FEE_DENOMINATOR; + balances[i] = new_balances[i] - ((fees[i] * _admin_fee) / FEE_DENOMINATOR); + new_balances[i] -= fees[i]; + } + D2 = get_D_mem(new_balances, amp); + } else { + balances = new_balances; + } + + // Calculate, how much pool tokens to mint + uint256 mint_amount; + if (token_supply == 0) { + mint_amount = D1; // Take the dust if there was any + } else { + mint_amount = (token_supply * (D2 - D0)) / D0; + } + require(mint_amount >= min_mint_amount, "Slippage screwed you"); + + // Take coins from the sender + for (uint256 i = 0; i < N_COINS; i++) { + uint256 amount = amounts[i]; + address coin = coins[i]; + transfer_in(coin, amount); + } + + // Mint pool tokens + token.mint(msg.sender, mint_amount); + + emit AddLiquidity(msg.sender, amounts, fees, D1, token_supply + mint_amount); + } + + function get_y( + uint256 i, + uint256 j, + uint256 x, + uint256[N_COINS] memory xp_ + ) internal view returns (uint256) { + // x in the input is converted to the same price/precision + require((i != j) && (i < N_COINS) && (j < N_COINS), "Illegal parameter"); + uint256 amp = get_A(); + uint256 D = get_D(xp_, amp); + uint256 c = D; + uint256 S_; + uint256 Ann = amp * N_COINS; + + uint256 _x; + for (uint256 k = 0; k < N_COINS; k++) { + if (k == i) { + _x = x; + } else if (k != j) { + _x = xp_[k]; + } else { + continue; + } + S_ += _x; + c = (c * D) / (_x * N_COINS); + } + c = (c * D) / (Ann * N_COINS); + uint256 b = S_ + D / Ann; // - D + uint256 y_prev; + uint256 y = D; + + for (uint256 m = 0; m < 255; m++) { + y_prev = y; + y = (y * y + c) / (2 * y + b - D); + // Equality with the precision of 1 + if (y > y_prev) { + if (y - y_prev <= 1) { + break; + } + } else { + if (y_prev - y <= 1) { + break; + } + } + } + return y; + } + + function get_dy( + uint256 i, + uint256 j, + uint256 dx + ) external view returns (uint256) { + // dx and dy in c-units + uint256[N_COINS] memory rates = RATES; + uint256[N_COINS] memory xp = _xp(); + + uint256 x = xp[i] + ((dx * rates[i]) / PRECISION); + uint256 y = get_y(i, j, x, xp); + uint256 dy = ((xp[j] - y - 1) * PRECISION) / rates[j]; + uint256 _fee = (fee * dy) / FEE_DENOMINATOR; + return dy - _fee; + } + + function get_dy_underlying( + uint256 i, + uint256 j, + uint256 dx + ) external view returns (uint256) { + // dx and dy in underlying units + uint256[N_COINS] memory xp = _xp(); + uint256[N_COINS] memory precisions = PRECISION_MUL; + + uint256 x = xp[i] + dx * precisions[i]; + uint256 y = get_y(i, j, x, xp); + uint256 dy = (xp[j] - y - 1) / precisions[j]; + uint256 _fee = (fee * dy) / FEE_DENOMINATOR; + return dy - _fee; + } + + function exchange( + uint256 i, + uint256 j, + uint256 dx, + uint256 min_dy + ) external payable nonReentrant { + require(!is_killed, "Killed"); + if (!support_BNB) { + require(msg.value == 0, "Inconsistent quantity"); // Avoid sending BNB by mistake. + } + + uint256[N_COINS] memory old_balances = balances; + uint256[N_COINS] memory xp = _xp_mem(old_balances); + + uint256 x = xp[i] + (dx * RATES[i]) / PRECISION; + uint256 y = get_y(i, j, x, xp); + + uint256 dy = xp[j] - y - 1; // -1 just in case there were some rounding errors + uint256 dy_fee = (dy * fee) / FEE_DENOMINATOR; + + // Convert all to real units + dy = ((dy - dy_fee) * PRECISION) / RATES[j]; + require(dy >= min_dy, "Exchange resulted in fewer coins than expected"); + + uint256 dy_admin_fee = (dy_fee * admin_fee) / FEE_DENOMINATOR; + dy_admin_fee = (dy_admin_fee * PRECISION) / RATES[j]; + + // Change balances exactly in same way as we change actual ERC20 coin amounts + balances[i] = old_balances[i] + dx; + // When rounding errors happen, we undercharge admin fee in favor of LP + balances[j] = old_balances[j] - dy - dy_admin_fee; + + address iAddress = coins[i]; + if (iAddress == BNB_ADDRESS) { + require(dx == msg.value, "Inconsistent quantity"); + } else { + IERC20(iAddress).safeTransferFrom(msg.sender, address(this), dx); + } + address jAddress = coins[j]; + transfer_out(jAddress, dy); + emit TokenExchange(msg.sender, i, dx, j, dy); + } + + function remove_liquidity(uint256 _amount, uint256[N_COINS] memory min_amounts) external nonReentrant { + uint256 total_supply = token.totalSupply(); + uint256[N_COINS] memory amounts; + uint256[N_COINS] memory fees; //Fees are unused but we've got them historically in event + + for (uint256 i = 0; i < N_COINS; i++) { + uint256 value = (balances[i] * _amount) / total_supply; + require(value >= min_amounts[i], "Withdrawal resulted in fewer coins than expected"); + balances[i] -= value; + amounts[i] = value; + transfer_out(coins[i], value); + } + + token.burnFrom(msg.sender, _amount); // dev: insufficient funds + + emit RemoveLiquidity(msg.sender, amounts, fees, total_supply - _amount); + } + + function remove_liquidity_imbalance(uint256[N_COINS] memory amounts, uint256 max_burn_amount) + external + nonReentrant + { + require(!is_killed, "Killed"); + + uint256 token_supply = token.totalSupply(); + require(token_supply > 0, "dev: zero total supply"); + uint256 _fee = (fee * N_COINS) / (4 * (N_COINS - 1)); + uint256 _admin_fee = admin_fee; + uint256 amp = get_A(); + + uint256[N_COINS] memory old_balances = balances; + uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1]]; + uint256 D0 = get_D_mem(old_balances, amp); + for (uint256 i = 0; i < N_COINS; i++) { + new_balances[i] -= amounts[i]; + } + uint256 D1 = get_D_mem(new_balances, amp); + uint256[N_COINS] memory fees; + for (uint256 i = 0; i < N_COINS; i++) { + uint256 ideal_balance = (D1 * old_balances[i]) / D0; + uint256 difference; + if (ideal_balance > new_balances[i]) { + difference = ideal_balance - new_balances[i]; + } else { + difference = new_balances[i] - ideal_balance; + } + fees[i] = (_fee * difference) / FEE_DENOMINATOR; + balances[i] = new_balances[i] - ((fees[i] * _admin_fee) / FEE_DENOMINATOR); + new_balances[i] -= fees[i]; + } + uint256 D2 = get_D_mem(new_balances, amp); + + uint256 token_amount = ((D0 - D2) * token_supply) / D0; + require(token_amount > 0, "token_amount must be greater than 0"); + token_amount += 1; // In case of rounding errors - make it unfavorable for the "attacker" + require(token_amount <= max_burn_amount, "Slippage screwed you"); + + token.burnFrom(msg.sender, token_amount); // dev: insufficient funds + + for (uint256 i = 0; i < N_COINS; i++) { + if (amounts[i] > 0) { + transfer_out(coins[i], amounts[i]); + } + } + token_supply -= token_amount; + emit RemoveLiquidityImbalance(msg.sender, amounts, fees, D1, token_supply); + } + + function get_y_D( + uint256 A_, + uint256 i, + uint256[N_COINS] memory xp, + uint256 D + ) internal pure returns (uint256) { + /** + Calculate x[i] if one reduces D from being calculated for xp to D + + Done by solving quadratic equation iteratively. + x_1**2 + x1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n + 1) / (n ** (2 * n) * prod' * A) + x_1**2 + b*x_1 = c + + x_1 = (x_1**2 + c) / (2*x_1 + b) + */ + // x in the input is converted to the same price/precision + require(i < N_COINS, "dev: i above N_COINS"); + uint256 c = D; + uint256 S_; + uint256 Ann = A_ * N_COINS; + + uint256 _x; + for (uint256 k = 0; k < N_COINS; k++) { + if (k != i) { + _x = xp[k]; + } else { + continue; + } + S_ += _x; + c = (c * D) / (_x * N_COINS); + } + c = (c * D) / (Ann * N_COINS); + uint256 b = S_ + D / Ann; + uint256 y_prev; + uint256 y = D; + + for (uint256 k = 0; k < 255; k++) { + y_prev = y; + y = (y * y + c) / (2 * y + b - D); + // Equality with the precision of 1 + if (y > y_prev) { + if (y - y_prev <= 1) { + break; + } + } else { + if (y_prev - y <= 1) { + break; + } + } + } + return y; + } + + function _calc_withdraw_one_coin(uint256 _token_amount, uint256 i) internal view returns (uint256, uint256) { + // First, need to calculate + // * Get current D + // * Solve Eqn against y_i for D - _token_amount + uint256 amp = get_A(); + uint256 _fee = (fee * N_COINS) / (4 * (N_COINS - 1)); + uint256[N_COINS] memory precisions = PRECISION_MUL; + uint256 total_supply = token.totalSupply(); + + uint256[N_COINS] memory xp = _xp(); + + uint256 D0 = get_D(xp, amp); + uint256 D1 = D0 - (_token_amount * D0) / total_supply; + uint256[N_COINS] memory xp_reduced = xp; + + uint256 new_y = get_y_D(amp, i, xp, D1); + uint256 dy_0 = (xp[i] - new_y) / precisions[i]; // w/o fees + + for (uint256 k = 0; k < N_COINS; k++) { + uint256 dx_expected; + if (k == i) { + dx_expected = (xp[k] * D1) / D0 - new_y; + } else { + dx_expected = xp[k] - (xp[k] * D1) / D0; + } + xp_reduced[k] -= (_fee * dx_expected) / FEE_DENOMINATOR; + } + uint256 dy = xp_reduced[i] - get_y_D(amp, i, xp_reduced, D1); + dy = (dy - 1) / precisions[i]; // Withdraw less to account for rounding errors + + return (dy, dy_0 - dy); + } + + function calc_withdraw_one_coin(uint256 _token_amount, uint256 i) external view returns (uint256) { + (uint256 dy, ) = _calc_withdraw_one_coin(_token_amount, i); + return dy; + } + + function remove_liquidity_one_coin( + uint256 _token_amount, + uint256 i, + uint256 min_amount + ) external nonReentrant { + // Remove _amount of liquidity all in a form of coin i + require(!is_killed, "Killed"); + (uint256 dy, uint256 dy_fee) = _calc_withdraw_one_coin(_token_amount, i); + require(dy >= min_amount, "Not enough coins removed"); + + balances[i] -= (dy + (dy_fee * admin_fee) / FEE_DENOMINATOR); + token.burnFrom(msg.sender, _token_amount); // dev: insufficient funds + transfer_out(coins[i], dy); + + emit RemoveLiquidityOne(msg.sender, i, _token_amount, dy); + } + + function transfer_out(address coin_address, uint256 value) internal { + if (coin_address == BNB_ADDRESS) { + _safeTransferBNB(msg.sender, value); + } else { + IERC20(coin_address).safeTransfer(msg.sender, value); + } + } + + function transfer_in(address coin_address, uint256 value) internal { + if (coin_address == BNB_ADDRESS) { + require(value == msg.value, "Inconsistent quantity"); + } else { + IERC20(coin_address).safeTransferFrom(msg.sender, address(this), value); + } + } + + function _safeTransferBNB(address to, uint256 value) internal { + (bool success, ) = to.call{gas: bnb_gas, value: value}(""); + require(success, "BNB transfer failed"); + } + + // Admin functions + + function set_bnb_gas(uint256 _bnb_gas) external onlyOwner { + require(_bnb_gas >= MIN_BNB_GAS && _bnb_gas <= MAX_BNB_GAS, "Illegal gas"); + bnb_gas = _bnb_gas; + emit SetBNBGas(_bnb_gas); + } + + function ramp_A(uint256 _future_A, uint256 _future_time) external onlyOwner { + require(block.timestamp >= initial_A_time + MIN_RAMP_TIME, "dev : too early"); + require(_future_time >= block.timestamp + MIN_RAMP_TIME, "dev: insufficient time"); + + uint256 _initial_A = get_A(); + require(_future_A > 0 && _future_A < MAX_A, "_future_A must be between 0 and MAX_A"); + require( + (_future_A >= _initial_A && _future_A <= _initial_A * MAX_A_CHANGE) || + (_future_A < _initial_A && _future_A * MAX_A_CHANGE >= _initial_A), + "Illegal parameter _future_A" + ); + initial_A = _initial_A; + future_A = _future_A; + initial_A_time = block.timestamp; + future_A_time = _future_time; + + emit RampA(_initial_A, _future_A, block.timestamp, _future_time); + } + + function stop_rampget_A() external onlyOwner { + uint256 current_A = get_A(); + initial_A = current_A; + future_A = current_A; + initial_A_time = block.timestamp; + future_A_time = block.timestamp; + // now (block.timestamp < t1) is always False, so we return saved A + + emit StopRampA(current_A, block.timestamp); + } + + function commit_new_fee(uint256 new_fee, uint256 new_admin_fee) external onlyOwner { + require(admin_actions_deadline == 0, "admin_actions_deadline must be 0"); // dev: active action + require(new_fee <= MAX_FEE, "dev: fee exceeds maximum"); + require(new_admin_fee <= MAX_ADMIN_FEE, "dev: admin fee exceeds maximum"); + + admin_actions_deadline = block.timestamp + ADMIN_ACTIONS_DELAY; + future_fee = new_fee; + future_admin_fee = new_admin_fee; + + emit CommitNewFee(admin_actions_deadline, new_fee, new_admin_fee); + } + + function apply_new_fee() external onlyOwner { + require(block.timestamp >= admin_actions_deadline, "dev: insufficient time"); + require(admin_actions_deadline != 0, "admin_actions_deadline should not be 0"); + + admin_actions_deadline = 0; + fee = future_fee; + admin_fee = future_admin_fee; + + emit NewFee(fee, admin_fee); + } + + function revert_new_parameters() external onlyOwner { + admin_actions_deadline = 0; + emit RevertParameters(); + } + + function admin_balances(uint256 i) external view returns (uint256) { + if (coins[i] == BNB_ADDRESS) { + return address(this).balance - balances[i]; + } else { + return IERC20(coins[i]).balanceOf(address(this)) - balances[i]; + } + } + + function withdraw_admin_fees() external onlyOwner { + for (uint256 i = 0; i < N_COINS; i++) { + uint256 value; + if (coins[i] == BNB_ADDRESS) { + value = address(this).balance - balances[i]; + } else { + value = IERC20(coins[i]).balanceOf(address(this)) - balances[i]; + } + if (value > 0) { + transfer_out(coins[i], value); + } + } + } + + function donate_admin_fees() external onlyOwner { + for (uint256 i = 0; i < N_COINS; i++) { + if (coins[i] == BNB_ADDRESS) { + balances[i] = address(this).balance; + } else { + balances[i] = IERC20(coins[i]).balanceOf(address(this)); + } + } + emit DonateAdminFees(); + } + + function kill_me() external onlyOwner { + require(kill_deadline > block.timestamp, "Exceeded deadline"); + is_killed = true; + emit Kill(); + } + + function unkill_me() external onlyOwner { + is_killed = false; + emit Unkill(); + } +} diff --git a/projects/stable-swap/contracts/PancakeStableSwapTwoPoolDeployer.sol b/projects/stable-swap/contracts/PancakeStableSwapTwoPoolDeployer.sol new file mode 100644 index 00000000..eaeaa68a --- /dev/null +++ b/projects/stable-swap/contracts/PancakeStableSwapTwoPoolDeployer.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "./PancakeStableSwapTwoPool.sol"; + +contract PancakeStableSwapTwoPoolDeployer is Ownable { + uint256 public constant N_COINS = 2; + + /** + * @notice constructor + */ + constructor() {} + + // returns sorted token addresses, used to handle return values from pairs sorted in this order + function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { + require(tokenA != tokenB, "IDENTICAL_ADDRESSES"); + (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); + } + + /** + * @notice createSwapPair + * @param _tokenA: Addresses of ERC20 conracts . + * @param _tokenB: Addresses of ERC20 conracts . + * @param _A: Amplification coefficient multiplied by n * (n - 1) + * @param _fee: Fee to charge for exchanges + * @param _admin_fee: Admin fee + * @param _admin: Admin + * @param _LP: LP + */ + function createSwapPair( + address _tokenA, + address _tokenB, + uint256 _A, + uint256 _fee, + uint256 _admin_fee, + address _admin, + address _LP + ) external onlyOwner returns (address) { + require(_tokenA != address(0) && _tokenB != address(0) && _tokenA != _tokenB, "Illegal token"); + (address t0, address t1) = sortTokens(_tokenA, _tokenB); + address[N_COINS] memory coins = [t0, t1]; + // create swap contract + bytes memory bytecode = type(PancakeStableSwapTwoPool).creationCode; + bytes32 salt = keccak256(abi.encodePacked(t0, t1, msg.sender, block.timestamp, block.chainid)); + address swapContract; + assembly { + swapContract := create2(0, add(bytecode, 32), mload(bytecode), salt) + } + PancakeStableSwapTwoPool(swapContract).initialize(coins, _A, _fee, _admin_fee, _admin, _LP); + + return swapContract; + } +} diff --git a/projects/stable-swap/contracts/interfaces/IPancakeStableSwap.sol b/projects/stable-swap/contracts/interfaces/IPancakeStableSwap.sol new file mode 100644 index 00000000..791f14ae --- /dev/null +++ b/projects/stable-swap/contracts/interfaces/IPancakeStableSwap.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IPancakeStableSwap { + function token() external view returns (address); + + function balances(uint256 i) external view returns (uint256); + + function N_COINS() external view returns (uint256); + + function RATES(uint256 i) external view returns (uint256); + + function coins(uint256 i) external view returns (address); + + function PRECISION_MUL(uint256 i) external view returns (uint256); + + function fee() external view returns (uint256); + + function admin_fee() external view returns (uint256); + + function A() external view returns (uint256); + + function get_D_mem(uint256[2] memory _balances, uint256 amp) external view returns (uint256); + + function get_y( + uint256 i, + uint256 j, + uint256 x, + uint256[2] memory xp_ + ) external view returns (uint256); + + function calc_withdraw_one_coin(uint256 _token_amount, uint256 i) external view returns (uint256); + + function add_liquidity(uint256[2] memory amounts, uint256 min_mint_amount) external payable; + + function remove_liquidity(uint256 _amount, uint256[2] memory min_amounts) external; + + function remove_liquidity_imbalance(uint256[2] memory amounts, uint256 max_burn_amount) external; +} diff --git a/projects/stable-swap/contracts/interfaces/IPancakeStableSwapDeployer.sol b/projects/stable-swap/contracts/interfaces/IPancakeStableSwapDeployer.sol new file mode 100644 index 00000000..182dfc58 --- /dev/null +++ b/projects/stable-swap/contracts/interfaces/IPancakeStableSwapDeployer.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IPancakeStableSwapDeployer { + function createSwapPair( + address _tokenA, + address _tokenB, + uint256 _A, + uint256 _fee, + uint256 _admin_fee, + address _admin, + address _LP + ) external returns (address); + + function createSwapPair( + address _tokenA, + address _tokenB, + address _tokenC, + uint256 _A, + uint256 _fee, + uint256 _admin_fee, + address _admin, + address _LP + ) external returns (address); +} diff --git a/projects/stable-swap/contracts/interfaces/IPancakeStableSwapInfo.sol b/projects/stable-swap/contracts/interfaces/IPancakeStableSwapInfo.sol new file mode 100644 index 00000000..2aab8f5c --- /dev/null +++ b/projects/stable-swap/contracts/interfaces/IPancakeStableSwapInfo.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IPancakeStableSwapInfo { + function get_dx( + address _swap, + uint256 i, + uint256 j, + uint256 dy, + uint256 max_dx + ) external view returns (uint256); +} diff --git a/projects/stable-swap/contracts/interfaces/IPancakeStableSwapLP.sol b/projects/stable-swap/contracts/interfaces/IPancakeStableSwapLP.sol new file mode 100644 index 00000000..54475a2f --- /dev/null +++ b/projects/stable-swap/contracts/interfaces/IPancakeStableSwapLP.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IPancakeStableSwapLP { + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + + function mint(address _to, uint256 _amount) external; + + function burnFrom(address _to, uint256 _amount) external; + + function setMinter(address _newMinter) external; +} diff --git a/projects/stable-swap/contracts/interfaces/IPancakeStableSwapLPFactory.sol b/projects/stable-swap/contracts/interfaces/IPancakeStableSwapLPFactory.sol new file mode 100644 index 00000000..61de203b --- /dev/null +++ b/projects/stable-swap/contracts/interfaces/IPancakeStableSwapLPFactory.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IPancakeStableSwapLPFactory { + function createSwapLP( + address _tokenA, + address _tokenB, + address _tokenC, + address _minter + ) external returns (address); +} diff --git a/projects/stable-swap/contracts/interfaces/IWBNB.sol b/projects/stable-swap/contracts/interfaces/IWBNB.sol new file mode 100644 index 00000000..254e8d93 --- /dev/null +++ b/projects/stable-swap/contracts/interfaces/IWBNB.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IWBNB { + function deposit() external payable; + + function transfer(address to, uint256 value) external returns (bool); + + function withdraw(uint256) external; + + function balanceOf(address account) external view returns (uint256); + + function approve(address spender, uint256 amount) external returns (bool); +} diff --git a/projects/stable-swap/contracts/mocks/MockToken.sol b/projects/stable-swap/contracts/mocks/MockToken.sol new file mode 100644 index 00000000..a4d4190a --- /dev/null +++ b/projects/stable-swap/contracts/mocks/MockToken.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/token/ERC20/ERC20.sol"; + +contract MockToken is ERC20 { + constructor() ERC20("Binance USD", "BUSD") { + // _mint(msg.sender, 100000 ether); + } + + function decimals() public pure override returns (uint8) { + return 18; + } + + function mint(address _to, uint256 _amount) external { + _mint(_to, _amount); + } + + function burnFrom(address _to, uint256 _amount) external { + _burn(_to, _amount); + } +} diff --git a/projects/stable-swap/contracts/test/Token.sol b/projects/stable-swap/contracts/test/Token.sol new file mode 100644 index 00000000..2e49be54 --- /dev/null +++ b/projects/stable-swap/contracts/test/Token.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/token/ERC20/ERC20.sol"; + +contract Token is ERC20 { + uint8 private immutable newDecimal; + + constructor( + string memory _name, + string memory _symbol, + uint8 _decimal + ) ERC20(_name, _symbol) { + newDecimal = _decimal; + } + + function decimals() public view override returns (uint8) { + return newDecimal; + } + + function mint(address _to, uint256 _amount) external { + _mint(_to, _amount); + } + + function burnFrom(address _to, uint256 _amount) external { + _burn(_to, _amount); + } +} diff --git a/projects/stable-swap/contracts/utils/PancakeStableSwapInfo.sol b/projects/stable-swap/contracts/utils/PancakeStableSwapInfo.sol new file mode 100644 index 00000000..e03b71ab --- /dev/null +++ b/projects/stable-swap/contracts/utils/PancakeStableSwapInfo.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "../interfaces/IPancakeStableSwapInfo.sol"; +import "../interfaces/IPancakeStableSwap.sol"; + +contract PancakeStableSwapInfo { + IPancakeStableSwapInfo public immutable twoPoolInfo; + IPancakeStableSwapInfo public immutable threePoolInfo; + + constructor(IPancakeStableSwapInfo _twoPoolInfo, IPancakeStableSwapInfo _threePoolInfo) { + twoPoolInfo = _twoPoolInfo; + threePoolInfo = _threePoolInfo; + } + + function get_dx( + address _swap, + uint256 i, + uint256 j, + uint256 dy, + uint256 max_dx + ) external view returns (uint256 dx) { + uint256 N_COINS = IPancakeStableSwap(_swap).N_COINS(); + if (N_COINS == 2) { + dx = twoPoolInfo.get_dx(_swap, i, j, dy, max_dx); + } else if (N_COINS == 3) { + dx = threePoolInfo.get_dx(_swap, i, j, dy, max_dx); + } + } +} diff --git a/projects/stable-swap/contracts/utils/PancakeStableSwapThreePoolInfo.sol b/projects/stable-swap/contracts/utils/PancakeStableSwapThreePoolInfo.sol new file mode 100644 index 00000000..5b319449 --- /dev/null +++ b/projects/stable-swap/contracts/utils/PancakeStableSwapThreePoolInfo.sol @@ -0,0 +1,434 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "../interfaces/IPancakeStableSwap.sol"; + +contract PancakeStableSwapThreePoolInfo { + uint256 public constant N_COINS = 3; + uint256 public constant FEE_DENOMINATOR = 1e10; + uint256 public constant PRECISION = 1e18; + + function token(address _swap) public view returns (IERC20) { + return IERC20(IPancakeStableSwap(_swap).token()); + } + + function balances(address _swap) public view returns (uint256[N_COINS] memory swapBalances) { + for (uint256 i = 0; i < N_COINS; i++) { + swapBalances[i] = IPancakeStableSwap(_swap).balances(i); + } + } + + function RATES(address _swap) public view returns (uint256[N_COINS] memory swapRATES) { + for (uint256 i = 0; i < N_COINS; i++) { + swapRATES[i] = IPancakeStableSwap(_swap).RATES(i); + } + } + + function PRECISION_MUL(address _swap) public view returns (uint256[N_COINS] memory swapPRECISION_MUL) { + for (uint256 i = 0; i < N_COINS; i++) { + swapPRECISION_MUL[i] = IPancakeStableSwap(_swap).PRECISION_MUL(i); + } + } + + function calc_coins_amount(address _swap, uint256 _amount) external view returns (uint256[N_COINS] memory) { + uint256 total_supply = token(_swap).totalSupply(); + uint256[N_COINS] memory amounts; + + for (uint256 i = 0; i < N_COINS; i++) { + uint256 value = (IPancakeStableSwap(_swap).balances(i) * _amount) / total_supply; + amounts[i] = value; + } + return amounts; + } + + function get_D_mem( + address _swap, + uint256[N_COINS] memory _balances, + uint256 amp + ) public view returns (uint256) { + return get_D(_xp_mem(_swap, _balances), amp); + } + + function get_add_liquidity_mint_amount(address _swap, uint256[N_COINS] memory amounts) + external + view + returns (uint256) + { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256[N_COINS] memory fees; + uint256 _fee = (swap.fee() * N_COINS) / (4 * (N_COINS - 1)); + uint256 amp = swap.A(); + + uint256 token_supply = token(_swap).totalSupply(); + //Initial invariant + uint256 D0; + uint256[N_COINS] memory old_balances = balances(_swap); + if (token_supply > 0) { + D0 = get_D_mem(_swap, old_balances, amp); + } + uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1], old_balances[2]]; + + for (uint256 i = 0; i < N_COINS; i++) { + if (token_supply == 0) { + require(amounts[i] > 0, "Initial deposit requires all coins"); + } + // balances store amounts of c-tokens + new_balances[i] = old_balances[i] + amounts[i]; + } + + // Invariant after change + uint256 D1 = get_D_mem(_swap, new_balances, amp); + require(D1 > D0, "D1 must be greater than D0"); + + // We need to recalculate the invariant accounting for fees + // to calculate fair user's share + uint256 D2 = D1; + if (token_supply > 0) { + // Only account for fees if we are not the first to deposit + for (uint256 i = 0; i < N_COINS; i++) { + uint256 ideal_balance = (D1 * old_balances[i]) / D0; + uint256 difference; + if (ideal_balance > new_balances[i]) { + difference = ideal_balance - new_balances[i]; + } else { + difference = new_balances[i] - ideal_balance; + } + + fees[i] = (_fee * difference) / FEE_DENOMINATOR; + new_balances[i] -= fees[i]; + } + D2 = get_D_mem(_swap, new_balances, amp); + } + + // Calculate, how much pool tokens to mint + uint256 mint_amount; + if (token_supply == 0) { + mint_amount = D1; // Take the dust if there was any + } else { + mint_amount = (token_supply * (D2 - D0)) / D0; + } + return mint_amount; + } + + function get_add_liquidity_fee(address _swap, uint256[N_COINS] memory amounts) + external + view + returns (uint256[N_COINS] memory liquidityFee) + { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256 _fee = (swap.fee() * N_COINS) / (4 * (N_COINS - 1)); + uint256 _admin_fee = swap.admin_fee(); + uint256 amp = swap.A(); + + uint256 token_supply = token(_swap).totalSupply(); + //Initial invariant + uint256 D0; + uint256[N_COINS] memory old_balances = balances(_swap); + if (token_supply > 0) { + D0 = get_D_mem(_swap, old_balances, amp); + } + uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1], old_balances[2]]; + + for (uint256 i = 0; i < N_COINS; i++) { + if (token_supply == 0) { + require(amounts[i] > 0, "Initial deposit requires all coins"); + } + new_balances[i] = old_balances[i] + amounts[i]; + } + + // Invariant after change + uint256 D1 = get_D_mem(_swap, new_balances, amp); + require(D1 > D0, "D1 must be greater than D0"); + if (token_supply > 0) { + // Only account for fees if we are not the first to deposit + for (uint256 i = 0; i < N_COINS; i++) { + uint256 ideal_balance = (D1 * old_balances[i]) / D0; + uint256 difference; + if (ideal_balance > new_balances[i]) { + difference = ideal_balance - new_balances[i]; + } else { + difference = new_balances[i] - ideal_balance; + } + uint256 coinFee; + coinFee = (_fee * difference) / FEE_DENOMINATOR; + liquidityFee[i] = ((coinFee * _admin_fee) / FEE_DENOMINATOR); + } + } + } + + function get_remove_liquidity_imbalance_fee(address _swap, uint256[N_COINS] memory amounts) + external + view + returns (uint256[N_COINS] memory liquidityFee) + { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256 _fee = (swap.fee() * N_COINS) / (4 * (N_COINS - 1)); + uint256 _admin_fee = swap.admin_fee(); + uint256 amp = swap.A(); + + uint256[N_COINS] memory old_balances = balances(_swap); + uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1], old_balances[2]]; + uint256 D0 = get_D_mem(_swap, old_balances, amp); + for (uint256 i = 0; i < N_COINS; i++) { + new_balances[i] -= amounts[i]; + } + uint256 D1 = get_D_mem(_swap, new_balances, amp); + for (uint256 i = 0; i < N_COINS; i++) { + uint256 ideal_balance = (D1 * old_balances[i]) / D0; + uint256 difference; + if (ideal_balance > new_balances[i]) { + difference = ideal_balance - new_balances[i]; + } else { + difference = new_balances[i] - ideal_balance; + } + uint256 coinFee; + coinFee = (_fee * difference) / FEE_DENOMINATOR; + liquidityFee[i] = ((coinFee * _admin_fee) / FEE_DENOMINATOR); + } + } + + function _xp_mem(address _swap, uint256[N_COINS] memory _balances) + public + view + returns (uint256[N_COINS] memory result) + { + result = RATES(_swap); + for (uint256 i = 0; i < N_COINS; i++) { + result[i] = (result[i] * _balances[i]) / PRECISION; + } + } + + function get_D(uint256[N_COINS] memory xp, uint256 amp) internal pure returns (uint256) { + uint256 S; + for (uint256 i = 0; i < N_COINS; i++) { + S += xp[i]; + } + if (S == 0) { + return 0; + } + + uint256 Dprev; + uint256 D = S; + uint256 Ann = amp * N_COINS; + for (uint256 j = 0; j < 255; j++) { + uint256 D_P = D; + for (uint256 k = 0; k < N_COINS; k++) { + D_P = (D_P * D) / (xp[k] * N_COINS); // If division by 0, this will be borked: only withdrawal will work. And that is good + } + Dprev = D; + D = ((Ann * S + D_P * N_COINS) * D) / ((Ann - 1) * D + (N_COINS + 1) * D_P); + // Equality with the precision of 1 + if (D > Dprev) { + if (D - Dprev <= 1) { + break; + } + } else { + if (Dprev - D <= 1) { + break; + } + } + } + return D; + } + + function get_y( + address _swap, + uint256 i, + uint256 j, + uint256 x, + uint256[N_COINS] memory xp_ + ) internal view returns (uint256) { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256 amp = swap.A(); + uint256 D = get_D(xp_, amp); + uint256 c = D; + uint256 S_; + uint256 Ann = amp * N_COINS; + + uint256 _x; + for (uint256 k = 0; k < N_COINS; k++) { + if (k == i) { + _x = x; + } else if (k != j) { + _x = xp_[k]; + } else { + continue; + } + S_ += _x; + c = (c * D) / (_x * N_COINS); + } + c = (c * D) / (Ann * N_COINS); + uint256 b = S_ + D / Ann; // - D + uint256 y_prev; + uint256 y = D; + + for (uint256 m = 0; m < 255; m++) { + y_prev = y; + y = (y * y + c) / (2 * y + b - D); + // Equality with the precision of 1 + if (y > y_prev) { + if (y - y_prev <= 1) { + break; + } + } else { + if (y_prev - y <= 1) { + break; + } + } + } + return y; + } + + function get_exchange_fee( + address _swap, + uint256 i, + uint256 j, + uint256 dx + ) external view returns (uint256 exFee, uint256 exAdminFee) { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + + uint256[N_COINS] memory old_balances = balances(_swap); + uint256[N_COINS] memory xp = _xp_mem(_swap, old_balances); + uint256[N_COINS] memory rates = RATES(_swap); + uint256 x = xp[i] + (dx * rates[i]) / PRECISION; + uint256 y = get_y(_swap, i, j, x, xp); + + uint256 dy = xp[j] - y - 1; // -1 just in case there were some rounding errors + uint256 dy_fee = (dy * swap.fee()) / FEE_DENOMINATOR; + + uint256 dy_admin_fee = (dy_fee * swap.admin_fee()) / FEE_DENOMINATOR; + dy_fee = (dy_fee * PRECISION) / rates[j]; + dy_admin_fee = (dy_admin_fee * PRECISION) / rates[j]; + exFee = dy_fee; + exAdminFee = dy_admin_fee; + } + + function _xp(address _swap) internal view returns (uint256[N_COINS] memory result) { + result = RATES(_swap); + for (uint256 i = 0; i < N_COINS; i++) { + result[i] = (result[i] * IPancakeStableSwap(_swap).balances(i)) / PRECISION; + } + } + + function get_y_D( + uint256 A_, + uint256 i, + uint256[N_COINS] memory xp, + uint256 D + ) internal pure returns (uint256) { + /** + Calculate x[i] if one reduces D from being calculated for xp to D + + Done by solving quadratic equation iteratively. + x_1**2 + x1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n + 1) / (n ** (2 * n) * prod' * A) + x_1**2 + b*x_1 = c + + x_1 = (x_1**2 + c) / (2*x_1 + b) + */ + // x in the input is converted to the same price/precision + require(i < N_COINS, "dev: i above N_COINS"); + uint256 c = D; + uint256 S_; + uint256 Ann = A_ * N_COINS; + + uint256 _x; + for (uint256 k = 0; k < N_COINS; k++) { + if (k != i) { + _x = xp[k]; + } else { + continue; + } + S_ += _x; + c = (c * D) / (_x * N_COINS); + } + c = (c * D) / (Ann * N_COINS); + uint256 b = S_ + D / Ann; + uint256 y_prev; + uint256 y = D; + + for (uint256 k = 0; k < 255; k++) { + y_prev = y; + y = (y * y + c) / (2 * y + b - D); + // Equality with the precision of 1 + if (y > y_prev) { + if (y - y_prev <= 1) { + break; + } + } else { + if (y_prev - y <= 1) { + break; + } + } + } + return y; + } + + function _calc_withdraw_one_coin( + address _swap, + uint256 _token_amount, + uint256 i + ) internal view returns (uint256, uint256) { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256 amp = swap.A(); + uint256 _fee = (swap.fee() * N_COINS) / (4 * (N_COINS - 1)); + uint256[N_COINS] memory precisions = PRECISION_MUL(_swap); + + uint256[N_COINS] memory xp = _xp(_swap); + + uint256 D0 = get_D(xp, amp); + uint256 D1 = D0 - (_token_amount * D0) / (token(_swap).totalSupply()); + uint256[N_COINS] memory xp_reduced = xp; + + uint256 new_y = get_y_D(amp, i, xp, D1); + uint256 dy_0 = (xp[i] - new_y) / precisions[i]; // w/o fees + + for (uint256 k = 0; k < N_COINS; k++) { + uint256 dx_expected; + if (k == i) { + dx_expected = (xp[k] * D1) / D0 - new_y; + } else { + dx_expected = xp[k] - (xp[k] * D1) / D0; + } + xp_reduced[k] -= (_fee * dx_expected) / FEE_DENOMINATOR; + } + uint256 dy = xp_reduced[i] - get_y_D(amp, i, xp_reduced, D1); + dy = (dy - 1) / precisions[i]; // Withdraw less to account for rounding errors + + return (dy, dy_0 - dy); + } + + function get_remove_liquidity_one_coin_fee( + address _swap, + uint256 _token_amount, + uint256 i + ) external view returns (uint256 adminFee) { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + (, uint256 dy_fee) = _calc_withdraw_one_coin(_swap, _token_amount, i); + adminFee = (dy_fee * swap.admin_fee()) / FEE_DENOMINATOR; + } + + function get_dx( + address _swap, + uint256 i, + uint256 j, + uint256 dy, + uint256 max_dx + ) external view returns (uint256) { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256[N_COINS] memory old_balances = balances(_swap); + uint256[N_COINS] memory xp = _xp_mem(_swap, old_balances); + + uint256 dy_with_fee = (dy * FEE_DENOMINATOR) / (FEE_DENOMINATOR - swap.fee()); + require(dy_with_fee < old_balances[j], "Excess balance"); + uint256[N_COINS] memory rates = RATES(_swap); + uint256 y = xp[j] - (dy_with_fee * rates[j]) / PRECISION; + uint256 x = get_y(_swap, j, i, y, xp); + + uint256 dx = x - xp[i]; + + // Convert all to real units + dx = (dx * PRECISION) / rates[i] + 1; // +1 for round lose. + require(dx <= max_dx, "Exchange resulted in fewer coins than expected"); + return dx; + } +} diff --git a/projects/stable-swap/contracts/utils/PancakeStableSwapTwoPoolInfo.sol b/projects/stable-swap/contracts/utils/PancakeStableSwapTwoPoolInfo.sol new file mode 100644 index 00000000..06d7bfc0 --- /dev/null +++ b/projects/stable-swap/contracts/utils/PancakeStableSwapTwoPoolInfo.sol @@ -0,0 +1,435 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "../interfaces/IPancakeStableSwap.sol"; + +contract PancakeStableSwapTwoPoolInfo { + uint256 public constant N_COINS = 2; + uint256 public constant FEE_DENOMINATOR = 1e10; + uint256 public constant PRECISION = 1e18; + + function token(address _swap) public view returns (IERC20) { + return IERC20(IPancakeStableSwap(_swap).token()); + } + + function balances(address _swap) public view returns (uint256[N_COINS] memory swapBalances) { + for (uint256 i = 0; i < N_COINS; i++) { + swapBalances[i] = IPancakeStableSwap(_swap).balances(i); + } + } + + function RATES(address _swap) public view returns (uint256[N_COINS] memory swapRATES) { + for (uint256 i = 0; i < N_COINS; i++) { + swapRATES[i] = IPancakeStableSwap(_swap).RATES(i); + } + } + + function PRECISION_MUL(address _swap) public view returns (uint256[N_COINS] memory swapPRECISION_MUL) { + for (uint256 i = 0; i < N_COINS; i++) { + swapPRECISION_MUL[i] = IPancakeStableSwap(_swap).PRECISION_MUL(i); + } + } + + function calc_coins_amount(address _swap, uint256 _amount) external view returns (uint256[N_COINS] memory) { + uint256 total_supply = token(_swap).totalSupply(); + uint256[N_COINS] memory amounts; + + for (uint256 i = 0; i < N_COINS; i++) { + uint256 value = (IPancakeStableSwap(_swap).balances(i) * _amount) / total_supply; + amounts[i] = value; + } + return amounts; + } + + function get_D_mem( + address _swap, + uint256[N_COINS] memory _balances, + uint256 amp + ) public view returns (uint256) { + return get_D(_xp_mem(_swap, _balances), amp); + } + + function get_add_liquidity_mint_amount(address _swap, uint256[N_COINS] memory amounts) + external + view + returns (uint256) + { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256[N_COINS] memory fees; + uint256 _fee = (swap.fee() * N_COINS) / (4 * (N_COINS - 1)); + uint256 amp = swap.A(); + + uint256 token_supply = token(_swap).totalSupply(); + //Initial invariant + uint256 D0; + uint256[N_COINS] memory old_balances = balances(_swap); + if (token_supply > 0) { + D0 = get_D_mem(_swap, old_balances, amp); + } + uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1]]; + + for (uint256 i = 0; i < N_COINS; i++) { + if (token_supply == 0) { + require(amounts[i] > 0, "Initial deposit requires all coins"); + } + // balances store amounts of c-tokens + new_balances[i] = old_balances[i] + amounts[i]; + } + + // Invariant after change + uint256 D1 = get_D_mem(_swap, new_balances, amp); + require(D1 > D0, "D1 must be greater than D0"); + + // We need to recalculate the invariant accounting for fees + // to calculate fair user's share + uint256 D2 = D1; + if (token_supply > 0) { + // Only account for fees if we are not the first to deposit + for (uint256 i = 0; i < N_COINS; i++) { + uint256 ideal_balance = (D1 * old_balances[i]) / D0; + uint256 difference; + if (ideal_balance > new_balances[i]) { + difference = ideal_balance - new_balances[i]; + } else { + difference = new_balances[i] - ideal_balance; + } + + fees[i] = (_fee * difference) / FEE_DENOMINATOR; + new_balances[i] -= fees[i]; + } + D2 = get_D_mem(_swap, new_balances, amp); + } + + // Calculate, how much pool tokens to mint + uint256 mint_amount; + if (token_supply == 0) { + mint_amount = D1; // Take the dust if there was any + } else { + mint_amount = (token_supply * (D2 - D0)) / D0; + } + return mint_amount; + } + + function get_add_liquidity_fee(address _swap, uint256[N_COINS] memory amounts) + external + view + returns (uint256[N_COINS] memory liquidityFee) + { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256 _fee = (swap.fee() * N_COINS) / (4 * (N_COINS - 1)); + uint256 _admin_fee = swap.admin_fee(); + uint256 amp = swap.A(); + + uint256 token_supply = token(_swap).totalSupply(); + //Initial invariant + uint256 D0; + uint256[N_COINS] memory old_balances = balances(_swap); + + if (token_supply > 0) { + D0 = get_D_mem(_swap, old_balances, amp); + } + uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1]]; + + for (uint256 i = 0; i < N_COINS; i++) { + if (token_supply == 0) { + require(amounts[i] > 0, "Initial deposit requires all coins"); + } + new_balances[i] = old_balances[i] + amounts[i]; + } + + // Invariant after change + uint256 D1 = get_D_mem(_swap, new_balances, amp); + require(D1 > D0, "D1 must be greater than D0"); + if (token_supply > 0) { + // Only account for fees if we are not the first to deposit + for (uint256 i = 0; i < N_COINS; i++) { + uint256 ideal_balance = (D1 * old_balances[i]) / D0; + uint256 difference; + if (ideal_balance > new_balances[i]) { + difference = ideal_balance - new_balances[i]; + } else { + difference = new_balances[i] - ideal_balance; + } + uint256 coinFee; + coinFee = (_fee * difference) / FEE_DENOMINATOR; + liquidityFee[i] = ((coinFee * _admin_fee) / FEE_DENOMINATOR); + } + } + } + + function get_remove_liquidity_imbalance_fee(address _swap, uint256[N_COINS] memory amounts) + external + view + returns (uint256[N_COINS] memory liquidityFee) + { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256 _fee = (swap.fee() * N_COINS) / (4 * (N_COINS - 1)); + uint256 _admin_fee = swap.admin_fee(); + uint256 amp = swap.A(); + + uint256[N_COINS] memory old_balances = balances(_swap); + uint256[N_COINS] memory new_balances = [old_balances[0], old_balances[1]]; + uint256 D0 = get_D_mem(_swap, old_balances, amp); + for (uint256 i = 0; i < N_COINS; i++) { + new_balances[i] -= amounts[i]; + } + uint256 D1 = get_D_mem(_swap, new_balances, amp); + for (uint256 i = 0; i < N_COINS; i++) { + uint256 ideal_balance = (D1 * old_balances[i]) / D0; + uint256 difference; + if (ideal_balance > new_balances[i]) { + difference = ideal_balance - new_balances[i]; + } else { + difference = new_balances[i] - ideal_balance; + } + uint256 coinFee; + coinFee = (_fee * difference) / FEE_DENOMINATOR; + liquidityFee[i] = ((coinFee * _admin_fee) / FEE_DENOMINATOR); + } + } + + function _xp_mem(address _swap, uint256[N_COINS] memory _balances) + public + view + returns (uint256[N_COINS] memory result) + { + result = RATES(_swap); + for (uint256 i = 0; i < N_COINS; i++) { + result[i] = (result[i] * _balances[i]) / PRECISION; + } + } + + function get_D(uint256[N_COINS] memory xp, uint256 amp) internal pure returns (uint256) { + uint256 S; + for (uint256 i = 0; i < N_COINS; i++) { + S += xp[i]; + } + if (S == 0) { + return 0; + } + + uint256 Dprev; + uint256 D = S; + uint256 Ann = amp * N_COINS; + for (uint256 j = 0; j < 255; j++) { + uint256 D_P = D; + for (uint256 k = 0; k < N_COINS; k++) { + D_P = (D_P * D) / (xp[k] * N_COINS); // If division by 0, this will be borked: only withdrawal will work. And that is good + } + Dprev = D; + D = ((Ann * S + D_P * N_COINS) * D) / ((Ann - 1) * D + (N_COINS + 1) * D_P); + // Equality with the precision of 1 + if (D > Dprev) { + if (D - Dprev <= 1) { + break; + } + } else { + if (Dprev - D <= 1) { + break; + } + } + } + return D; + } + + function get_y( + address _swap, + uint256 i, + uint256 j, + uint256 x, + uint256[N_COINS] memory xp_ + ) internal view returns (uint256) { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256 amp = swap.A(); + uint256 D = get_D(xp_, amp); + uint256 c = D; + uint256 S_; + uint256 Ann = amp * N_COINS; + + uint256 _x; + for (uint256 k = 0; k < N_COINS; k++) { + if (k == i) { + _x = x; + } else if (k != j) { + _x = xp_[k]; + } else { + continue; + } + S_ += _x; + c = (c * D) / (_x * N_COINS); + } + c = (c * D) / (Ann * N_COINS); + uint256 b = S_ + D / Ann; // - D + uint256 y_prev; + uint256 y = D; + + for (uint256 m = 0; m < 255; m++) { + y_prev = y; + y = (y * y + c) / (2 * y + b - D); + // Equality with the precision of 1 + if (y > y_prev) { + if (y - y_prev <= 1) { + break; + } + } else { + if (y_prev - y <= 1) { + break; + } + } + } + return y; + } + + function get_exchange_fee( + address _swap, + uint256 i, + uint256 j, + uint256 dx + ) external view returns (uint256 exFee, uint256 exAdminFee) { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + + uint256[N_COINS] memory old_balances = balances(_swap); + uint256[N_COINS] memory xp = _xp_mem(_swap, old_balances); + uint256[N_COINS] memory rates = RATES(_swap); + uint256 x = xp[i] + (dx * rates[i]) / PRECISION; + uint256 y = get_y(_swap, i, j, x, xp); + + uint256 dy = xp[j] - y - 1; // -1 just in case there were some rounding errors + uint256 dy_fee = (dy * swap.fee()) / FEE_DENOMINATOR; + + uint256 dy_admin_fee = (dy_fee * swap.admin_fee()) / FEE_DENOMINATOR; + dy_fee = (dy_fee * PRECISION) / rates[j]; + dy_admin_fee = (dy_admin_fee * PRECISION) / rates[j]; + exFee = dy_fee; + exAdminFee = dy_admin_fee; + } + + function _xp(address _swap) internal view returns (uint256[N_COINS] memory result) { + result = RATES(_swap); + for (uint256 i = 0; i < N_COINS; i++) { + result[i] = (result[i] * IPancakeStableSwap(_swap).balances(i)) / PRECISION; + } + } + + function get_y_D( + uint256 A_, + uint256 i, + uint256[N_COINS] memory xp, + uint256 D + ) internal pure returns (uint256) { + /** + Calculate x[i] if one reduces D from being calculated for xp to D + + Done by solving quadratic equation iteratively. + x_1**2 + x1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n + 1) / (n ** (2 * n) * prod' * A) + x_1**2 + b*x_1 = c + + x_1 = (x_1**2 + c) / (2*x_1 + b) + */ + // x in the input is converted to the same price/precision + require(i < N_COINS, "dev: i above N_COINS"); + uint256 c = D; + uint256 S_; + uint256 Ann = A_ * N_COINS; + + uint256 _x; + for (uint256 k = 0; k < N_COINS; k++) { + if (k != i) { + _x = xp[k]; + } else { + continue; + } + S_ += _x; + c = (c * D) / (_x * N_COINS); + } + c = (c * D) / (Ann * N_COINS); + uint256 b = S_ + D / Ann; + uint256 y_prev; + uint256 y = D; + + for (uint256 k = 0; k < 255; k++) { + y_prev = y; + y = (y * y + c) / (2 * y + b - D); + // Equality with the precision of 1 + if (y > y_prev) { + if (y - y_prev <= 1) { + break; + } + } else { + if (y_prev - y <= 1) { + break; + } + } + } + return y; + } + + function _calc_withdraw_one_coin( + address _swap, + uint256 _token_amount, + uint256 i + ) internal view returns (uint256, uint256) { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256 amp = swap.A(); + uint256 _fee = (swap.fee() * N_COINS) / (4 * (N_COINS - 1)); + uint256[N_COINS] memory precisions = PRECISION_MUL(_swap); + + uint256[N_COINS] memory xp = _xp(_swap); + + uint256 D0 = get_D(xp, amp); + uint256 D1 = D0 - (_token_amount * D0) / (token(_swap).totalSupply()); + uint256[N_COINS] memory xp_reduced = xp; + + uint256 new_y = get_y_D(amp, i, xp, D1); + uint256 dy_0 = (xp[i] - new_y) / precisions[i]; // w/o fees + + for (uint256 k = 0; k < N_COINS; k++) { + uint256 dx_expected; + if (k == i) { + dx_expected = (xp[k] * D1) / D0 - new_y; + } else { + dx_expected = xp[k] - (xp[k] * D1) / D0; + } + xp_reduced[k] -= (_fee * dx_expected) / FEE_DENOMINATOR; + } + uint256 dy = xp_reduced[i] - get_y_D(amp, i, xp_reduced, D1); + dy = (dy - 1) / precisions[i]; // Withdraw less to account for rounding errors + + return (dy, dy_0 - dy); + } + + function get_remove_liquidity_one_coin_fee( + address _swap, + uint256 _token_amount, + uint256 i + ) external view returns (uint256 adminFee) { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + (, uint256 dy_fee) = _calc_withdraw_one_coin(_swap, _token_amount, i); + adminFee = (dy_fee * swap.admin_fee()) / FEE_DENOMINATOR; + } + + function get_dx( + address _swap, + uint256 i, + uint256 j, + uint256 dy, + uint256 max_dx + ) external view returns (uint256) { + IPancakeStableSwap swap = IPancakeStableSwap(_swap); + uint256[N_COINS] memory old_balances = balances(_swap); + uint256[N_COINS] memory xp = _xp_mem(_swap, old_balances); + + uint256 dy_with_fee = (dy * FEE_DENOMINATOR) / (FEE_DENOMINATOR - swap.fee()); + require(dy_with_fee < old_balances[j], "Excess balance"); + uint256[N_COINS] memory rates = RATES(_swap); + uint256 y = xp[j] - (dy_with_fee * rates[j]) / PRECISION; + uint256 x = get_y(_swap, j, i, y, xp); + + uint256 dx = x - xp[i]; + + // Convert all to real units + dx = (dx * PRECISION) / rates[i] + 1; // +1 for round lose. + require(dx <= max_dx, "Exchange resulted in fewer coins than expected"); + return dx; + } +} diff --git a/projects/stable-swap/contracts/utils/PancakeStableSwapWBNBHelper.sol b/projects/stable-swap/contracts/utils/PancakeStableSwapWBNBHelper.sol new file mode 100644 index 00000000..df7d9703 --- /dev/null +++ b/projects/stable-swap/contracts/utils/PancakeStableSwapWBNBHelper.sol @@ -0,0 +1,121 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; +import "@openzeppelin-4.5.0/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "../interfaces/IWBNB.sol"; +import "../interfaces/IPancakeStableSwap.sol"; + +contract PancakeStableSwapWBNBHelper is Ownable { + using SafeERC20 for IERC20; + + uint256 public constant N_COINS = 2; + IWBNB public immutable WBNB; + + // Record whether approved for stable swap smart contract. + mapping(address => bool) isApproved; + + mapping(address => bool) public isWhitelist; + + error NotWBNBPair(); + error NotWhitelist(); + error InvalidNCOINS(); + + event UpdateWhitelist(address swap, bool status); + + constructor(IWBNB _WBNB) { + WBNB = _WBNB; + } + + function setWhiteList(address _swap, bool _status) external onlyOwner { + isWhitelist[_swap] = _status; + emit UpdateWhitelist(_swap, _status); + } + + function initSwapPair(IPancakeStableSwap swap) internal { + address token0 = swap.coins(0); + address token1 = swap.coins(1); + address LPToken = swap.token(); + IERC20(token0).safeApprove(address(swap), type(uint256).max); + IERC20(token1).safeApprove(address(swap), type(uint256).max); + IERC20(LPToken).safeApprove(address(swap), type(uint256).max); + isApproved[address(swap)] = true; + } + + function add_liquidity( + IPancakeStableSwap swap, + uint256[N_COINS] memory amounts, + uint256 min_mint_amount + ) external payable { + if (!isWhitelist[address(swap)]) revert NotWhitelist(); + if (swap.N_COINS() != N_COINS) revert InvalidNCOINS(); + if (!isApproved[address(swap)]) initSwapPair(swap); + + address token0 = swap.coins(0); + address token1 = swap.coins(1); + uint256 WBNBIndex; + if (token0 == address(WBNB)) { + WBNBIndex = 0; + } else if (token1 == address(WBNB)) { + WBNBIndex = 1; + } else { + revert NotWBNBPair(); + } + require(msg.value == amounts[WBNBIndex], "Inconsistent quantity"); + WBNB.deposit{value: msg.value}(); + if (WBNBIndex == 0) { + IERC20(token1).safeTransferFrom(msg.sender, address(this), amounts[1]); + } else { + IERC20(token0).safeTransferFrom(msg.sender, address(this), amounts[0]); + } + swap.add_liquidity(amounts, min_mint_amount); + + address LPToken = swap.token(); + uint256 mintedLPAmount = IERC20(LPToken).balanceOf(address(this)); + IERC20(LPToken).safeTransfer(msg.sender, mintedLPAmount); + } + + function remove_liquidity( + IPancakeStableSwap swap, + uint256 _amount, + uint256[N_COINS] memory min_amounts + ) external { + if (!isWhitelist[address(swap)]) revert NotWhitelist(); + if (swap.N_COINS() != N_COINS) revert InvalidNCOINS(); + if (!isApproved[address(swap)]) initSwapPair(swap); + + address token0 = swap.coins(0); + address token1 = swap.coins(1); + uint256 WBNBIndex; + if (token0 == address(WBNB)) { + WBNBIndex = 0; + } else if (token1 == address(WBNB)) { + WBNBIndex = 1; + } else { + revert NotWBNBPair(); + } + address LPToken = swap.token(); + IERC20(LPToken).safeTransferFrom(msg.sender, address(this), _amount); + swap.remove_liquidity(_amount, min_amounts); + + uint256 WBNBBalance = WBNB.balanceOf(address(this)); + WBNB.withdraw(WBNBBalance); + _safeTransferBNB(msg.sender, address(this).balance); + if (WBNBIndex == 0) { + uint256 token1Balance = IERC20(token1).balanceOf(address(this)); + IERC20(token1).safeTransfer(msg.sender, token1Balance); + } else { + uint256 token0Balance = IERC20(token0).balanceOf(address(this)); + IERC20(token0).safeTransfer(msg.sender, token0Balance); + } + } + + function _safeTransferBNB(address to, uint256 value) internal { + (bool success, ) = to.call{gas: 2300, value: value}(""); + require(success, "TransferHelper: BNB_TRANSFER_FAILED"); + } + + receive() external payable { + assert(msg.sender == address(WBNB)); // only accept BNB from the WBNB contract + } +} diff --git a/projects/stable-swap/hardhat.config.ts b/projects/stable-swap/hardhat.config.ts new file mode 100644 index 00000000..9306e46f --- /dev/null +++ b/projects/stable-swap/hardhat.config.ts @@ -0,0 +1,82 @@ +import type { HardhatUserConfig, NetworkUserConfig } from "hardhat/types"; +import "@nomiclabs/hardhat-ethers"; +import "@nomiclabs/hardhat-web3"; +import "@nomiclabs/hardhat-truffle5"; +import "hardhat-abi-exporter"; +import "hardhat-contract-sizer"; +import "solidity-coverage"; +import "dotenv/config"; + +const bscTestnet: NetworkUserConfig = { + url: "https://data-seed-prebsc-1-s1.binance.org:8545/", + chainId: 97, + accounts: [process.env.KEY_TESTNET!], +}; + +const bscMainnet: NetworkUserConfig = { + url: "https://bsc-dataseed.binance.org/", + chainId: 56, + accounts: [process.env.KEY_MAINNET!], +}; + +const config = { + defaultNetwork: "hardhat", + networks: { + hardhat: {}, + // testnet: bscTestnet, + // mainnet: bscMainnet, + }, + solidity: { + compilers: [ + { + version: "0.8.10", + settings: { + optimizer: { + enabled: true, + runs: 100, + }, + }, + }, + { + version: "0.8.9", + settings: { + optimizer: { + enabled: true, + runs: 100, + }, + }, + }, + { + version: "0.8.0", + settings: { + optimizer: { + enabled: true, + runs: 100, + }, + }, + }, + { + version: "0.6.12", + settings: { + optimizer: { + enabled: true, + runs: 100, + }, + }, + }, + ], + }, + paths: { + sources: "./contracts/", + tests: "./test", + cache: "./cache", + artifacts: "./artifacts", + }, + // abiExporter: { + // path: "./data/abi", + // clear: true, + // flat: false, + // }, +}; + +export default config; diff --git a/projects/stable-swap/package.json b/projects/stable-swap/package.json new file mode 100644 index 00000000..919972ae --- /dev/null +++ b/projects/stable-swap/package.json @@ -0,0 +1,25 @@ +{ + "name": "pancake-stable-swap", + "description": "Pancake Stable Swap", + "main": "index.js", + "version": "1.0.0", + "license": "MIT", + "private": true, + "scripts": { + "compile": "npx hardhat compile", + "deploy:testnet": "npx hardhat run --network testnet scripts/deploy.ts", + "deploy:mainnet": "npx hardhat run --network mainnet scripts/deploy.ts", + "deploy_LPFactory:testnet": "npx hardhat run --network testnet scripts/deploy_LPFactory.ts", + "deploy_LPFactory:mainnet": "npx hardhat run --network mainnet scripts/deploy_LPFactory.ts", + "deploy_swapTwoPoolDeployer:testnet": "npx hardhat run --network testnet scripts/deploy_swapTwoPoolDeployer.ts", + "deploy_swapTwoPoolDeployer:mainnet": "npx hardhat run --network mainnet scripts/deploy_swapTwoPoolDeployer.ts", + "deploy_swapThreePoolDeployer:testnet": "npx hardhat run --network testnet scripts/deploy_swapThreePoolDeployer.ts", + "deploy_swapThreePoolDeployer:mainnet": "npx hardhat run --network mainnet scripts/deploy_swapThreePoolDeployer.ts", + "test": "npx hardhat test", + "test:coverage": "npx hardhat coverage", + "test:size-contracts": "npx hardhat size-contracts" + }, + "dependencies": { + "@openzeppelin-4.5.0/contracts": "npm:@openzeppelin/contracts@4.5.0" + } +} \ No newline at end of file diff --git a/projects/stable-swap/scripts/deploy.ts b/projects/stable-swap/scripts/deploy.ts new file mode 100644 index 00000000..1b29424e --- /dev/null +++ b/projects/stable-swap/scripts/deploy.ts @@ -0,0 +1,32 @@ +import { ethers, run, network } from "hardhat"; +import config from "../config"; + +async function main() { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + const PancakeStableSwapFactory = await ethers.getContractFactory("PancakeStableSwapFactory"); + const pancakeStableSwapFactory = await PancakeStableSwapFactory.deploy( + config.LPFactory[networkName], + config.SwapTwoPoolDeployer[networkName], + config.SwapThreePoolDeployer[networkName] + ); + await pancakeStableSwapFactory.deployed(); + + console.log("pancakeStableSwapFactory deployed to:", pancakeStableSwapFactory.address); + } +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/stable-swap/scripts/deploy_LPFactory.ts b/projects/stable-swap/scripts/deploy_LPFactory.ts new file mode 100644 index 00000000..2b8abaf2 --- /dev/null +++ b/projects/stable-swap/scripts/deploy_LPFactory.ts @@ -0,0 +1,27 @@ +import { ethers, run, network } from "hardhat"; + +async function main() { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + const PancakeStableSwapLPFactory = await ethers.getContractFactory("PancakeStableSwapLPFactory"); + const pancakeStableSwapLPFactory = await PancakeStableSwapLPFactory.deploy(); + await pancakeStableSwapLPFactory.deployed(); + + console.log("pancakeStableSwapLPFactory deployed to:", pancakeStableSwapLPFactory.address); + } +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/stable-swap/scripts/deploy_MockToken.ts b/projects/stable-swap/scripts/deploy_MockToken.ts new file mode 100644 index 00000000..21673baf --- /dev/null +++ b/projects/stable-swap/scripts/deploy_MockToken.ts @@ -0,0 +1,27 @@ +import { ethers, run, network } from "hardhat"; + +async function main() { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + const MockToken = await ethers.getContractFactory("MockToken"); + const mockToken = await MockToken.deploy(); + await mockToken.deployed(); + + console.log("mockToken deployed to:", mockToken.address); + } +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/stable-swap/scripts/deploy_swapThreePoolDeployer.ts b/projects/stable-swap/scripts/deploy_swapThreePoolDeployer.ts new file mode 100644 index 00000000..7d000a2b --- /dev/null +++ b/projects/stable-swap/scripts/deploy_swapThreePoolDeployer.ts @@ -0,0 +1,27 @@ +import { ethers, run, network } from "hardhat"; + +async function main() { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + const PancakeStableSwapThreePoolDeployer = await ethers.getContractFactory("PancakeStableSwapThreePoolDeployer"); + const pancakeStableSwapThreePoolDeployer = await PancakeStableSwapThreePoolDeployer.deploy(); + await pancakeStableSwapThreePoolDeployer.deployed(); + + console.log("pancakeStableSwapThreePoolDeployer deployed to:", pancakeStableSwapThreePoolDeployer.address); + } +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/stable-swap/scripts/deploy_swapTwoPoolDeployer.ts b/projects/stable-swap/scripts/deploy_swapTwoPoolDeployer.ts new file mode 100644 index 00000000..59b8c06c --- /dev/null +++ b/projects/stable-swap/scripts/deploy_swapTwoPoolDeployer.ts @@ -0,0 +1,27 @@ +import { ethers, run, network } from "hardhat"; + +async function main() { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + const PancakeStableSwapTwoPoolDeployer = await ethers.getContractFactory("PancakeStableSwapTwoPoolDeployer"); + const pancakeStableSwapTwoPoolDeployer = await PancakeStableSwapTwoPoolDeployer.deploy(); + await pancakeStableSwapTwoPoolDeployer.deployed(); + + console.log("pancakeStableSwapTwoPoolDeployer deployed to:", pancakeStableSwapTwoPoolDeployer.address); + } +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/stable-swap/test/PancakeStableSwapThreePool.test.ts b/projects/stable-swap/test/PancakeStableSwapThreePool.test.ts new file mode 100644 index 00000000..08931451 --- /dev/null +++ b/projects/stable-swap/test/PancakeStableSwapThreePool.test.ts @@ -0,0 +1,420 @@ +import { ether, time, constants, BN, expectRevert, expectEvent } from "@openzeppelin/test-helpers"; +import { advanceBlock, advanceBlockTo } from "@openzeppelin/test-helpers/src/time"; +import { artifacts, contract, ethers } from "hardhat"; +import { parseEther } from "ethers/lib/utils"; +import { BigNumber } from "ethers"; +import { assert, expect } from "chai"; + +const Factory = artifacts.require("PancakeStableSwapFactory"); +const StableSwapThreePool = artifacts.require("PancakeStableSwapThreePool"); +const LPToken = artifacts.require("PancakeStableSwapLP"); +const Token = artifacts.require("./test/Token.sol"); +const PancakeStableSwapInfo = artifacts.require("./utils/PancakeStableSwapInfo.sol"); +const PancakeStableSwapTwoPoolInfo = artifacts.require("./utils/PancakeStableSwapTwoPoolInfo.sol"); +const PancakeStableSwapThreePoolInfo = artifacts.require("./utils/PancakeStableSwapThreePoolInfo.sol"); +const PancakeStableSwapLPFactory = artifacts.require("PancakeStableSwapLPFactory.sol"); +const PancakeStableSwapTwoPoolDeployer = artifacts.require("PancakeStableSwapTwoPoolDeployer.sol"); +const PancakeStableSwapThreePoolDeployer = artifacts.require("PancakeStableSwapThreePoolDeployer.sol"); + +contract("PancakeStableSwapThreePool", ([admin, user1, user2, admin2, user3, user4]) => { + let factory, + swapDeployer, + swapTriplePoolDeployer, + LPFactory, + BUSD, + USDC, + USDT, + swap_BUSD_USDC_USDT, + LP_BUSD_USDC_USDT, + token0, + token1, + token2, + threePoolInfoSC, + twoPoolInfoSC, + poolInfoSC; + const A = 1000; + const Fee = 4000000; + const AdminFee = 5000000000; + const N_COINS = 2; + const Slippage = BigNumber.from(99); //0.99 + const SlippageMax = BigNumber.from(10100); //1.01 + const Slippage_PRECISION = BigNumber.from(10000); + + beforeEach(async () => { + LPFactory = await PancakeStableSwapLPFactory.new({ from: admin }); + swapDeployer = await PancakeStableSwapTwoPoolDeployer.new({ from: admin }); + swapTriplePoolDeployer = await PancakeStableSwapThreePoolDeployer.new({ from: admin }); + factory = await Factory.new(LPFactory.address, swapDeployer.address, swapTriplePoolDeployer.address, { + from: admin, + }); + await LPFactory.transferOwnership(factory.address, { from: admin }); + await swapDeployer.transferOwnership(factory.address, { from: admin }); + await swapTriplePoolDeployer.transferOwnership(factory.address, { from: admin }); + BUSD = await Token.new("Binance USD", "BUSD", 18, { from: admin }); + USDC = await Token.new("USD Coin", "USDC", 18, { from: admin }); + USDT = await Token.new("Tether USD", "USDT", 18, { from: admin }); + await BUSD.mint(user1, parseEther("10000"), { from: user1 }); + await BUSD.mint(user2, parseEther("10000"), { from: user2 }); + await USDC.mint(user1, parseEther("10000"), { from: user1 }); + await USDC.mint(user2, parseEther("10000"), { from: user2 }); + await USDT.mint(user1, parseEther("10000"), { from: user1 }); + await USDT.mint(user2, parseEther("10000"), { from: user2 }); + let tx = await factory.createThreePoolPair(BUSD.address, USDC.address, USDT.address, A, Fee, AdminFee, { + from: admin, + }); + let info = await factory.getThreePoolPairInfo(BUSD.address, USDC.address); + swap_BUSD_USDC_USDT = await StableSwapThreePool.at(info.swapContract); + LP_BUSD_USDC_USDT = await LPToken.at(info.LPContract); + token0 = await Token.at(info.token0); + token1 = await Token.at(info.token1); + token2 = await Token.at(info.token2); + threePoolInfoSC = await PancakeStableSwapThreePoolInfo.new({ from: admin }); + twoPoolInfoSC = await PancakeStableSwapTwoPoolInfo.new({ from: admin }); + poolInfoSC = await PancakeStableSwapInfo.new(twoPoolInfoSC.address, threePoolInfoSC.address, { from: admin }); + }); + + describe("Triple Pool Pair Info", () => { + it("Check triple pool pair info between factory and swap smart contract", async () => { + let info = await factory.getThreePoolPairInfo(BUSD.address, USDC.address); + assert.equal(info.swapContract, swap_BUSD_USDC_USDT.address); + let token0 = await swap_BUSD_USDC_USDT.coins(0); + let token1 = await swap_BUSD_USDC_USDT.coins(1); + let token2 = await swap_BUSD_USDC_USDT.coins(2); + let LPToken = await swap_BUSD_USDC_USDT.token(); + assert.equal(info.token0, token0); + assert.equal(info.token1, token1); + assert.equal(info.token2, token2); + assert.equal(info.LPContract, LPToken); + }); + }); + + describe("User Add Liquidity in triple pool", () => { + it("Initialize liquidity", async () => { + await BUSD.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await USDC.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await USDT.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + + await expectRevert( + swap_BUSD_USDC_USDT.add_liquidity([0, parseEther("1"), 0], 0, { from: user1 }), + "Initial deposit requires all coins" + ); + await expectRevert( + swap_BUSD_USDC_USDT.add_liquidity([parseEther("1"), 0, 0], 0, { from: user1 }), + "Initial deposit requires all coins" + ); + + await expectRevert( + swap_BUSD_USDC_USDT.add_liquidity([0, 0, parseEther("1")], 0, { from: user1 }), + "Initial deposit requires all coins" + ); + + await expectRevert( + swap_BUSD_USDC_USDT.add_liquidity([parseEther("1"), parseEther("1"), parseEther("1")], parseEther("3.1"), { + from: user1, + }), + "Slippage screwed you" + ); + + await expectRevert( + swap_BUSD_USDC_USDT.add_liquidity([parseEther("1"), parseEther("1"), parseEther("1")], 0, { + from: user1, + value: ether("1"), + }), + "Inconsistent quantity" + ); + + const expect_LP_balance = parseEther("300"); + let tx = await swap_BUSD_USDC_USDT.add_liquidity( + [parseEther("100"), parseEther("100"), parseEther("100")], + expect_LP_balance, + { + from: user1, + } + ); + let LP_balance = await LP_BUSD_USDC_USDT.balanceOf(user1); + let LP_totalSupply = await LP_BUSD_USDC_USDT.totalSupply(); + assert.equal(expect_LP_balance.toString(), LP_balance.toString()); + assert.equal(LP_totalSupply.toString(), LP_balance.toString()); + }); + + it("Add one coin into liquidity in triple pool ", async () => { + await BUSD.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await USDC.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await USDT.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await BUSD.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user2 }); + await USDC.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user2 }); + await USDT.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user2 }); + + await swap_BUSD_USDC_USDT.add_liquidity([parseEther("100"), parseEther("100"), parseEther("100")], 0, { + from: user1, + }); + + let expect_LP_balance0 = await threePoolInfoSC.get_add_liquidity_mint_amount(swap_BUSD_USDC_USDT.address, [ + parseEther("1"), + 0, + 0, + ]); + + let token0_balance_before = await swap_BUSD_USDC_USDT.balances(0); + let token1_balance_before = await swap_BUSD_USDC_USDT.balances(1); + let token2_balance_before = await swap_BUSD_USDC_USDT.balances(2); + + let defaultToken0Amount = parseEther("1"); + let liquidityAdminFee = await threePoolInfoSC.get_add_liquidity_fee(swap_BUSD_USDC_USDT.address, [ + defaultToken0Amount, + 0, + 0, + ]); + await swap_BUSD_USDC_USDT.add_liquidity([defaultToken0Amount, 0, 0], expect_LP_balance0, { from: user2 }); + + let token0_balance_after = await swap_BUSD_USDC_USDT.balances(0); + let token1_balance_after = await swap_BUSD_USDC_USDT.balances(1); + let token2_balance_after = await swap_BUSD_USDC_USDT.balances(2); + + let realAddToken0 = token0_balance_after.sub(token0_balance_before); + let realLiquidityToken0AdminFee = BigNumber.from(defaultToken0Amount.toString()).sub( + BigNumber.from(realAddToken0.toString()) + ); + let realLiquidityToken1AdminFee = token1_balance_before.sub(token1_balance_after); + let realLiquidityToken2AdminFee = token2_balance_before.sub(token2_balance_after); + // check admin fee + assert.equal(realLiquidityToken0AdminFee.toString(), liquidityAdminFee[0].toString()); + assert.equal(realLiquidityToken1AdminFee.toString(), liquidityAdminFee[1].toString()); + assert.equal(realLiquidityToken2AdminFee.toString(), liquidityAdminFee[2].toString()); + + let LP_balance0 = await LP_BUSD_USDC_USDT.balanceOf(user2); + assert.equal(true, LP_balance0.eq(expect_LP_balance0)); + + let expect_LP_balance1 = await swap_BUSD_USDC_USDT.calc_token_amount([0, defaultToken0Amount, 0], true); + expect_LP_balance1 = BigNumber.from(expect_LP_balance1.toString()).mul(Slippage).div(Slippage_PRECISION); + await swap_BUSD_USDC_USDT.add_liquidity([0, defaultToken0Amount, 0], expect_LP_balance1, { from: user2 }); + let LP_balance1 = await LP_BUSD_USDC_USDT.balanceOf(user2); + assert.equal(true, LP_balance1.gt(expect_LP_balance1)); + }); + }); + + describe("User Remove Liquidity in triple pool", () => { + beforeEach(async () => { + await BUSD.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await USDC.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await USDT.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await swap_BUSD_USDC_USDT.add_liquidity([parseEther("100"), parseEther("100"), parseEther("100")], 0, { + from: user1, + }); + }); + it("Remove liquidity in triple pool", async () => { + let LP_balance_before = await LP_BUSD_USDC_USDT.balanceOf(user1); + let token0_balance_before = await token0.balanceOf(user1); + let token1_balance_before = await token1.balanceOf(user1); + let token2_balance_before = await token2.balanceOf(user1); + let remove_LP_balance = parseEther("1"); + let expectCoins = await threePoolInfoSC.calc_coins_amount(swap_BUSD_USDC_USDT.address, remove_LP_balance); + await swap_BUSD_USDC_USDT.remove_liquidity(remove_LP_balance, [0, 0, 0], { from: user1 }); + let LP_balance_after = await LP_BUSD_USDC_USDT.balanceOf(user1); + let token0_balance_after = await token0.balanceOf(user1); + let token1_balance_after = await token1.balanceOf(user1); + let token2_balance_after = await token2.balanceOf(user1); + //check lp balance + assert.equal(LP_balance_before.sub(LP_balance_after).toString(), remove_LP_balance.toString()); + //check check token0 balance + assert.equal(token0_balance_after.sub(token0_balance_before).toString(), expectCoins[0].toString()); + //check check token1 balance + assert.equal(token1_balance_after.sub(token1_balance_before).toString(), expectCoins[1].toString()); + //check check token2 balance + assert.equal(token2_balance_after.sub(token2_balance_before).toString(), expectCoins[2].toString()); + }); + + it("Remove liquidity imbalance in triple pool", async () => { + let user_LP_balance_before = await LP_BUSD_USDC_USDT.balanceOf(user1); + let LP_totalSupply_before = await LP_BUSD_USDC_USDT.totalSupply(); + + let user_token0_balance_before = await token0.balanceOf(user1); + let user_token1_balance_before = await token1.balanceOf(user1); + let user_token2_balance_before = await token2.balanceOf(user1); + + let swap_token0_balance_before = await swap_BUSD_USDC_USDT.balances(0); + let swap_token1_balance_before = await swap_BUSD_USDC_USDT.balances(1); + let swap_token2_balance_before = await swap_BUSD_USDC_USDT.balances(2); + + let defaultTokenAmount = parseEther("1"); + let remove_token_amounts = [defaultTokenAmount, defaultTokenAmount, defaultTokenAmount]; + let liquidityAdminFee = await threePoolInfoSC.get_remove_liquidity_imbalance_fee( + swap_BUSD_USDC_USDT.address, + remove_token_amounts + ); + let max_burn_amount = await swap_BUSD_USDC_USDT.calc_token_amount(remove_token_amounts, false); + max_burn_amount = BigNumber.from(max_burn_amount.toString()).mul(SlippageMax).div(Slippage_PRECISION); + await swap_BUSD_USDC_USDT.remove_liquidity_imbalance(remove_token_amounts, max_burn_amount, { from: user1 }); + let user_LP_balance_after = await LP_BUSD_USDC_USDT.balanceOf(user1); + let LP_totalSupply_after = await LP_BUSD_USDC_USDT.totalSupply(); + + let user_token0_balance_after = await token0.balanceOf(user1); + let user_token1_balance_after = await token1.balanceOf(user1); + let user_token2_balance_after = await token2.balanceOf(user1); + + let swap_token0_balance_after = await swap_BUSD_USDC_USDT.balances(0); + let swap_token1_balance_after = await swap_BUSD_USDC_USDT.balances(1); + let swap_token2_balance_after = await swap_BUSD_USDC_USDT.balances(2); + + assert.equal( + defaultTokenAmount.toString(), + swap_token0_balance_before.sub(swap_token0_balance_after).sub(liquidityAdminFee[0]).toString() + ); + assert.equal( + defaultTokenAmount.toString(), + swap_token1_balance_before.sub(swap_token1_balance_after).sub(liquidityAdminFee[1]).toString() + ); + assert.equal( + defaultTokenAmount.toString(), + swap_token2_balance_before.sub(swap_token2_balance_after).sub(liquidityAdminFee[2]).toString() + ); + assert.equal( + LP_totalSupply_before.sub(LP_totalSupply_after).toString(), + user_LP_balance_before.sub(user_LP_balance_after).toString() + ); + assert.equal(defaultTokenAmount.toString(), user_token0_balance_after.sub(user_token0_balance_before).toString()); + assert.equal(defaultTokenAmount.toString(), user_token1_balance_after.sub(user_token1_balance_before).toString()); + assert.equal(defaultTokenAmount.toString(), user_token2_balance_after.sub(user_token2_balance_before).toString()); + //check fee , swap_token0_balance_before = swap_token0_balance_after + defaultTokenAmount + token0AdminFee + assert.equal( + swap_token0_balance_before.toString(), + BigNumber.from(swap_token0_balance_after.toString()) + .add(BigNumber.from(defaultTokenAmount.toString())) + .add(BigNumber.from(liquidityAdminFee[0].toString())) + .toString() + ); + //check fee , swap_token1_balance_before = swap_token1_balance_after + defaultTokenAmount + token1AdminFee + assert.equal( + swap_token1_balance_before.toString(), + BigNumber.from(swap_token1_balance_after.toString()) + .add(BigNumber.from(defaultTokenAmount.toString())) + .add(BigNumber.from(liquidityAdminFee[1].toString())) + .toString() + ); + //check fee , swap_token1_balance_before = swap_token1_balance_after + defaultTokenAmount + token1AdminFee + assert.equal( + swap_token2_balance_before.toString(), + BigNumber.from(swap_token2_balance_after.toString()) + .add(BigNumber.from(defaultTokenAmount.toString())) + .add(BigNumber.from(liquidityAdminFee[2].toString())) + .toString() + ); + }); + + it("Remove liquidity one_coin in triple pool", async () => { + let defaultTokenAmount = parseEther("1"); + let user_token1_balance_before = await token1.balanceOf(user1); + let expect_Token1_amount = await swap_BUSD_USDC_USDT.calc_withdraw_one_coin(defaultTokenAmount, 1); + await swap_BUSD_USDC_USDT.remove_liquidity_one_coin(defaultTokenAmount, 1, expect_Token1_amount, { from: user1 }); + let user_token1_balance_after = await token1.balanceOf(user1); + assert(user_token1_balance_after.sub(user_token1_balance_before).toString(), expect_Token1_amount.toString()); + }); + }); + + describe("User Exchange in triple pool", () => { + beforeEach(async () => { + await BUSD.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await USDC.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await USDT.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user1 }); + await swap_BUSD_USDC_USDT.add_liquidity([parseEther("100"), parseEther("100"), parseEther("100")], 0, { + from: user1, + }); + }); + it("Swap token0 to token1 in triple pool", async () => { + await token0.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user2 }); + let exchange_token0_balance = parseEther("1"); + let expect_token1_balance = await swap_BUSD_USDC_USDT.get_dy(0, 1, exchange_token0_balance); + let cal_dx_amount = await poolInfoSC.get_dx( + swap_BUSD_USDC_USDT.address, + 0, + 1, + expect_token1_balance, + parseEther("1000000000") + ); + //check get_dx + assert.equal(exchange_token0_balance.toString(), cal_dx_amount.toString()); + let exchangeFees = await threePoolInfoSC.get_exchange_fee( + swap_BUSD_USDC_USDT.address, + 0, + 1, + exchange_token0_balance + ); + let user_token0_balance_before = await token0.balanceOf(user2); + let user_token1_balance_before = await token1.balanceOf(user2); + let swapContract_token1_balance_before = await token1.balanceOf(swap_BUSD_USDC_USDT.address); + let swap_token1_balance_before = await swap_BUSD_USDC_USDT.balances(1); + let token1_admin_fee_before = await swap_BUSD_USDC_USDT.admin_balances(1); + await swap_BUSD_USDC_USDT.exchange(0, 1, exchange_token0_balance, expect_token1_balance, { from: user2 }); + let user_token0_balance_after = await token0.balanceOf(user2); + let token1_admin_fee_after = await swap_BUSD_USDC_USDT.admin_balances(1); + let swapContract_token1_balance_after = await token1.balanceOf(swap_BUSD_USDC_USDT.address); + let swap_token1_balance_after = await swap_BUSD_USDC_USDT.balances(1); + let user_token1_balance_after = await token1.balanceOf(user2); + //check user token0 balance + assert.equal( + exchange_token0_balance.toString(), + user_token0_balance_before.sub(user_token0_balance_after).toString() + ); + //check exchange admmin fee + assert.equal(exchangeFees[1].toString(), token1_admin_fee_after.sub(token1_admin_fee_before).toString()); + //check get_dy + assert.equal( + user_token1_balance_after.sub(user_token1_balance_before).toString(), + expect_token1_balance.toString() + ); + //check token1 balance + assert.equal( + user_token1_balance_after.sub(user_token1_balance_before).toString(), + swap_token1_balance_before.sub(swap_token1_balance_after).sub(exchangeFees[1]).toString() + ); + assert.equal( + user_token1_balance_after.sub(user_token1_balance_before).toString(), + swapContract_token1_balance_before.sub(swapContract_token1_balance_after).toString() + ); + }); + + it("Swap token1 to token2 in triple pool", async () => { + await token1.approve(swap_BUSD_USDC_USDT.address, parseEther("1000000000"), { from: user2 }); + let exchange_token1_balance = parseEther("1"); + let expect_token2_balance = await swap_BUSD_USDC_USDT.get_dy(1, 2, exchange_token1_balance); + let exchangeFees = await threePoolInfoSC.get_exchange_fee( + swap_BUSD_USDC_USDT.address, + 1, + 2, + exchange_token1_balance + ); + let user_token1_balance_before = await token1.balanceOf(user2); + let user_token2_balance_before = await token2.balanceOf(user2); + let swapContract_token2_balance_before = await token2.balanceOf(swap_BUSD_USDC_USDT.address); + let swap_token2_balance_before = await swap_BUSD_USDC_USDT.balances(2); + let token2_admin_fee_before = await swap_BUSD_USDC_USDT.admin_balances(2); + await swap_BUSD_USDC_USDT.exchange(1, 2, exchange_token1_balance, expect_token2_balance, { from: user2 }); + let user_token1_balance_after = await token1.balanceOf(user2); + let token2_admin_fee_after = await swap_BUSD_USDC_USDT.admin_balances(2); + let swapContract_token2_balance_after = await token2.balanceOf(swap_BUSD_USDC_USDT.address); + let swap_token2_balance_after = await swap_BUSD_USDC_USDT.balances(2); + let user_token2_balance_after = await token2.balanceOf(user2); + //check user token1 balance + assert.equal( + exchange_token1_balance.toString(), + user_token1_balance_before.sub(user_token1_balance_after).toString() + ); + //check exchange admmin fee + assert.equal(exchangeFees[1].toString(), token2_admin_fee_after.sub(token2_admin_fee_before).toString()); + //check get_dy + assert.equal( + user_token2_balance_after.sub(user_token2_balance_before).toString(), + expect_token2_balance.toString() + ); + //check token2 balance + assert.equal( + user_token2_balance_after.sub(user_token2_balance_before).toString(), + swap_token2_balance_before.sub(swap_token2_balance_after).sub(exchangeFees[1]).toString() + ); + assert.equal( + user_token2_balance_after.sub(user_token2_balance_before).toString(), + swapContract_token2_balance_before.sub(swapContract_token2_balance_after).toString() + ); + }); + }); +}); diff --git a/projects/stable-swap/test/PancakeStableSwapTwoPool.test.ts b/projects/stable-swap/test/PancakeStableSwapTwoPool.test.ts new file mode 100644 index 00000000..e8561cf9 --- /dev/null +++ b/projects/stable-swap/test/PancakeStableSwapTwoPool.test.ts @@ -0,0 +1,514 @@ +import { ether, time, constants, BN, expectRevert, expectEvent } from "@openzeppelin/test-helpers"; +import { advanceBlock, advanceBlockTo } from "@openzeppelin/test-helpers/src/time"; +import { artifacts, contract, ethers } from "hardhat"; +import { parseEther } from "ethers/lib/utils"; +import { BigNumber } from "ethers"; +import { assert, expect } from "chai"; + +const Factory = artifacts.require("PancakeStableSwapFactory"); +const StableSwapTwoPool = artifacts.require("PancakeStableSwapTwoPool"); +const LPToken = artifacts.require("PancakeStableSwapLP"); +const Token = artifacts.require("./test/Token.sol"); +const PancakeStableSwapInfo = artifacts.require("./utils/PancakeStableSwapInfo.sol"); +const PancakeStableSwapTwoPoolInfo = artifacts.require("./utils/PancakeStableSwapTwoPoolInfo.sol"); +const PancakeStableSwapThreePoolInfo = artifacts.require("./utils/PancakeStableSwapThreePoolInfo.sol"); +const PancakeStableSwapLPFactory = artifacts.require("PancakeStableSwapLPFactory.sol"); +const PancakeStableSwapTwoPoolDeployer = artifacts.require("PancakeStableSwapTwoPoolDeployer.sol"); +const PancakeStableSwapThreePoolDeployer = artifacts.require("PancakeStableSwapThreePoolDeployer.sol"); + +contract("PancakeStableSwapTwoPool", ([admin, user1, user2, admin2, user3, user4]) => { + let factory, + swapDeployer, + swapTriplePoolDeployer, + LPFactory, + BUSD, + USDC, + swap_BUSD_USDC, + LP_BUSD_USDC, + token0, + token1, + threePoolInfoSC, + twoPoolInfoSC, + poolInfoSC; + + const A = 1000; + const Fee = 4000000; + const AdminFee = 5000000000; + const N_COINS = 2; + const Slippage = BigNumber.from(99); //0.99 + const SlippageMax = BigNumber.from(10100); //1.01 + const Slippage_PRECISION = BigNumber.from(10000); + + beforeEach(async () => { + LPFactory = await PancakeStableSwapLPFactory.new({ from: admin }); + swapDeployer = await PancakeStableSwapTwoPoolDeployer.new({ from: admin }); + swapTriplePoolDeployer = await PancakeStableSwapThreePoolDeployer.new({ from: admin }); + factory = await Factory.new(LPFactory.address, swapDeployer.address, swapTriplePoolDeployer.address, { + from: admin, + }); + await LPFactory.transferOwnership(factory.address, { from: admin }); + await swapDeployer.transferOwnership(factory.address, { from: admin }); + await swapTriplePoolDeployer.transferOwnership(factory.address, { from: admin }); + BUSD = await Token.new("Binance USD", "BUSD", 18, { from: admin }); + USDC = await Token.new("USD Coin", "USDC", 18, { from: admin }); + await BUSD.mint(user1, parseEther("10000"), { from: user1 }); + await BUSD.mint(user2, parseEther("10000"), { from: user2 }); + await USDC.mint(user1, parseEther("10000"), { from: user1 }); + await USDC.mint(user2, parseEther("10000"), { from: user2 }); + let tx = await factory.createSwapPair(BUSD.address, USDC.address, A, Fee, AdminFee, { from: admin }); + let info = await factory.getPairInfo(BUSD.address, USDC.address); + swap_BUSD_USDC = await StableSwapTwoPool.at(info.swapContract); + LP_BUSD_USDC = await LPToken.at(info.LPContract); + token0 = await Token.at(info.token0); + token1 = await Token.at(info.token1); + threePoolInfoSC = await PancakeStableSwapThreePoolInfo.new({ from: admin }); + twoPoolInfoSC = await PancakeStableSwapTwoPoolInfo.new({ from: admin }); + poolInfoSC = await PancakeStableSwapInfo.new(twoPoolInfoSC.address, threePoolInfoSC.address, { from: admin }); + }); + + describe("Stable Swap Pair Info", () => { + it("Check pair info between factory and swap smart contract", async () => { + let info = await factory.getPairInfo(BUSD.address, USDC.address); + assert.equal(info.swapContract, swap_BUSD_USDC.address); + let token0 = await swap_BUSD_USDC.coins(0); + let token1 = await swap_BUSD_USDC.coins(1); + let LPToken = await swap_BUSD_USDC.token(); + assert.equal(info.token0, token0); + assert.equal(info.token1, token1); + assert.equal(info.LPContract, LPToken); + }); + }); + + describe("User Add Liquidity", () => { + it("Initialize liquidity", async () => { + await BUSD.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await USDC.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + + await expectRevert( + swap_BUSD_USDC.add_liquidity([0, parseEther("1")], 0, { from: user1 }), + "Initial deposit requires all coins" + ); + await expectRevert( + swap_BUSD_USDC.add_liquidity([parseEther("1"), 0], 0, { from: user1 }), + "Initial deposit requires all coins" + ); + + await expectRevert( + swap_BUSD_USDC.add_liquidity([parseEther("1"), parseEther("1")], parseEther("2.1"), { from: user1 }), + "Slippage screwed you" + ); + + await expectRevert( + swap_BUSD_USDC.add_liquidity([parseEther("1"), parseEther("1")], 0, { from: user1, value: ether("1") }), + "Inconsistent quantity" + ); + + const expect_LP_balance = parseEther("200"); + let tx = await swap_BUSD_USDC.add_liquidity([parseEther("100"), parseEther("100")], expect_LP_balance, { + from: user1, + }); + let LP_balance = await LP_BUSD_USDC.balanceOf(user1); + let LP_totalSupply = await LP_BUSD_USDC.totalSupply(); + assert.equal(expect_LP_balance.toString(), LP_balance.toString()); + assert.equal(LP_totalSupply.toString(), LP_balance.toString()); + }); + + it("Add one coin into liquidity ", async () => { + await BUSD.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await USDC.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await BUSD.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user2 }); + await USDC.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user2 }); + + await swap_BUSD_USDC.add_liquidity([parseEther("100"), parseEther("100")], 0, { from: user1 }); + + let expect_LP_balance0 = await twoPoolInfoSC.get_add_liquidity_mint_amount(swap_BUSD_USDC.address, [ + parseEther("1"), + 0, + ]); + // let expect_LP_balance0 = await swap_BUSD_USDC.calc_token_amount([parseEther("1"), 0], true); + // expect_LP_balance0 = BigNumber.from(expect_LP_balance0.toString()).mul(Slippage).div(Slippage_PRECISION); + let token0_balance_before = await swap_BUSD_USDC.balances(0); + let token1_balance_before = await swap_BUSD_USDC.balances(1); + let defaultToken0Amount = parseEther("1"); + let liquidityAdminFee = await twoPoolInfoSC.get_add_liquidity_fee(swap_BUSD_USDC.address, [ + defaultToken0Amount, + 0, + ]); + await swap_BUSD_USDC.add_liquidity([defaultToken0Amount, 0], expect_LP_balance0, { from: user2 }); + let token0_balance_after = await swap_BUSD_USDC.balances(0); + let token1_balance_after = await swap_BUSD_USDC.balances(1); + let realAddToken0 = token0_balance_after.sub(token0_balance_before); + let realLiquidityToken0AdminFee = BigNumber.from(defaultToken0Amount.toString()).sub( + BigNumber.from(realAddToken0.toString()) + ); + let realLiquidityToken1AdminFee = token1_balance_before.sub(token1_balance_after); + // check admin fee + assert.equal(realLiquidityToken0AdminFee.toString(), liquidityAdminFee[0].toString()); + assert.equal(realLiquidityToken1AdminFee.toString(), liquidityAdminFee[1].toString()); + let LP_balance0 = await LP_BUSD_USDC.balanceOf(user2); + assert.equal(true, LP_balance0.eq(expect_LP_balance0)); + + let expect_LP_balance1 = await swap_BUSD_USDC.calc_token_amount([0, defaultToken0Amount], true); + expect_LP_balance1 = BigNumber.from(expect_LP_balance1.toString()).mul(Slippage).div(Slippage_PRECISION); + await swap_BUSD_USDC.add_liquidity([0, defaultToken0Amount], expect_LP_balance1, { from: user2 }); + let LP_balance1 = await LP_BUSD_USDC.balanceOf(user2); + assert.equal(true, LP_balance1.gt(expect_LP_balance1)); + }); + }); + + describe("User Remove Liquidity", () => { + beforeEach(async () => { + await BUSD.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await USDC.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await swap_BUSD_USDC.add_liquidity([parseEther("100"), parseEther("100")], 0, { from: user1 }); + }); + it("Remove liquidity", async () => { + let LP_balance_before = await LP_BUSD_USDC.balanceOf(user1); + let token0_balance_before = await token0.balanceOf(user1); + let token1_balance_before = await token1.balanceOf(user1); + let remove_LP_balance = parseEther("1"); + let expectCoins = await twoPoolInfoSC.calc_coins_amount(swap_BUSD_USDC.address, remove_LP_balance); + await swap_BUSD_USDC.remove_liquidity(remove_LP_balance, [0, 0], { from: user1 }); + let LP_balance_after = await LP_BUSD_USDC.balanceOf(user1); + let token0_balance_after = await token0.balanceOf(user1); + let token1_balance_after = await token1.balanceOf(user1); + //check lp balance + assert.equal(LP_balance_before.sub(LP_balance_after).toString(), remove_LP_balance.toString()); + //check check token0 balance + assert.equal(token0_balance_after.sub(token0_balance_before).toString(), expectCoins[0].toString()); + //check check token1 balance + assert.equal(token1_balance_after.sub(token1_balance_before).toString(), expectCoins[1].toString()); + }); + + it("Remove liquidity imbalance", async () => { + let user_LP_balance_before = await LP_BUSD_USDC.balanceOf(user1); + let LP_totalSupply_before = await LP_BUSD_USDC.totalSupply(); + let user_token0_balance_before = await token0.balanceOf(user1); + let user_token1_balance_before = await token1.balanceOf(user1); + let swap_token0_balance_before = await swap_BUSD_USDC.balances(0); + let swap_token1_balance_before = await swap_BUSD_USDC.balances(1); + let defaultTokenAmount = parseEther("1"); + let remove_token_amounts = [defaultTokenAmount, defaultTokenAmount]; + let liquidityAdminFee = await twoPoolInfoSC.get_remove_liquidity_imbalance_fee( + swap_BUSD_USDC.address, + remove_token_amounts + ); + let max_burn_amount = await swap_BUSD_USDC.calc_token_amount(remove_token_amounts, false); + max_burn_amount = BigNumber.from(max_burn_amount.toString()).mul(SlippageMax).div(Slippage_PRECISION); + await swap_BUSD_USDC.remove_liquidity_imbalance(remove_token_amounts, max_burn_amount, { from: user1 }); + let user_LP_balance_after = await LP_BUSD_USDC.balanceOf(user1); + let LP_totalSupply_after = await LP_BUSD_USDC.totalSupply(); + let user_token0_balance_after = await token0.balanceOf(user1); + let user_token1_balance_after = await token1.balanceOf(user1); + let swap_token0_balance_after = await swap_BUSD_USDC.balances(0); + let swap_token1_balance_after = await swap_BUSD_USDC.balances(1); + assert.equal( + defaultTokenAmount.toString(), + swap_token0_balance_before.sub(swap_token0_balance_after).sub(liquidityAdminFee[0]).toString() + ); + assert.equal( + defaultTokenAmount.toString(), + swap_token1_balance_before.sub(swap_token1_balance_after).sub(liquidityAdminFee[1]).toString() + ); + assert.equal( + LP_totalSupply_before.sub(LP_totalSupply_after).toString(), + user_LP_balance_before.sub(user_LP_balance_after).toString() + ); + assert.equal(defaultTokenAmount.toString(), user_token0_balance_after.sub(user_token0_balance_before).toString()); + assert.equal(defaultTokenAmount.toString(), user_token1_balance_after.sub(user_token1_balance_before).toString()); + //check fee , swap_token0_balance_before = swap_token0_balance_after + defaultTokenAmount + token0AdminFee + assert.equal( + swap_token0_balance_before.toString(), + BigNumber.from(swap_token0_balance_after.toString()) + .add(BigNumber.from(defaultTokenAmount.toString())) + .add(BigNumber.from(liquidityAdminFee[0].toString())) + .toString() + ); + //check fee , swap_token1_balance_before = swap_token1_balance_after + defaultTokenAmount + token1AdminFee + assert.equal( + swap_token1_balance_before.toString(), + BigNumber.from(swap_token1_balance_after.toString()) + .add(BigNumber.from(defaultTokenAmount.toString())) + .add(BigNumber.from(liquidityAdminFee[1].toString())) + .toString() + ); + }); + + it("Remove liquidity one_coin", async () => { + let defaultTokenAmount = parseEther("1"); + let user_token1_balance_before = await token1.balanceOf(user1); + let expect_Token1_amount = await swap_BUSD_USDC.calc_withdraw_one_coin(defaultTokenAmount, 1); + await swap_BUSD_USDC.remove_liquidity_one_coin(defaultTokenAmount, 1, expect_Token1_amount, { from: user1 }); + let user_token1_balance_after = await token1.balanceOf(user1); + assert(user_token1_balance_after.sub(user_token1_balance_before).toString(), expect_Token1_amount.toString()); + }); + }); + + describe("User Exchange", () => { + beforeEach(async () => { + await BUSD.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await USDC.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await swap_BUSD_USDC.add_liquidity([parseEther("100"), parseEther("100")], 0, { from: user1 }); + }); + it("Swap token0 to token1", async () => { + await token0.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user2 }); + let exchange_token0_balance = parseEther("1"); + let expect_token1_balance = await swap_BUSD_USDC.get_dy(0, 1, exchange_token0_balance); + let cal_dx_amount = await poolInfoSC.get_dx( + swap_BUSD_USDC.address, + 0, + 1, + expect_token1_balance, + parseEther("1000000000") + ); + //check get_dx + assert.equal(exchange_token0_balance.toString(), cal_dx_amount.toString()); + let exchangeFees = await twoPoolInfoSC.get_exchange_fee(swap_BUSD_USDC.address, 0, 1, exchange_token0_balance); + let user_token0_balance_before = await token0.balanceOf(user2); + let user_token1_balance_before = await token1.balanceOf(user2); + let swapContract_token1_balance_before = await token1.balanceOf(swap_BUSD_USDC.address); + let swap_token1_balance_before = await swap_BUSD_USDC.balances(1); + let token1_admin_fee_before = await swap_BUSD_USDC.admin_balances(1); + await swap_BUSD_USDC.exchange(0, 1, exchange_token0_balance, expect_token1_balance, { from: user2 }); + let user_token0_balance_after = await token0.balanceOf(user2); + let token1_admin_fee_after = await swap_BUSD_USDC.admin_balances(1); + let swapContract_token1_balance_after = await token1.balanceOf(swap_BUSD_USDC.address); + let swap_token1_balance_after = await swap_BUSD_USDC.balances(1); + let user_token1_balance_after = await token1.balanceOf(user2); + //check user token0 balance + assert.equal( + exchange_token0_balance.toString(), + user_token0_balance_before.sub(user_token0_balance_after).toString() + ); + //check exchange admmin fee + assert.equal(exchangeFees[1].toString(), token1_admin_fee_after.sub(token1_admin_fee_before).toString()); + //check get_dy + assert.equal( + user_token1_balance_after.sub(user_token1_balance_before).toString(), + expect_token1_balance.toString() + ); + //check token1 balance + assert.equal( + user_token1_balance_after.sub(user_token1_balance_before).toString(), + swap_token1_balance_before.sub(swap_token1_balance_after).sub(exchangeFees[1]).toString() + ); + assert.equal( + user_token1_balance_after.sub(user_token1_balance_before).toString(), + swapContract_token1_balance_before.sub(swapContract_token1_balance_after).toString() + ); + }); + }); + + describe("Owner operation", () => { + it("Update A", async () => { + let future_A = 300; + let now = await time.latest(); + let MIN_RAMP_TIME = await swap_BUSD_USDC.MIN_RAMP_TIME(); + let future_time = now.add(MIN_RAMP_TIME.mul(new BN(2))); + let A_before = await swap_BUSD_USDC.A(); + await swap_BUSD_USDC.ramp_A(future_A, future_time); + let A_after = await swap_BUSD_USDC.A(); + assert.equal(A_before.toString(), String(A)); + assert.equal(A_before.toString(), A_after.toString()); + let targetTime = future_time.add(new BN(2)); + await time.increaseTo(targetTime); + let A_after_future_time = await swap_BUSD_USDC.A(); + assert.equal(String(future_A), A_after_future_time.toString()); + }); + + it("Update Fee", async () => { + let new_fee = 5000000; + let new_admin_fee = 6000000000; + let now = await time.latest(); + let ADMIN_ACTIONS_DELAY = await swap_BUSD_USDC.ADMIN_ACTIONS_DELAY(); + let future_time = now.add(ADMIN_ACTIONS_DELAY); + let fee_before = await swap_BUSD_USDC.fee(); + let adminFee_before = await swap_BUSD_USDC.admin_fee(); + await swap_BUSD_USDC.commit_new_fee(new_fee, new_admin_fee); + assert.equal(fee_before.toString(), String(Fee)); + assert.equal(adminFee_before.toString(), String(AdminFee)); + let targetTime = future_time.add(new BN(2)); + await time.increaseTo(targetTime); + await swap_BUSD_USDC.apply_new_fee(); + let fee_after = await swap_BUSD_USDC.fee(); + let adminFee_after = await swap_BUSD_USDC.admin_fee(); + assert.equal(fee_after.toString(), String(new_fee)); + assert.equal(adminFee_after.toString(), String(new_admin_fee)); + }); + + it("Withdraw admin Fee", async () => { + await BUSD.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await USDC.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await BUSD.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user2 }); + await USDC.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user2 }); + await swap_BUSD_USDC.add_liquidity([parseEther("100"), parseEther("100")], 0, { from: user1 }); + await swap_BUSD_USDC.exchange(0, 1, parseEther("1"), 0, { from: user2 }); + let token0_admin_fee_before = await swap_BUSD_USDC.admin_balances(0); + let token1_admin_fee_before = await swap_BUSD_USDC.admin_balances(1); + let token0_admin_balance_before = await token0.balanceOf(admin); + let token1_admin_balance_before = await token1.balanceOf(admin); + swap_BUSD_USDC.withdraw_admin_fees({ from: admin }); + let token0_admin_fee_after = await swap_BUSD_USDC.admin_balances(0); + let token1_admin_fee_after = await swap_BUSD_USDC.admin_balances(1); + let token0_admin_balance_after = await token0.balanceOf(admin); + let token1_admin_balance_after = await token1.balanceOf(admin); + + assert.equal( + token0_admin_fee_before.sub(token0_admin_fee_after).toString(), + token0_admin_balance_after.sub(token0_admin_balance_before).toString() + ); + assert.equal( + token1_admin_fee_before.sub(token1_admin_fee_after).toString(), + token1_admin_balance_after.sub(token1_admin_balance_before).toString() + ); + }); + + it("Kill me", async () => { + await BUSD.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await USDC.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await BUSD.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user2 }); + await USDC.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user2 }); + await swap_BUSD_USDC.add_liquidity([parseEther("100"), parseEther("100")], 0, { from: user1 }); + + let is_killed_before = await swap_BUSD_USDC.is_killed(); + await swap_BUSD_USDC.kill_me(); + let is_killed_after = await swap_BUSD_USDC.is_killed(); + assert.equal(is_killed_before, false); + assert.equal(is_killed_after, true); + try { + await swap_BUSD_USDC.exchange(0, 1, parseEther("1"), 0); + expect.fail(); + } catch (e) { + expect(e.message).to.include("Killed"); + } + await swap_BUSD_USDC.unkill_me(); + is_killed_after = await swap_BUSD_USDC.is_killed(); + assert.equal(is_killed_after, false); + + let now = await time.latest(); + let KILL_DEADLINE_DT = await swap_BUSD_USDC.KILL_DEADLINE_DT(); + let targetTime = now.add(KILL_DEADLINE_DT).add(new BN(1)); + await time.increaseTo(targetTime); + try { + await swap_BUSD_USDC.kill_me(); + expect.fail(); + } catch (e) { + expect(e.message).to.include("Exceeded deadline"); + } + }); + }); + + describe("Add pair info", () => { + let factory2, token0, token1, token2; + beforeEach(async () => { + let LPFactory2 = await PancakeStableSwapLPFactory.new({ from: admin }); + let swapDeployer2 = await PancakeStableSwapTwoPoolDeployer.new({ from: admin }); + let swapTriplePoolDeployer2 = await PancakeStableSwapThreePoolDeployer.new({ from: admin }); + factory2 = await Factory.new(LPFactory2.address, swapDeployer2.address, swapTriplePoolDeployer2.address, { + from: admin, + }); + await LPFactory2.transferOwnership(factory2.address, { from: admin }); + await swapDeployer2.transferOwnership(factory2.address, { from: admin }); + await swapTriplePoolDeployer2.transferOwnership(factory2.address, { from: admin }); + }); + it("addPairInfo", async () => { + await factory2.addPairInfo(swap_BUSD_USDC.address, { from: admin }); + let pair_info = await factory2.getPairInfo(BUSD.address, USDC.address); + assert.equal(swap_BUSD_USDC.address, pair_info.swapContract); + assert.equal(LP_BUSD_USDC.address, pair_info.LPContract); + }); + it("addTriplePoolPairInfo", async () => { + token0 = await Token.new("test Token", "TEST", 18, { from: admin }); + token1 = await Token.new("test Token", "TEST", 18, { from: admin }); + token2 = await Token.new("test Token", "TEST", 18, { from: admin }); + //create triple pool + await factory.createThreePoolPair(token0.address, token1.address, token2.address, A, Fee, AdminFee, { + from: admin, + }); + let info_triple_pool = await factory.getThreePoolPairInfo(token0.address, token1.address); + let swap_triple_pool = await StableSwapTwoPool.at(info_triple_pool.swapContract); + let LP_triple_pool = await LPToken.at(info_triple_pool.LPContract); + + await factory2.addPairInfo(swap_triple_pool.address, { from: admin }); + let pair_info = await factory2.getThreePoolPairInfo(token0.address, token1.address); + assert.equal(swap_triple_pool.address, pair_info.swapContract); + assert.equal(LP_triple_pool.address, pair_info.LPContract); + }); + }); + + describe("The effect of Amplification on swapping", () => { + let swap_BUSD_USDC_2, LP_BUSD_USDC_2, token0_2, token1_2, BUSD_2, USDC_2; + let A2 = 300; + beforeEach(async () => { + BUSD_2 = await Token.new("Binance USD", "BUSD", 18, { from: admin }); + USDC_2 = await Token.new("USD Coin", "USDC", 18, { from: admin }); + let tx = await factory.createSwapPair(BUSD_2.address, USDC_2.address, A2, Fee, AdminFee, { from: admin }); + let info = await factory.getPairInfo(BUSD_2.address, USDC_2.address); + swap_BUSD_USDC_2 = await StableSwapTwoPool.at(info.swapContract); + LP_BUSD_USDC_2 = await LPToken.at(info.LPContract); + token0_2 = await Token.at(info.token0); + token1_2 = await Token.at(info.token1); + + await token0.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await token1.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user1 }); + await token0.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user2 }); + await token1.approve(swap_BUSD_USDC.address, parseEther("1000000000"), { from: user2 }); + + await token0_2.mint(user3, parseEther("10000"), { from: user3 }); + await token1_2.mint(user3, parseEther("10000"), { from: user3 }); + await token0_2.mint(user4, parseEther("10000"), { from: user4 }); + await token1_2.mint(user4, parseEther("10000"), { from: user4 }); + + await token0_2.approve(swap_BUSD_USDC_2.address, parseEther("1000000000"), { from: user3 }); + await token1_2.approve(swap_BUSD_USDC_2.address, parseEther("1000000000"), { from: user3 }); + await token0_2.approve(swap_BUSD_USDC_2.address, parseEther("1000000000"), { from: user4 }); + await token1_2.approve(swap_BUSD_USDC_2.address, parseEther("1000000000"), { from: user4 }); + }); + it("Token0:Token1 = 1:1, A1:A2 = 1000:300", async () => { + await swap_BUSD_USDC.add_liquidity([parseEther("100"), parseEther("100")], 0, { from: user1 }); + await swap_BUSD_USDC_2.add_liquidity([parseEther("100"), parseEther("100")], 0, { from: user3 }); + let Swap_Token1_Amount = parseEther("1"); + let expect_token1_balance_swap1 = await swap_BUSD_USDC.get_dy(0, 1, Swap_Token1_Amount); + let expect_token1_balance_swap2 = await swap_BUSD_USDC_2.get_dy(0, 1, Swap_Token1_Amount); + console.log("A 1000,will get " + expect_token1_balance_swap1.toString()); + console.log("A 300, will get " + expect_token1_balance_swap2.toString()); + }); + + it("Token0:Token1 = 1:1,A1:A2 = 1000:3000", async () => { + let future_A = 3000; + let now = await time.latest(); + let MIN_RAMP_TIME = await swap_BUSD_USDC_2.MIN_RAMP_TIME(); + let future_time = now.add(MIN_RAMP_TIME).add(new BN(1)); + await swap_BUSD_USDC_2.ramp_A(future_A, future_time); + let targetTime = future_time.add(new BN(1)); + await time.increaseTo(targetTime); + + await swap_BUSD_USDC.add_liquidity([parseEther("100"), parseEther("100")], 0, { from: user1 }); + await swap_BUSD_USDC_2.add_liquidity([parseEther("100"), parseEther("100")], 0, { from: user3 }); + let Swap_Token1_Amount = parseEther("1"); + let expect_token1_balance_swap1 = await swap_BUSD_USDC.get_dy(0, 1, Swap_Token1_Amount); + let expect_token1_balance_swap2 = await swap_BUSD_USDC_2.get_dy(0, 1, Swap_Token1_Amount); + console.log("A 1000,will get " + expect_token1_balance_swap1.toString()); + console.log("A 3000, will get " + expect_token1_balance_swap2.toString()); + }); + it("Token0:Token1 = 2:1, A1:A2 = 1000:300", async () => { + await swap_BUSD_USDC.add_liquidity([parseEther("100"), parseEther("50")], 0, { from: user1 }); + await swap_BUSD_USDC_2.add_liquidity([parseEther("100"), parseEther("50")], 0, { from: user3 }); + let Swap_Token1_Amount = parseEther("1"); + let expect_token1_balance_swap1 = await swap_BUSD_USDC.get_dy(0, 1, Swap_Token1_Amount); + let expect_token1_balance_swap2 = await swap_BUSD_USDC_2.get_dy(0, 1, Swap_Token1_Amount); + console.log("A 1000,will get " + expect_token1_balance_swap1.toString()); + console.log("A 300, will get " + expect_token1_balance_swap2.toString()); + }); + + it("Token0:Token1 = 1:2,A1:A2 = 1000:300", async () => { + await swap_BUSD_USDC.add_liquidity([parseEther("50"), parseEther("100")], 0, { from: user1 }); + await swap_BUSD_USDC_2.add_liquidity([parseEther("50"), parseEther("100")], 0, { from: user3 }); + let Swap_Token1_Amount = parseEther("1"); + let expect_token1_balance_swap1 = await swap_BUSD_USDC.get_dy(0, 1, Swap_Token1_Amount); + let expect_token1_balance_swap2 = await swap_BUSD_USDC_2.get_dy(0, 1, Swap_Token1_Amount); + console.log("A 1000,will get " + expect_token1_balance_swap1.toString()); + console.log("A 300, will get " + expect_token1_balance_swap2.toString()); + }); + }); +}); diff --git a/projects/stable-swap/test/PancakeStableSwapWithBNB.test.ts b/projects/stable-swap/test/PancakeStableSwapWithBNB.test.ts new file mode 100644 index 00000000..f4ecd90d --- /dev/null +++ b/projects/stable-swap/test/PancakeStableSwapWithBNB.test.ts @@ -0,0 +1,521 @@ +import { ether, time, constants, BN, expectRevert, expectEvent, balance } from "@openzeppelin/test-helpers"; +import { artifacts, contract, ethers } from "hardhat"; +import { parseEther } from "ethers/lib/utils"; +import { BigNumber } from "ethers"; +import { assert, expect } from "chai"; + +const Factory = artifacts.require("PancakeStableSwapFactory"); +const PancakeStableSwapTwoPool = artifacts.require("PancakeStableSwapTwoPool"); +const LPToken = artifacts.require("PancakeStableSwapLP"); +const Token = artifacts.require("./test/Token.sol"); +const PancakeStableSwapInfo = artifacts.require("./utils/PancakeStableSwapInfo.sol"); +const PancakeStableSwapTwoPoolInfo = artifacts.require("./utils/PancakeStableSwapTwoPoolInfo.sol"); +const PancakeStableSwapThreePoolInfo = artifacts.require("./utils/PancakeStableSwapThreePoolInfo.sol"); +const PancakeStableSwapLPFactory = artifacts.require("PancakeStableSwapLPFactory.sol"); +const PancakeStableSwapTwoPoolDeployer = artifacts.require("PancakeStableSwapTwoPoolDeployer.sol"); +const PancakeStableSwapThreePoolDeployer = artifacts.require("PancakeStableSwapThreePoolDeployer.sol"); + +contract("PancakeStableSwapTwoPool", ([admin, user1, user2]) => { + let factory, + swapDeployer, + swapTriplePoolDeployer, + LPFactory, + WBNB, + swap_BNB_WBNB, + LP_BNB_WBNB, + BNB_index, + threePoolInfoSC, + twoPoolInfoSC, + poolInfoSC; + const BNBAddress = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; + const A = 1000; + const Fee = 4000000; + const AdminFee = 5000000000; + const Slippage = BigNumber.from(99); //0.99 + const SlippageMax = BigNumber.from(10100); //1.01 + const Slippage_PRECISION = BigNumber.from(10000); + const GasPriceDefault = ether("0.000000001"); // 1 gwei + + beforeEach(async () => { + LPFactory = await PancakeStableSwapLPFactory.new({ from: admin }); + swapDeployer = await PancakeStableSwapTwoPoolDeployer.new({ from: admin }); + swapTriplePoolDeployer = await PancakeStableSwapThreePoolDeployer.new({ from: admin }); + factory = await Factory.new(LPFactory.address, swapDeployer.address, swapTriplePoolDeployer.address, { + from: admin, + }); + await LPFactory.transferOwnership(factory.address, { from: admin }); + await swapDeployer.transferOwnership(factory.address, { from: admin }); + await swapTriplePoolDeployer.transferOwnership(factory.address, { from: admin }); + WBNB = await Token.new("Wrapped BNB", "WBNB", 18, { from: admin }); + await WBNB.mint(user1, parseEther("10000"), { from: user1 }); + await WBNB.mint(user2, parseEther("10000"), { from: user2 }); + let tx = await factory.createSwapPair(WBNB.address, BNBAddress, A, Fee, AdminFee, { from: admin }); + let info = await factory.getPairInfo(WBNB.address, BNBAddress); + swap_BNB_WBNB = await PancakeStableSwapTwoPool.at(info.swapContract); + LP_BNB_WBNB = await LPToken.at(info.LPContract); + if (info.token0 == BNBAddress) { + BNB_index = 0; + } else { + BNB_index = 1; + } + threePoolInfoSC = await PancakeStableSwapThreePoolInfo.new({ from: admin }); + twoPoolInfoSC = await PancakeStableSwapTwoPoolInfo.new({ from: admin }); + poolInfoSC = await PancakeStableSwapInfo.new(twoPoolInfoSC.address, threePoolInfoSC.address, { from: admin }); + }); + + describe("Stable Swap Pair Info With BNB", () => { + it("Check pair info between factory and swap smart contract", async () => { + let info = await factory.getPairInfo(WBNB.address, BNBAddress); + assert.equal(info.swapContract, swap_BNB_WBNB.address); + let token0 = await swap_BNB_WBNB.coins(0); + let token1 = await swap_BNB_WBNB.coins(1); + let LPToken = await swap_BNB_WBNB.token(); + assert.equal(info.token0, token0); + assert.equal(info.token1, token1); + assert.equal(info.LPContract, LPToken); + }); + }); + + describe("User Add Liquidity with BNB", () => { + it("Initialize liquidity", async () => { + await WBNB.approve(swap_BNB_WBNB.address, parseEther("1000000000"), { from: user1 }); + + if (BNB_index == 0) { + await expectRevert( + swap_BNB_WBNB.add_liquidity([0, parseEther("1")], 0, { from: user1 }), + "Initial deposit requires all coins" + ); + await expectRevert( + swap_BNB_WBNB.add_liquidity([parseEther("1"), 0], 0, { from: user1, value: ether("1") }), + "Initial deposit requires all coins" + ); + + await expectRevert( + swap_BNB_WBNB.add_liquidity([parseEther("1"), parseEther("1")], 0, { from: user1, value: ether("0") }), + "Inconsistent quantity" + ); + + await expectRevert( + swap_BNB_WBNB.add_liquidity([parseEther("1"), parseEther("1")], 0, { from: user1, value: ether("0.99") }), + "Inconsistent quantity" + ); + + await expectRevert( + swap_BNB_WBNB.add_liquidity([parseEther("1"), parseEther("1")], 0, { from: user1, value: ether("1.01") }), + "Inconsistent quantity" + ); + } else { + await expectRevert( + swap_BNB_WBNB.add_liquidity([0, parseEther("1")], 0, { from: user1, value: ether("1") }), + "Initial deposit requires all coins" + ); + await expectRevert( + swap_BNB_WBNB.add_liquidity([parseEther("1"), 0], 0, { from: user1 }), + "Initial deposit requires all coins" + ); + } + + await expectRevert( + swap_BNB_WBNB.add_liquidity([parseEther("1"), parseEther("1")], parseEther("2.1"), { + from: user1, + value: ether("1"), + }), + "Slippage screwed you" + ); + const expect_LP_balance = parseEther("200"); + let tx = await swap_BNB_WBNB.add_liquidity([parseEther("100"), parseEther("100")], expect_LP_balance, { + from: user1, + value: ether("100"), + }); + let LP_balance = await LP_BNB_WBNB.balanceOf(user1); + let LP_totalSupply = await LP_BNB_WBNB.totalSupply(); + assert.equal(expect_LP_balance.toString(), LP_balance.toString()); + assert.equal(LP_totalSupply.toString(), LP_balance.toString()); + }); + + it("Add one coin into liquidity with BNB ", async () => { + await WBNB.approve(swap_BNB_WBNB.address, parseEther("1000000000"), { from: user1 }); + await WBNB.approve(swap_BNB_WBNB.address, parseEther("1000000000"), { from: user2 }); + + await swap_BNB_WBNB.add_liquidity([parseEther("100"), parseEther("100")], 0, { + from: user1, + value: ether("100"), + }); + + let expect_LP_balance0 = await twoPoolInfoSC.get_add_liquidity_mint_amount(swap_BNB_WBNB.address, [ + parseEther("1"), + 0, + ]); + + let token0_balance_before = await swap_BNB_WBNB.balances(0); + let token1_balance_before = await swap_BNB_WBNB.balances(1); + let defaultToken0Amount = parseEther("1"); + let liquidityAdminFee = await twoPoolInfoSC.get_add_liquidity_fee(swap_BNB_WBNB.address, [ + defaultToken0Amount, + 0, + ]); + if (BNB_index == 0) { + await swap_BNB_WBNB.add_liquidity([defaultToken0Amount, 0], expect_LP_balance0, { + from: user2, + value: ether("1"), + }); + } else { + await swap_BNB_WBNB.add_liquidity([defaultToken0Amount, 0], expect_LP_balance0, { + from: user2, + value: ether("0"), + }); + } + let token0_balance_after = await swap_BNB_WBNB.balances(0); + let token1_balance_after = await swap_BNB_WBNB.balances(1); + let realAddToken0 = token0_balance_after.sub(token0_balance_before); + let realLiquidityToken0AdminFee = BigNumber.from(defaultToken0Amount.toString()).sub( + BigNumber.from(realAddToken0.toString()) + ); + let realLiquidityToken1AdminFee = token1_balance_before.sub(token1_balance_after); + // check admin fee + assert.equal(realLiquidityToken0AdminFee.toString(), liquidityAdminFee[0].toString()); + assert.equal(realLiquidityToken1AdminFee.toString(), liquidityAdminFee[1].toString()); + let LP_balance0 = await LP_BNB_WBNB.balanceOf(user2); + assert.equal(true, LP_balance0.eq(expect_LP_balance0)); + + let expect_LP_balance1 = await swap_BNB_WBNB.calc_token_amount([0, defaultToken0Amount], true); + expect_LP_balance1 = BigNumber.from(expect_LP_balance1.toString()).mul(Slippage).div(Slippage_PRECISION); + if (BNB_index == 0) { + await swap_BNB_WBNB.add_liquidity([0, defaultToken0Amount], expect_LP_balance1, { + from: user2, + value: ether("0"), + }); + } else { + await swap_BNB_WBNB.add_liquidity([0, defaultToken0Amount], expect_LP_balance1, { + from: user2, + value: ether("1"), + }); + } + let LP_balance1 = await LP_BNB_WBNB.balanceOf(user2); + assert.equal(true, LP_balance1.gt(expect_LP_balance1)); + }); + }); + + describe("User Remove Liquidity with BNB", () => { + beforeEach(async () => { + await WBNB.approve(swap_BNB_WBNB.address, parseEther("1000000000"), { from: user1 }); + await swap_BNB_WBNB.add_liquidity([parseEther("100"), parseEther("100")], 0, { + from: user1, + value: ether("100"), + }); + }); + it("Remove liquidity with BNB", async () => { + let LP_balance_before = await LP_BNB_WBNB.balanceOf(user1); + let wbnb_balance_before = await WBNB.balanceOf(user1); + let bnb_balance_before = await balance.current(user1); + let remove_LP_balance = parseEther("1"); + let expectCoins = await twoPoolInfoSC.calc_coins_amount(swap_BNB_WBNB.address, remove_LP_balance); + let tx = await swap_BNB_WBNB.remove_liquidity(remove_LP_balance, [0, 0], { + from: user1, + gasPrice: GasPriceDefault, + }); + let gasUsed = new BN(tx.receipt.gasUsed.toString()).mul(GasPriceDefault); + let LP_balance_after = await LP_BNB_WBNB.balanceOf(user1); + let wbnb_balance_after = await WBNB.balanceOf(user1); + let bnb_balance_after = await balance.current(user1); + //check lp balance + assert.equal(LP_balance_before.sub(LP_balance_after).toString(), remove_LP_balance.toString()); + //check check token0 balance + assert.equal(wbnb_balance_after.sub(wbnb_balance_before).toString(), expectCoins[0].toString()); + //check check token1 balance + assert.equal(bnb_balance_after.sub(bnb_balance_before).toString(), expectCoins[1].sub(gasUsed).toString()); + }); + + it("Remove liquidity imbalance with BNB", async () => { + let user_LP_balance_before = await LP_BNB_WBNB.balanceOf(user1); + let LP_totalSupply_before = await LP_BNB_WBNB.totalSupply(); + let user_wbnb_balance_before = await WBNB.balanceOf(user1); + let user_bnb_balance_before = await balance.current(user1); + let swap_wbnb_balance_before; + let swap_bnb_balance_before; + if (BNB_index == 0) { + swap_wbnb_balance_before = await swap_BNB_WBNB.balances(1); + swap_bnb_balance_before = await swap_BNB_WBNB.balances(0); + } else { + swap_wbnb_balance_before = await swap_BNB_WBNB.balances(0); + swap_bnb_balance_before = await swap_BNB_WBNB.balances(1); + } + let defaultTokenAmount = parseEther("1"); + let remove_token_amounts = [defaultTokenAmount, defaultTokenAmount]; + let liquidityAdminFee = await twoPoolInfoSC.get_remove_liquidity_imbalance_fee( + swap_BNB_WBNB.address, + remove_token_amounts + ); + let max_burn_amount = await swap_BNB_WBNB.calc_token_amount(remove_token_amounts, false); + max_burn_amount = BigNumber.from(max_burn_amount.toString()).mul(SlippageMax).div(Slippage_PRECISION); + let tx = await swap_BNB_WBNB.remove_liquidity_imbalance(remove_token_amounts, max_burn_amount, { + from: user1, + gasPrice: GasPriceDefault, + }); + let gasUsed = new BN(tx.receipt.gasUsed.toString()).mul(GasPriceDefault); + let user_LP_balance_after = await LP_BNB_WBNB.balanceOf(user1); + let LP_totalSupply_after = await LP_BNB_WBNB.totalSupply(); + let user_wbnb_balance_after = await WBNB.balanceOf(user1); + let user_bnb_balance_after = await balance.current(user1); + let swap_wbnb_balance_after; + let swap_bnb_balance_after; + if (BNB_index == 0) { + swap_wbnb_balance_after = await swap_BNB_WBNB.balances(1); + swap_bnb_balance_after = await swap_BNB_WBNB.balances(0); + } else { + swap_wbnb_balance_after = await swap_BNB_WBNB.balances(0); + swap_bnb_balance_after = await swap_BNB_WBNB.balances(1); + } + assert.equal( + defaultTokenAmount.toString(), + swap_wbnb_balance_before.sub(swap_wbnb_balance_after).sub(liquidityAdminFee[0]).toString() + ); + assert.equal( + defaultTokenAmount.toString(), + swap_bnb_balance_before.sub(swap_bnb_balance_after).sub(liquidityAdminFee[1]).toString() + ); + assert.equal( + LP_totalSupply_before.sub(LP_totalSupply_after).toString(), + user_LP_balance_before.sub(user_LP_balance_after).toString() + ); + assert.equal(defaultTokenAmount.toString(), user_wbnb_balance_after.sub(user_wbnb_balance_before).toString()); + assert.equal( + defaultTokenAmount.toString(), + user_bnb_balance_after.sub(user_bnb_balance_before).add(gasUsed).toString() + ); + //check fee , swap_token0_balance_before = swap_token0_balance_after + defaultTokenAmount + token0AdminFee + assert.equal( + swap_wbnb_balance_before.toString(), + BigNumber.from(swap_wbnb_balance_after.toString()) + .add(BigNumber.from(defaultTokenAmount.toString())) + .add(BigNumber.from(liquidityAdminFee[0].toString())) + .toString() + ); + //check fee , swap_token1_balance_before = swap_token1_balance_after + defaultTokenAmount + token1AdminFee + assert.equal( + swap_bnb_balance_before.toString(), + BigNumber.from(swap_bnb_balance_after.toString()) + .add(BigNumber.from(defaultTokenAmount.toString())) + .add(BigNumber.from(liquidityAdminFee[1].toString())) + .toString() + ); + }); + + it("Remove liquidity one_coin with BNB", async () => { + let defaultTokenAmount = parseEther("1"); + let user_token1_balance_before = await balance.current(user1); + let expect_Token1_amount = await swap_BNB_WBNB.calc_withdraw_one_coin(defaultTokenAmount, 1); + let tx; + if (BNB_index == 0) { + tx = await swap_BNB_WBNB.remove_liquidity_one_coin(defaultTokenAmount, 0, expect_Token1_amount, { + from: user1, + gasPrice: GasPriceDefault, + }); + } else { + tx = await swap_BNB_WBNB.remove_liquidity_one_coin(defaultTokenAmount, 1, expect_Token1_amount, { + from: user1, + gasPrice: GasPriceDefault, + }); + } + let gasUsed = new BN(tx.receipt.gasUsed.toString()).mul(GasPriceDefault); + let user_token1_balance_after = await balance.current(user1); + assert( + user_token1_balance_after.sub(user_token1_balance_before).add(gasUsed).toString(), + expect_Token1_amount.toString() + ); + }); + }); + + describe("User Exchange with BNB", () => { + beforeEach(async () => { + await WBNB.approve(swap_BNB_WBNB.address, parseEther("1000000000"), { from: user1 }); + await swap_BNB_WBNB.add_liquidity([parseEther("100"), parseEther("100")], 0, { + from: user1, + value: ether("100"), + }); + }); + it("Swap wbnb to bnb", async () => { + await WBNB.approve(swap_BNB_WBNB.address, parseEther("1000000000"), { from: user2 }); + let exchange_wbnb_balance = parseEther("1"); + let expect_bnb_balance; + let exchangeFees; + if (BNB_index == 0) { + expect_bnb_balance = await swap_BNB_WBNB.get_dy(1, 0, exchange_wbnb_balance); + exchangeFees = await twoPoolInfoSC.get_exchange_fee(swap_BNB_WBNB.address, 1, 0, exchange_wbnb_balance); + } else { + expect_bnb_balance = await swap_BNB_WBNB.get_dy(0, 1, exchange_wbnb_balance); + exchangeFees = await twoPoolInfoSC.get_exchange_fee(swap_BNB_WBNB.address, 0, 1, exchange_wbnb_balance); + } + + let user_wbnb_balance_before; + let user_bnb_balance_before; + user_wbnb_balance_before = await WBNB.balanceOf(user2); + user_bnb_balance_before = await balance.current(user2); + + let swapContract_bnb_balance_before = await balance.current(swap_BNB_WBNB.address); + + let swap_bnb_balance_before; + if (BNB_index == 0) { + swap_bnb_balance_before = await swap_BNB_WBNB.balances(0); + } else { + swap_bnb_balance_before = await swap_BNB_WBNB.balances(1); + } + + let bnb_admin_fee_before; + if (BNB_index == 0) { + bnb_admin_fee_before = await swap_BNB_WBNB.admin_balances(0); + } else { + bnb_admin_fee_before = await swap_BNB_WBNB.admin_balances(1); + } + let tx; + if (BNB_index == 0) { + tx = await swap_BNB_WBNB.exchange(1, 0, exchange_wbnb_balance, expect_bnb_balance, { + from: user2, + gasPrice: GasPriceDefault, + }); + } else { + tx = await swap_BNB_WBNB.exchange(0, 1, exchange_wbnb_balance, expect_bnb_balance, { + from: user2, + gasPrice: GasPriceDefault, + }); + } + let gasUsed = new BN(tx.receipt.gasUsed.toString()).mul(GasPriceDefault); + + let bnb_admin_fee_after; + if (BNB_index == 0) { + bnb_admin_fee_after = await swap_BNB_WBNB.admin_balances(0); + } else { + bnb_admin_fee_after = await swap_BNB_WBNB.admin_balances(1); + } + + let swapContract_bnb_balance_after = await balance.current(swap_BNB_WBNB.address); + + let swap_bnb_balance_after; + if (BNB_index == 0) { + swap_bnb_balance_after = await swap_BNB_WBNB.balances(0); + } else { + swap_bnb_balance_after = await swap_BNB_WBNB.balances(1); + } + let user_wbnb_balance_after; + let user_bnb_balance_after; + user_wbnb_balance_after = await WBNB.balanceOf(user2); + user_bnb_balance_after = await balance.current(user2); + //check user wbnb balance + assert.equal(exchange_wbnb_balance.toString(), user_wbnb_balance_before.sub(user_wbnb_balance_after).toString()); + //check exchange admmin fee + assert.equal(exchangeFees[1].toString(), bnb_admin_fee_after.sub(bnb_admin_fee_before).toString()); + //check get_dy + assert.equal( + user_bnb_balance_after.sub(user_bnb_balance_before).add(gasUsed).toString(), + expect_bnb_balance.toString() + ); + //check bnb balance + assert.equal( + user_bnb_balance_after.sub(user_bnb_balance_before).add(gasUsed).toString(), + swap_bnb_balance_before.sub(swap_bnb_balance_after).sub(exchangeFees[1]).toString() + ); + assert.equal( + user_bnb_balance_after.sub(user_bnb_balance_before).add(gasUsed).toString(), + swapContract_bnb_balance_before.sub(swapContract_bnb_balance_after).toString() + ); + }); + + it("Swap bnb to wbnb", async () => { + let exchange_bnb_balance = parseEther("1"); + let expect_wbnb_balance; + let exchangeFees; + if (BNB_index == 0) { + expect_wbnb_balance = await swap_BNB_WBNB.get_dy(0, 1, exchange_bnb_balance); + exchangeFees = await twoPoolInfoSC.get_exchange_fee(swap_BNB_WBNB.address, 0, 1, exchange_bnb_balance); + } else { + expect_wbnb_balance = await swap_BNB_WBNB.get_dy(1, 0, exchange_bnb_balance); + exchangeFees = await twoPoolInfoSC.get_exchange_fee(swap_BNB_WBNB.address, 1, 0, exchange_bnb_balance); + } + + let user_wbnb_balance_before; + let user_bnb_balance_before; + user_wbnb_balance_before = await WBNB.balanceOf(user2); + user_bnb_balance_before = await balance.current(user2); + + let swapContract_bnb_balance_before = await balance.current(swap_BNB_WBNB.address); + + let swap_wbnb_balance_before; + let swap_bnb_balance_before; + if (BNB_index == 0) { + swap_wbnb_balance_before = await swap_BNB_WBNB.balances(1); + swap_bnb_balance_before = await swap_BNB_WBNB.balances(0); + } else { + swap_wbnb_balance_before = await swap_BNB_WBNB.balances(0); + swap_bnb_balance_before = await swap_BNB_WBNB.balances(1); + } + + assert.equal(swapContract_bnb_balance_before.toString(), swap_bnb_balance_before.toString()); + + let wbnb_admin_fee_before; + if (BNB_index == 0) { + wbnb_admin_fee_before = await swap_BNB_WBNB.admin_balances(1); + } else { + wbnb_admin_fee_before = await swap_BNB_WBNB.admin_balances(0); + } + let tx; + if (BNB_index == 0) { + tx = await swap_BNB_WBNB.exchange(0, 1, exchange_bnb_balance, expect_wbnb_balance, { + from: user2, + gasPrice: GasPriceDefault, + value: exchange_bnb_balance, + }); + } else { + tx = await swap_BNB_WBNB.exchange(1, 0, exchange_bnb_balance, expect_wbnb_balance, { + from: user2, + gasPrice: GasPriceDefault, + value: exchange_bnb_balance, + }); + } + let gasUsed = new BN(tx.receipt.gasUsed.toString()).mul(GasPriceDefault); + + let wbnb_admin_fee_after; + if (BNB_index == 0) { + wbnb_admin_fee_after = await swap_BNB_WBNB.admin_balances(1); + } else { + wbnb_admin_fee_after = await swap_BNB_WBNB.admin_balances(0); + } + + let swapContract_bnb_balance_after = await balance.current(swap_BNB_WBNB.address); + + let swap_wbnb_balance_after; + let swap_bnb_balance_after; + if (BNB_index == 0) { + swap_wbnb_balance_after = await swap_BNB_WBNB.balances(1); + swap_bnb_balance_after = await swap_BNB_WBNB.balances(0); + } else { + swap_wbnb_balance_after = await swap_BNB_WBNB.balances(0); + swap_bnb_balance_after = await swap_BNB_WBNB.balances(1); + } + + assert.equal(swapContract_bnb_balance_after.toString(), swap_bnb_balance_after.toString()); + + let user_wbnb_balance_after; + let user_bnb_balance_after; + user_wbnb_balance_after = await WBNB.balanceOf(user2); + user_bnb_balance_after = await balance.current(user2); + //check user bnb balance + assert.equal( + exchange_bnb_balance.toString(), + user_bnb_balance_before.sub(user_bnb_balance_after).sub(gasUsed).toString() + ); + //check exchange admmin fee + assert.equal(exchangeFees[1].toString(), wbnb_admin_fee_after.sub(wbnb_admin_fee_before).toString()); + //check get_dy + assert.equal(user_wbnb_balance_after.sub(user_wbnb_balance_before).toString(), expect_wbnb_balance.toString()); + //check wbnb balance + assert.equal( + user_wbnb_balance_after.sub(user_wbnb_balance_before).toString(), + swap_wbnb_balance_before.sub(swap_wbnb_balance_after).sub(exchangeFees[1]).toString() + ); + assert.equal( + user_bnb_balance_after.sub(user_bnb_balance_before).add(gasUsed).toString(), + swapContract_bnb_balance_before.sub(swapContract_bnb_balance_after).toString() + ); + }); + }); +}); diff --git a/projects/vecake-farm-booster/v3/README.md b/projects/vecake-farm-booster/v3/README.md new file mode 100644 index 00000000..9cd6471b --- /dev/null +++ b/projects/vecake-farm-booster/v3/README.md @@ -0,0 +1 @@ +## MasterChef V3 FarmBooster For VECake \ No newline at end of file diff --git a/projects/vecake-farm-booster/v3/config.ts b/projects/vecake-farm-booster/v3/config.ts new file mode 100644 index 00000000..440afdd7 --- /dev/null +++ b/projects/vecake-farm-booster/v3/config.ts @@ -0,0 +1,22 @@ +export default { + Farm_Booster: { + mainnet: "0x625F45234D6335859a8b940960067E89476300c6", + testnet: "0xF93efC15142d05381b017ca64b80074ccF4d1aCB", + }, + MasterChefV3: { + mainnet: "0x556B9306565093C855AEA9AE92A594704c2Cd59e", + testnet: "0x4c650FB471fe4e0f476fD3437C3411B1122c4e3B", + }, + VECake: { + mainnet: "0x5692DB8177a81A6c6afc8084C2976C9933EC1bAB", + testnet: "0x4879fcB447E7F4c7843A6D15dF5526061304dcFb", + }, + CA: { + mainnet: 50000, + testnet: 50000, + }, + CB: { + mainnet: 100000, + testnet: 100000, + }, +}; diff --git a/projects/vecake-farm-booster/v3/contracts/FarmBooster.sol b/projects/vecake-farm-booster/v3/contracts/FarmBooster.sol new file mode 100644 index 00000000..333164e1 --- /dev/null +++ b/projects/vecake-farm-booster/v3/contracts/FarmBooster.sol @@ -0,0 +1,454 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/IERC20.sol"; +import "./libraries/IterateMapping.sol"; +import "./interfaces/IVECake.sol"; +import "./interfaces/IMasterChefV3.sol"; +import "./interfaces/IPancakeV3Pool.sol"; +import "./interfaces/INonfungiblePositionManager.sol"; +import "./interfaces/IPancakeV3Factory.sol"; + +contract FarmBooster is Ownable { + using IterableMapping for ItMap; + + /// @notice VECake. + address public immutable VECake; + /// @notice VECake caller, this smart contract will trigger depositFor and unlock. + address public VECakeCaller; + /// @notice MasterChef V3 contract. + IMasterChefV3 public immutable MASTER_CHEF_V3; + + /// @notice NonfungiblePositionManager contract. + INonfungiblePositionManager public immutable NonfungiblePositionManager; + + /// @notice PancakeV3Factory contract. + IPancakeV3Factory public immutable PancakeV3Factory; + + /// @notice Record user token position liquidity + /// @dev Only record the positions which have updated after fram booster set in MasterChef V3. + mapping(address => mapping(uint256 => uint256)) public userPositionLiquidity; + + /// @notice Record user total liquidity in MasterChef V3 pool + mapping(address => mapping(uint256 => uint256)) public userPoolTotalLiquidity; + + /// @notice limit max boost + uint256 public cA; + /// @notice include 1e4 + uint256 public constant MIN_CA = 1e4; + /// @notice include 1e5 + uint256 public constant MAX_CA = 1e5; + /// @notice cA precision + uint256 public constant CA_PRECISION = 1e5; + /// @notice controls difficulties + uint256 public cB; + /// @notice not include 0 + uint256 public constant MIN_CB = 0; + /// @notice include 50 + uint256 public constant MAX_CB = 1e8; + /// @notice cB precision + uint256 public constant CB_PRECISION = 1e4; + /// @notice MCV3 basic boost factor, none boosted user"s boost factor + uint256 public constant BOOST_PRECISION = 100 * 1e10; + /// @notice MCV3 Hard limit for maximum boost factor + uint256 public constant MAX_BOOST_PRECISION = 200 * 1e10; + + /// @notice Override global cB for special pool pid. + mapping(uint256 => uint256) public cBOverride; + + /// @notice The whitelist of pools allowed for farm boosting. + mapping(uint256 => bool) public whiteList; + + /// @notice Record whether the farm booster has been turned on, in order to save gas. + mapping(uint256 => bool) public everBoosted; + + /// @notice Info of each pool user. + mapping(address => ItMap) public userInfo; + + event UpdateCA(uint256 oldCA, uint256 newCA); + event UpdateCB(uint256 oldCB, uint256 newCB); + event UpdateCBOverride(uint256 pid, uint256 oldCB, uint256 newCB); + event UpdateBoostFarms(uint256 pid, bool status); + event UpdatePoolBoostMultiplier( + address indexed user, + uint256 indexed pid, + uint256 indexed tokenId, + uint256 oldMultiplier, + uint256 newMultiplier + ); + event UpdateVECakeCaller(address VECakeCaller); + + /// @param _VECake VECake contract address. + /// @param _v3 MasterChefV3 contract address. + /// @param _cA Limit max boost. + /// @param _cB Controls difficulties. + constructor( + address _VECake, + IMasterChefV3 _v3, + uint256 _cA, + uint256 _cB + ) { + require(_cA >= MIN_CA && _cA <= MAX_CA && _cB > MIN_CB && _cB <= MAX_CB, "Invalid parameter"); + VECake = _VECake; + MASTER_CHEF_V3 = _v3; + cA = _cA; + cB = _cB; + + NonfungiblePositionManager = INonfungiblePositionManager(MASTER_CHEF_V3.nonfungiblePositionManager()); + + PancakeV3Factory = IPancakeV3Factory(NonfungiblePositionManager.factory()); + } + + /// @notice Checks if the msg.sender is the MasterChef V3. + modifier onlyMasterChefV3() { + require(msg.sender == address(MASTER_CHEF_V3), "Not MasterChef V3"); + _; + } + + /// @notice Checks if the msg.sender is the vecake caller. + modifier onlyVECakeCaller() { + require(msg.sender == VECakeCaller, "Not vecake caller"); + _; + } + + /// @notice set VECake caller. + /// @param _VECakeCaller VECake caller. + function setVECakeCaller(address _VECakeCaller) external onlyOwner { + VECakeCaller = _VECakeCaller; + emit UpdateVECakeCaller(_VECakeCaller); + } + + struct BoosterFarmConfig { + uint256 pid; + bool status; + } + + /// @notice Only allow whitelisted pids for farm boosting. + /// @param _boosterFarms Booster farms config + function setBoosterFarms(BoosterFarmConfig[] calldata _boosterFarms) external onlyOwner { + for (uint256 i = 0; i < _boosterFarms.length; i++) { + BoosterFarmConfig memory farm = _boosterFarms[i]; + if (farm.status && !everBoosted[farm.pid]) everBoosted[farm.pid] = true; + whiteList[farm.pid] = farm.status; + emit UpdateBoostFarms(farm.pid, farm.status); + } + } + + /// @notice Limit max boost. + /// @param _cA Max boost. + function setCA(uint256 _cA) external onlyOwner { + require(_cA >= MIN_CA && _cA <= MAX_CA, "Invalid cA"); + uint256 temp = cA; + cA = _cA; + emit UpdateCA(temp, cA); + } + + /// @notice Controls difficulties. + /// @param _cB Difficulties. + function setCB(uint256 _cB) external onlyOwner { + require(_cB > MIN_CB && _cB <= MAX_CB, "Invalid cB"); + uint256 temp = cB; + cB = _cB; + emit UpdateCB(temp, cB); + } + + /// @notice Set cBOverride. + /// @param _pid Pool pid. + /// @param _cB Difficulties. + function setCBOverride(uint256 _pid, uint256 _cB) external onlyOwner { + // Can set cBOverride[pid] 0 when need to remove override value. + require((_cB > MIN_CB && _cB <= MAX_CB) || _cB == 0, "Invalid cB"); + uint256 temp = cB; + cBOverride[_pid] = _cB; + emit UpdateCBOverride(_pid, temp, cB); + } + + /// @notice Update user pool liquidity. + /// @dev This will update the user total liquidity in pool. + /// @param _user User address. + /// @param _tokenId token id. + /// @param _pid pool id. + /// @param _liquidity token liquidity. + function updateUserPoolLiquidity( + address _user, + uint256 _tokenId, + uint256 _pid, + uint256 _liquidity + ) internal { + // update total liquidity in this pool + userPoolTotalLiquidity[_user][_pid] = + userPoolTotalLiquidity[_user][_pid] - + userPositionLiquidity[_user][_tokenId] + + _liquidity; + userPositionLiquidity[_user][_tokenId] = _liquidity; + } + + /// @notice Update user boost multiplier, only for MasterChef V3. + /// @param _tokenId Token Id of position NFT. + function updatePositionBoostMultiplier(uint256 _tokenId) external onlyMasterChefV3 returns (uint256 _multiplier) { + ( + uint128 liquidity, + uint128 boostLiquidity, + , + , + , + , + address user, + uint256 pid, + uint256 boostMultiplier + ) = MASTER_CHEF_V3.userPositionInfos(_tokenId); + // Do not allow user to increase liquidity after removed all liquidity in MasterChef V3. + if (boostLiquidity == 0 && boostMultiplier > 0) { + revert(); + } + // Set default multiplier + _multiplier = BOOST_PRECISION; + // In order to save gas, no need to check the farms which have never been boosted. + if (everBoosted[pid]) { + updateUserPoolLiquidity(user, _tokenId, pid, liquidity); + + ItMap storage itmap = userInfo[user]; + uint256 prevMultiplier = itmap.data[_tokenId]; + + if (!whiteList[pid]) { + if (itmap.contains(_tokenId)) { + itmap.remove(_tokenId); + } + } else { + _multiplier = _boostCalculate(user, pid, userPoolTotalLiquidity[user][pid], 0, true); + itmap.insert(_tokenId, _multiplier); + } + emit UpdatePoolBoostMultiplier(user, pid, _tokenId, prevMultiplier, _multiplier); + } + } + + /// @notice Remove user boost multiplier when user withdraw or burn in MasterChef V3. + /// @param _user User address. + /// @param _tokenId Token Id of position NFT. + /// @param _pid Id of MasterChef V3 farm pool. + function removeBoostMultiplier( + address _user, + uint256 _tokenId, + uint256 _pid + ) external onlyMasterChefV3 { + // In order to save gas, no need to check the farms which have never been boosted. + if (everBoosted[_pid]) { + updateUserPoolLiquidity(_user, _tokenId, _pid, 0); + + ItMap storage itmap = userInfo[_user]; + if (itmap.contains(_tokenId)) { + itmap.remove(_tokenId); + } + } + } + + /// @notice VECake operation(deposit/withdraw) automatically call this function. + /// @param _for User address. + /// @param _amount The amount to deposit + /// @param _unlockTime New time to unlock Cake. Pass 0 if no change. + /// @param _prevLockedAmount Existed locks[_for].amount + /// @param _prevLockedEnd Existed locks[_for].end + /// @param _actionType The action that user did as this internal function shared among + /// @param _isCakePoolUser This user is cake pool user or not + function depositFor( + address _for, + uint256 _amount, + uint256 _unlockTime, + int128 _prevLockedAmount, + uint256 _prevLockedEnd, + uint256 _actionType, + bool _isCakePoolUser + ) external onlyVECakeCaller { + _updateUserAllBoostMultiplier(_for); + } + + /// @notice Function to perform withdraw and unlock Cake for a user + /// @param _user The address to be unlocked + /// @param _prevLockedAmount Existed locks[_user].amount + /// @param _prevLockedEnd Existed locks[_user].end + /// @param _withdrawAmount Cake amount + function unlock( + address _user, + int128 _prevLockedAmount, + uint256 _prevLockedEnd, + uint256 _withdrawAmount + ) external onlyVECakeCaller { + _updateUserAllBoostMultiplier(_user); + } + + function _updateUserAllBoostMultiplier(address _user) internal { + ItMap storage itmap = userInfo[_user]; + uint256 length = itmap.keys.length; + if (length > 0) { + for (uint256 i = 0; i < length; i++) { + uint256 tokenId = itmap.keys[i]; + (, address user, uint256 pid, ) = getUserPositionInfo(tokenId); + if (_user == user) _updateBoostMultiplier(itmap, user, pid, tokenId); + } + } + } + + /// @param _user user address. + /// @param _pid pool id. + /// @param _tokenId token id. + function _updateBoostMultiplier( + ItMap storage itmap, + address _user, + uint256 _pid, + uint256 _tokenId + ) internal { + // Used to be boosted farm pool and current is not, remove from mapping + if (!whiteList[_pid]) { + if (itmap.data[_tokenId] > BOOST_PRECISION) { + // reset to BOOST_PRECISION + MASTER_CHEF_V3.updateBoostMultiplier(_tokenId, BOOST_PRECISION); + } + itmap.remove(_tokenId); + return; + } + + (, , , uint256 prevMultiplier) = getUserPositionInfo(_tokenId); + uint256 multiplier = _boostCalculate(_user, _pid, userPoolTotalLiquidity[_user][_pid], 0, true); + + if (multiplier < BOOST_PRECISION) { + multiplier = BOOST_PRECISION; + } else if (multiplier > MAX_BOOST_PRECISION) { + multiplier = MAX_BOOST_PRECISION; + } + + // Update multiplier to MCV3 + if (multiplier != prevMultiplier) { + MASTER_CHEF_V3.updateBoostMultiplier(_tokenId, multiplier); + } + itmap.insert(_tokenId, multiplier); + + emit UpdatePoolBoostMultiplier(_user, _pid, _tokenId, prevMultiplier, multiplier); + } + + /// @notice Whether position boosted specific farm pool. + /// @param _tokenId Token Id of position NFT. + function isBoostedPool(uint256 _tokenId) external view returns (bool, uint256) { + (, address user, uint256 pid, ) = getUserPositionInfo(_tokenId); + return (userInfo[user].contains(_tokenId), pid); + } + + /// @notice Actived position list. + /// @param _user user address. + function activedPositions(address _user) external view returns (uint256[] memory positions) { + ItMap storage itmap = userInfo[_user]; + if (itmap.keys.length == 0) return positions; + + positions = new uint256[](itmap.keys.length); + // solidity for-loop not support multiple variables initialized by "," separate. + for (uint256 index = 0; index < itmap.keys.length; index++) { + positions[index] = itmap.keys[index]; + } + } + + function getUserPositionInfo(uint256 _tokenId) + internal + view + returns ( + uint128 liquidity, + address user, + uint256 pid, + uint256 boostMultiplier + ) + { + (liquidity, , , , , , user, pid, boostMultiplier) = MASTER_CHEF_V3.userPositionInfos(_tokenId); + } + + /// @notice Anyone can call this function, if you find some guys effected multiplier is not fair + /// for other users, just call "updateLiquidity" function in MasterChef V3. + /// @param _tokenId Token Id of position NFT. + /// @dev If return value not in range [BOOST_PRECISION, MAX_BOOST_PRECISION] + /// the actual effected multiplier will be the close to side boundry value. + function getUserMultiplier(uint256 _tokenId) external view returns (uint256) { + (uint256 liquidity, address user, uint256 pid, ) = getUserPositionInfo(_tokenId); + // Default is true + bool isStaked = true; + // positions did not stake in MasterChefV3 when pid is equal to 0. + // Check positions in NonfungiblePositionManager + if (pid == 0) { + ( + , + , + address token0, + address token1, + uint24 fee, + , + , + uint128 positionLiquidity, + , + , + , + + ) = NonfungiblePositionManager.positions(_tokenId); + + liquidity = uint256(positionLiquidity); + user = NonfungiblePositionManager.ownerOf(_tokenId); + address v3PoolAddress = PancakeV3Factory.getPool(token0, token1, fee); + pid = MASTER_CHEF_V3.v3PoolAddressPid(v3PoolAddress); + + if (pid > 0) { + isStaked = false; + } + } + if (!whiteList[pid]) { + return BOOST_PRECISION; + } else { + uint256 totalLiquidityInPool = userPoolTotalLiquidity[user][pid] - + userPositionLiquidity[user][_tokenId] + + liquidity; + return _boostCalculate(user, pid, totalLiquidityInPool, liquidity, isStaked); + } + } + + /// @notice Get the total liquidity. + /// @dev Will use the smaller value between MasterChefV3 pool totalLiquidity and V3 pool liquidity. + /// @param _pid pool id(MasterchefV3 pool). + /// @param _positionLiquidity Position liquidity of tokenId + /// @param _isStaked The position had staked in MasterChefV3 or not + function _getTotalLiquidity( + uint256 _pid, + uint256 _positionLiquidity, + bool _isStaked + ) internal view returns (uint256) { + (, address v3Pool, , , , uint256 totalLiquidity, ) = MASTER_CHEF_V3.poolInfo(_pid); + if (!_isStaked) { + totalLiquidity += _positionLiquidity; + } + uint256 v3PoolLiquidity = IPancakeV3Pool(v3Pool).liquidity(); + if (totalLiquidity > v3PoolLiquidity) { + totalLiquidity = v3PoolLiquidity; + } + return totalLiquidity; + } + + /// @param _user user address. + /// @param _pid pool id(MasterchefV3 pool). + /// @param _userTotalLiquidity User total liquidity in MasterChef V3 pool + /// @param _positionLiquidity Position liquidity of tokenId + /// @param _isStaked The position had staked in MasterChefV3 or not + function _boostCalculate( + address _user, + uint256 _pid, + uint256 _userTotalLiquidity, + uint256 _positionLiquidity, + bool _isStaked + ) internal view returns (uint256) { + uint256 dB = (cA * _userTotalLiquidity) / CA_PRECISION; + // dB == 0 means _liquidity close to 0 + if (dB == 0) return BOOST_PRECISION; + + uint256 totalLiquidity = _getTotalLiquidity(_pid, _positionLiquidity, _isStaked); + + // will use cBOverride[pid] If cBOverride[pid] is greater than 0 , or will use global cB. + uint256 realCB = cBOverride[_pid] > 0 ? cBOverride[_pid] : cB; + uint256 totalSupplyInVECake = IVECake(VECake).totalSupply(); + if (totalSupplyInVECake == 0) return BOOST_PRECISION; + uint256 aB = (totalLiquidity * IVECake(VECake).balanceOf(_user) * realCB) / totalSupplyInVECake / CB_PRECISION; + return ((_userTotalLiquidity <= (dB + aB) ? _userTotalLiquidity : (dB + aB)) * BOOST_PRECISION) / dB; + } +} diff --git a/projects/vecake-farm-booster/v3/contracts/MCV3MultiPositionUpdate.sol b/projects/vecake-farm-booster/v3/contracts/MCV3MultiPositionUpdate.sol new file mode 100644 index 00000000..06539876 --- /dev/null +++ b/projects/vecake-farm-booster/v3/contracts/MCV3MultiPositionUpdate.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; +import "./interfaces/IMasterChefV3.sol"; + +contract MCV3MultiPositionUpdate { + IMasterChefV3 public immutable MASTER_CHEF_V3; + + /// @param _v3 MasterChefV3 contract address. + constructor(IMasterChefV3 _v3) { + MASTER_CHEF_V3 = _v3; + } + + function multiPositionUpdate(uint256[] calldata _tokenIds) external { + for (uint256 i = 0; i < _tokenIds.length; i++) { + MASTER_CHEF_V3.updateLiquidity(_tokenIds[i]); + } + } +} diff --git a/projects/vecake-farm-booster/v3/contracts/interfaces/IFarmBooster.sol b/projects/vecake-farm-booster/v3/contracts/interfaces/IFarmBooster.sol new file mode 100644 index 00000000..3e9ac733 --- /dev/null +++ b/projects/vecake-farm-booster/v3/contracts/interfaces/IFarmBooster.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +interface IFarmBooster { + function onCakePoolUpdate( + address _user, + uint256 _lockedAmount, + uint256 _lockedDuration, + uint256 _totalLockedAmount, + uint256 _maxLockDuration + ) external; + + function updatePoolBoostMultiplier(address _user, uint256 _pid) external; + + function setProxy(address _user, address _proxy) external; + + function isBoosterPool(address _user, uint256 _pid) external view returns (bool); + + function getUserMultiplier(uint256 _tokenId) external view returns (uint256); +} diff --git a/projects/vecake-farm-booster/v3/contracts/interfaces/IFarmBoosterV1.sol b/projects/vecake-farm-booster/v3/contracts/interfaces/IFarmBoosterV1.sol new file mode 100644 index 00000000..2356d31b --- /dev/null +++ b/projects/vecake-farm-booster/v3/contracts/interfaces/IFarmBoosterV1.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +interface IFarmBoosterV1 { + /// @notice Record user token position liquidity + /// @dev Only record the positions which have updated after fram booster set in MasterChef V3. + /// mapping(address => mapping(uint256 => uint256)) public userPositionLiquidity; + function userPositionLiquidity(address user, uint256 tokenId) external view returns (uint256 liquidity); + + /// @notice Record user total liquidity in MasterChef V3 pool + /// mapping(address => mapping(uint256 => uint256)) public userPoolTotalLiquidity; + function userPoolTotalLiquidity(address user, uint256 poolId) external view returns (uint256 totalLiquidity); +} diff --git a/projects/vecake-farm-booster/v3/contracts/interfaces/IMasterChefV3.sol b/projects/vecake-farm-booster/v3/contracts/interfaces/IMasterChefV3.sol new file mode 100644 index 00000000..6758c00c --- /dev/null +++ b/projects/vecake-farm-booster/v3/contracts/interfaces/IMasterChefV3.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +interface IMasterChefV3 { + function balanceOf(address user) external view returns (uint256); + + function userPositionInfos(uint256 _tokenId) + external + view + returns ( + uint128, + uint128, + int24, + int24, + uint256, + uint256, + address, + uint256, + uint256 + ); + + function poolInfo(uint256 _pid) + external + view + returns ( + uint256, + address, + address, + address, + uint24, + uint256, + uint256 + ); + + function v3PoolAddressPid(address _pool) external view returns (uint256); + + function updateBoostMultiplier(uint256 _tokenId, uint256 _newMultiplier) external; + + function updateLiquidity(uint256 _tokenId) external; + + function nonfungiblePositionManager() external view returns (address); +} diff --git a/projects/vecake-farm-booster/v3/contracts/interfaces/INonfungiblePositionManager.sol b/projects/vecake-farm-booster/v3/contracts/interfaces/INonfungiblePositionManager.sol new file mode 100644 index 00000000..2de96676 --- /dev/null +++ b/projects/vecake-farm-booster/v3/contracts/interfaces/INonfungiblePositionManager.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +interface INonfungiblePositionManager { + /// @notice Returns the position information associated with a given token ID. + /// @dev Throws if the token ID is not valid. + /// @param tokenId The ID of the token that represents the position + /// @return nonce The nonce for permits + /// @return operator The address that is approved for spending + /// @return token0 The address of the token0 for a specific pool + /// @return token1 The address of the token1 for a specific pool + /// @return fee The fee associated with the pool + /// @return tickLower The lower end of the tick range for the position + /// @return tickUpper The higher end of the tick range for the position + /// @return liquidity The liquidity of the position + /// @return feeGrowthInside0LastX128 The fee growth of token0 as of the last action on the individual position + /// @return feeGrowthInside1LastX128 The fee growth of token1 as of the last action on the individual position + /// @return tokensOwed0 The uncollected amount of token0 owed to the position as of the last computation + /// @return tokensOwed1 The uncollected amount of token1 owed to the position as of the last computation + function positions(uint256 tokenId) + external + view + returns ( + uint96 nonce, + address operator, + address token0, + address token1, + uint24 fee, + int24 tickLower, + int24 tickUpper, + uint128 liquidity, + uint256 feeGrowthInside0LastX128, + uint256 feeGrowthInside1LastX128, + uint128 tokensOwed0, + uint128 tokensOwed1 + ); + + function ownerOf(uint256 tokenId) external view returns (address); + + function factory() external view returns (address); +} diff --git a/projects/vecake-farm-booster/v3/contracts/interfaces/IPancakeV3Factory.sol b/projects/vecake-farm-booster/v3/contracts/interfaces/IPancakeV3Factory.sol new file mode 100644 index 00000000..e8838421 --- /dev/null +++ b/projects/vecake-farm-booster/v3/contracts/interfaces/IPancakeV3Factory.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +interface IPancakeV3Factory { + function getPool( + address tokenA, + address tokenB, + uint24 fee + ) external view returns (address pool); +} diff --git a/projects/vecake-farm-booster/v3/contracts/interfaces/IPancakeV3Pool.sol b/projects/vecake-farm-booster/v3/contracts/interfaces/IPancakeV3Pool.sol new file mode 100644 index 00000000..98173959 --- /dev/null +++ b/projects/vecake-farm-booster/v3/contracts/interfaces/IPancakeV3Pool.sol @@ -0,0 +1,8 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +interface IPancakeV3Pool { + /// @notice The currently in range liquidity available to the pool + /// @dev This value has no relationship to the total liquidity across all ticks + function liquidity() external view returns (uint128); +} diff --git a/projects/vecake-farm-booster/v3/contracts/interfaces/IVECake.sol b/projects/vecake-farm-booster/v3/contracts/interfaces/IVECake.sol new file mode 100644 index 00000000..cd0760cb --- /dev/null +++ b/projects/vecake-farm-booster/v3/contracts/interfaces/IVECake.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IVECake { + function userInfo(address user) + external + view + returns ( + address cakePoolProxy, // Proxy Smart Contract for users who had locked in cake pool. + uint128 cakeAmount, // Cake amount locked in cake pool. + uint48 lockEndTime, // Record the lockEndTime in cake pool. + uint48 migrationTime, // Record the migration time. + uint16 cakePoolType, // 1: Migration, 2: Delegation. + uint16 withdrawFlag // 0: Not withdraw, 1 : withdrew. + ); + + function isCakePoolProxy(address _user) external view returns (bool); + + /// @dev Return the max epoch of the given "_user" + function userPointEpoch(address _user) external view returns (uint256); + + /// @dev Return the max global epoch + function epoch() external view returns (uint256); + + /// @dev Trigger global check point + function checkpoint() external; + + /// @notice Return the proxy balance of VECake at a given "_blockNumber" + /// @param _user The proxy owner address to get a balance of VECake + /// @param _blockNumber The speicific block number that you want to check the balance of VECake + function balanceOfAtForProxy(address _user, uint256 _blockNumber) external view returns (uint256); + + /// @notice Return the balance of VECake at a given "_blockNumber" + /// @param _user The address to get a balance of VECake + /// @param _blockNumber The speicific block number that you want to check the balance of VECake + function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256); + + /// @notice Return the voting weight of a givne user's proxy + /// @param _user The address of a user + function balanceOfForProxy(address _user) external view returns (uint256); + + /// @notice Return the voting weight of a givne user + /// @param _user The address of a user + function balanceOf(address _user) external view returns (uint256); + + /// @notice Calculate total supply of VECake (voting power) + function totalSupply() external view returns (uint256); +} diff --git a/projects/vecake-farm-booster/v3/contracts/libraries/IterateMapping.sol b/projects/vecake-farm-booster/v3/contracts/libraries/IterateMapping.sol new file mode 100644 index 00000000..cee6a5a5 --- /dev/null +++ b/projects/vecake-farm-booster/v3/contracts/libraries/IterateMapping.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +struct ItMap { + // pid => boost + mapping(uint256 => uint256) data; + // pid => index + mapping(uint256 => uint256) indexs; + // array of pid + uint256[] keys; + // never use it, just for keep compile success. + uint256 size; +} + +library IterableMapping { + function insert( + ItMap storage self, + uint256 key, + uint256 value + ) internal { + uint256 keyIndex = self.indexs[key]; + self.data[key] = value; + if (keyIndex > 0) return; + else { + self.indexs[key] = self.keys.length + 1; + self.keys.push(key); + return; + } + } + + function remove(ItMap storage self, uint256 key) internal { + uint256 index = self.indexs[key]; + if (index == 0) return; + uint256 lastKey = self.keys[self.keys.length - 1]; + if (key != lastKey) { + self.keys[index - 1] = lastKey; + self.indexs[lastKey] = index; + } + delete self.data[key]; + delete self.indexs[key]; + self.keys.pop(); + } + + function contains(ItMap storage self, uint256 key) internal view returns (bool) { + return self.indexs[key] > 0; + } +} diff --git a/projects/vecake-farm-booster/v3/hardhat.config.ts b/projects/vecake-farm-booster/v3/hardhat.config.ts new file mode 100644 index 00000000..895e2b63 --- /dev/null +++ b/projects/vecake-farm-booster/v3/hardhat.config.ts @@ -0,0 +1,73 @@ +import type { HardhatUserConfig, NetworkUserConfig } from "hardhat/types"; +import "@nomiclabs-2.2.2/hardhat-ethers"; +import "@nomiclabs/hardhat-web3"; +import "@nomiclabs/hardhat-truffle5"; +import "hardhat-abi-exporter"; +import "hardhat-contract-sizer"; +import "solidity-coverage"; +import "dotenv/config"; + +const bscTestnet: NetworkUserConfig = { + url: "https://data-seed-prebsc-1-s1.binance.org:8545/", + chainId: 97, + accounts: [process.env.KEY_TESTNET!], +}; + +const bscMainnet: NetworkUserConfig = { + url: "https://bsc-dataseed.binance.org/", + chainId: 56, + accounts: [process.env.KEY_MAINNET!], +}; + +const config = { + defaultNetwork: "hardhat", + networks: { + hardhat: {}, + // testnet: bscTestnet, + // mainnet: bscMainnet, + }, + solidity: { + compilers: [ + { + version: "0.8.10", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + { + version: "0.8.0", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + { + version: "0.6.12", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + ], + }, + paths: { + sources: "./contracts/", + tests: "./test", + cache: "./cache", + artifacts: "./artifacts", + }, + // abiExporter: { + // path: "./data/abi", + // clear: true, + // flat: false, + // }, +}; + +export default config; diff --git a/projects/vecake-farm-booster/v3/package.json b/projects/vecake-farm-booster/v3/package.json new file mode 100644 index 00000000..dc41de53 --- /dev/null +++ b/projects/vecake-farm-booster/v3/package.json @@ -0,0 +1,24 @@ +{ + "name": "vecake-farm-booster-v3", + "version": "1.0.0", + "description": "Pancake vecake farm booster v3", + "private": true, + "repository": "", + "author": "PancakeSwap", + "license": "MIT", + "scripts": { + "format:check": "prettier --check './**/*.{js,ts,sol}'", + "format:write": "prettier --write './**/*.{js,ts,sol}'", + "test": "npx hardhat test", + "compile": "npx hardhat compile", + "size": "npx hardhat size-contracts", + "deploy:testnet": "npx hardhat run --network testnet scripts/deploy.ts", + "deploy:mainnet": "npx hardhat run --network mainnet scripts/deploy.ts" + }, + "devDependencies": { + }, + "dependencies": { + "@openzeppelin-4.5.0/contracts": "npm:@openzeppelin/contracts@4.5.0", + "@nomiclabs-2.2.2/hardhat-ethers": "npm:@nomiclabs/hardhat-ethers@^2.2.2" +} +} diff --git a/projects/vecake-farm-booster/v3/scripts/deploy.ts b/projects/vecake-farm-booster/v3/scripts/deploy.ts new file mode 100644 index 00000000..3679f978 --- /dev/null +++ b/projects/vecake-farm-booster/v3/scripts/deploy.ts @@ -0,0 +1,33 @@ +import { ethers, run, network } from "hardhat"; +import config from "../config"; + +async function main() { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + const FarmBooster = await ethers.getContractFactory("FarmBooster"); + const farmBooster = await FarmBooster.deploy( + config.VECake[networkName], + config.MasterChefV3[networkName], + config.CA[networkName], + config.CB[networkName] + ); + await farmBooster.deployed(); + + console.log("farmBooster deployed to:", farmBooster.address); + } +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/vecake-farm-booster/v3/test/FarmBooster.test.ts b/projects/vecake-farm-booster/v3/test/FarmBooster.test.ts new file mode 100644 index 00000000..216f3698 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/FarmBooster.test.ts @@ -0,0 +1,889 @@ +import { artifacts, contract, ethers, network } from "hardhat"; +import { time, BN, expectEvent, expectRevert } from "@openzeppelin/test-helpers"; +import { parseEther, formatEther } from "ethers/lib/utils"; +import { expect } from "chai"; +import { beforeEach } from "mocha"; +import { BigNumber } from "ethers"; + +import PancakeV3PoolDeployerArtifact from "./artifactsFile/PancakeV3PoolDeployer.json"; +import PancakeV3PoolArtifact from "./artifactsFile/PancakeV3Pool.json"; +import PancakeV3FactoryArtifact from "./artifactsFile/PancakeV3Factory.json"; +import PancakeV3SwapRouterArtifact from "./artifactsFile/SwapRouter.json"; +import NonfungiblePositionManagerArtifact from "./artifactsFile/NonfungiblePositionManager.json"; +import PancakeV3LmPoolDeployerArtifact from "./artifactsFile/PancakeV3LmPoolDeployer.json"; +import PancakeV3LmPoolArtifact from "./artifactsFile/PancakeV3LmPool.json"; +import FarmBoosterArtifact from "./artifactsFile/FarmBooster.json"; + +import ERC20MockArtifact from "./artifactsFile/ERC20Mock.json"; +import CakeTokenArtifact from "./artifactsFile/CakeToken.json"; +import SyrupBarArtifact from "./artifactsFile/SyrupBar.json"; +import MasterChefArtifact from "./artifactsFile/MasterChef.json"; +import MasterChefV2Artifact from "./artifactsFile/MasterChefV2.json"; +import MasterChefV3Artifact from "./artifactsFile/MasterChefV3.json"; +import CakePoolArtifact from "./artifactsFile/CakePool.json"; +import VECakeArtifact from "./artifactsFile/VECake.json"; +import ProxyForCakePoolArtifact from "./artifactsFile/ProxyForCakePool.json"; +import ProxyForCakePoolFactoryArtifact from "./artifactsFile/ProxyForCakePoolFactory.json"; + +const ZERO = BigNumber.from(0); +const TOLERANCE = "0.04"; // 0.04% +const HOUR = BigNumber.from(3600); +const DAY = BigNumber.from(86400); +const WEEK = DAY.mul(7); +const MONTH = DAY.mul(30); +const YEAR = DAY.mul(365); +const MAX_LOCK = BigNumber.from(32054399); // seconds in 53 weeks - 1 second (60 * 60 * 24 * 7 * 53) - 1 +const ZEROTickSqrtPriceX96 = "79228162514264337593543950336"; +const BOOST_PRECISION = BigNumber.from(10).pow(12); + +describe("Farm Booster", () => { + let CakePoolSC; + let masterChefV2; + let masterChefV3; + let ProxyForCakePoolFactorySC; + let VECakeSC; + let CakeTokenSC; + let NonfungiblePositionManagerSC; + let FarmBoosterSC; + let poolAddresses; + let admin; + let user1; + let user2; + let user3; + let user4; + let recipient; + let tokenA; + let tokenB; + let pools; + let myToken; + before(async function () { + [admin, user1, user2, user3, user4, recipient] = await ethers.getSigners(); + }); + + beforeEach(async () => { + // Deploy factory + const PancakeV3PoolDeployer = await ethers.getContractFactoryFromArtifact(PancakeV3PoolDeployerArtifact); + const pancakeV3PoolDeployer = await PancakeV3PoolDeployer.deploy(); + + const PancakeV3Factory = await ethers.getContractFactoryFromArtifact(PancakeV3FactoryArtifact); + const pancakeV3Factory = await PancakeV3Factory.deploy(pancakeV3PoolDeployer.address); + + await pancakeV3PoolDeployer.setFactoryAddress(pancakeV3Factory.address); + + const PancakeV3SwapRouter = await ethers.getContractFactoryFromArtifact(PancakeV3SwapRouterArtifact); + const pancakeV3SwapRouter = await PancakeV3SwapRouter.deploy( + pancakeV3PoolDeployer.address, + pancakeV3Factory.address, + ethers.constants.AddressZero + ); + + await PancakeV3SwapRouter.deploy( + pancakeV3PoolDeployer.address, + pancakeV3Factory.address, + ethers.constants.AddressZero + ); + + // Deploy NFT position manager + const NonfungiblePositionManager = await ethers.getContractFactoryFromArtifact(NonfungiblePositionManagerArtifact); + NonfungiblePositionManagerSC = await NonfungiblePositionManager.deploy( + pancakeV3PoolDeployer.address, + pancakeV3Factory.address, + ethers.constants.AddressZero, + // nonfungibleTokenPositionDescriptor.address + ethers.constants.AddressZero + ); + + const ERC20Mock = await ethers.getContractFactoryFromArtifact(ERC20MockArtifact); + + // Prepare for master chef v3 + + const CakeToken = await ethers.getContractFactoryFromArtifact(CakeTokenArtifact); + CakeTokenSC = await CakeToken.deploy(); + await CakeTokenSC["mint(address,uint256)"](admin.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user1.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user2.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user3.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user4.address, ethers.utils.parseUnits("100000000000000")); + + const SyrupBar = await ethers.getContractFactoryFromArtifact(SyrupBarArtifact); + const syrupBar = await SyrupBar.deploy(CakeTokenSC.address); + + const lpTokenV1 = await ERC20Mock.deploy("LP Token V1", "LPV1"); + const dummyTokenV2 = await ERC20Mock.deploy("Dummy Token V2", "DTV2"); + + const MasterChef = await ethers.getContractFactoryFromArtifact(MasterChefArtifact); + const masterChef = await MasterChef.deploy( + CakeTokenSC.address, + syrupBar.address, + admin.address, + ethers.utils.parseUnits("40"), + ethers.constants.Zero + ); + + await CakeTokenSC.transferOwnership(masterChef.address); + await syrupBar.transferOwnership(masterChef.address); + + await masterChef.add(0, lpTokenV1.address, true); // farm with pid 1 and 0 allocPoint + await masterChef.add(1, dummyTokenV2.address, true); // farm with pid 2 and 1 allocPoint + + const MasterChefV2 = await ethers.getContractFactoryFromArtifact(MasterChefV2Artifact); + masterChefV2 = await MasterChefV2.deploy(masterChef.address, CakeTokenSC.address, 2, admin.address); + + await dummyTokenV2.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenV2.approve(masterChefV2.address, ethers.constants.MaxUint256); + await masterChefV2.init(dummyTokenV2.address); + + const lpTokenV2 = await ERC20Mock.deploy("LP Token V2", "LPV2"); + const dummyTokenV3 = await ERC20Mock.deploy("Dummy Token V3", "DTV3"); + const dummyTokenForCakePool = await ERC20Mock.deploy("Dummy Token Cake Pool", "DTCP"); + const dummyTokenForSpecialPool2 = await ERC20Mock.deploy("Dummy Token Special pool 2", "DT"); + + await masterChefV2.add(0, lpTokenV2.address, true, true); // regular farm with pid 0 and 1 allocPoint + await masterChefV2.add(1, dummyTokenV3.address, true, true); // regular farm with pid 1 and 1 allocPoint + await masterChefV2.add(1, dummyTokenForCakePool.address, false, true); // special farm with pid 2 and 1 allocPoint + await masterChefV2.add(0, dummyTokenForSpecialPool2.address, false, true); // special farm with pid 3 and 0 allocPoint + + // set cake pool + const CakePool = await ethers.getContractFactoryFromArtifact(CakePoolArtifact); + CakePoolSC = await CakePool.deploy( + CakeTokenSC.address, + masterChefV2.address, + admin.address, + admin.address, + admin.address, + 2 + ); + await masterChefV2.updateWhiteList(CakePoolSC.address, true); + await dummyTokenForCakePool.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenForCakePool.approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakePoolSC.init(dummyTokenForCakePool.address); + + await CakeTokenSC.connect(admin).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user1).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user2).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user3).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user4).approve(CakePoolSC.address, ethers.constants.MaxUint256); + + // lock cake in cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1000"), 3600 * 24 * 365); + + // Deploy master chef v3 + const MasterChefV3 = await ethers.getContractFactoryFromArtifact(MasterChefV3Artifact); + masterChefV3 = await MasterChefV3.deploy( + CakeTokenSC.address, + NonfungiblePositionManagerSC.address, + ethers.constants.AddressZero + ); + + await dummyTokenV3.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenV3.approve(masterChefV2.address, ethers.constants.MaxUint256); + await masterChefV2.deposit(1, await dummyTokenV3.balanceOf(admin.address)); + + const PancakeV3LmPoolDeployer = await ethers.getContractFactoryFromArtifact(PancakeV3LmPoolDeployerArtifact); + const pancakeV3LmPoolDeployer = await PancakeV3LmPoolDeployer.deploy(masterChefV3.address); + await pancakeV3Factory.setLmPoolDeployer(pancakeV3LmPoolDeployer.address); + + await masterChefV3.setLMPoolDeployer(pancakeV3LmPoolDeployer.address); + + // deploy ProxyForCakePoolFactory + const ProxyForCakePoolFactory = await ethers.getContractFactoryFromArtifact(ProxyForCakePoolFactoryArtifact); + ProxyForCakePoolFactorySC = await ProxyForCakePoolFactory.deploy(); + + // deploy VECake + const VECake = await ethers.getContractFactoryFromArtifact(VECakeArtifact); + VECakeSC = await VECake.deploy(CakePoolSC.address, CakeTokenSC.address, ProxyForCakePoolFactorySC.address); + + await CakeTokenSC.connect(admin).approve(VECakeSC.address, ethers.constants.MaxUint256); + + await ProxyForCakePoolFactorySC.initialize(VECakeSC.address); + + await CakePoolSC.setVCakeContract(VECakeSC.address); + + await VECakeSC.initializeCakePoolMigration(); + + await CakeTokenSC.connect(admin).approve(VECakeSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user1).approve(VECakeSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user2).approve(VECakeSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user3).approve(VECakeSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + // set farm booster + const FarmBooster = await ethers.getContractFactoryFromArtifact(FarmBoosterArtifact); + FarmBoosterSC = await FarmBooster.deploy(VECakeSC.address, masterChefV3.address, 50000, 100000); + await CakePoolSC.setBoostContract(FarmBoosterSC.address); + await masterChefV3.updateFarmBoostContract(FarmBoosterSC.address); + + // Deploy mock ERC20 tokens + const MockTokenOne = await ERC20Mock.deploy("Token A", "A"); + const MockTokenTwo = await ERC20Mock.deploy("Token B", "B"); + if (MockTokenOne.address <= MockTokenTwo.address) { + tokenA = MockTokenOne; + tokenB = MockTokenTwo; + } else { + tokenA = MockTokenTwo; + tokenB = MockTokenOne; + } + + await tokenA.mint(admin.address, ethers.utils.parseUnits("100000000")); + await tokenA.mint(user1.address, ethers.utils.parseUnits("100000000")); + await tokenA.mint(user2.address, ethers.utils.parseUnits("100000000")); + await tokenA.mint(user3.address, ethers.utils.parseUnits("100000000")); + await tokenB.mint(admin.address, ethers.utils.parseUnits("100000000")); + await tokenB.mint(user1.address, ethers.utils.parseUnits("100000000")); + await tokenB.mint(user2.address, ethers.utils.parseUnits("100000000")); + await tokenB.mint(user3.address, ethers.utils.parseUnits("100000000")); + + await tokenA.connect(admin).approve(pancakeV3SwapRouter.address, ethers.constants.MaxUint256); + await tokenB.connect(admin).approve(pancakeV3SwapRouter.address, ethers.constants.MaxUint256); + await tokenA.connect(user2).approve(pancakeV3SwapRouter.address, ethers.constants.MaxUint256); + await tokenB.connect(user2).approve(pancakeV3SwapRouter.address, ethers.constants.MaxUint256); + + await tokenA.connect(user1).approve(NonfungiblePositionManagerSC.address, ethers.constants.MaxUint256); + await tokenB.connect(user1).approve(NonfungiblePositionManagerSC.address, ethers.constants.MaxUint256); + await tokenA.connect(user2).approve(NonfungiblePositionManagerSC.address, ethers.constants.MaxUint256); + await tokenB.connect(user2).approve(NonfungiblePositionManagerSC.address, ethers.constants.MaxUint256); + await tokenA.connect(user3).approve(NonfungiblePositionManagerSC.address, ethers.constants.MaxUint256); + await tokenB.connect(user3).approve(NonfungiblePositionManagerSC.address, ethers.constants.MaxUint256); + + await tokenA.connect(user1).approve(masterChefV3.address, ethers.constants.MaxUint256); + await tokenB.connect(user1).approve(masterChefV3.address, ethers.constants.MaxUint256); + await tokenA.connect(user2).approve(masterChefV3.address, ethers.constants.MaxUint256); + await tokenB.connect(user2).approve(masterChefV3.address, ethers.constants.MaxUint256); + await tokenA.connect(user3).approve(masterChefV3.address, ethers.constants.MaxUint256); + await tokenB.connect(user3).approve(masterChefV3.address, ethers.constants.MaxUint256); + + await CakeTokenSC.connect(admin).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user1).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user2).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user3).approve(CakePoolSC.address, ethers.constants.MaxUint256); + + // Create pools + pools = [ + { + token0: tokenA.address < tokenB.address ? tokenA.address : tokenB.address, + token1: tokenB.address > tokenA.address ? tokenB.address : tokenA.address, + fee: 500, + initSqrtPriceX96: ZEROTickSqrtPriceX96, + }, + { + token0: tokenA.address < tokenB.address ? tokenA.address : tokenB.address, + token1: tokenB.address > tokenA.address ? tokenB.address : tokenA.address, + fee: 2500, + initSqrtPriceX96: ZEROTickSqrtPriceX96, + }, + { + token0: tokenA.address < tokenB.address ? tokenA.address : tokenB.address, + token1: tokenB.address > tokenA.address ? tokenB.address : tokenA.address, + fee: 10000, + initSqrtPriceX96: ZEROTickSqrtPriceX96, + }, + ]; + poolAddresses = await Promise.all( + pools.map(async (p) => { + const receipt = await ( + await NonfungiblePositionManagerSC.createAndInitializePoolIfNecessary( + p.token0, + p.token1, + p.fee, + p.initSqrtPriceX96 + ) + ).wait(); + const [, address] = ethers.utils.defaultAbiCoder.decode(["int24", "address"], receipt.logs[0].data); + return address; + }) + ); + + // Farm 1 month in advance and then upkeep + await time.increase(30 * 24 * 60 * 60); + await masterChefV2.connect(admin).deposit(1, 0); + await CakeTokenSC.approve(masterChefV3.address, ethers.constants.MaxUint256); + await masterChefV3.setReceiver(admin.address); + await masterChefV3.upkeep(ethers.utils.parseUnits(`${4 * 24 * 60 * 60}`), 24 * 60 * 60, true); + + await time.increase(1); + + await masterChefV3.add(100, poolAddresses[0], true); + + await FarmBoosterSC.setBoosterFarms([[1, true]]); + + // deposit in VECake + let OneYear = BigNumber.from((await time.latest()).toString()).add(YEAR); + await VECakeSC.connect(user1).createLock(ethers.utils.parseUnits("100"), OneYear); + await VECakeSC.connect(user2).createLock(ethers.utils.parseUnits("1000000"), OneYear); + }); + + afterEach(async () => { + await network.provider.send("hardhat_reset"); + }); + + describe("Position boost multiplier", function () { + beforeEach(async function () { + await NonfungiblePositionManagerSC.connect(user1).mint({ + token0: pools[0].token0, + token1: pools[0].token1, + fee: pools[0].fee, + tickLower: -100, + tickUpper: 100, + amount0Desired: ethers.utils.parseUnits("100"), + amount1Desired: ethers.utils.parseUnits("100"), + amount0Min: ethers.constants.Zero, + amount1Min: ethers.constants.Zero, + recipient: user1.address, + deadline: 100000000000000, + }); + await time.increase(1); + // stake in MasterChefV3 + await NonfungiblePositionManagerSC.connect(user1)["safeTransferFrom(address,address,uint256)"]( + user1.address, + masterChefV3.address, + 1 + ); + await time.increase(1); + }); + it("MasterChefV3 position will be boosted after locked in VECake", async function () { + const newMultiplier = await FarmBoosterSC.getUserMultiplier(1); + const userPositionInfo = await masterChefV3.userPositionInfos(1); + expect(userPositionInfo.boostMultiplier).to.deep.eq(newMultiplier); + const newBoostLiquidity = newMultiplier.mul(userPositionInfo.liquidity).div(BOOST_PRECISION); + expect(newBoostLiquidity).to.deep.eq(userPositionInfo.boostLiquidity); + }); + + it("The multiplier by getUserMultiplier before staked in MasterChefV3 should be equal to the multiplier after staked in MasterChefV3", async function () { + // // create lock in VECake + let OneYear = BigNumber.from((await time.latest()).toString()).add(YEAR); + await VECakeSC.connect(user3).createLock(ethers.utils.parseUnits("100"), OneYear); + + await NonfungiblePositionManagerSC.connect(user3).mint({ + token0: pools[0].token0, + token1: pools[0].token1, + fee: pools[0].fee, + tickLower: -100, + tickUpper: 100, + amount0Desired: ethers.utils.parseUnits("100"), + amount1Desired: ethers.utils.parseUnits("100"), + amount0Min: ethers.constants.Zero, + amount1Min: ethers.constants.Zero, + recipient: user3.address, + deadline: 100000000000000, + }); + await time.increase(1); + let multiplierBeforeStake = await FarmBoosterSC.getUserMultiplier(2); + + let positionInfo = await masterChefV3.userPositionInfos(2); + expect(positionInfo.boostMultiplier).to.deep.eq(ZERO); + expect(positionInfo.liquidity).to.deep.eq(ZERO); + + //stake in MasterChefV3 + await NonfungiblePositionManagerSC.connect(user3)["safeTransferFrom(address,address,uint256)"]( + user3.address, + masterChefV3.address, + 2 + ); + await time.increase(1); + + const multiplierAfterStake = await FarmBoosterSC.getUserMultiplier(2); + + // multiplierBeforeStake shoule be greater than BOOST_PRECISION + expect(multiplierBeforeStake.gt(BOOST_PRECISION)).to.deep.eq(true); + // multiplierBeforeStake shoule be greater than BOOST_PRECISION + expect(multiplierAfterStake.gt(BOOST_PRECISION)).to.deep.eq(true); + expect(multiplierBeforeStake).to.deep.eq(multiplierAfterStake); + + positionInfo = await masterChefV3.userPositionInfos(2); + expect(multiplierBeforeStake).to.deep.eq(positionInfo.boostMultiplier); + expect(multiplierAfterStake).to.deep.eq(positionInfo.boostMultiplier); + }); + + it("User multiplier will be equal to BOOST_PRECISION after withdraw from VECake", async function () { + const now = BigNumber.from((await time.latest()).toString()); + const AfterOneYear = now.add(YEAR).add(MONTH); + + await time.increaseTo(AfterOneYear.toNumber()); + + let cakeBalanceBeforeOfUser1 = await CakeTokenSC.balanceOf(user1.address); + await VECakeSC.connect(user1).withdrawAll(user1.address); + let cakeBalanceAfterOfUser1 = await CakeTokenSC.balanceOf(user1.address); + expect(cakeBalanceAfterOfUser1.sub(cakeBalanceBeforeOfUser1)).to.deep.eq(ethers.utils.parseUnits("100")); + + const newMultiplier = await FarmBoosterSC.getUserMultiplier(1); + + expect(newMultiplier).to.deep.eq(BOOST_PRECISION); + }); + + it("User position multiplier will be updated by executed updateLiquidity in MasterChefV3 after withdraw from VECake", async function () { + const now = BigNumber.from((await time.latest()).toString()); + const AfterOneYear = now.add(YEAR).add(MONTH); + + await time.increaseTo(AfterOneYear.toNumber()); + + let cakeBalanceBeforeOfUser1 = await CakeTokenSC.balanceOf(user1.address); + await VECakeSC.connect(user1).withdrawAll(user1.address); + let cakeBalanceAfterOfUser1 = await CakeTokenSC.balanceOf(user1.address); + expect(cakeBalanceAfterOfUser1.sub(cakeBalanceBeforeOfUser1)).to.deep.eq(ethers.utils.parseUnits("100")); + + const newMultiplier = await FarmBoosterSC.getUserMultiplier(1); + expect(newMultiplier).to.deep.eq(BOOST_PRECISION); + let userPositionInfoBefore = await masterChefV3.userPositionInfos(1); + + expect(userPositionInfoBefore.liquidity.lt(userPositionInfoBefore.boostLiquidity)).to.deep.eq(true); + expect( + userPositionInfoBefore.liquidity.mul(userPositionInfoBefore.boostMultiplier).div(BOOST_PRECISION) + ).to.deep.eq(userPositionInfoBefore.boostLiquidity); + + // update position boost multiplier in MasterChefV3 + await masterChefV3.updateLiquidity(1); + let userPositionInfoAfter = await masterChefV3.userPositionInfos(1); + expect(userPositionInfoAfter.boostMultiplier).to.deep.eq(newMultiplier); + const newBoostLiquidity = newMultiplier.mul(userPositionInfoAfter.liquidity).div(BOOST_PRECISION); + expect(newBoostLiquidity).to.deep.eq(userPositionInfoAfter.boostLiquidity); + }); + + it("Get bigger boosted multiplier after created lock in VECake", async function () { + await NonfungiblePositionManagerSC.connect(user3).mint({ + token0: pools[0].token0, + token1: pools[0].token1, + fee: pools[0].fee, + tickLower: -100, + tickUpper: 100, + amount0Desired: ethers.utils.parseUnits("100"), + amount1Desired: ethers.utils.parseUnits("100"), + amount0Min: ethers.constants.Zero, + amount1Min: ethers.constants.Zero, + recipient: user3.address, + deadline: 100000000000000, + }); + await time.increase(1); + //stake in MasterChefV3 + await NonfungiblePositionManagerSC.connect(user3)["safeTransferFrom(address,address,uint256)"]( + user3.address, + masterChefV3.address, + 2 + ); + await time.increase(1); + const oldMultiplier = await FarmBoosterSC.getUserMultiplier(2); + + // create lock in VECake + let OneYear = BigNumber.from((await time.latest()).toString()).add(YEAR); + await VECakeSC.connect(user3).createLock(ethers.utils.parseUnits("100"), OneYear); + const newMultiplier = await FarmBoosterSC.getUserMultiplier(2); + expect(newMultiplier.gt(oldMultiplier)).to.deep.eq(true); + }); + + it("Get bigger boosted multiplier after executed createLockForProxy when migrated from cake pool", async function () { + const oldMultiplier = await FarmBoosterSC.getUserMultiplier(1); + + // migrate from cake pool + await VECakeSC.connect(user1).migrateFromCakePool(); + const newMultiplier = await FarmBoosterSC.getUserMultiplier(1); + expect(newMultiplier.gt(oldMultiplier)).to.deep.eq(true); + }); + + it("Get bigger boosted multiplier after locked more cake", async function () { + const oldMultiplier = await FarmBoosterSC.getUserMultiplier(1); + + await VECakeSC.connect(user1).increaseLockAmount(ethers.utils.parseUnits("100")); + const newMultiplier = await FarmBoosterSC.getUserMultiplier(1); + expect(newMultiplier.gt(oldMultiplier)).to.deep.eq(true); + }); + + it("Get bigger boosted multiplier after extended cake lock end time", async function () { + const oldMultiplier = await FarmBoosterSC.getUserMultiplier(1); + let TwoYear = BigNumber.from((await time.latest()).toString()).add(YEAR.mul(2)); + await VECakeSC.connect(user1).increaseUnlockTime(TwoYear); + const newMultiplier = await FarmBoosterSC.getUserMultiplier(1); + + expect(newMultiplier.gt(oldMultiplier)).to.deep.eq(true); + }); + }); + + describe("Multiple pools and multiple positions", function () { + beforeEach(async function () { + await masterChefV3.add(100, poolAddresses[1], true); + await masterChefV3.add(100, poolAddresses[2], true); + + await FarmBoosterSC.setBoosterFarms([ + [2, true], + [3, true], + ]); + + await NonfungiblePositionManagerSC.connect(user1).mint({ + token0: pools[0].token0, + token1: pools[0].token1, + fee: pools[0].fee, + tickLower: -100, + tickUpper: 100, + amount0Desired: ethers.utils.parseUnits("100"), + amount1Desired: ethers.utils.parseUnits("100"), + amount0Min: ethers.constants.Zero, + amount1Min: ethers.constants.Zero, + recipient: user1.address, + deadline: 100000000000000, + }); + await time.increase(1); + // stake in MasterChefV3 + await NonfungiblePositionManagerSC.connect(user1)["safeTransferFrom(address,address,uint256)"]( + user1.address, + masterChefV3.address, + 1 + ); + await time.increase(1); + + await NonfungiblePositionManagerSC.connect(user1).mint({ + token0: pools[1].token0, + token1: pools[1].token1, + fee: pools[1].fee, + tickLower: -100, + tickUpper: 100, + amount0Desired: ethers.utils.parseUnits("100"), + amount1Desired: ethers.utils.parseUnits("100"), + amount0Min: ethers.constants.Zero, + amount1Min: ethers.constants.Zero, + recipient: user1.address, + deadline: 100000000000000, + }); + await time.increase(1); + // stake in MasterChefV3 + await NonfungiblePositionManagerSC.connect(user1)["safeTransferFrom(address,address,uint256)"]( + user1.address, + masterChefV3.address, + 2 + ); + await time.increase(1); + + await NonfungiblePositionManagerSC.connect(user1).mint({ + token0: pools[2].token0, + token1: pools[2].token1, + fee: pools[2].fee, + tickLower: -200, + tickUpper: 200, + amount0Desired: ethers.utils.parseUnits("10"), + amount1Desired: ethers.utils.parseUnits("10"), + amount0Min: ethers.constants.Zero, + amount1Min: ethers.constants.Zero, + recipient: user1.address, + deadline: 100000000000000, + }); + await time.increase(1); + //stake in MasterChefV3 + await NonfungiblePositionManagerSC.connect(user1)["safeTransferFrom(address,address,uint256)"]( + user1.address, + masterChefV3.address, + 3 + ); + await time.increase(1); + }); + + it("Deposit more cake into VECake pool, all positions multiplier will be greater than before or equal to", async function () { + const userPositionOneInfo_before = await masterChefV3.userPositionInfos(1); + const userPositionTwoInfo_before = await masterChefV3.userPositionInfos(2); + const userPositionThreeInfo_before = await masterChefV3.userPositionInfos(3); + + const userMultiplierOne_before = await FarmBoosterSC.getUserMultiplier(1); + const userMultiplierTwo_before = await FarmBoosterSC.getUserMultiplier(2); + const userMultiplierThree_before = await FarmBoosterSC.getUserMultiplier(3); + + expect(userPositionOneInfo_before.boostMultiplier).to.deep.eq(userMultiplierOne_before); + expect(userPositionTwoInfo_before.boostMultiplier).to.deep.eq(userMultiplierTwo_before); + expect(userPositionThreeInfo_before.boostMultiplier).to.deep.eq(userMultiplierThree_before); + // lock more cake into VECake + await VECakeSC.connect(user1).increaseLockAmount(ethers.utils.parseUnits("100")); + + // update positions multiplier in MasterChef V3 + await masterChefV3.updateLiquidity(1); + await masterChefV3.updateLiquidity(2); + await masterChefV3.updateLiquidity(3); + + const userMultiplierOne_after = await FarmBoosterSC.getUserMultiplier(1); + const userMultiplierTwo_after = await FarmBoosterSC.getUserMultiplier(2); + const userMultiplierThree_after = await FarmBoosterSC.getUserMultiplier(3); + + const userPositionOneInfo_after = await masterChefV3.userPositionInfos(1); + const userPositionTwoInfo_after = await masterChefV3.userPositionInfos(2); + const userPositionThreeInfo_after = await masterChefV3.userPositionInfos(3); + + expect(userMultiplierOne_after.gte(userMultiplierOne_before)).to.deep.eq(true); + expect(userMultiplierTwo_after.gte(userMultiplierTwo_before)).to.deep.eq(true); + expect(userMultiplierThree_after.gte(userMultiplierThree_before)).to.deep.eq(true); + + expect(userPositionOneInfo_after.boostMultiplier.gte(userPositionOneInfo_before.boostMultiplier)).to.deep.eq( + true + ); + expect(userPositionTwoInfo_after.boostMultiplier.gte(userPositionTwoInfo_before.boostMultiplier)).to.deep.eq( + true + ); + expect(userPositionThreeInfo_after.boostMultiplier.gte(userPositionThreeInfo_before.boostMultiplier)).to.deep.eq( + true + ); + }); + + it("Extend cake lock end time, all positions multiplier will be greater than before or equal to", async function () { + const userPositionOneInfo_before = await masterChefV3.userPositionInfos(1); + const userPositionTwoInfo_before = await masterChefV3.userPositionInfos(2); + const userPositionThreeInfo_before = await masterChefV3.userPositionInfos(3); + + const userMultiplierOne_before = await FarmBoosterSC.getUserMultiplier(1); + const userMultiplierTwo_before = await FarmBoosterSC.getUserMultiplier(2); + const userMultiplierThree_before = await FarmBoosterSC.getUserMultiplier(3); + + expect(userPositionOneInfo_before.boostMultiplier).to.deep.eq(userMultiplierOne_before); + expect(userPositionTwoInfo_before.boostMultiplier).to.deep.eq(userMultiplierTwo_before); + expect(userPositionThreeInfo_before.boostMultiplier).to.deep.eq(userMultiplierThree_before); + // extend lock end time + let TwoYear = BigNumber.from((await time.latest()).toString()).add(YEAR.mul(2)); + await VECakeSC.connect(user1).increaseUnlockTime(TwoYear); + + // update positions multiplier in MasterChef V3 + await masterChefV3.updateLiquidity(1); + await masterChefV3.updateLiquidity(2); + await masterChefV3.updateLiquidity(3); + + const userMultiplierOne_after = await FarmBoosterSC.getUserMultiplier(1); + const userMultiplierTwo_after = await FarmBoosterSC.getUserMultiplier(2); + const userMultiplierThree_after = await FarmBoosterSC.getUserMultiplier(3); + + const userPositionOneInfo_after = await masterChefV3.userPositionInfos(1); + const userPositionTwoInfo_after = await masterChefV3.userPositionInfos(2); + const userPositionThreeInfo_after = await masterChefV3.userPositionInfos(3); + + expect(userMultiplierOne_after.gte(userMultiplierOne_before)).to.deep.eq(true); + expect(userMultiplierTwo_after.gte(userMultiplierTwo_before)).to.deep.eq(true); + expect(userMultiplierThree_after.gte(userMultiplierThree_before)).to.deep.eq(true); + + expect(userPositionOneInfo_after.boostMultiplier.gte(userPositionOneInfo_before.boostMultiplier)).to.deep.eq( + true + ); + expect(userPositionTwoInfo_after.boostMultiplier.gte(userPositionTwoInfo_before.boostMultiplier)).to.deep.eq( + true + ); + expect(userPositionThreeInfo_after.boostMultiplier.gte(userPositionThreeInfo_before.boostMultiplier)).to.deep.eq( + true + ); + }); + + it("WithdrawAll cake in VECake pool, all positions multiplier will be BOOST_PRECISION", async function () { + const userPositionOneInfo_before = await masterChefV3.userPositionInfos(1); + const userPositionTwoInfo_before = await masterChefV3.userPositionInfos(2); + const userPositionThreeInfo_before = await masterChefV3.userPositionInfos(3); + + const userMultiplierOne_before = await FarmBoosterSC.getUserMultiplier(1); + const userMultiplierTwo_before = await FarmBoosterSC.getUserMultiplier(2); + const userMultiplierThree_before = await FarmBoosterSC.getUserMultiplier(3); + + expect(userPositionOneInfo_before.boostMultiplier).to.deep.eq(userMultiplierOne_before); + expect(userPositionTwoInfo_before.boostMultiplier).to.deep.eq(userMultiplierTwo_before); + expect(userPositionThreeInfo_before.boostMultiplier).to.deep.eq(userMultiplierThree_before); + // withdraw all + let TwoYear = BigNumber.from((await time.latest()).toString()).add(YEAR.mul(2)); + await time.increaseTo(TwoYear.toNumber()); + await VECakeSC.connect(user1).withdrawAll(user1.address); + + // update positions multiplier in MasterChef V3 + await masterChefV3.updateLiquidity(1); + await masterChefV3.updateLiquidity(2); + await masterChefV3.updateLiquidity(3); + + const userMultiplierOne_after = await FarmBoosterSC.getUserMultiplier(1); + const userMultiplierTwo_after = await FarmBoosterSC.getUserMultiplier(2); + const userMultiplierThree_after = await FarmBoosterSC.getUserMultiplier(3); + + const userPositionOneInfo_after = await masterChefV3.userPositionInfos(1); + const userPositionTwoInfo_after = await masterChefV3.userPositionInfos(2); + const userPositionThreeInfo_after = await masterChefV3.userPositionInfos(3); + + expect(userMultiplierOne_after.lte(userMultiplierOne_before)).to.deep.eq(true); + expect(userMultiplierTwo_after.lte(userMultiplierTwo_before)).to.deep.eq(true); + expect(userMultiplierThree_after.lte(userMultiplierThree_before)).to.deep.eq(true); + + expect(userPositionOneInfo_after.boostMultiplier.lte(userPositionOneInfo_before.boostMultiplier)).to.deep.eq( + true + ); + expect(userPositionTwoInfo_after.boostMultiplier.lte(userPositionTwoInfo_before.boostMultiplier)).to.deep.eq( + true + ); + expect(userPositionThreeInfo_after.boostMultiplier.lte(userPositionThreeInfo_before.boostMultiplier)).to.deep.eq( + true + ); + + expect(userPositionOneInfo_after.boostMultiplier).to.deep.eq(BOOST_PRECISION); + expect(userPositionTwoInfo_after.boostMultiplier).to.deep.eq(BOOST_PRECISION); + expect(userPositionThreeInfo_after.boostMultiplier).to.deep.eq(BOOST_PRECISION); + }); + }); + + describe("Special cases", function () { + beforeEach(async function () { + await masterChefV3.add(100, poolAddresses[1], true); + + await NonfungiblePositionManagerSC.connect(user1).mint({ + token0: pools[1].token0, + token1: pools[1].token1, + fee: pools[1].fee, + tickLower: -100, + tickUpper: 100, + amount0Desired: ethers.utils.parseUnits("100"), + amount1Desired: ethers.utils.parseUnits("100"), + amount0Min: ethers.constants.Zero, + amount1Min: ethers.constants.Zero, + recipient: user1.address, + deadline: 100000000000000, + }); + }); + it("Stake in MasterChef V3 , Remove all liquidity , can not increase liquidity", async function () { + // // stake in MasterChefV3 + await NonfungiblePositionManagerSC.connect(user1)["safeTransferFrom(address,address,uint256)"]( + user1.address, + masterChefV3.address, + 1 + ); + await time.increase(1); + + let positionInfo1 = await masterChefV3.userPositionInfos(1); + expect(positionInfo1.liquidity.gt(ZERO)).to.deep.eq(true); + // decrease all liquidity + await masterChefV3.connect(user1).decreaseLiquidity({ + tokenId: 1, + liquidity: positionInfo1.liquidity, + amount0Min: ethers.constants.Zero, + amount1Min: ethers.constants.Zero, + deadline: (await time.latest()) + 1, + }); + positionInfo1 = await masterChefV3.userPositionInfos(1); + + expect(positionInfo1.liquidity).to.deep.eq(ZERO); + expect(positionInfo1.boostLiquidity).to.deep.eq(ZERO); + expect(positionInfo1.boostMultiplier.gt(ZERO)).to.deep.eq(true); + + await expectRevert.unspecified( + masterChefV3.connect(user1).increaseLiquidity({ + tokenId: 1, + amount0Desired: ethers.utils.parseUnits("2"), + amount1Desired: ethers.utils.parseUnits("2"), + amount0Min: ethers.constants.Zero, + amount1Min: ethers.constants.Zero, + deadline: (await time.latest()) + 1, + }) + ); + await masterChefV3.connect(user1).withdraw(1, user1.address); + positionInfo1 = await masterChefV3.userPositionInfos(1); + + expect(positionInfo1.liquidity).to.deep.eq(ZERO); + expect(positionInfo1.boostLiquidity).to.deep.eq(ZERO); + expect(positionInfo1.tickLower).to.deep.eq(0); + expect(positionInfo1.tickUpper).to.deep.eq(0); + }); + + it("Stake in MasterChef V3 before set famrm booster, then set farm booster, can withdraw successfully", async function () { + // // stake in MasterChefV3 + await NonfungiblePositionManagerSC.connect(user1)["safeTransferFrom(address,address,uint256)"]( + user1.address, + masterChefV3.address, + 1 + ); + await time.increase(1); + let whiteListStatus = await FarmBoosterSC.whiteList(2); + expect(whiteListStatus).to.deep.eq(false); + await FarmBoosterSC.setBoosterFarms([[2, true]]); + whiteListStatus = await FarmBoosterSC.whiteList(2); + expect(whiteListStatus).to.deep.eq(true); + + let positionInfo1 = await masterChefV3.userPositionInfos(1); + expect(positionInfo1.liquidity.gt(ZERO)).to.deep.eq(true); + + await masterChefV3.connect(user1).withdraw(1, user1.address); + positionInfo1 = await masterChefV3.userPositionInfos(1); + + expect(positionInfo1.liquidity).to.deep.eq(ZERO); + expect(positionInfo1.boostLiquidity).to.deep.eq(ZERO); + expect(positionInfo1.tickLower).to.deep.eq(0); + expect(positionInfo1.tickUpper).to.deep.eq(0); + }); + + it("Stake in MasterChef V3 before set famrm booster, then set farm booster, multiplier from getUserMultiplier before updated will be same as boostMultiplier after updated position liquidity", async function () { + // // stake in MasterChefV3 + await NonfungiblePositionManagerSC.connect(user1)["safeTransferFrom(address,address,uint256)"]( + user1.address, + masterChefV3.address, + 1 + ); + await time.increase(1); + let whiteListStatus = await FarmBoosterSC.whiteList(2); + expect(whiteListStatus).to.deep.eq(false); + + let multiplierBeforeSetWhitelist = await FarmBoosterSC.getUserMultiplier(1); + expect(multiplierBeforeSetWhitelist).to.deep.eq(BOOST_PRECISION); + + await FarmBoosterSC.setBoosterFarms([[2, true]]); + whiteListStatus = await FarmBoosterSC.whiteList(2); + expect(whiteListStatus).to.deep.eq(true); + + let positionInfo1 = await masterChefV3.userPositionInfos(1); + expect(positionInfo1.liquidity.gt(ZERO)).to.deep.eq(true); + + let expectMultiplier = await FarmBoosterSC.getUserMultiplier(1); + + await masterChefV3.connect(user1).updateLiquidity(1); + positionInfo1 = await masterChefV3.userPositionInfos(1); + + expect(positionInfo1.boostMultiplier).to.deep.eq(expectMultiplier); + }); + }); + + describe("Owner operations", function () { + it("Set Booster Farms", async function () { + let pool1WhiteList = await FarmBoosterSC.whiteList(1); + expect(pool1WhiteList).eq(true); + + await masterChefV3.add(100, poolAddresses[1], true); + await masterChefV3.add(100, poolAddresses[2], true); + + let pool2WhiteList = await FarmBoosterSC.whiteList(2); + let pool3WhiteList = await FarmBoosterSC.whiteList(3); + expect(pool2WhiteList).eq(false); + expect(pool3WhiteList).eq(false); + + await FarmBoosterSC.setBoosterFarms([ + [2, true], + [3, true], + ]); + + pool2WhiteList = await FarmBoosterSC.whiteList(2); + pool3WhiteList = await FarmBoosterSC.whiteList(3); + expect(pool2WhiteList).eq(true); + expect(pool3WhiteList).eq(true); + }); + + it("Set CA", async function () { + const MIN_CA = BigNumber.from(10).pow(4); + const MAX_CA = BigNumber.from(10).pow(5); + + await expectRevert(FarmBoosterSC.setCA(MIN_CA.sub(1)), "Invalid cA"); + await expectRevert(FarmBoosterSC.setCA(MAX_CA.add(1)), "Invalid cA"); + + const NEW_CA = MIN_CA.add(6666); + await FarmBoosterSC.setCA(NEW_CA); + let cA = await FarmBoosterSC.cA(); + expect(cA).to.deep.eq(NEW_CA); + }); + + it("Set CB", async function () { + const MIN_CB = BigNumber.from(0); + const MAX_CB = BigNumber.from(10).pow(8); + await expectRevert(FarmBoosterSC.setCB(MIN_CB), "Invalid cB"); + await expectRevert(FarmBoosterSC.setCB(MAX_CB.add(1)), "Invalid cB"); + const NEW_CB = MIN_CB.add(6666); + await FarmBoosterSC.setCB(NEW_CB); + let cB = await FarmBoosterSC.cB(); + expect(cB).to.deep.eq(NEW_CB); + }); + + it("Set CB Override", async function () { + const MAX_CB = BigNumber.from(10).pow(8); + await expectRevert(FarmBoosterSC.setCBOverride(1, MAX_CB.add(1)), "Invalid cB"); + + const NEW_CB = BigNumber.from(88888888); + await FarmBoosterSC.setCBOverride(1, NEW_CB); + let cB = await FarmBoosterSC.cBOverride(1); + expect(cB).to.deep.eq(NEW_CB); + }); + }); +}); diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/CakePool.json b/projects/vecake-farm-booster/v3/test/artifactsFile/CakePool.json new file mode 100644 index 00000000..50a59266 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/CakePool.json @@ -0,0 +1,1551 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CakePool", + "sourceName": "contracts/CakePool.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IMasterChefV2", + "name": "_masterchefV2", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastDepositedTime", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "free", + "type": "bool" + } + ], + "name": "FreeFeeUser", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Harvest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Init", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedDuration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockTimestamp", + "type": "uint256" + } + ], + "name": "Lock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "boostContract", + "type": "address" + } + ], + "name": "NewBoostContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "boostWeight", + "type": "uint256" + } + ], + "name": "NewBoostWeight", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "durationFactor", + "type": "uint256" + } + ], + "name": "NewDurationFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "durationFactorOverdue", + "type": "uint256" + } + ], + "name": "NewDurationFactorOverdue", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxLockDuration", + "type": "uint256" + } + ], + "name": "NewMaxLockDuration", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "NewOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "overdueFee", + "type": "uint256" + } + ], + "name": "NewOverdueFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "performanceFee", + "type": "uint256" + } + ], + "name": "NewPerformanceFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "performanceFeeContract", + "type": "uint256" + } + ], + "name": "NewPerformanceFeeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "treasury", + "type": "address" + } + ], + "name": "NewTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unlockFreeDuration", + "type": "uint256" + } + ], + "name": "NewUnlockFreeDuration", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "VCake", + "type": "address" + } + ], + "name": "NewVCakeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFee", + "type": "uint256" + } + ], + "name": "NewWithdrawFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFeeContract", + "type": "uint256" + } + ], + "name": "NewWithdrawFeeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFeePeriod", + "type": "uint256" + } + ], + "name": "NewWithdrawFeePeriod", + "type": "event" + }, + { + "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": [], + "name": "Pause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockTimestamp", + "type": "uint256" + } + ], + "name": "Unlock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Unpause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BOOST_WEIGHT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BOOST_WEIGHT_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION_FACTOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION_FACTOR_OVERDUE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK_DURATION_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_OVERDUE_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_PERFORMANCE_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_WITHDRAW_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_WITHDRAW_FEE_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_DEPOSIT_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_LOCK_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_WITHDRAW_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION_FACTOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION_FACTOR_SHARE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNLOCK_FREE_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VCake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "available", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "boostContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePoolPID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "calculateOverdueFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "calculatePerformanceFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "calculateTotalPendingCakeRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "calculateWithdrawFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockDuration", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freeOverdueFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freePerformanceFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freeWithdrawFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPricePerFullShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "inCaseTokensGetStuck", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "dummyToken", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "masterchefV2", + "outputs": [ + { + "internalType": "contract IMasterChefV2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "overdueFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "performanceFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "performanceFeeContract", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_boostContract", + "type": "address" + } + ], + "name": "setBoostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_boostWeight", + "type": "uint256" + } + ], + "name": "setBoostWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_durationFactor", + "type": "uint256" + } + ], + "name": "setDurationFactor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_durationFactorOverdue", + "type": "uint256" + } + ], + "name": "setDurationFactorOverdue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setFreePerformanceFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxLockDuration", + "type": "uint256" + } + ], + "name": "setMaxLockDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_overdueFee", + "type": "uint256" + } + ], + "name": "setOverdueFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setOverdueFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_performanceFee", + "type": "uint256" + } + ], + "name": "setPerformanceFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_performanceFeeContract", + "type": "uint256" + } + ], + "name": "setPerformanceFeeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasury", + "type": "address" + } + ], + "name": "setTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_unlockFreeDuration", + "type": "uint256" + } + ], + "name": "setUnlockFreeDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_VCake", + "type": "address" + } + ], + "name": "setVCakeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFee", + "type": "uint256" + } + ], + "name": "setWithdrawFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFeeContract", + "type": "uint256" + } + ], + "name": "setWithdrawFeeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFeePeriod", + "type": "uint256" + } + ], + "name": "setWithdrawFeePeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setWithdrawFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalBoostDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalLockedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "unlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastDepositedTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cakeAtLastUserAction", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUserActionTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockStartTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockEndTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "locked", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "lockedAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawByAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFeeContract", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFeePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60c060405262093a80600e556301e13380600f556301e1338060105562ed4e0060115564e8d4a5100060125560c860135560c8601455600a601555600a60165564e8d4a510006017556203f4806018553480156200005c57600080fd5b5060405162003e5838038062003e588339810160408190526200007f9162000152565b6200008a33620000e9565b6000805460ff60a01b191690556001600160a01b0395861660805293851660a052600880549386166001600160a01b03199485161790556009805492861692841692909217909155600a805491909416911617909155600b55620001da565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200014f57600080fd5b50565b60008060008060008060c087890312156200016c57600080fd5b8651620001798162000139565b60208801519096506200018c8162000139565b60408801519095506200019f8162000139565b6060880151909450620001b28162000139565b6080880151909350620001c58162000139565b8092505060a087015190509295509295509295565b60805160a051613bf6620002626000396000818161082e01528181610bd301528181610c710152818161146c0152818161304801526130f10152600081816109360152818161128c0152818161164b01528181611f46015281816126ae015281816126f3015281816129fd01528181612aad0152818161331501526134fe0152613bf66000f3fe608060405234801561001057600080fd5b50600436106104145760003560e01c80638778878211610221578063cb528b521161012b578063e464c623116100c3578063f2fde38b11610087578063f2fde38b146108f8578063f786b9581461090b578063f851a4401461091e578063fc0c546a14610931578063fd253b641461095857600080fd5b8063e464c623146108c1578063e4b37ef5146108ca578063e73008bc146108d3578063e941fa78146108dc578063f0f44260146108e557600080fd5b8063cb528b5214610829578063ccd34cd514610758578063d4b0de2f14610850578063d826ed0614610859578063def68a9c1461086c578063def7869d1461087f578063df10b4e614610892578063dfcedeee1461089b578063e2bbb158146108ae57600080fd5b8063acaf88cd116101b9578063bc75f4b81161017d578063bc75f4b8146107de578063bdca9165146107e7578063beba0fa0146107f0578063c54d349c14610803578063c6ed51be1461081657600080fd5b8063acaf88cd1461079c578063b3ab15fb146107a5578063b685784414610521578063b6ac642a146107b8578063bb9f408d146107cb57600080fd5b8063877887821461071157806387d4bda91461071a5780638da5cb5b1461073d57806393c99e6a14610745578063948a03f21461075857806395dc14e114610764578063a3639b3914610777578063a5834e061461078a578063aaada5da1461079357600080fd5b806348a0d754116103225780636d4710b9116102ba578063731ff24a1161027e578063731ff24a146106e657806377c7b8fc146106f957806378b4330f146105545780638456cb5914610701578063853828b61461070957600080fd5b80636d4710b9146106a7578063704b6c02146106b057806370897b23146106c3578063715018a6146106d6578063722713f7146106de57600080fd5b806348a0d754146106175780634e4de1e91461061f5780634f1bfc9e146106325780635521e9bf1461063b578063570ca7351461064e57806358ebceb6146106615780635c975abb1461066957806361d027b314610671578063668679ba1461068457600080fd5b80632cfc5f01116103b05780633a98ef39116103745780633a98ef39146105b75780633eb78874146105c05780633f4ba83a146105c95780633fec4e32146105d1578063423b93ed1461060457600080fd5b80632cfc5f01146105545780632d19b9821461055e5780632e1a7d4d1461057e5780632f6c493c1461059157806335981921146105a457600080fd5b806301e813261461041957806305a9f274146104375780630c59696b1461044057806314ff3039146104555780631959a0021461046857806319ab453c1461050e5780631ea30fef146105215780631efac1b81461052e57806329a5cfd614610541575b600080fd5b6104246305265c0081565b6040519081526020015b60405180910390f35b610424600d5481565b61045361044e3660046137ed565b610965565b005b6104536104633660046137ed565b610a40565b6104c861047636600461381b565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460068601546007870154600890970154959794969495939492939192909160ff9091169089565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200161042e565b61045361051c36600461381b565b610ac1565b6104246509184e72a00081565b61045361053c3660046137ed565b610d02565b61042461054f366004613838565b610dda565b61042462093a8081565b600254610571906001600160a01b031681565b60405161042e9190613864565b61045361058c3660046137ed565b610f15565b61045361059f36600461381b565b610f8e565b6104536105b23660046137ed565b6110a1565b61042460075481565b61042460145481565b61045361115f565b6105f46105df36600461381b565b60046020526000908152604090205460ff1681565b604051901515815260200161042e565b610453610612366004613886565b6111e0565b610424611272565b61045361062d366004613886565b611307565b610424600f5481565b6104536106493660046137ed565b611399565b600a54610571906001600160a01b031681565b61042461143f565b6105f46114d7565b600954610571906001600160a01b031681565b6105f461069236600461381b565b60066020526000908152604090205460ff1681565b610424600b5481565b6104536106be36600461381b565b6114e7565b6104536106d13660046137ed565b611588565b610453611609565b610424611644565b6104246b204fce5e3e2502611000000081565b6104246116e0565b610453611732565b6104536117b4565b61042460135481565b6105f461072836600461381b565b60056020526000908152604090205460ff1681565b6105716117cd565b6104536107533660046137ed565b6117dc565b61042464e8d4a5100081565b61042461077236600461381b565b6118ad565b6104536107853660046137ed565b611a00565b61042460175481565b610424600e5481565b61042460115481565b6104536107b336600461381b565b611aaf565b6104536107c63660046137ed565b611b50565b6104536107d93660046137ed565b611bd1565b61042460125481565b6104246107d081565b6104536107fe366004613886565b611c52565b6104536108113660046137ed565b611ce4565b61042461082436600461381b565b611d9f565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b6104246101f481565b61045361086736600461381b565b611e7e565b61045361087a36600461381b565b611f1a565b61045361088d36600461381b565b61205e565b61042460185481565b600154610571906001600160a01b031681565b6104536108bc3660046138bf565b6120fa565b61042460105481565b61042460165481565b610424600c5481565b61042460155481565b6104536108f336600461381b565b61217a565b61045361090636600461381b565b61221b565b6104536109193660046137ed565b6122b8565b600854610571906001600160a01b031681565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b610424652d79883d200081565b6008546001600160a01b031633146109985760405162461bcd60e51b815260040161098f906138e1565b60405180910390fd5b64e8d4a51000811115610a045760405162461bcd60e51b815260206004820152602e60248201527f6f7665726475654665652063616e6e6f74206265206d6f7265207468616e204d60448201526d41585f4f5645524455455f46454560901b606482015260840161098f565b60178190556040518181527ff4bd1c5978320077e792afbb3911e8cab1325ce28a6b3e67f9067a1d80692961906020015b60405180910390a150565b6008546001600160a01b03163314610a6a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115610a8c5760405162461bcd60e51b815260040161098f90613906565b60168190556040518181527fcab352e118188b8a2f20a2e8c4ce1241ce2c1740aac4f17c5b0831e65824d8ef90602001610a35565b33610aca6117cd565b6001600160a01b031614610af05760405162461bcd60e51b815260040161098f90613956565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610b1f903390600401613864565b602060405180830381865afa158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b60919061398b565b905080610ba75760405162461bcd60e51b8152602060048201526015602482015274042616c616e6365206d75737420657863656564203605c1b604482015260640161098f565b610bbc6001600160a01b038316333084612391565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820183905283169063095ea7b3906044016020604051808303816000875af1158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f91906139a4565b50600b54604051631c57762b60e31b81526004810191909152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b50506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc14925060009150a15050565b6008546001600160a01b03163314610d2c5760405162461bcd60e51b815260040161098f906138e1565b62093a80811115610da55760405162461bcd60e51b815260206004820152603d60248201527f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560448201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000606482015260840161098f565b60188190556040518181527fb89ddaddb7435be26824cb48d2d0186c9525a2e1ec057abcb502704cdc0686cc90602001610a35565b6001600160a01b03821660009081526003602052604081208054831115610e0057805492505b3360009081526005602052604090205460ff16158015610e3057506018548160010154610e2d91906139d7565b42105b15610f09576000610e3f61143f565b610e47611644565b610e5191906139d7565b8254909150600090610e6864e8d4a51000876139ef565b610e729190613a0e565b90506000610e7f87612402565b60068501546007548654610e9390876139ef565b610e9d9190613a0e565b610ea79190613a30565b610eb19190613a30565b9050600064e8d4a51000610ec584846139ef565b610ecf9190613a0e565b601554909150333b15610ee157506016545b6000612710610ef083856139ef565b610efa9190613a0e565b9750610f0f9650505050505050565b60009150505b92915050565b610f1d6114d7565b15610f3a5760405162461bcd60e51b815260040161098f90613a47565b60008111610f805760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161098f565b610f8b816000612420565b50565b80336001600160a01b0382161480610fb05750600a546001600160a01b031633145b610ffc5760405162461bcd60e51b815260206004820152601a60248201527f4e6f74206f70657261746f72206f722063616b65206f776e6572000000000000604482015260640161098f565b6110046114d7565b156110215760405162461bcd60e51b815260040161098f90613a47565b6001600160a01b0382166000908152600360205260409020600781015460ff1680156110505750428160050154105b6110905760405162461bcd60e51b815260206004820152601160248201527010d85b9b9bdd081d5b9b1bd8dac81e595d607a1b604482015260640161098f565b61109c600080856127a6565b505050565b6008546001600160a01b031633146110cb5760405162461bcd60e51b815260040161098f906138e1565b6000811161112a5760405162461bcd60e51b815260206004820152602660248201527f4455524154494f4e5f464143544f525f4f5645524455452063616e6e6f74206260448201526565207a65726f60d01b606482015260840161098f565b60118190556040518181527f18b6d179114082d7eda9837e15a39eb30032d5f3df00487a67541398f48fabfe90602001610a35565b6008546001600160a01b031633146111895760405162461bcd60e51b815260040161098f906138e1565b6111916114d7565b6111ad5760405162461bcd60e51b815260040161098f90613a71565b6111b5612e08565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6008546001600160a01b0316331461120a5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166112305760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260046020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906112c1903090600401613864565b602060405180830381865afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611302919061398b565b905090565b6008546001600160a01b031633146113315760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166113575760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260066020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6113a16114d7565b156113be5760405162461bcd60e51b815260040161098f90613a47565b6509184e72a00081116114345760405162461bcd60e51b815260206004820152603860248201527f576974686472617720616d6f756e74206d7573742062652067726561746572206044820152771d1a185b8813525397d5d2551211149055d7d05353d5539560421b606482015260840161098f565b610f8b600082612420565b600b54604051631175a1dd60e01b8152600481019190915230602482015260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631175a1dd90604401602060405180830381865afa1580156114b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f919061398b565b600054600160a01b900460ff1690565b336114f06117cd565b6001600160a01b0316146115165760405162461bcd60e51b815260040161098f90613956565b6001600160a01b03811661153c5760405162461bcd60e51b815260040161098f90613a9f565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91610a3591613864565b6008546001600160a01b031633146115b25760405162461bcd60e51b815260040161098f906138e1565b6107d08111156115d45760405162461bcd60e51b815260040161098f90613acf565b60138190556040518181527fefeafcf03e479a9566d7ef321b4816de0ba19cfa3cd0fae2f8c5f4a0afb342c490602001610a35565b336116126117cd565b6001600160a01b0316146116385760405162461bcd60e51b815260040161098f90613956565b6116426000612e73565b565b6000600c547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016116959190613864565b602060405180830381865afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d6919061398b565b61130291906139d7565b6000600754600014611725576007546116f761143f565b6116ff611644565b61170991906139d7565b61171b90670de0b6b3a76400006139ef565b6113029190613a0e565b50670de0b6b3a764000090565b6008546001600160a01b0316331461175c5760405162461bcd60e51b815260040161098f906138e1565b6117646114d7565b156117815760405162461bcd60e51b815260040161098f90613a47565b611789612ec3565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b3360009081526003602052604090205461164290610f15565b6000546001600160a01b031690565b6008546001600160a01b031633146118065760405162461bcd60e51b815260040161098f906138e1565b652d79883d20008111156118785760405162461bcd60e51b815260206004820152603360248201527f424f4f53545f5745494748542063616e6e6f74206265206d6f7265207468616e604482015272081093d3d4d517d5d15251d21517d312535255606a1b606482015260840161098f565b60128190556040518181527f7666dfff8c3377938e522b4eed3aff079973a976f95969db60a406d49f40da4e90602001610a35565b6001600160a01b03811660009081526003602052604081208054158015906118d95750600781015460ff165b80156118fe57506001600160a01b03831660009081526006602052604090205460ff16155b801561191a575042600e54826005015461191891906139d7565b105b156119f757600061192961143f565b611931611644565b61193b91906139d7565b6006830154600754845492935060009261195590856139ef565b61195f9190613a0e565b6119699190613a30565b9050600083600801548261197d9190613a30565b90506000600e548560050154426119949190613a30565b61199e9190613a30565b90506011548111156119af57506011545b6000601154601754836119c291906139ef565b6119cc9190613a0e565b9050600064e8d4a510006119e083866139ef565b6119ea9190613a0e565b9998505050505050505050565b50600092915050565b6008546001600160a01b03163314611a2a5760405162461bcd60e51b815260040161098f906138e1565b60008111611a7a5760405162461bcd60e51b815260206004820152601e60248201527f4455524154494f4e5f464143544f522063616e6e6f74206265207a65726f0000604482015260640161098f565b60108190556040518181527f9478eb023aac0a7d58a4e935377056bf27cf5b72a2300725f831817a8f62fbde90602001610a35565b33611ab86117cd565b6001600160a01b031614611ade5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b038116611b045760405162461bcd60e51b815260040161098f90613a9f565b600a80546001600160a01b0319166001600160a01b0383169081179091556040517fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a91610a3591613864565b6008546001600160a01b03163314611b7a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115611b9c5760405162461bcd60e51b815260040161098f90613906565b60158190556040518181527fd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d90602001610a35565b6008546001600160a01b03163314611bfb5760405162461bcd60e51b815260040161098f906138e1565b6107d0811115611c1d5760405162461bcd60e51b815260040161098f90613acf565b60148190556040518181527fc5d25457b67b87678c987375af13f6e50beb3ad7bfd009da26766ae986eaa20d90602001610a35565b6008546001600160a01b03163314611c7c5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038216611ca25760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260056020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6008546001600160a01b03163314611d0e5760405162461bcd60e51b815260040161098f906138e1565b60008111611d6a5760405162461bcd60e51b815260206004820152602360248201527f554e4c4f434b5f465245455f4455524154494f4e2063616e6e6f74206265207a60448201526265726f60e81b606482015260840161098f565b600e8190556040518181527ff84bf2b901cfc02956d4e69556d7448cef4ea13587e7714dba7c6d697091e7ad90602001610a35565b6001600160a01b0381166000908152600360205260408120805415801590611dcc5750600781015460ff16155b8015611df157506001600160a01b03831660009081526004602052604090205460ff16155b156119f7576000611e0061143f565b611e08611644565b611e1291906139d7565b90506000600754828460000154611e2991906139ef565b611e339190613a0e565b90506000836002015482611e479190613a30565b601354909150863b15611e5957506014545b6000612710611e6883856139ef565b611e729190613a0e565b98975050505050505050565b6008546001600160a01b03163314611ea85760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038116611ece5760405162461bcd60e51b815260040161098f90613a9f565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5352e27b0414343d9438a1c6e9d04c65c7cb4d91f44920afee588f91717893f191610a3591613864565b6008546001600160a01b03163314611f445760405162461bcd60e51b815260040161098f906138e1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611fd45760405162461bcd60e51b815260206004820152602560248201527f546f6b656e2063616e6e6f742062652073616d65206173206465706f736974206044820152643a37b5b2b760d91b606482015260840161098f565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190612003903090600401613864565b602060405180830381865afa158015612020573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612044919061398b565b905061205a6001600160a01b0383163383612f23565b5050565b6008546001600160a01b031633146120885760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0381166120ae5760405162461bcd60e51b815260040161098f90613a9f565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f8f49a182922022d9119a1a6aeeca151b4a5665e86bd61c1ff32e152d459558b291610a3591613864565b6121026114d7565b1561211f5760405162461bcd60e51b815260040161098f90613a47565b600082118061212e5750600081115b61216f5760405162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015260640161098f565b61205a8282336127a6565b336121836117cd565b6001600160a01b0316146121a95760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166121cf5760405162461bcd60e51b815260040161098f90613a9f565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea08691610a3591613864565b336122246117cd565b6001600160a01b03161461224a5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166122af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161098f565b610f8b81612e73565b6008546001600160a01b031633146122e25760405162461bcd60e51b815260040161098f906138e1565b6305265c0081111561235c5760405162461bcd60e51b815260206004820152603d60248201527f4d41585f4c4f434b5f4455524154494f4e2063616e6e6f74206265206d6f726560448201527f207468616e204d41585f4c4f434b5f4455524154494f4e5f4c494d4954000000606482015260840161098f565b600f8190556040518181527fcab2f3455b51b6ca5377e84fccd0f890b6f6ca36c02e18b6d36cb34f469fe4fe90602001610a35565b6040516001600160a01b03808516602483015283166044820152606481018290526123fc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f53565b50505050565b600061240d826118ad565b61241683611d9f565b610f0f91906139d7565b33600090815260036020526040902080548311156124805760405162461bcd60e51b815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015260640161098f565b428160050154106124c35760405162461bcd60e51b815260206004820152600d60248201526c5374696c6c20696e206c6f636b60981b604482015260640161098f565b6002546001600160a01b031615612537576002546040516351cff8d960e01b81526001600160a01b03909116906351cff8d990612504903390600401613864565b600060405180830381600087803b15801561251e57600080fd5b505af1158015612532573d6000803e3d6000fd5b505050505b805483906000906125546b204fce5e3e25026110000000846139ef565b61255e9190613a0e565b9050612568613025565b612571336131a3565b8415801561257f5750600084115b156125c057600061258e611644565b9050806007548661259f91906139ef565b6125a99190613a0e565b84549093508311156125ba57835492505b506125e7565b82546b204fce5e3e25026110000000906125da90836139ef565b6125e49190613a0e565b91505b6000600754836125f5611644565b6125ff91906139ef565b6126099190613a0e565b90508284600001600082825461261f9190613a30565b9250508190555082600760008282546126389190613a30565b90915550503360009081526005602052604090205460ff1615801561266d5750601854846001015461266a91906139d7565b42105b156126e657601554333b1561268157506016545b600061271061269083856139ef565b61269a9190613a0e565b6009549091506126d7906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6126e18184613a30565b925050505b61271a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612f23565b83541561274c5760075461272c611644565b855461273891906139ef565b6127429190613a0e565b6002850155612754565b600060028501555b4260038501556127633361359e565b604080518281526020810185905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a2505050505050565b6001600160a01b0381166000908152600360205260409020805415806127cc5750600084115b15612845576509184e72a00084116128455760405162461bcd60e51b815260206004820152603660248201527f4465706f73697420616d6f756e74206d757374206265206772656174657220746044820152751a185b8813525397d1115413d4d25517d05353d5539560521b606482015260840161098f565b6005810154839042116128a3578415612882574260048301556008820154600d8054600090612875908490613a30565b9091555050600060088301555b816004015482600501546128969190613a30565b6128a090826139d7565b90505b8315806128b3575062093a808110155b6128ff5760405162461bcd60e51b815260206004820152601f60248201527f4d696e696d756d206c6f636b20706572696f64206973206f6e65207765656b00604482015260640161098f565b600f548111156129515760405162461bcd60e51b815260206004820152601c60248201527f4d6178696d756d206c6f636b20706572696f6420657863656564656400000000604482015260640161098f565b6002546001600160a01b0316156129d057600254604051630efe6a8b60e01b81526001600160a01b038581166004830152602482018890526044820187905290911690630efe6a8b90606401600060405180830381600087803b1580156129b757600080fd5b505af11580156129cb573d6000803e3d6000fd5b505050505b6129d8613025565b600754612a285760006129e9611272565b600954909150612a26906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b505b612a31836131a3565b8315612a8a574282600501541015612a60574260048301819055612a569085906139d7565b6005830155612a7a565b83826005016000828254612a7491906139d7565b90915550505b60078201805460ff191660011790555b600080600080612a98611644565b90508815612ad957612ad56001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001688308c612391565b8892505b855415801590612aed5750600786015460ff165b15612b66576007548654612b0190836139ef565b612b0b9190613a0e565b9150612b1782846139d7565b9250856000015460076000828254612b2f9190613a30565b9091555050600086556004860154421415612b665760088601829055600d8054839190600090612b609084906139d7565b90915550505b60075415612b9657612b788282613a30565b600754612b8590856139ef565b612b8f9190613a0e565b9350612b9a565b8293505b856004015486600501541115612d1b57600060105460125488600401548960050154612bc69190613a30565b612bd091906139ef565b612bda9190613a0e565b9050600064e8d4a51000612bee87846139ef565b612bf89190613a0e565b9050612c0481876139d7565b955085886000016000828254612c1a91906139d7565b909155506000905064e8d4a51000612c3287856139ef565b612c3c9190613a0e565b905080896006016000828254612c5291906139d7565b9250508190555080600c6000828254612c6b91906139d7565b925050819055508b896008016000828254612c8691906139d7565b925050819055508b600d6000828254612c9f91906139d7565b92505081905550896001600160a01b03167f2b943276e5d747f6f7dd46d3b880d8874cb8d6b9b88ca1903990a2738e7dc7a18a600801548b600001548c600401548d60050154612cef9190613a30565b6040805193845260208401929092529082015242606082015260800160405180910390a2505050612d35565b83866000016000828254612d2f91906139d7565b90915550505b6000891180612d445750600088115b15612d50574260018701555b8360076000828254612d6291906139d7565b90915550506006860154600754612d77611644565b8854612d8391906139ef565b612d8d9190613a0e565b612d979190613a30565b6002870155426003870155612dab8761359e565b604080518a8152602081018690529081018990524260608201526001600160a01b038816907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060800160405180910390a2505050505050505050565b612e106114d7565b612e2c5760405162461bcd60e51b815260040161098f90613a71565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051612e699190613864565b60405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612ecb6114d7565b15612ee85760405162461bcd60e51b815260040161098f90613a47565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e5c3390565b6040516001600160a01b03831660248201526044810182905261109c90849063a9059cbb60e01b906064016123c5565b6000612fa8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661366a9092919063ffffffff16565b80519091501561109c5780806020019051810190612fc691906139a4565b61109c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161098f565b600b54604051631175a1dd60e01b815260048101919091523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631175a1dd90604401602060405180830381865afa158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb919061398b565b90508015610f8b5760006130cd611272565b600b54604051630441a3e760e41b81526004810191909152600060248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b15801561313d57600080fd5b505af1158015613151573d6000803e3d6000fd5b50505050600061315f611272565b9050337fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba61318d8484613a30565b60405190815260200160405180910390a2505050565b6001600160a01b038116600090815260036020526040902080541561205a57600781015460ff1615613446576000816006015460075483600001546131e6611644565b6131f091906139ef565b6131fa9190613a0e565b6132049190613a30565b90508160060154600c600082825461321c9190613a30565b90915550506000600683018190558254600780549192909161323f908490613a30565b90915550506001600160a01b03831660009081526006602052604090205460ff1615801561327d575042600e54836005015461327b91906139d7565b105b1561334f5760008260080154826132949190613a30565b90506000600e548460050154426132ab9190613a30565b6132b59190613a30565b90506011548111156132c657506011545b6000601154601754836132d991906139ef565b6132e39190613a0e565b9050600064e8d4a510006132f783866139ef565b6133019190613a0e565b60095490915061333e906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6133488186613a30565b9450505050505b6000613359611644565b9050600060075460001461338f576133718383613a30565b60075461337e90856139ef565b6133889190613a0e565b9050613392565b50815b808455600780548291906000906133aa9084906139d7565b9091555050600584015442111561343f5760078401805460ff19169055600060048501819055600585018190556008850154600d8054919290916133ef908490613a30565b909155505060006008850155604080518481524260208201526001600160a01b038716917ff7870c5b224cbc19873599e46ccfc7103934650509b1af0c3ce90138377c2004910160405180910390a25b5050505050565b6001600160a01b03821660009081526004602052604090205460ff1661205a576000600754613473611644565b835461347f91906139ef565b6134899190613a0e565b90508160000154600760008282546134a19190613a30565b9091555050600080835560028301546134ba9083613a30565b601354909150843b156134cc57506014545b60006127106134db83856139ef565b6134e59190613a0e565b9050801561353457600954613527906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6135318185613a30565b93505b600061353e611644565b90506000600754600014613574576135568683613a30565b60075461356390886139ef565b61356d9190613a0e565b9050613577565b50845b8087556007805482919060009061358f9084906139d7565b90915550505050505050505050565b6001546001600160a01b031615610f8b576001600160a01b0381166000908152600360205260408120600481015460058201549192916135de9190613a30565b6001546008840154600d5460105460405163e874fdaf60e01b81526001600160a01b03898116600483015260248201949094526044810186905260648101929092526084820152929350169063e874fdaf9060a401600060405180830381600087803b15801561364d57600080fd5b505af1158015613661573d6000803e3d6000fd5b50505050505050565b60606136798484600085613683565b90505b9392505050565b6060824710156136e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161098f565b6001600160a01b0385163b61373b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161098f565b600080866001600160a01b031685876040516137579190613b51565b60006040518083038185875af1925050503d8060008114613794576040519150601f19603f3d011682016040523d82523d6000602084013e613799565b606091505b50915091506137a98282866137b4565b979650505050505050565b606083156137c357508161367c565b8251156137d35782518084602001fd5b8160405162461bcd60e51b815260040161098f9190613b6d565b6000602082840312156137ff57600080fd5b5035919050565b6001600160a01b0381168114610f8b57600080fd5b60006020828403121561382d57600080fd5b813561367c81613806565b6000806040838503121561384b57600080fd5b823561385681613806565b946020939093013593505050565b6001600160a01b0391909116815260200190565b8015158114610f8b57600080fd5b6000806040838503121561389957600080fd5b82356138a481613806565b915060208301356138b481613878565b809150509250929050565b600080604083850312156138d257600080fd5b50508035926020909101359150565b6020808252600b908201526a61646d696e3a207775743f60a81b604082015260600190565b60208082526030908201527f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060408201526f4d41585f57495448445241575f46454560801b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561399d57600080fd5b5051919050565b6000602082840312156139b657600080fd5b815161367c81613878565b634e487b7160e01b600052601160045260246000fd5b600082198211156139ea576139ea6139c1565b500190565b6000816000190483118215151615613a0957613a096139c1565b500290565b600082613a2b57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613a4257613a426139c1565b500390565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526016908201527543616e6e6f74206265207a65726f206164647265737360501b604082015260600190565b60208082526036908201527f706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468604082015275616e204d41585f504552464f524d414e43455f46454560501b606082015260800190565b60005b83811015613b40578181015183820152602001613b28565b838111156123fc5750506000910152565b60008251613b63818460208701613b25565b9190910192915050565b6020815260008251806020840152613b8c816040850160208701613b25565b601f01601f1916919091016040019291505056fe3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d44a26469706673582212208fac60e48eb35e29f7a743c638638371e8b2fc9dffb4ce7b25ae133d7651c44a64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106104145760003560e01c80638778878211610221578063cb528b521161012b578063e464c623116100c3578063f2fde38b11610087578063f2fde38b146108f8578063f786b9581461090b578063f851a4401461091e578063fc0c546a14610931578063fd253b641461095857600080fd5b8063e464c623146108c1578063e4b37ef5146108ca578063e73008bc146108d3578063e941fa78146108dc578063f0f44260146108e557600080fd5b8063cb528b5214610829578063ccd34cd514610758578063d4b0de2f14610850578063d826ed0614610859578063def68a9c1461086c578063def7869d1461087f578063df10b4e614610892578063dfcedeee1461089b578063e2bbb158146108ae57600080fd5b8063acaf88cd116101b9578063bc75f4b81161017d578063bc75f4b8146107de578063bdca9165146107e7578063beba0fa0146107f0578063c54d349c14610803578063c6ed51be1461081657600080fd5b8063acaf88cd1461079c578063b3ab15fb146107a5578063b685784414610521578063b6ac642a146107b8578063bb9f408d146107cb57600080fd5b8063877887821461071157806387d4bda91461071a5780638da5cb5b1461073d57806393c99e6a14610745578063948a03f21461075857806395dc14e114610764578063a3639b3914610777578063a5834e061461078a578063aaada5da1461079357600080fd5b806348a0d754116103225780636d4710b9116102ba578063731ff24a1161027e578063731ff24a146106e657806377c7b8fc146106f957806378b4330f146105545780638456cb5914610701578063853828b61461070957600080fd5b80636d4710b9146106a7578063704b6c02146106b057806370897b23146106c3578063715018a6146106d6578063722713f7146106de57600080fd5b806348a0d754146106175780634e4de1e91461061f5780634f1bfc9e146106325780635521e9bf1461063b578063570ca7351461064e57806358ebceb6146106615780635c975abb1461066957806361d027b314610671578063668679ba1461068457600080fd5b80632cfc5f01116103b05780633a98ef39116103745780633a98ef39146105b75780633eb78874146105c05780633f4ba83a146105c95780633fec4e32146105d1578063423b93ed1461060457600080fd5b80632cfc5f01146105545780632d19b9821461055e5780632e1a7d4d1461057e5780632f6c493c1461059157806335981921146105a457600080fd5b806301e813261461041957806305a9f274146104375780630c59696b1461044057806314ff3039146104555780631959a0021461046857806319ab453c1461050e5780631ea30fef146105215780631efac1b81461052e57806329a5cfd614610541575b600080fd5b6104246305265c0081565b6040519081526020015b60405180910390f35b610424600d5481565b61045361044e3660046137ed565b610965565b005b6104536104633660046137ed565b610a40565b6104c861047636600461381b565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460068601546007870154600890970154959794969495939492939192909160ff9091169089565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200161042e565b61045361051c36600461381b565b610ac1565b6104246509184e72a00081565b61045361053c3660046137ed565b610d02565b61042461054f366004613838565b610dda565b61042462093a8081565b600254610571906001600160a01b031681565b60405161042e9190613864565b61045361058c3660046137ed565b610f15565b61045361059f36600461381b565b610f8e565b6104536105b23660046137ed565b6110a1565b61042460075481565b61042460145481565b61045361115f565b6105f46105df36600461381b565b60046020526000908152604090205460ff1681565b604051901515815260200161042e565b610453610612366004613886565b6111e0565b610424611272565b61045361062d366004613886565b611307565b610424600f5481565b6104536106493660046137ed565b611399565b600a54610571906001600160a01b031681565b61042461143f565b6105f46114d7565b600954610571906001600160a01b031681565b6105f461069236600461381b565b60066020526000908152604090205460ff1681565b610424600b5481565b6104536106be36600461381b565b6114e7565b6104536106d13660046137ed565b611588565b610453611609565b610424611644565b6104246b204fce5e3e2502611000000081565b6104246116e0565b610453611732565b6104536117b4565b61042460135481565b6105f461072836600461381b565b60056020526000908152604090205460ff1681565b6105716117cd565b6104536107533660046137ed565b6117dc565b61042464e8d4a5100081565b61042461077236600461381b565b6118ad565b6104536107853660046137ed565b611a00565b61042460175481565b610424600e5481565b61042460115481565b6104536107b336600461381b565b611aaf565b6104536107c63660046137ed565b611b50565b6104536107d93660046137ed565b611bd1565b61042460125481565b6104246107d081565b6104536107fe366004613886565b611c52565b6104536108113660046137ed565b611ce4565b61042461082436600461381b565b611d9f565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b6104246101f481565b61045361086736600461381b565b611e7e565b61045361087a36600461381b565b611f1a565b61045361088d36600461381b565b61205e565b61042460185481565b600154610571906001600160a01b031681565b6104536108bc3660046138bf565b6120fa565b61042460105481565b61042460165481565b610424600c5481565b61042460155481565b6104536108f336600461381b565b61217a565b61045361090636600461381b565b61221b565b6104536109193660046137ed565b6122b8565b600854610571906001600160a01b031681565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b610424652d79883d200081565b6008546001600160a01b031633146109985760405162461bcd60e51b815260040161098f906138e1565b60405180910390fd5b64e8d4a51000811115610a045760405162461bcd60e51b815260206004820152602e60248201527f6f7665726475654665652063616e6e6f74206265206d6f7265207468616e204d60448201526d41585f4f5645524455455f46454560901b606482015260840161098f565b60178190556040518181527ff4bd1c5978320077e792afbb3911e8cab1325ce28a6b3e67f9067a1d80692961906020015b60405180910390a150565b6008546001600160a01b03163314610a6a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115610a8c5760405162461bcd60e51b815260040161098f90613906565b60168190556040518181527fcab352e118188b8a2f20a2e8c4ce1241ce2c1740aac4f17c5b0831e65824d8ef90602001610a35565b33610aca6117cd565b6001600160a01b031614610af05760405162461bcd60e51b815260040161098f90613956565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610b1f903390600401613864565b602060405180830381865afa158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b60919061398b565b905080610ba75760405162461bcd60e51b8152602060048201526015602482015274042616c616e6365206d75737420657863656564203605c1b604482015260640161098f565b610bbc6001600160a01b038316333084612391565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820183905283169063095ea7b3906044016020604051808303816000875af1158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f91906139a4565b50600b54604051631c57762b60e31b81526004810191909152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b50506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc14925060009150a15050565b6008546001600160a01b03163314610d2c5760405162461bcd60e51b815260040161098f906138e1565b62093a80811115610da55760405162461bcd60e51b815260206004820152603d60248201527f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560448201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000606482015260840161098f565b60188190556040518181527fb89ddaddb7435be26824cb48d2d0186c9525a2e1ec057abcb502704cdc0686cc90602001610a35565b6001600160a01b03821660009081526003602052604081208054831115610e0057805492505b3360009081526005602052604090205460ff16158015610e3057506018548160010154610e2d91906139d7565b42105b15610f09576000610e3f61143f565b610e47611644565b610e5191906139d7565b8254909150600090610e6864e8d4a51000876139ef565b610e729190613a0e565b90506000610e7f87612402565b60068501546007548654610e9390876139ef565b610e9d9190613a0e565b610ea79190613a30565b610eb19190613a30565b9050600064e8d4a51000610ec584846139ef565b610ecf9190613a0e565b601554909150333b15610ee157506016545b6000612710610ef083856139ef565b610efa9190613a0e565b9750610f0f9650505050505050565b60009150505b92915050565b610f1d6114d7565b15610f3a5760405162461bcd60e51b815260040161098f90613a47565b60008111610f805760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161098f565b610f8b816000612420565b50565b80336001600160a01b0382161480610fb05750600a546001600160a01b031633145b610ffc5760405162461bcd60e51b815260206004820152601a60248201527f4e6f74206f70657261746f72206f722063616b65206f776e6572000000000000604482015260640161098f565b6110046114d7565b156110215760405162461bcd60e51b815260040161098f90613a47565b6001600160a01b0382166000908152600360205260409020600781015460ff1680156110505750428160050154105b6110905760405162461bcd60e51b815260206004820152601160248201527010d85b9b9bdd081d5b9b1bd8dac81e595d607a1b604482015260640161098f565b61109c600080856127a6565b505050565b6008546001600160a01b031633146110cb5760405162461bcd60e51b815260040161098f906138e1565b6000811161112a5760405162461bcd60e51b815260206004820152602660248201527f4455524154494f4e5f464143544f525f4f5645524455452063616e6e6f74206260448201526565207a65726f60d01b606482015260840161098f565b60118190556040518181527f18b6d179114082d7eda9837e15a39eb30032d5f3df00487a67541398f48fabfe90602001610a35565b6008546001600160a01b031633146111895760405162461bcd60e51b815260040161098f906138e1565b6111916114d7565b6111ad5760405162461bcd60e51b815260040161098f90613a71565b6111b5612e08565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6008546001600160a01b0316331461120a5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166112305760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260046020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906112c1903090600401613864565b602060405180830381865afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611302919061398b565b905090565b6008546001600160a01b031633146113315760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166113575760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260066020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6113a16114d7565b156113be5760405162461bcd60e51b815260040161098f90613a47565b6509184e72a00081116114345760405162461bcd60e51b815260206004820152603860248201527f576974686472617720616d6f756e74206d7573742062652067726561746572206044820152771d1a185b8813525397d5d2551211149055d7d05353d5539560421b606482015260840161098f565b610f8b600082612420565b600b54604051631175a1dd60e01b8152600481019190915230602482015260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631175a1dd90604401602060405180830381865afa1580156114b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f919061398b565b600054600160a01b900460ff1690565b336114f06117cd565b6001600160a01b0316146115165760405162461bcd60e51b815260040161098f90613956565b6001600160a01b03811661153c5760405162461bcd60e51b815260040161098f90613a9f565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91610a3591613864565b6008546001600160a01b031633146115b25760405162461bcd60e51b815260040161098f906138e1565b6107d08111156115d45760405162461bcd60e51b815260040161098f90613acf565b60138190556040518181527fefeafcf03e479a9566d7ef321b4816de0ba19cfa3cd0fae2f8c5f4a0afb342c490602001610a35565b336116126117cd565b6001600160a01b0316146116385760405162461bcd60e51b815260040161098f90613956565b6116426000612e73565b565b6000600c547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016116959190613864565b602060405180830381865afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d6919061398b565b61130291906139d7565b6000600754600014611725576007546116f761143f565b6116ff611644565b61170991906139d7565b61171b90670de0b6b3a76400006139ef565b6113029190613a0e565b50670de0b6b3a764000090565b6008546001600160a01b0316331461175c5760405162461bcd60e51b815260040161098f906138e1565b6117646114d7565b156117815760405162461bcd60e51b815260040161098f90613a47565b611789612ec3565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b3360009081526003602052604090205461164290610f15565b6000546001600160a01b031690565b6008546001600160a01b031633146118065760405162461bcd60e51b815260040161098f906138e1565b652d79883d20008111156118785760405162461bcd60e51b815260206004820152603360248201527f424f4f53545f5745494748542063616e6e6f74206265206d6f7265207468616e604482015272081093d3d4d517d5d15251d21517d312535255606a1b606482015260840161098f565b60128190556040518181527f7666dfff8c3377938e522b4eed3aff079973a976f95969db60a406d49f40da4e90602001610a35565b6001600160a01b03811660009081526003602052604081208054158015906118d95750600781015460ff165b80156118fe57506001600160a01b03831660009081526006602052604090205460ff16155b801561191a575042600e54826005015461191891906139d7565b105b156119f757600061192961143f565b611931611644565b61193b91906139d7565b6006830154600754845492935060009261195590856139ef565b61195f9190613a0e565b6119699190613a30565b9050600083600801548261197d9190613a30565b90506000600e548560050154426119949190613a30565b61199e9190613a30565b90506011548111156119af57506011545b6000601154601754836119c291906139ef565b6119cc9190613a0e565b9050600064e8d4a510006119e083866139ef565b6119ea9190613a0e565b9998505050505050505050565b50600092915050565b6008546001600160a01b03163314611a2a5760405162461bcd60e51b815260040161098f906138e1565b60008111611a7a5760405162461bcd60e51b815260206004820152601e60248201527f4455524154494f4e5f464143544f522063616e6e6f74206265207a65726f0000604482015260640161098f565b60108190556040518181527f9478eb023aac0a7d58a4e935377056bf27cf5b72a2300725f831817a8f62fbde90602001610a35565b33611ab86117cd565b6001600160a01b031614611ade5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b038116611b045760405162461bcd60e51b815260040161098f90613a9f565b600a80546001600160a01b0319166001600160a01b0383169081179091556040517fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a91610a3591613864565b6008546001600160a01b03163314611b7a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115611b9c5760405162461bcd60e51b815260040161098f90613906565b60158190556040518181527fd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d90602001610a35565b6008546001600160a01b03163314611bfb5760405162461bcd60e51b815260040161098f906138e1565b6107d0811115611c1d5760405162461bcd60e51b815260040161098f90613acf565b60148190556040518181527fc5d25457b67b87678c987375af13f6e50beb3ad7bfd009da26766ae986eaa20d90602001610a35565b6008546001600160a01b03163314611c7c5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038216611ca25760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260056020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6008546001600160a01b03163314611d0e5760405162461bcd60e51b815260040161098f906138e1565b60008111611d6a5760405162461bcd60e51b815260206004820152602360248201527f554e4c4f434b5f465245455f4455524154494f4e2063616e6e6f74206265207a60448201526265726f60e81b606482015260840161098f565b600e8190556040518181527ff84bf2b901cfc02956d4e69556d7448cef4ea13587e7714dba7c6d697091e7ad90602001610a35565b6001600160a01b0381166000908152600360205260408120805415801590611dcc5750600781015460ff16155b8015611df157506001600160a01b03831660009081526004602052604090205460ff16155b156119f7576000611e0061143f565b611e08611644565b611e1291906139d7565b90506000600754828460000154611e2991906139ef565b611e339190613a0e565b90506000836002015482611e479190613a30565b601354909150863b15611e5957506014545b6000612710611e6883856139ef565b611e729190613a0e565b98975050505050505050565b6008546001600160a01b03163314611ea85760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038116611ece5760405162461bcd60e51b815260040161098f90613a9f565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5352e27b0414343d9438a1c6e9d04c65c7cb4d91f44920afee588f91717893f191610a3591613864565b6008546001600160a01b03163314611f445760405162461bcd60e51b815260040161098f906138e1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611fd45760405162461bcd60e51b815260206004820152602560248201527f546f6b656e2063616e6e6f742062652073616d65206173206465706f736974206044820152643a37b5b2b760d91b606482015260840161098f565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190612003903090600401613864565b602060405180830381865afa158015612020573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612044919061398b565b905061205a6001600160a01b0383163383612f23565b5050565b6008546001600160a01b031633146120885760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0381166120ae5760405162461bcd60e51b815260040161098f90613a9f565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f8f49a182922022d9119a1a6aeeca151b4a5665e86bd61c1ff32e152d459558b291610a3591613864565b6121026114d7565b1561211f5760405162461bcd60e51b815260040161098f90613a47565b600082118061212e5750600081115b61216f5760405162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015260640161098f565b61205a8282336127a6565b336121836117cd565b6001600160a01b0316146121a95760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166121cf5760405162461bcd60e51b815260040161098f90613a9f565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea08691610a3591613864565b336122246117cd565b6001600160a01b03161461224a5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166122af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161098f565b610f8b81612e73565b6008546001600160a01b031633146122e25760405162461bcd60e51b815260040161098f906138e1565b6305265c0081111561235c5760405162461bcd60e51b815260206004820152603d60248201527f4d41585f4c4f434b5f4455524154494f4e2063616e6e6f74206265206d6f726560448201527f207468616e204d41585f4c4f434b5f4455524154494f4e5f4c494d4954000000606482015260840161098f565b600f8190556040518181527fcab2f3455b51b6ca5377e84fccd0f890b6f6ca36c02e18b6d36cb34f469fe4fe90602001610a35565b6040516001600160a01b03808516602483015283166044820152606481018290526123fc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f53565b50505050565b600061240d826118ad565b61241683611d9f565b610f0f91906139d7565b33600090815260036020526040902080548311156124805760405162461bcd60e51b815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015260640161098f565b428160050154106124c35760405162461bcd60e51b815260206004820152600d60248201526c5374696c6c20696e206c6f636b60981b604482015260640161098f565b6002546001600160a01b031615612537576002546040516351cff8d960e01b81526001600160a01b03909116906351cff8d990612504903390600401613864565b600060405180830381600087803b15801561251e57600080fd5b505af1158015612532573d6000803e3d6000fd5b505050505b805483906000906125546b204fce5e3e25026110000000846139ef565b61255e9190613a0e565b9050612568613025565b612571336131a3565b8415801561257f5750600084115b156125c057600061258e611644565b9050806007548661259f91906139ef565b6125a99190613a0e565b84549093508311156125ba57835492505b506125e7565b82546b204fce5e3e25026110000000906125da90836139ef565b6125e49190613a0e565b91505b6000600754836125f5611644565b6125ff91906139ef565b6126099190613a0e565b90508284600001600082825461261f9190613a30565b9250508190555082600760008282546126389190613a30565b90915550503360009081526005602052604090205460ff1615801561266d5750601854846001015461266a91906139d7565b42105b156126e657601554333b1561268157506016545b600061271061269083856139ef565b61269a9190613a0e565b6009549091506126d7906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6126e18184613a30565b925050505b61271a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612f23565b83541561274c5760075461272c611644565b855461273891906139ef565b6127429190613a0e565b6002850155612754565b600060028501555b4260038501556127633361359e565b604080518281526020810185905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a2505050505050565b6001600160a01b0381166000908152600360205260409020805415806127cc5750600084115b15612845576509184e72a00084116128455760405162461bcd60e51b815260206004820152603660248201527f4465706f73697420616d6f756e74206d757374206265206772656174657220746044820152751a185b8813525397d1115413d4d25517d05353d5539560521b606482015260840161098f565b6005810154839042116128a3578415612882574260048301556008820154600d8054600090612875908490613a30565b9091555050600060088301555b816004015482600501546128969190613a30565b6128a090826139d7565b90505b8315806128b3575062093a808110155b6128ff5760405162461bcd60e51b815260206004820152601f60248201527f4d696e696d756d206c6f636b20706572696f64206973206f6e65207765656b00604482015260640161098f565b600f548111156129515760405162461bcd60e51b815260206004820152601c60248201527f4d6178696d756d206c6f636b20706572696f6420657863656564656400000000604482015260640161098f565b6002546001600160a01b0316156129d057600254604051630efe6a8b60e01b81526001600160a01b038581166004830152602482018890526044820187905290911690630efe6a8b90606401600060405180830381600087803b1580156129b757600080fd5b505af11580156129cb573d6000803e3d6000fd5b505050505b6129d8613025565b600754612a285760006129e9611272565b600954909150612a26906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b505b612a31836131a3565b8315612a8a574282600501541015612a60574260048301819055612a569085906139d7565b6005830155612a7a565b83826005016000828254612a7491906139d7565b90915550505b60078201805460ff191660011790555b600080600080612a98611644565b90508815612ad957612ad56001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001688308c612391565b8892505b855415801590612aed5750600786015460ff165b15612b66576007548654612b0190836139ef565b612b0b9190613a0e565b9150612b1782846139d7565b9250856000015460076000828254612b2f9190613a30565b9091555050600086556004860154421415612b665760088601829055600d8054839190600090612b609084906139d7565b90915550505b60075415612b9657612b788282613a30565b600754612b8590856139ef565b612b8f9190613a0e565b9350612b9a565b8293505b856004015486600501541115612d1b57600060105460125488600401548960050154612bc69190613a30565b612bd091906139ef565b612bda9190613a0e565b9050600064e8d4a51000612bee87846139ef565b612bf89190613a0e565b9050612c0481876139d7565b955085886000016000828254612c1a91906139d7565b909155506000905064e8d4a51000612c3287856139ef565b612c3c9190613a0e565b905080896006016000828254612c5291906139d7565b9250508190555080600c6000828254612c6b91906139d7565b925050819055508b896008016000828254612c8691906139d7565b925050819055508b600d6000828254612c9f91906139d7565b92505081905550896001600160a01b03167f2b943276e5d747f6f7dd46d3b880d8874cb8d6b9b88ca1903990a2738e7dc7a18a600801548b600001548c600401548d60050154612cef9190613a30565b6040805193845260208401929092529082015242606082015260800160405180910390a2505050612d35565b83866000016000828254612d2f91906139d7565b90915550505b6000891180612d445750600088115b15612d50574260018701555b8360076000828254612d6291906139d7565b90915550506006860154600754612d77611644565b8854612d8391906139ef565b612d8d9190613a0e565b612d979190613a30565b6002870155426003870155612dab8761359e565b604080518a8152602081018690529081018990524260608201526001600160a01b038816907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060800160405180910390a2505050505050505050565b612e106114d7565b612e2c5760405162461bcd60e51b815260040161098f90613a71565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051612e699190613864565b60405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612ecb6114d7565b15612ee85760405162461bcd60e51b815260040161098f90613a47565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e5c3390565b6040516001600160a01b03831660248201526044810182905261109c90849063a9059cbb60e01b906064016123c5565b6000612fa8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661366a9092919063ffffffff16565b80519091501561109c5780806020019051810190612fc691906139a4565b61109c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161098f565b600b54604051631175a1dd60e01b815260048101919091523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631175a1dd90604401602060405180830381865afa158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb919061398b565b90508015610f8b5760006130cd611272565b600b54604051630441a3e760e41b81526004810191909152600060248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b15801561313d57600080fd5b505af1158015613151573d6000803e3d6000fd5b50505050600061315f611272565b9050337fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba61318d8484613a30565b60405190815260200160405180910390a2505050565b6001600160a01b038116600090815260036020526040902080541561205a57600781015460ff1615613446576000816006015460075483600001546131e6611644565b6131f091906139ef565b6131fa9190613a0e565b6132049190613a30565b90508160060154600c600082825461321c9190613a30565b90915550506000600683018190558254600780549192909161323f908490613a30565b90915550506001600160a01b03831660009081526006602052604090205460ff1615801561327d575042600e54836005015461327b91906139d7565b105b1561334f5760008260080154826132949190613a30565b90506000600e548460050154426132ab9190613a30565b6132b59190613a30565b90506011548111156132c657506011545b6000601154601754836132d991906139ef565b6132e39190613a0e565b9050600064e8d4a510006132f783866139ef565b6133019190613a0e565b60095490915061333e906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6133488186613a30565b9450505050505b6000613359611644565b9050600060075460001461338f576133718383613a30565b60075461337e90856139ef565b6133889190613a0e565b9050613392565b50815b808455600780548291906000906133aa9084906139d7565b9091555050600584015442111561343f5760078401805460ff19169055600060048501819055600585018190556008850154600d8054919290916133ef908490613a30565b909155505060006008850155604080518481524260208201526001600160a01b038716917ff7870c5b224cbc19873599e46ccfc7103934650509b1af0c3ce90138377c2004910160405180910390a25b5050505050565b6001600160a01b03821660009081526004602052604090205460ff1661205a576000600754613473611644565b835461347f91906139ef565b6134899190613a0e565b90508160000154600760008282546134a19190613a30565b9091555050600080835560028301546134ba9083613a30565b601354909150843b156134cc57506014545b60006127106134db83856139ef565b6134e59190613a0e565b9050801561353457600954613527906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6135318185613a30565b93505b600061353e611644565b90506000600754600014613574576135568683613a30565b60075461356390886139ef565b61356d9190613a0e565b9050613577565b50845b8087556007805482919060009061358f9084906139d7565b90915550505050505050505050565b6001546001600160a01b031615610f8b576001600160a01b0381166000908152600360205260408120600481015460058201549192916135de9190613a30565b6001546008840154600d5460105460405163e874fdaf60e01b81526001600160a01b03898116600483015260248201949094526044810186905260648101929092526084820152929350169063e874fdaf9060a401600060405180830381600087803b15801561364d57600080fd5b505af1158015613661573d6000803e3d6000fd5b50505050505050565b60606136798484600085613683565b90505b9392505050565b6060824710156136e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161098f565b6001600160a01b0385163b61373b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161098f565b600080866001600160a01b031685876040516137579190613b51565b60006040518083038185875af1925050503d8060008114613794576040519150601f19603f3d011682016040523d82523d6000602084013e613799565b606091505b50915091506137a98282866137b4565b979650505050505050565b606083156137c357508161367c565b8251156137d35782518084602001fd5b8160405162461bcd60e51b815260040161098f9190613b6d565b6000602082840312156137ff57600080fd5b5035919050565b6001600160a01b0381168114610f8b57600080fd5b60006020828403121561382d57600080fd5b813561367c81613806565b6000806040838503121561384b57600080fd5b823561385681613806565b946020939093013593505050565b6001600160a01b0391909116815260200190565b8015158114610f8b57600080fd5b6000806040838503121561389957600080fd5b82356138a481613806565b915060208301356138b481613878565b809150509250929050565b600080604083850312156138d257600080fd5b50508035926020909101359150565b6020808252600b908201526a61646d696e3a207775743f60a81b604082015260600190565b60208082526030908201527f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060408201526f4d41585f57495448445241575f46454560801b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561399d57600080fd5b5051919050565b6000602082840312156139b657600080fd5b815161367c81613878565b634e487b7160e01b600052601160045260246000fd5b600082198211156139ea576139ea6139c1565b500190565b6000816000190483118215151615613a0957613a096139c1565b500290565b600082613a2b57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613a4257613a426139c1565b500390565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526016908201527543616e6e6f74206265207a65726f206164647265737360501b604082015260600190565b60208082526036908201527f706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468604082015275616e204d41585f504552464f524d414e43455f46454560501b606082015260800190565b60005b83811015613b40578181015183820152602001613b28565b838111156123fc5750506000910152565b60008251613b63818460208701613b25565b9190910192915050565b6020815260008251806020840152613b8c816040850160208701613b25565b601f01601f1916919091016040019291505056fe3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d44a26469706673582212208fac60e48eb35e29f7a743c638638371e8b2fc9dffb4ce7b25ae133d7651c44a64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/CakeToken.json b/projects/vecake-farm-booster/v3/test/artifactsFile/CakeToken.json new file mode 100644 index 00000000..4e56ee43 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/CakeToken.json @@ -0,0 +1,639 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CakeToken", + "sourceName": "contracts/test/CakeToken.sol", + "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": "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": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "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" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b50604051806040016040528060118152602001702830b731b0b5b2a9bbb0b8102a37b5b2b760791b8152506040518060400160405280600481526020016343616b6560e01b81525060006200006b620000f660201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000ca906004906020850190620000fa565b508051620000e0906005906020840190620000fa565b50506006805460ff191660121790555062000196565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200013d57805160ff19168380011785556200016d565b828001600101855582156200016d579182015b828111156200016d57825182559160200191906001019062000150565b506200017b9291506200017f565b5090565b5b808211156200017b576000815560010162000180565b61237e80620001a66000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c8063782d6fe1116100f9578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e1461062f578063e7a324dc1461066a578063f1127ed814610672578063f2fde38b146106d1576101b9565b8063a9059cbb1461056f578063b4b5ea57146105a8578063c3cda520146105db576101b9565b80638da5cb5b116100d35780638da5cb5b1461050957806395d89b4114610511578063a0712d6814610519578063a457c2d714610536576101b9565b8063782d6fe1146104955780637ecebe00146104ce578063893d20e814610501576101b9565b806339509351116101665780635c19a95c116101405780635c19a95c146103db5780636fcfff451461040e57806370a082311461045a578063715018a61461048d576101b9565b8063395093511461030b57806340c10f1914610344578063587cde1e1461037f576101b9565b806320606b701161019757806320606b70146102a257806323b872dd146102aa578063313ce567146102ed576101b9565b806306fdde03146101be578063095ea7b31461023b57806318160ddd14610288575b600080fd5b6101c6610704565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356107b8565b604080519115158252519081900360200190f35b6102906107d6565b60408051918252519081900360200190f35b6102906107dc565b610274600480360360608110156102c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610800565b6102f56108a1565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108aa565b61037d6004803603604081101561035a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610905565b005b6103b26004803603602081101561039557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109ed565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61037d600480360360208110156103f157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a18565b6104416004803603602081101561042457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a25565b6040805163ffffffff9092168252519081900360200190f35b6102906004803603602081101561047057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a3d565b61037d610a65565b610290600480360360408110156104ab57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610b7c565b610290600480360360208110156104e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e46565b6103b2610e58565b6103b2610e67565b6101c6610e83565b6102746004803603602081101561052f57600080fd5b5035610f02565b6102746004803603604081101561054c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fc5565b6102746004803603604081101561058557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561103a565b610290600480360360208110156105be57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661104e565b61037d600480360360c08110156105f157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356110ea565b6102906004803603604081101561064557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611429565b610290611461565b6106b16004803603604081101561068857600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611485565b6040805163ffffffff909316835260208301919091528051918290030190f35b61037d600480360360208110156106e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114b2565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b820191906000526020600020905b81548152906001019060200180831161079157829003601f168201915b5050505050905090565b60006107cc6107c5611653565b8484611657565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b600061080d84848461179e565b61089784610819611653565b610892856040518060600160405280602881526020016121ee6028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610864611653565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611965565b611657565b5060019392505050565b60065460ff1690565b60006107cc6108b7611653565b8461089285600260006108c8611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611a16565b61090d611653565b73ffffffffffffffffffffffffffffffffffffffff1661092b610e67565b73ffffffffffffffffffffffffffffffffffffffff16146109ad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6109b78282611a8a565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600760205260408120546109e9921683611bb1565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610a223382611d97565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610a6d611653565b73ffffffffffffffffffffffffffffffffffffffff16610a8b610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610b0d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610bd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806122706027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610c115760009150506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610cd65773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff168352929052206001015490506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610d1e5760009150506107d0565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e0257600282820363ffffffff16048103610d6e612141565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610ddd576020015194506107d09350505050565b805163ffffffff16871115610df457819350610dfb565b6001820392505b5050610d44565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610e62610e67565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b6000610f0c611653565b73ffffffffffffffffffffffffffffffffffffffff16610f2a610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610fac57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610fbd610fb7611653565b83611a8a565b506001919050565b60006107cc610fd2611653565b84610892856040518060600160405280602581526020016123026025913960026000610ffc611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611965565b60006107cc611047611653565b848461179e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff16806110865760006110e3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611115610704565b80519060200120611124611e5e565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa15801561129d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806122166026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146113b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806122bd6022913960400191505060405180910390fd5b87421115611412576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121c86026913960400191505060405180910390fd5b61141c818b611d97565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6114ba611653565b73ffffffffffffffffffffffffffffffffffffffff166114d8610e67565b73ffffffffffffffffffffffffffffffffffffffff161461155a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166115c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121a26026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff83166116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061217e6024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821661172f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806123276022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661180a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806121596025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611876576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806122df6023913960400191505060405180910390fd5b6118c0816040518060600160405280602681526020016122976026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611965565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602052604080822093909355908416815220546118fc9082611a16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611a0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119d35781810151838201526020016119bb565b50505050905090810190601f168015611a005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156110e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b0c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611b199082611a16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611b4c9082611a16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bed5750600081115b15611d925773ffffffffffffffffffffffffffffffffffffffff831615611cc45773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff169081611c47576000611ca4565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611cb28285611e62565b9050611cc086848484611ed9565b5050505b73ffffffffffffffffffffffffffffffffffffffff821615611d925773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff169081611d19576000611d76565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611d848285611a16565b905061142185848484611ed9565b505050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526007602052604081205490911690611dcb84610a3d565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611e58828483611bb1565b50505050565b4690565b600082821115611ed357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611efd4360405180606001604052806034815260200161223c603491396120c9565b905060008463ffffffff16118015611f71575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15611fd95773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612072565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156119d35781810151838201526020016119bb565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a20617070726f766520746f20746865207a65726f2061646472657373a2646970667358221220878bcaf3d45de55293e9d5d1b586861a43290aaa00bc428b8c26b2b0c77d4ef164736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101b95760003560e01c8063782d6fe1116100f9578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e1461062f578063e7a324dc1461066a578063f1127ed814610672578063f2fde38b146106d1576101b9565b8063a9059cbb1461056f578063b4b5ea57146105a8578063c3cda520146105db576101b9565b80638da5cb5b116100d35780638da5cb5b1461050957806395d89b4114610511578063a0712d6814610519578063a457c2d714610536576101b9565b8063782d6fe1146104955780637ecebe00146104ce578063893d20e814610501576101b9565b806339509351116101665780635c19a95c116101405780635c19a95c146103db5780636fcfff451461040e57806370a082311461045a578063715018a61461048d576101b9565b8063395093511461030b57806340c10f1914610344578063587cde1e1461037f576101b9565b806320606b701161019757806320606b70146102a257806323b872dd146102aa578063313ce567146102ed576101b9565b806306fdde03146101be578063095ea7b31461023b57806318160ddd14610288575b600080fd5b6101c6610704565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356107b8565b604080519115158252519081900360200190f35b6102906107d6565b60408051918252519081900360200190f35b6102906107dc565b610274600480360360608110156102c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610800565b6102f56108a1565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108aa565b61037d6004803603604081101561035a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610905565b005b6103b26004803603602081101561039557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109ed565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61037d600480360360208110156103f157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a18565b6104416004803603602081101561042457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a25565b6040805163ffffffff9092168252519081900360200190f35b6102906004803603602081101561047057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a3d565b61037d610a65565b610290600480360360408110156104ab57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610b7c565b610290600480360360208110156104e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e46565b6103b2610e58565b6103b2610e67565b6101c6610e83565b6102746004803603602081101561052f57600080fd5b5035610f02565b6102746004803603604081101561054c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fc5565b6102746004803603604081101561058557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561103a565b610290600480360360208110156105be57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661104e565b61037d600480360360c08110156105f157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356110ea565b6102906004803603604081101561064557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611429565b610290611461565b6106b16004803603604081101561068857600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611485565b6040805163ffffffff909316835260208301919091528051918290030190f35b61037d600480360360208110156106e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114b2565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b820191906000526020600020905b81548152906001019060200180831161079157829003601f168201915b5050505050905090565b60006107cc6107c5611653565b8484611657565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b600061080d84848461179e565b61089784610819611653565b610892856040518060600160405280602881526020016121ee6028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610864611653565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611965565b611657565b5060019392505050565b60065460ff1690565b60006107cc6108b7611653565b8461089285600260006108c8611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611a16565b61090d611653565b73ffffffffffffffffffffffffffffffffffffffff1661092b610e67565b73ffffffffffffffffffffffffffffffffffffffff16146109ad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6109b78282611a8a565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600760205260408120546109e9921683611bb1565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610a223382611d97565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610a6d611653565b73ffffffffffffffffffffffffffffffffffffffff16610a8b610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610b0d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610bd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806122706027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610c115760009150506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610cd65773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff168352929052206001015490506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610d1e5760009150506107d0565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e0257600282820363ffffffff16048103610d6e612141565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610ddd576020015194506107d09350505050565b805163ffffffff16871115610df457819350610dfb565b6001820392505b5050610d44565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610e62610e67565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b6000610f0c611653565b73ffffffffffffffffffffffffffffffffffffffff16610f2a610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610fac57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610fbd610fb7611653565b83611a8a565b506001919050565b60006107cc610fd2611653565b84610892856040518060600160405280602581526020016123026025913960026000610ffc611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611965565b60006107cc611047611653565b848461179e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff16806110865760006110e3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611115610704565b80519060200120611124611e5e565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa15801561129d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806122166026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146113b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806122bd6022913960400191505060405180910390fd5b87421115611412576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121c86026913960400191505060405180910390fd5b61141c818b611d97565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6114ba611653565b73ffffffffffffffffffffffffffffffffffffffff166114d8610e67565b73ffffffffffffffffffffffffffffffffffffffff161461155a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166115c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121a26026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff83166116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061217e6024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821661172f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806123276022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661180a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806121596025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611876576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806122df6023913960400191505060405180910390fd5b6118c0816040518060600160405280602681526020016122976026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611965565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602052604080822093909355908416815220546118fc9082611a16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611a0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119d35781810151838201526020016119bb565b50505050905090810190601f168015611a005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156110e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b0c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611b199082611a16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611b4c9082611a16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bed5750600081115b15611d925773ffffffffffffffffffffffffffffffffffffffff831615611cc45773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff169081611c47576000611ca4565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611cb28285611e62565b9050611cc086848484611ed9565b5050505b73ffffffffffffffffffffffffffffffffffffffff821615611d925773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff169081611d19576000611d76565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611d848285611a16565b905061142185848484611ed9565b505050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526007602052604081205490911690611dcb84610a3d565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611e58828483611bb1565b50505050565b4690565b600082821115611ed357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611efd4360405180606001604052806034815260200161223c603491396120c9565b905060008463ffffffff16118015611f71575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15611fd95773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612072565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156119d35781810151838201526020016119bb565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a20617070726f766520746f20746865207a65726f2061646472657373a2646970667358221220878bcaf3d45de55293e9d5d1b586861a43290aaa00bc428b8c26b2b0c77d4ef164736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/ERC20Mock.json b/projects/vecake-farm-booster/v3/test/artifactsFile/ERC20Mock.json new file mode 100644 index 00000000..506a3546 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/ERC20Mock.json @@ -0,0 +1,315 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Mock", + "sourceName": "contracts/mocks/ERC20Mock.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "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": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c2c38038062000c2c8339810160408190526200003491620001e1565b8151829082906200004d9060039060208501906200006e565b508051620000639060049060208401906200006e565b505050505062000288565b8280546200007c906200024b565b90600052602060002090601f016020900481019282620000a05760008555620000eb565b82601f10620000bb57805160ff1916838001178555620000eb565b82800160010185558215620000eb579182015b82811115620000eb578251825591602001919060010190620000ce565b50620000f9929150620000fd565b5090565b5b80821115620000f95760008155600101620000fe565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013c57600080fd5b81516001600160401b038082111562000159576200015962000114565b604051601f8301601f19908116603f0116810190828211818310171562000184576200018462000114565b81604052838152602092508683858801011115620001a157600080fd5b600091505b83821015620001c55785820183015181830184015290820190620001a6565b83821115620001d75760008385830101525b9695505050505050565b60008060408385031215620001f557600080fd5b82516001600160401b03808211156200020d57600080fd5b6200021b868387016200012a565b935060208501519150808211156200023257600080fd5b5062000241858286016200012a565b9150509250929050565b600181811c908216806200026057607f821691505b602082108114156200028257634e487b7160e01b600052602260045260246000fd5b50919050565b61099480620002986000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d1565b60405180910390f35b6100ea6100e5366004610842565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461086c565b61026a565b604051601281526020016100ce565b6100ea61013c366004610842565b61028e565b61015461014f366004610842565b6102b0565b005b6100fe6101643660046108a8565b6001600160a01b031660009081526020819052604090205490565b6100c16102be565b6100ea610195366004610842565b6102cd565b6100ea6101a8366004610842565b61034d565b6100fe6101bb3660046108ca565b61035b565b6060600380546101cf906108fd565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108fd565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610386565b5060019392505050565b6000336102788582856104aa565b610283858585610524565b506001949350505050565b6000336102608185856102a1838361035b565b6102ab9190610938565b610386565b6102ba82826106f2565b5050565b6060600480546101cf906108fd565b600033816102db828661035b565b9050838110156103405760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102838286868403610386565b600033610260818585610524565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103e85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610337565b6001600160a01b0382166104495760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610337565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b6848461035b565b9050600019811461051e57818110156105115760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610337565b61051e8484848403610386565b50505050565b6001600160a01b0383166105885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610337565b6001600160a01b0382166105ea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610337565b6001600160a01b038316600090815260208190526040902054818110156106625760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610337565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610699908490610938565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e591815260200190565b60405180910390a361051e565b6001600160a01b0382166107485760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610337565b806002600082825461075a9190610938565b90915550506001600160a01b03821660009081526020819052604081208054839290610787908490610938565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b818110156107fe578581018301518582016040015282016107e2565b81811115610810576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461083d57600080fd5b919050565b6000806040838503121561085557600080fd5b61085e83610826565b946020939093013593505050565b60008060006060848603121561088157600080fd5b61088a84610826565b925061089860208501610826565b9150604084013590509250925092565b6000602082840312156108ba57600080fd5b6108c382610826565b9392505050565b600080604083850312156108dd57600080fd5b6108e683610826565b91506108f460208401610826565b90509250929050565b600181811c9082168061091157607f821691505b6020821081141561093257634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561095957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220c9116e967a89bacdcb5d5cacab54540303b3650686f16fea49473cd777d6624764736f6c634300080c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d1565b60405180910390f35b6100ea6100e5366004610842565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461086c565b61026a565b604051601281526020016100ce565b6100ea61013c366004610842565b61028e565b61015461014f366004610842565b6102b0565b005b6100fe6101643660046108a8565b6001600160a01b031660009081526020819052604090205490565b6100c16102be565b6100ea610195366004610842565b6102cd565b6100ea6101a8366004610842565b61034d565b6100fe6101bb3660046108ca565b61035b565b6060600380546101cf906108fd565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108fd565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610386565b5060019392505050565b6000336102788582856104aa565b610283858585610524565b506001949350505050565b6000336102608185856102a1838361035b565b6102ab9190610938565b610386565b6102ba82826106f2565b5050565b6060600480546101cf906108fd565b600033816102db828661035b565b9050838110156103405760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102838286868403610386565b600033610260818585610524565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103e85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610337565b6001600160a01b0382166104495760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610337565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b6848461035b565b9050600019811461051e57818110156105115760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610337565b61051e8484848403610386565b50505050565b6001600160a01b0383166105885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610337565b6001600160a01b0382166105ea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610337565b6001600160a01b038316600090815260208190526040902054818110156106625760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610337565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610699908490610938565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e591815260200190565b60405180910390a361051e565b6001600160a01b0382166107485760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610337565b806002600082825461075a9190610938565b90915550506001600160a01b03821660009081526020819052604081208054839290610787908490610938565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b818110156107fe578581018301518582016040015282016107e2565b81811115610810576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461083d57600080fd5b919050565b6000806040838503121561085557600080fd5b61085e83610826565b946020939093013593505050565b60008060006060848603121561088157600080fd5b61088a84610826565b925061089860208501610826565b9150604084013590509250925092565b6000602082840312156108ba57600080fd5b6108c382610826565b9392505050565b600080604083850312156108dd57600080fd5b6108e683610826565b91506108f460208401610826565b90509250929050565b600181811c9082168061091157607f821691505b6020821081141561093257634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561095957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220c9116e967a89bacdcb5d5cacab54540303b3650686f16fea49473cd777d6624764736f6c634300080c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/FarmBooster.json b/projects/vecake-farm-booster/v3/test/artifactsFile/FarmBooster.json new file mode 100644 index 00000000..aa3228a3 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/FarmBooster.json @@ -0,0 +1,797 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "FarmBooster", + "sourceName": "contracts/FarmBooster.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_VECake", + "type": "address" + }, + { + "internalType": "contract IMasterChefV3", + "name": "_v3", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_cA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_cB", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "UpdateBoostFarms", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldCA", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCA", + "type": "uint256" + } + ], + "name": "UpdateCA", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldCB", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCB", + "type": "uint256" + } + ], + "name": "UpdateCB", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldCB", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCB", + "type": "uint256" + } + ], + "name": "UpdateCBOverride", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMultiplier", + "type": "uint256" + } + ], + "name": "UpdatePoolBoostMultiplier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "VECakeCaller", + "type": "address" + } + ], + "name": "UpdateVECakeCaller", + "type": "event" + }, + { + "inputs": [], + "name": "BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CA_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CB_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER_CHEF_V3", + "outputs": [ + { + "internalType": "contract IMasterChefV3", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_CA", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_CB", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_CA", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_CB", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NonfungiblePositionManager", + "outputs": [ + { + "internalType": "contract INonfungiblePositionManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PancakeV3Factory", + "outputs": [ + { + "internalType": "contract IPancakeV3Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VECakeCaller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "activedPositions", + "outputs": [ + { + "internalType": "uint256[]", + "name": "positions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cA", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cB", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "cBOverride", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_for", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + }, + { + "internalType": "int128", + "name": "_prevLockedAmount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "_prevLockedEnd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_actionType", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_isCakePoolUser", + "type": "bool" + } + ], + "name": "depositFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "everBoosted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "getUserMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "isBoostedPool", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "removeBoostMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "internalType": "struct FarmBooster.BoosterFarmConfig[]", + "name": "_boosterFarms", + "type": "tuple[]" + } + ], + "name": "setBoosterFarms", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_cA", + "type": "uint256" + } + ], + "name": "setCA", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_cB", + "type": "uint256" + } + ], + "name": "setCB", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_cB", + "type": "uint256" + } + ], + "name": "setCBOverride", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_VECakeCaller", + "type": "address" + } + ], + "name": "setVECakeCaller", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "int128", + "name": "_prevLockedAmount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "_prevLockedEnd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_withdrawAmount", + "type": "uint256" + } + ], + "name": "unlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "updatePositionBoostMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "_multiplier", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "userPoolTotalLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "userPositionLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "whiteList", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162002cbb38038062002cbb833981016040819052620000359162000227565b6200004033620001be565b6127108210158015620000565750620186a08211155b8015620000635750600081115b80156200007457506305f5e1008111155b620000b95760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b2103830b930b6b2ba32b960791b604482015260640160405180910390fd5b6001600160a01b03808516608052831660a08190526004838155600583905560408051635a25139160e11b8152905163b44a2722928281019260209291908290030181865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000137919062000274565b6001600160a01b031660c08190526040805163c45a015560e01b8152905163c45a0155916004808201926020929091908290030181865afa15801562000181573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001a7919062000274565b6001600160a01b031660e052506200029b92505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200022457600080fd5b50565b600080600080608085870312156200023e57600080fd5b84516200024b816200020e565b60208601519094506200025e816200020e565b6040860151606090960151949790965092505050565b6000602082840312156200028757600080fd5b815162000294816200020e565b9392505050565b60805160a05160c05160e05161298b62000330600039600081816104c30152610bed01526000818161059001528181610a330152610af501526000818161032d01528181610738015281816107c901528181610ca0015281816113ac01528181611c7001528181611e630152818161201e015261216101526000818161040401528181611a250152611b1a015261298b6000f3fe608060405234801561001057600080fd5b506004361061025c5760003560e01c80636ea1e3c011610145578063a817715b116100bd578063d6a526cf1161008c578063eb582d1311610071578063eb582d131461058b578063f2fde38b146105b2578063fe19a904146105c557600080fd5b8063d6a526cf14610558578063e1b2d8441461056b57600080fd5b8063a817715b14610530578063c459a9c214610539578063c61a66e014610530578063cc6db2da1461054c57600080fd5b806381057714116101145780638da5cb5b116100f95780638da5cb5b146105015780639c1ebe631461051f5780639cc1d7be1461052857600080fd5b806381057714146104f85780638abe3003146103a757600080fd5b80636ea1e3c0146104a3578063715018a6146104b65780637600f3f2146104be57806379453948146104e557600080fd5b80635c5aaa49116101d857806363613da9116101a757806369b021281161018c57806369b02128146104705780636cbb37dd1461047d5780636e85ee471461049057600080fd5b806363613da91461042657806369074d641461044657600080fd5b80635c5aaa49146103a75780635dd574db146103b157806361f0f689146103d457806362534e79146103ff57600080fd5b80634e9866281161022f578063506328fc11610214578063506328fc1461031557806352fb6531146103285780635c475d421461037457600080fd5b80634e986628146102ea5780634ffcbb391461030a57600080fd5b80631959a0021461026157806325f14873146102975780633a51327c146102ac57806344e7bf06146102d7575b600080fd5b61028461026f366004612263565b60096020526000908152604090206003015481565b6040519081526020015b60405180910390f35b6102aa6102a5366004612287565b6105d8565b005b6102846102ba3660046122a0565b600360209081526000928352604080842090915290825290205481565b6102846102e5366004612287565b61071e565b6102846102f8366004612287565b60066020526000908152604090205481565b6102846305f5e10081565b610284610323366004612287565b6109f9565b61034f7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161028e565b610397610382366004612287565b60076020526000908152604090205460ff1681565b604051901515815260200161028e565b610284620186a081565b6103976103bf366004612287565b60086020526000908152604090205460ff1681565b6102846103e23660046122a0565b600260209081526000928352604080842090915290825290205481565b61034f7f000000000000000000000000000000000000000000000000000000000000000081565b610439610434366004612263565b610dbc565b60405161028e91906122cc565b610459610454366004612287565b610ea2565b60408051921515835260208301919091520161028e565b6102846501d1a94a200081565b6102aa61048b366004612287565b610ef6565b6102aa61049e366004612337565b611030565b6102aa6104b13660046123a3565b6110c3565b6102aa611277565b61034f7f000000000000000000000000000000000000000000000000000000000000000081565b6102aa6104f3366004612418565b611304565b61028460055481565b60005473ffffffffffffffffffffffffffffffffffffffff1661034f565b61028460045481565b610284600081565b61028461271081565b6102aa61054736600461245c565b611394565b61028464e8d4a5100081565b6102aa610566366004612263565b61149c565b60015461034f9073ffffffffffffffffffffffffffffffffffffffff1681565b61034f7f000000000000000000000000000000000000000000000000000000000000000081565b6102aa6105c0366004612263565b611596565b6102aa6105d3366004612491565b6116c6565b60005473ffffffffffffffffffffffffffffffffffffffff16331461065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b60008111801561067257506305f5e1008111155b6106d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f496e76616c6964206342000000000000000000000000000000000000000000006044820152606401610655565b600580549082905560408051828152602081018490527fff6a4b972407d470846bd3a5979c60d68807653244cc8d096c4174a76486e71c91015b60405180910390a15050565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146107bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f74204d6173746572436865662056330000000000000000000000000000006044820152606401610655565b60008060008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633b1acf74886040518263ffffffff1660e01b815260040161082291815260200190565b61012060405180830381865afa158015610840573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086491906124f0565b9850985098505050505094509450836fffffffffffffffffffffffffffffffff1660001480156108945750600081115b1561089e57600080fd5b60008281526008602052604090205464e8d4a51000965060ff16156109ef576108db838884886fffffffffffffffffffffffffffffffff16611827565b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602090815260408083208a845280835281842054868552600790935292205460ff166109445760008981526001830160205260409020541561093f5761093f828a6118cc565b610991565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600360209081526040808320878452909152812054610984918791879160016119af565b9750610991828a8a611bfd565b88848673ffffffffffffffffffffffffffffffffffffffff167f1e0e5eda2403f0a5efd54ab2b1ed4a66a026877e4255695d414a66acb88419e8848c6040516109e4929190918252602082015260400190565b60405180910390a450505b5050505050919050565b600080600080610a0885611c68565b506fffffffffffffffffffffffffffffffff92909216945092509050600181610d20576000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166399fbab888b6040518263ffffffff1660e01b8152600401610a8c91815260200190565b61018060405180830381865afa158015610aaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ace9190612593565b50505050975050509550955095505050806fffffffffffffffffffffffffffffffff1697507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636352211e8b6040518263ffffffff1660e01b8152600401610b4e91815260200190565b602060405180830381865afa158015610b6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8f9190612674565b6040517f1698ee8200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152858116602483015262ffffff851660448301529198506000917f00000000000000000000000000000000000000000000000000000000000000001690631698ee8290606401602060405180830381865afa158015610c34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c589190612674565b6040517f0743384d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301529192507f000000000000000000000000000000000000000000000000000000000000000090911690630743384d90602401602060405180830381865afa158015610ce9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0d9190612691565b96508615610d1a57600095505b50505050505b60008281526007602052604090205460ff16610d46575064e8d4a5100095945050505050565b73ffffffffffffffffffffffffffffffffffffffff831660008181526002602090815260408083208a84528252808320549383526003825280832086845290915281205490918691610d9891906126d9565b610da291906126f0565b9050610db184848388866119af565b979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600960205260409020600281015460609190610df45750919050565b600281015467ffffffffffffffff811115610e1157610e11612708565b604051908082528060200260200182016040528015610e3a578160200160208202803683370190505b50915060005b6002820154811015610e9b57816002018181548110610e6157610e61612737565b9060005260206000200154838281518110610e7e57610e7e612737565b602090810291909101015280610e9381612766565b915050610e40565b5050919050565b600080600080610eb185611c68565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600960209081526040808320998352600190990190529690962054151596945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6127108110158015610f8c5750620186a08111155b610ff2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f496e76616c6964206341000000000000000000000000000000000000000000006044820152606401610655565b600480549082905560408051828152602081018490527f948053d58d4dfed61c0843c01f010e1a4446c65f03d475567102cc64dfe0ecd49101610712565b60015473ffffffffffffffffffffffffffffffffffffffff1633146110b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f7420766563616b652063616c6c65720000000000000000000000000000006044820152606401610655565b6110ba87611d20565b50505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b60005b8181101561127257600083838381811061116357611163612737565b905060400201803603810190611179919061279f565b90508060200151801561119d5750805160009081526008602052604090205460ff16155b156111dc578051600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b60208181018051835160009081526007845260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016921515929092179091558351915181519283521515928201929092527fbeef892af000af61e107ef5e9c764acbccd54157fd6c219d241750fb3eca3102910160405180910390a1508061126a81612766565b915050611147565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6113026000611de7565b565b60015473ffffffffffffffffffffffffffffffffffffffff163314611385576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f7420766563616b652063616c6c65720000000000000000000000000000006044820152606401610655565b61138e84611d20565b50505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611433576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f74204d6173746572436865662056330000000000000000000000000000006044820152606401610655565b60008181526008602052604090205460ff1615611272576114578383836000611827565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260096020908152604080832085845260018101909252909120541561138e5761138e81846118cc565b60005473ffffffffffffffffffffffffffffffffffffffff16331461151d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f74893ad32aa66290f59f1716275159e5945397884cb67b7a5a19c96473482e169060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314611617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b73ffffffffffffffffffffffffffffffffffffffff81166116ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610655565b6116c381611de7565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314611747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b60008111801561175b57506305f5e1008111155b80611764575080155b6117ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f496e76616c6964206342000000000000000000000000000000000000000000006044820152606401610655565b600580546000848152600660209081526040918290208590559254815186815293840183905290830152907fa6a879d52f70ee909a019d4e93c2b17407cfe6a072da32219ad04ab25e15de429060600160405180910390a1505050565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600260209081526040808320878452825280832054938352600382528083208684529091529020548291611876916126d9565b61188091906126f0565b73ffffffffffffffffffffffffffffffffffffffff9094166000818152600360209081526040808320958352948152848220969096559081526002855282812093815292909352902055565b6000818152600183016020526040902054806118e757505050565b600283018054600091906118fd906001906126d9565b8154811061190d5761190d612737565b906000526020600020015490508083146119645780600285016119316001856126d9565b8154811061194157611941612737565b600091825260208083209091019290925582815260018601909152604090208290555b60008381526020858152604080832083905560018701909152812055600284018054806119935761199361281a565b6001900381819060005260206000200160009055905550505050565b600080620186a0856004546119c49190612849565b6119ce9190612886565b9050806119e35764e8d4a51000915050611bf4565b60006119f0878686611e5c565b60008881526006602052604081205491925090611a0f57600554611a1f565b6000888152600660205260409020545b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab29190612691565b905080611aca5764e8d4a51000945050505050611bf4565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260009161271091849186917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b859190612691565b611b8f9088612849565b611b999190612849565b611ba39190612886565b611bad9190612886565b90508464e8d4a51000611bc083836126f0565b8b1115611bd657611bd183886126f0565b611bd8565b8a5b611be29190612849565b611bec9190612886565b955050505050505b95945050505050565b6000828152600184016020908152604080832054918690529091208290558015611c275750505050565b6002840154611c379060016126f0565b6000848152600180870160209081526040832093909355600290960180549687018155815220909301919091555050565b6000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633b1acf74866040518263ffffffff1660e01b8152600401611cc991815260200190565b61012060405180830381865afa158015611ce7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0b91906124f0565b979d919c509a50959850949650505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600960205260409020600281015480156112725760005b8181101561138e576000836002018281548110611d7257611d72612737565b90600052602060002001549050600080611d8b83611c68565b5092509250508173ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415611dd157611dd186838386611fb3565b5050508080611ddf90612766565b915050611d53565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631526fe27876040518263ffffffff1660e01b8152600401611ebc91815260200190565b60e060405180830381865afa158015611ed9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611efd91906128c1565b50955050505092505083611f1857611f1585826126f0565b90505b60008273ffffffffffffffffffffffffffffffffffffffff16631a6865026040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f89919061293a565b6fffffffffffffffffffffffffffffffff16905080821115611fa9578091505b5095945050505050565b60008281526007602052604090205460ff1661209f5760008181526020859052604090205464e8d4a510001015612090576040517f69746a1d0000000000000000000000000000000000000000000000000000000081526004810182905264e8d4a5100060248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906369746a1d90604401600060405180830381600087803b15801561207757600080fd5b505af115801561208b573d6000803e3d6000fd5b505050505b61209a84826118cc565b61138e565b60006120aa82611c68565b73ffffffffffffffffffffffffffffffffffffffff881660009081526003602090815260408083208a845290915281205491955093506120f2925087915086908460016119af565b905064e8d4a5100081101561210d575064e8d4a51000612124565b6501d1a94a200081111561212457506501d1a94a20005b8181146121d3576040517f69746a1d00000000000000000000000000000000000000000000000000000000815260048101849052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906369746a1d90604401600060405180830381600087803b1580156121ba57600080fd5b505af11580156121ce573d6000803e3d6000fd5b505050505b6121de868483611bfd565b82848673ffffffffffffffffffffffffffffffffffffffff167f1e0e5eda2403f0a5efd54ab2b1ed4a66a026877e4255695d414a66acb88419e88585604051612231929190918252602082015260400190565b60405180910390a4505050505050565b73ffffffffffffffffffffffffffffffffffffffff811681146116c357600080fd5b60006020828403121561227557600080fd5b813561228081612241565b9392505050565b60006020828403121561229957600080fd5b5035919050565b600080604083850312156122b357600080fd5b82356122be81612241565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b81811015612304578351835292840192918401916001016122e8565b50909695505050505050565b8035600f81900b811461232257600080fd5b919050565b8035801515811461232257600080fd5b600080600080600080600060e0888a03121561235257600080fd5b873561235d81612241565b9650602088013595506040880135945061237960608901612310565b93506080880135925060a0880135915061239560c08901612327565b905092959891949750929550565b600080602083850312156123b657600080fd5b823567ffffffffffffffff808211156123ce57600080fd5b818501915085601f8301126123e257600080fd5b8135818111156123f157600080fd5b8660208260061b850101111561240657600080fd5b60209290920196919550909350505050565b6000806000806080858703121561242e57600080fd5b843561243981612241565b935061244760208601612310565b93969395505050506040820135916060013590565b60008060006060848603121561247157600080fd5b833561247c81612241565b95602085013595506040909401359392505050565b600080604083850312156124a457600080fd5b50508035926020909101359150565b80516fffffffffffffffffffffffffffffffff8116811461232257600080fd5b8051600281900b811461232257600080fd5b805161232281612241565b60008060008060008060008060006101208a8c03121561250f57600080fd5b6125188a6124b3565b985061252660208b016124b3565b975061253460408b016124d3565b965061254260608b016124d3565b955060808a0151945060a08a0151935060c08a015161256081612241565b8093505060e08a015191506101008a015190509295985092959850929598565b805162ffffff8116811461232257600080fd5b6000806000806000806000806000806000806101808d8f0312156125b657600080fd5b8c516bffffffffffffffffffffffff811681146125d257600080fd5b9b506125e060208e016124e5565b9a506125ee60408e016124e5565b99506125fc60608e016124e5565b985061260a60808e01612580565b975061261860a08e016124d3565b965061262660c08e016124d3565b955061263460e08e016124b3565b94506101008d015193506101208d015192506126536101408e016124b3565b91506126626101608e016124b3565b90509295989b509295989b509295989b565b60006020828403121561268657600080fd5b815161228081612241565b6000602082840312156126a357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156126eb576126eb6126aa565b500390565b60008219821115612703576127036126aa565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612798576127986126aa565b5060010190565b6000604082840312156127b157600080fd5b6040516040810181811067ffffffffffffffff821117156127fb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528235815261280e60208401612327565b60208201529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612881576128816126aa565b500290565b6000826128bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600080600080600080600060e0888a0312156128dc57600080fd5b8751965060208801516128ee81612241565b60408901519096506128ff81612241565b606089015190955061291081612241565b935061291e60808901612580565b925060a0880151915060c0880151905092959891949750929550565b60006020828403121561294c57600080fd5b612280826124b356fea264697066735822122069ec13a539f353a8480f782cfcd1a47c25c966f4ddfa9874eddafca03baaa09764736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061025c5760003560e01c80636ea1e3c011610145578063a817715b116100bd578063d6a526cf1161008c578063eb582d1311610071578063eb582d131461058b578063f2fde38b146105b2578063fe19a904146105c557600080fd5b8063d6a526cf14610558578063e1b2d8441461056b57600080fd5b8063a817715b14610530578063c459a9c214610539578063c61a66e014610530578063cc6db2da1461054c57600080fd5b806381057714116101145780638da5cb5b116100f95780638da5cb5b146105015780639c1ebe631461051f5780639cc1d7be1461052857600080fd5b806381057714146104f85780638abe3003146103a757600080fd5b80636ea1e3c0146104a3578063715018a6146104b65780637600f3f2146104be57806379453948146104e557600080fd5b80635c5aaa49116101d857806363613da9116101a757806369b021281161018c57806369b02128146104705780636cbb37dd1461047d5780636e85ee471461049057600080fd5b806363613da91461042657806369074d641461044657600080fd5b80635c5aaa49146103a75780635dd574db146103b157806361f0f689146103d457806362534e79146103ff57600080fd5b80634e9866281161022f578063506328fc11610214578063506328fc1461031557806352fb6531146103285780635c475d421461037457600080fd5b80634e986628146102ea5780634ffcbb391461030a57600080fd5b80631959a0021461026157806325f14873146102975780633a51327c146102ac57806344e7bf06146102d7575b600080fd5b61028461026f366004612263565b60096020526000908152604090206003015481565b6040519081526020015b60405180910390f35b6102aa6102a5366004612287565b6105d8565b005b6102846102ba3660046122a0565b600360209081526000928352604080842090915290825290205481565b6102846102e5366004612287565b61071e565b6102846102f8366004612287565b60066020526000908152604090205481565b6102846305f5e10081565b610284610323366004612287565b6109f9565b61034f7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161028e565b610397610382366004612287565b60076020526000908152604090205460ff1681565b604051901515815260200161028e565b610284620186a081565b6103976103bf366004612287565b60086020526000908152604090205460ff1681565b6102846103e23660046122a0565b600260209081526000928352604080842090915290825290205481565b61034f7f000000000000000000000000000000000000000000000000000000000000000081565b610439610434366004612263565b610dbc565b60405161028e91906122cc565b610459610454366004612287565b610ea2565b60408051921515835260208301919091520161028e565b6102846501d1a94a200081565b6102aa61048b366004612287565b610ef6565b6102aa61049e366004612337565b611030565b6102aa6104b13660046123a3565b6110c3565b6102aa611277565b61034f7f000000000000000000000000000000000000000000000000000000000000000081565b6102aa6104f3366004612418565b611304565b61028460055481565b60005473ffffffffffffffffffffffffffffffffffffffff1661034f565b61028460045481565b610284600081565b61028461271081565b6102aa61054736600461245c565b611394565b61028464e8d4a5100081565b6102aa610566366004612263565b61149c565b60015461034f9073ffffffffffffffffffffffffffffffffffffffff1681565b61034f7f000000000000000000000000000000000000000000000000000000000000000081565b6102aa6105c0366004612263565b611596565b6102aa6105d3366004612491565b6116c6565b60005473ffffffffffffffffffffffffffffffffffffffff16331461065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b60008111801561067257506305f5e1008111155b6106d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f496e76616c6964206342000000000000000000000000000000000000000000006044820152606401610655565b600580549082905560408051828152602081018490527fff6a4b972407d470846bd3a5979c60d68807653244cc8d096c4174a76486e71c91015b60405180910390a15050565b60003373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146107bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f74204d6173746572436865662056330000000000000000000000000000006044820152606401610655565b60008060008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633b1acf74886040518263ffffffff1660e01b815260040161082291815260200190565b61012060405180830381865afa158015610840573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086491906124f0565b9850985098505050505094509450836fffffffffffffffffffffffffffffffff1660001480156108945750600081115b1561089e57600080fd5b60008281526008602052604090205464e8d4a51000965060ff16156109ef576108db838884886fffffffffffffffffffffffffffffffff16611827565b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602090815260408083208a845280835281842054868552600790935292205460ff166109445760008981526001830160205260409020541561093f5761093f828a6118cc565b610991565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600360209081526040808320878452909152812054610984918791879160016119af565b9750610991828a8a611bfd565b88848673ffffffffffffffffffffffffffffffffffffffff167f1e0e5eda2403f0a5efd54ab2b1ed4a66a026877e4255695d414a66acb88419e8848c6040516109e4929190918252602082015260400190565b60405180910390a450505b5050505050919050565b600080600080610a0885611c68565b506fffffffffffffffffffffffffffffffff92909216945092509050600181610d20576000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166399fbab888b6040518263ffffffff1660e01b8152600401610a8c91815260200190565b61018060405180830381865afa158015610aaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ace9190612593565b50505050975050509550955095505050806fffffffffffffffffffffffffffffffff1697507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636352211e8b6040518263ffffffff1660e01b8152600401610b4e91815260200190565b602060405180830381865afa158015610b6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8f9190612674565b6040517f1698ee8200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152858116602483015262ffffff851660448301529198506000917f00000000000000000000000000000000000000000000000000000000000000001690631698ee8290606401602060405180830381865afa158015610c34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c589190612674565b6040517f0743384d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301529192507f000000000000000000000000000000000000000000000000000000000000000090911690630743384d90602401602060405180830381865afa158015610ce9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0d9190612691565b96508615610d1a57600095505b50505050505b60008281526007602052604090205460ff16610d46575064e8d4a5100095945050505050565b73ffffffffffffffffffffffffffffffffffffffff831660008181526002602090815260408083208a84528252808320549383526003825280832086845290915281205490918691610d9891906126d9565b610da291906126f0565b9050610db184848388866119af565b979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600960205260409020600281015460609190610df45750919050565b600281015467ffffffffffffffff811115610e1157610e11612708565b604051908082528060200260200182016040528015610e3a578160200160208202803683370190505b50915060005b6002820154811015610e9b57816002018181548110610e6157610e61612737565b9060005260206000200154838281518110610e7e57610e7e612737565b602090810291909101015280610e9381612766565b915050610e40565b5050919050565b600080600080610eb185611c68565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600960209081526040808320998352600190990190529690962054151596945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6127108110158015610f8c5750620186a08111155b610ff2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f496e76616c6964206341000000000000000000000000000000000000000000006044820152606401610655565b600480549082905560408051828152602081018490527f948053d58d4dfed61c0843c01f010e1a4446c65f03d475567102cc64dfe0ecd49101610712565b60015473ffffffffffffffffffffffffffffffffffffffff1633146110b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f7420766563616b652063616c6c65720000000000000000000000000000006044820152606401610655565b6110ba87611d20565b50505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b60005b8181101561127257600083838381811061116357611163612737565b905060400201803603810190611179919061279f565b90508060200151801561119d5750805160009081526008602052604090205460ff16155b156111dc578051600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b60208181018051835160009081526007845260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016921515929092179091558351915181519283521515928201929092527fbeef892af000af61e107ef5e9c764acbccd54157fd6c219d241750fb3eca3102910160405180910390a1508061126a81612766565b915050611147565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b6113026000611de7565b565b60015473ffffffffffffffffffffffffffffffffffffffff163314611385576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f7420766563616b652063616c6c65720000000000000000000000000000006044820152606401610655565b61138e84611d20565b50505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611433576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4e6f74204d6173746572436865662056330000000000000000000000000000006044820152606401610655565b60008181526008602052604090205460ff1615611272576114578383836000611827565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260096020908152604080832085845260018101909252909120541561138e5761138e81846118cc565b60005473ffffffffffffffffffffffffffffffffffffffff16331461151d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f74893ad32aa66290f59f1716275159e5945397884cb67b7a5a19c96473482e169060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314611617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b73ffffffffffffffffffffffffffffffffffffffff81166116ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610655565b6116c381611de7565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314611747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610655565b60008111801561175b57506305f5e1008111155b80611764575080155b6117ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f496e76616c6964206342000000000000000000000000000000000000000000006044820152606401610655565b600580546000848152600660209081526040918290208590559254815186815293840183905290830152907fa6a879d52f70ee909a019d4e93c2b17407cfe6a072da32219ad04ab25e15de429060600160405180910390a1505050565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600260209081526040808320878452825280832054938352600382528083208684529091529020548291611876916126d9565b61188091906126f0565b73ffffffffffffffffffffffffffffffffffffffff9094166000818152600360209081526040808320958352948152848220969096559081526002855282812093815292909352902055565b6000818152600183016020526040902054806118e757505050565b600283018054600091906118fd906001906126d9565b8154811061190d5761190d612737565b906000526020600020015490508083146119645780600285016119316001856126d9565b8154811061194157611941612737565b600091825260208083209091019290925582815260018601909152604090208290555b60008381526020858152604080832083905560018701909152812055600284018054806119935761199361281a565b6001900381819060005260206000200160009055905550505050565b600080620186a0856004546119c49190612849565b6119ce9190612886565b9050806119e35764e8d4a51000915050611bf4565b60006119f0878686611e5c565b60008881526006602052604081205491925090611a0f57600554611a1f565b6000888152600660205260409020545b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab29190612691565b905080611aca5764e8d4a51000945050505050611bf4565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260009161271091849186917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b859190612691565b611b8f9088612849565b611b999190612849565b611ba39190612886565b611bad9190612886565b90508464e8d4a51000611bc083836126f0565b8b1115611bd657611bd183886126f0565b611bd8565b8a5b611be29190612849565b611bec9190612886565b955050505050505b95945050505050565b6000828152600184016020908152604080832054918690529091208290558015611c275750505050565b6002840154611c379060016126f0565b6000848152600180870160209081526040832093909355600290960180549687018155815220909301919091555050565b6000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633b1acf74866040518263ffffffff1660e01b8152600401611cc991815260200190565b61012060405180830381865afa158015611ce7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0b91906124f0565b979d919c509a50959850949650505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600960205260409020600281015480156112725760005b8181101561138e576000836002018281548110611d7257611d72612737565b90600052602060002001549050600080611d8b83611c68565b5092509250508173ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415611dd157611dd186838386611fb3565b5050508080611ddf90612766565b915050611d53565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631526fe27876040518263ffffffff1660e01b8152600401611ebc91815260200190565b60e060405180830381865afa158015611ed9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611efd91906128c1565b50955050505092505083611f1857611f1585826126f0565b90505b60008273ffffffffffffffffffffffffffffffffffffffff16631a6865026040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f89919061293a565b6fffffffffffffffffffffffffffffffff16905080821115611fa9578091505b5095945050505050565b60008281526007602052604090205460ff1661209f5760008181526020859052604090205464e8d4a510001015612090576040517f69746a1d0000000000000000000000000000000000000000000000000000000081526004810182905264e8d4a5100060248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906369746a1d90604401600060405180830381600087803b15801561207757600080fd5b505af115801561208b573d6000803e3d6000fd5b505050505b61209a84826118cc565b61138e565b60006120aa82611c68565b73ffffffffffffffffffffffffffffffffffffffff881660009081526003602090815260408083208a845290915281205491955093506120f2925087915086908460016119af565b905064e8d4a5100081101561210d575064e8d4a51000612124565b6501d1a94a200081111561212457506501d1a94a20005b8181146121d3576040517f69746a1d00000000000000000000000000000000000000000000000000000000815260048101849052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906369746a1d90604401600060405180830381600087803b1580156121ba57600080fd5b505af11580156121ce573d6000803e3d6000fd5b505050505b6121de868483611bfd565b82848673ffffffffffffffffffffffffffffffffffffffff167f1e0e5eda2403f0a5efd54ab2b1ed4a66a026877e4255695d414a66acb88419e88585604051612231929190918252602082015260400190565b60405180910390a4505050505050565b73ffffffffffffffffffffffffffffffffffffffff811681146116c357600080fd5b60006020828403121561227557600080fd5b813561228081612241565b9392505050565b60006020828403121561229957600080fd5b5035919050565b600080604083850312156122b357600080fd5b82356122be81612241565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b81811015612304578351835292840192918401916001016122e8565b50909695505050505050565b8035600f81900b811461232257600080fd5b919050565b8035801515811461232257600080fd5b600080600080600080600060e0888a03121561235257600080fd5b873561235d81612241565b9650602088013595506040880135945061237960608901612310565b93506080880135925060a0880135915061239560c08901612327565b905092959891949750929550565b600080602083850312156123b657600080fd5b823567ffffffffffffffff808211156123ce57600080fd5b818501915085601f8301126123e257600080fd5b8135818111156123f157600080fd5b8660208260061b850101111561240657600080fd5b60209290920196919550909350505050565b6000806000806080858703121561242e57600080fd5b843561243981612241565b935061244760208601612310565b93969395505050506040820135916060013590565b60008060006060848603121561247157600080fd5b833561247c81612241565b95602085013595506040909401359392505050565b600080604083850312156124a457600080fd5b50508035926020909101359150565b80516fffffffffffffffffffffffffffffffff8116811461232257600080fd5b8051600281900b811461232257600080fd5b805161232281612241565b60008060008060008060008060006101208a8c03121561250f57600080fd5b6125188a6124b3565b985061252660208b016124b3565b975061253460408b016124d3565b965061254260608b016124d3565b955060808a0151945060a08a0151935060c08a015161256081612241565b8093505060e08a015191506101008a015190509295985092959850929598565b805162ffffff8116811461232257600080fd5b6000806000806000806000806000806000806101808d8f0312156125b657600080fd5b8c516bffffffffffffffffffffffff811681146125d257600080fd5b9b506125e060208e016124e5565b9a506125ee60408e016124e5565b99506125fc60608e016124e5565b985061260a60808e01612580565b975061261860a08e016124d3565b965061262660c08e016124d3565b955061263460e08e016124b3565b94506101008d015193506101208d015192506126536101408e016124b3565b91506126626101608e016124b3565b90509295989b509295989b509295989b565b60006020828403121561268657600080fd5b815161228081612241565b6000602082840312156126a357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156126eb576126eb6126aa565b500390565b60008219821115612703576127036126aa565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612798576127986126aa565b5060010190565b6000604082840312156127b157600080fd5b6040516040810181811067ffffffffffffffff821117156127fb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528235815261280e60208401612327565b60208201529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612881576128816126aa565b500290565b6000826128bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600080600080600080600060e0888a0312156128dc57600080fd5b8751965060208801516128ee81612241565b60408901519096506128ff81612241565b606089015190955061291081612241565b935061291e60808901612580565b925060a0880151915060c0880151905092959891949750929550565b60006020828403121561294c57600080fd5b612280826124b356fea264697066735822122069ec13a539f353a8480f782cfcd1a47c25c966f4ddfa9874eddafca03baaa09764736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/MasterChef.json b/projects/vecake-farm-booster/v3/test/artifactsFile/MasterChef.json new file mode 100644 index 00000000..3824474e --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/MasterChef.json @@ -0,0 +1,590 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MasterChef", + "sourceName": "contracts/test/MasterChef.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract CakeToken", + "name": "_cake", + "type": "address" + }, + { + "internalType": "contract SyrupBar", + "name": "_syrup", + "type": "address" + }, + { + "internalType": "address", + "name": "_devaddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_cakePerBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_startBlock", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BONUS_MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_lpToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "add", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cake", + "outputs": [ + { + "internalType": "contract CakeToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_devaddr", + "type": "address" + } + ], + "name": "dev", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "devaddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "enterStaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_to", + "type": "uint256" + } + ], + "name": "getMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "leaveStaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "migrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrator", + "outputs": [ + { + "internalType": "contract IMigratorChef", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingCake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "lpToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IMigratorChef", + "name": "_migrator", + "type": "address" + } + ], + "name": "setMigrator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "syrup", + "outputs": [ + { + "internalType": "contract SyrupBar", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "multiplierNumber", + "type": "uint256" + } + ], + "name": "updateMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040526001600555600060095534801561001a57600080fd5b5060405162002b0a38038062002b0a833981810160405260a081101561003f57600080fd5b5080516020820151604083015160608401516080909401519293919290919060006100686101e2565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b03199081166001600160a01b03978816908117835560028054831697891697909717909655600380548216958816959095179094556004928355600a829055604080516080810182529586526103e86020870181815291870193845260006060880181815260078054958601815590915296517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688939095029283018054909616949097169390931790935590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a82015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b909101556009556101e6565b3390565b61291480620001f66000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635ffe6146116101045780638d88a90e116100a2578063d49e77cd11610071578063d49e77cd1461050c578063dce1748414610514578063e2bbb1581461051c578063f2fde38b1461053f576101cf565b80638d88a90e1461045c5780638da5cb5b1461048f5780638dbb1e3a1461049757806393f1a40b146104ba576101cf565b8063715018a6116100de578063715018a6146104135780637cd07e471461041b57806386a952c41461044c5780638aa2855014610454576101cf565b80635ffe6146146103c3578063630b5ba1146103e057806364482f79146103e8576101cf565b806323cf311811610171578063454b06081161014b578063454b06081461036457806348cd4cb11461038157806351eb05a6146103895780635312ea8e146103a6576101cf565b806323cf3118146102f157806341441d3b14610324578063441a3e7014610341576101cf565b80631175a1dd116101ad5780631175a1dd146102155780631526fe271461024e57806317caf6f1146102a85780631eaaa045146102b0576101cf565b80630755e0b6146101d4578063081e3eda146101ee5780631058d281146101f6575b600080fd5b6101dc610572565b60408051918252519081900360200190f35b6101dc610578565b6102136004803603602081101561020c57600080fd5b503561057e565b005b6101dc6004803603604081101561022b57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166107ba565b61026b6004803603602081101561026457600080fd5b503561094a565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526020850193909352838301919091526060830152519081900360800190f35b6101dc610998565b610213600480360360608110156102c657600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135151561099e565b6102136004803603602081101561030757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b99565b6102136004803603602081101561033a57600080fd5b5035610c88565b6102136004803603604081101561035757600080fd5b5080359060200135610e4f565b6102136004803603602081101561037a57600080fd5b5035611040565b6101dc61139b565b6102136004803603602081101561039f57600080fd5b50356113a1565b610213600480360360208110156103bc57600080fd5b503561162d565b610213600480360360208110156103d957600080fd5b50356116d5565b610213611782565b610213600480360360608110156103fe57600080fd5b508035906020810135906040013515156117a5565b6102136118d2565b6104236119e9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610423611a05565b6101dc611a21565b6102136004803603602081101561047257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a27565b610423611af4565b6101dc600480360360408110156104ad57600080fd5b5080359060200135611b10565b6104f3600480360360408110156104d057600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16611b2b565b6040805192835260208301919091528051918290030190f35b610423611b4f565b610423611b6b565b6102136004803603604081101561053257600080fd5b5080359060200135611b87565b6102136004803603602081101561055557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d12565b60045481565b60075490565b6000600760008154811061058e57fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7909152604090922080546004909202909201925083111561063e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b61064860006113a1565b6000610682826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90611f26565b90611fa7565b9050801561069457610694338261201e565b83156106cb5781546106a69085611fa7565b825582546106cb9073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b600383015482546106e69164e8d4a510009161067691611eb3565b6001830155600254604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101879052905173ffffffffffffffffffffffffffffffffffffffff90921691639dc29fac9160448082019260009290919082900301818387803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b5050604080518781529051600093503392507ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350505050565b600080600784815481106107ca57fe5b6000918252602080832087845260088252604080852073ffffffffffffffffffffffffffffffffffffffff898116875290845281862060049586029093016003810154815484517f70a082310000000000000000000000000000000000000000000000000000000081523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b50516002850154909150431180156108af57508015155b156109155760006108c4856002015443611b10565b905060006108f160095461067688600101546108eb60045487611eb390919063ffffffff16565b90611eb3565b9050610910610909846106768464e8d4a51000611eb3565b8590612147565b935050505b61093d836001015461067c64e8d4a51000610676868860000154611eb390919063ffffffff16565b9450505050505b92915050565b6007818154811061095757fe5b6000918252602090912060049091020180546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff9092169350919084565b60095481565b6109a66121bb565b73ffffffffffffffffffffffffffffffffffffffff166109c4611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610a4657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8015610a5457610a54611782565b6000600a544311610a6757600a54610a69565b435b600954909150610a799085612147565b6009556040805160808101825273ffffffffffffffffffffffffffffffffffffffff85811682526020820187815292820184815260006060840181815260078054600181018255925293517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490920291820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919094161790925592517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b90910155610b936121bf565b50505050565b610ba16121bb565b73ffffffffffffffffffffffffffffffffffffffff16610bbf611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610c4157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006007600081548110610c9857fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c790915260408320600490920201925090610cdf906113a1565b805415610d28576000610d14826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610d2657610d26338261201e565b505b8215610d61578154610d529073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054610d5e9084612147565b81555b60038201548154610d7c9164e8d4a510009161067691611eb3565b6001820155600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff909216916340c10f199160448082019260009290919082900301818387803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b5050604080518681529051600093503392507f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505050565b81610ebb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77697468647261772043414b4520627920756e7374616b696e67000000000000604482015290519081900360640190fd5b600060078381548110610eca57fe5b600091825260208083208684526008825260408085203386529092529220805460049092029092019250831115610f6257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b610f6b846113a1565b6000610f99826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610fab57610fab338261201e565b8315610fe2578154610fbd9085611fa7565b82558254610fe29073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b60038301548254610ffd9164e8d4a510009161067691611eb3565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60065473ffffffffffffffffffffffffffffffffffffffff166110c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6d6967726174653a206e6f206d69677261746f72000000000000000000000000604482015290519081900360640190fd5b6000600782815481106110d357fe5b600091825260208083206004928302018054604080517f70a0823100000000000000000000000000000000000000000000000000000000815230958101959095525191955073ffffffffffffffffffffffffffffffffffffffff16939284926370a0823192602480840193829003018186803b15801561115257600080fd5b505afa158015611166573d6000803e3d6000fd5b505050506040513d602081101561117c57600080fd5b50516006549091506111a89073ffffffffffffffffffffffffffffffffffffffff848116911683612319565b600654604080517fce5494bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b1580156112bc57600080fd5b505afa1580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b5051821461135557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d6967726174653a206261640000000000000000000000000000000000000000604482015290519081900360640190fd5b83547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9190911617909255505050565b600a5481565b6000600782815481106113b057fe5b90600052602060002090600402019050806002015443116113d1575061162a565b8054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561144157600080fd5b505afa158015611455573d6000803e3d6000fd5b505050506040513d602081101561146b57600080fd5b505190508061148157504360029091015561162a565b6000611491836002015443611b10565b905060006114b860095461067686600101546108eb60045487611eb390919063ffffffff16565b60015460035491925073ffffffffffffffffffffffffffffffffffffffff908116916340c10f1991166114ec84600a611f26565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561153f57600080fd5b505af1158015611553573d6000803e3d6000fd5b5050600154600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201526024810187905290519190921693506340c10f199250604480830192600092919082900301818387803b1580156115d557600080fd5b505af11580156115e9573d6000803e3d6000fd5b5050505061161761160c8461067664e8d4a5100085611eb390919063ffffffff16565b600386015490612147565b6003850155505043600290920191909155505b50565b60006007828154811061163c57fe5b6000918252602080832085845260088252604080852033808752935290932080546004909302909301805490945061168e9273ffffffffffffffffffffffffffffffffffffffff9190911691906120b5565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b6116dd6121bb565b73ffffffffffffffffffffffffffffffffffffffff166116fb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461177d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600555565b60075460005b818110156117a157611799816113a1565b600101611788565b5050565b6117ad6121bb565b73ffffffffffffffffffffffffffffffffffffffff166117cb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461184d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b801561185b5761185b611782565b60006007848154811061186a57fe5b9060005260206000209060040201600101549050826007858154811061188c57fe5b906000526020600020906004020160010181905550828114610b93576118c7836118c183600954611fa790919063ffffffff16565b90612147565b600955610b936121bf565b6118da6121bb565b73ffffffffffffffffffffffffffffffffffffffff166118f8611af4565b73ffffffffffffffffffffffffffffffffffffffff161461197a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff163314611aad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6465763a207775743f0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600554600090611b24906108eb8486611fa7565b9392505050565b60086020908152600092835260408084209091529082529020805460019091015482565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b81611bf357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6465706f7369742043414b45206279207374616b696e67000000000000000000604482015290519081900360640190fd5b600060078381548110611c0257fe5b60009182526020808320868452600882526040808520338652909252922060049091029091019150611c33846113a1565b805415611c7c576000611c68826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015611c7a57611c7a338261201e565b505b8215611cb5578154611ca69073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054611cb29084612147565b81555b60038201548154611cd09164e8d4a510009161067691611eb3565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b611d1a6121bb565b73ffffffffffffffffffffffffffffffffffffffff16611d38611af4565b73ffffffffffffffffffffffffffffffffffffffff1614611dba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116611e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061283c6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600082611ec257506000610944565b82820282848281611ecf57fe5b0414611b24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128886021913960400191505060405180910390fd5b6000808211611f9657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f9f57fe5b049392505050565b60008282111561201857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600254604080517fa2e6ddcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529151919092169163a2e6ddcc91604480830192600092919082900301818387803b15801561209957600080fd5b505af11580156120ad573d6000803e3d6000fd5b505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526121429084906124a3565b505050565b600082820183811015611b2457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600754600060015b8281101561220a57612200600782815481106121df57fe5b9060005260206000209060040201600101548361214790919063ffffffff16565b91506001016121c7565b5080156117a15761221c816003611f26565b9050612256816118c1600760008154811061223357fe5b906000526020600020906004020160010154600954611fa790919063ffffffff16565b60098190555080600760008154811061226b57fe5b9060005260206000209060040201600101819055505050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b939085906124a3565b8015806123c55750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561239757600080fd5b505afa1580156123ab573d6000803e3d6000fd5b505050506040513d60208110156123c157600080fd5b5051155b61241a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806128a96036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526121429084905b6060612505826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661257b9092919063ffffffff16565b8051909150156121425780806020019051602081101561252457600080fd5b5051612142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612812602a913960400191505060405180910390fd5b606061258a8484600085612592565b949350505050565b6060824710156125ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806128626026913960400191505060405180910390fd5b6125f68561274d565b61266157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106126cb57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161268e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461272d576040519150601f19603f3d011682016040523d82523d6000602084013e612732565b606091505b5091509150612742828286612753565b979650505050505050565b3b151590565b60608315612762575081611b24565b8251156127725782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156127d65781810151838201526020016127be565b50505050905090810190601f1680156128035780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666542455032303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212204a998361f0f5665374d8aaeb4227a26c5a52a806a0be4997372508cb9e5e1e7c64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635ffe6146116101045780638d88a90e116100a2578063d49e77cd11610071578063d49e77cd1461050c578063dce1748414610514578063e2bbb1581461051c578063f2fde38b1461053f576101cf565b80638d88a90e1461045c5780638da5cb5b1461048f5780638dbb1e3a1461049757806393f1a40b146104ba576101cf565b8063715018a6116100de578063715018a6146104135780637cd07e471461041b57806386a952c41461044c5780638aa2855014610454576101cf565b80635ffe6146146103c3578063630b5ba1146103e057806364482f79146103e8576101cf565b806323cf311811610171578063454b06081161014b578063454b06081461036457806348cd4cb11461038157806351eb05a6146103895780635312ea8e146103a6576101cf565b806323cf3118146102f157806341441d3b14610324578063441a3e7014610341576101cf565b80631175a1dd116101ad5780631175a1dd146102155780631526fe271461024e57806317caf6f1146102a85780631eaaa045146102b0576101cf565b80630755e0b6146101d4578063081e3eda146101ee5780631058d281146101f6575b600080fd5b6101dc610572565b60408051918252519081900360200190f35b6101dc610578565b6102136004803603602081101561020c57600080fd5b503561057e565b005b6101dc6004803603604081101561022b57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166107ba565b61026b6004803603602081101561026457600080fd5b503561094a565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526020850193909352838301919091526060830152519081900360800190f35b6101dc610998565b610213600480360360608110156102c657600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135151561099e565b6102136004803603602081101561030757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b99565b6102136004803603602081101561033a57600080fd5b5035610c88565b6102136004803603604081101561035757600080fd5b5080359060200135610e4f565b6102136004803603602081101561037a57600080fd5b5035611040565b6101dc61139b565b6102136004803603602081101561039f57600080fd5b50356113a1565b610213600480360360208110156103bc57600080fd5b503561162d565b610213600480360360208110156103d957600080fd5b50356116d5565b610213611782565b610213600480360360608110156103fe57600080fd5b508035906020810135906040013515156117a5565b6102136118d2565b6104236119e9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610423611a05565b6101dc611a21565b6102136004803603602081101561047257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a27565b610423611af4565b6101dc600480360360408110156104ad57600080fd5b5080359060200135611b10565b6104f3600480360360408110156104d057600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16611b2b565b6040805192835260208301919091528051918290030190f35b610423611b4f565b610423611b6b565b6102136004803603604081101561053257600080fd5b5080359060200135611b87565b6102136004803603602081101561055557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d12565b60045481565b60075490565b6000600760008154811061058e57fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7909152604090922080546004909202909201925083111561063e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b61064860006113a1565b6000610682826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90611f26565b90611fa7565b9050801561069457610694338261201e565b83156106cb5781546106a69085611fa7565b825582546106cb9073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b600383015482546106e69164e8d4a510009161067691611eb3565b6001830155600254604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101879052905173ffffffffffffffffffffffffffffffffffffffff90921691639dc29fac9160448082019260009290919082900301818387803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b5050604080518781529051600093503392507ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350505050565b600080600784815481106107ca57fe5b6000918252602080832087845260088252604080852073ffffffffffffffffffffffffffffffffffffffff898116875290845281862060049586029093016003810154815484517f70a082310000000000000000000000000000000000000000000000000000000081523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b50516002850154909150431180156108af57508015155b156109155760006108c4856002015443611b10565b905060006108f160095461067688600101546108eb60045487611eb390919063ffffffff16565b90611eb3565b9050610910610909846106768464e8d4a51000611eb3565b8590612147565b935050505b61093d836001015461067c64e8d4a51000610676868860000154611eb390919063ffffffff16565b9450505050505b92915050565b6007818154811061095757fe5b6000918252602090912060049091020180546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff9092169350919084565b60095481565b6109a66121bb565b73ffffffffffffffffffffffffffffffffffffffff166109c4611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610a4657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8015610a5457610a54611782565b6000600a544311610a6757600a54610a69565b435b600954909150610a799085612147565b6009556040805160808101825273ffffffffffffffffffffffffffffffffffffffff85811682526020820187815292820184815260006060840181815260078054600181018255925293517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490920291820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919094161790925592517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b90910155610b936121bf565b50505050565b610ba16121bb565b73ffffffffffffffffffffffffffffffffffffffff16610bbf611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610c4157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006007600081548110610c9857fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c790915260408320600490920201925090610cdf906113a1565b805415610d28576000610d14826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610d2657610d26338261201e565b505b8215610d61578154610d529073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054610d5e9084612147565b81555b60038201548154610d7c9164e8d4a510009161067691611eb3565b6001820155600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff909216916340c10f199160448082019260009290919082900301818387803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b5050604080518681529051600093503392507f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505050565b81610ebb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77697468647261772043414b4520627920756e7374616b696e67000000000000604482015290519081900360640190fd5b600060078381548110610eca57fe5b600091825260208083208684526008825260408085203386529092529220805460049092029092019250831115610f6257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b610f6b846113a1565b6000610f99826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610fab57610fab338261201e565b8315610fe2578154610fbd9085611fa7565b82558254610fe29073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b60038301548254610ffd9164e8d4a510009161067691611eb3565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60065473ffffffffffffffffffffffffffffffffffffffff166110c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6d6967726174653a206e6f206d69677261746f72000000000000000000000000604482015290519081900360640190fd5b6000600782815481106110d357fe5b600091825260208083206004928302018054604080517f70a0823100000000000000000000000000000000000000000000000000000000815230958101959095525191955073ffffffffffffffffffffffffffffffffffffffff16939284926370a0823192602480840193829003018186803b15801561115257600080fd5b505afa158015611166573d6000803e3d6000fd5b505050506040513d602081101561117c57600080fd5b50516006549091506111a89073ffffffffffffffffffffffffffffffffffffffff848116911683612319565b600654604080517fce5494bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b1580156112bc57600080fd5b505afa1580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b5051821461135557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d6967726174653a206261640000000000000000000000000000000000000000604482015290519081900360640190fd5b83547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9190911617909255505050565b600a5481565b6000600782815481106113b057fe5b90600052602060002090600402019050806002015443116113d1575061162a565b8054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561144157600080fd5b505afa158015611455573d6000803e3d6000fd5b505050506040513d602081101561146b57600080fd5b505190508061148157504360029091015561162a565b6000611491836002015443611b10565b905060006114b860095461067686600101546108eb60045487611eb390919063ffffffff16565b60015460035491925073ffffffffffffffffffffffffffffffffffffffff908116916340c10f1991166114ec84600a611f26565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561153f57600080fd5b505af1158015611553573d6000803e3d6000fd5b5050600154600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201526024810187905290519190921693506340c10f199250604480830192600092919082900301818387803b1580156115d557600080fd5b505af11580156115e9573d6000803e3d6000fd5b5050505061161761160c8461067664e8d4a5100085611eb390919063ffffffff16565b600386015490612147565b6003850155505043600290920191909155505b50565b60006007828154811061163c57fe5b6000918252602080832085845260088252604080852033808752935290932080546004909302909301805490945061168e9273ffffffffffffffffffffffffffffffffffffffff9190911691906120b5565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b6116dd6121bb565b73ffffffffffffffffffffffffffffffffffffffff166116fb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461177d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600555565b60075460005b818110156117a157611799816113a1565b600101611788565b5050565b6117ad6121bb565b73ffffffffffffffffffffffffffffffffffffffff166117cb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461184d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b801561185b5761185b611782565b60006007848154811061186a57fe5b9060005260206000209060040201600101549050826007858154811061188c57fe5b906000526020600020906004020160010181905550828114610b93576118c7836118c183600954611fa790919063ffffffff16565b90612147565b600955610b936121bf565b6118da6121bb565b73ffffffffffffffffffffffffffffffffffffffff166118f8611af4565b73ffffffffffffffffffffffffffffffffffffffff161461197a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff163314611aad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6465763a207775743f0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600554600090611b24906108eb8486611fa7565b9392505050565b60086020908152600092835260408084209091529082529020805460019091015482565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b81611bf357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6465706f7369742043414b45206279207374616b696e67000000000000000000604482015290519081900360640190fd5b600060078381548110611c0257fe5b60009182526020808320868452600882526040808520338652909252922060049091029091019150611c33846113a1565b805415611c7c576000611c68826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015611c7a57611c7a338261201e565b505b8215611cb5578154611ca69073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054611cb29084612147565b81555b60038201548154611cd09164e8d4a510009161067691611eb3565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b611d1a6121bb565b73ffffffffffffffffffffffffffffffffffffffff16611d38611af4565b73ffffffffffffffffffffffffffffffffffffffff1614611dba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116611e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061283c6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600082611ec257506000610944565b82820282848281611ecf57fe5b0414611b24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128886021913960400191505060405180910390fd5b6000808211611f9657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f9f57fe5b049392505050565b60008282111561201857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600254604080517fa2e6ddcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529151919092169163a2e6ddcc91604480830192600092919082900301818387803b15801561209957600080fd5b505af11580156120ad573d6000803e3d6000fd5b505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526121429084906124a3565b505050565b600082820183811015611b2457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600754600060015b8281101561220a57612200600782815481106121df57fe5b9060005260206000209060040201600101548361214790919063ffffffff16565b91506001016121c7565b5080156117a15761221c816003611f26565b9050612256816118c1600760008154811061223357fe5b906000526020600020906004020160010154600954611fa790919063ffffffff16565b60098190555080600760008154811061226b57fe5b9060005260206000209060040201600101819055505050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b939085906124a3565b8015806123c55750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561239757600080fd5b505afa1580156123ab573d6000803e3d6000fd5b505050506040513d60208110156123c157600080fd5b5051155b61241a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806128a96036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526121429084905b6060612505826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661257b9092919063ffffffff16565b8051909150156121425780806020019051602081101561252457600080fd5b5051612142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612812602a913960400191505060405180910390fd5b606061258a8484600085612592565b949350505050565b6060824710156125ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806128626026913960400191505060405180910390fd5b6125f68561274d565b61266157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106126cb57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161268e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461272d576040519150601f19603f3d011682016040523d82523d6000602084013e612732565b606091505b5091509150612742828286612753565b979650505050505050565b3b151590565b60608315612762575081611b24565b8251156127725782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156127d65781810151838201526020016127be565b50505050905090810190601f1680156128035780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666542455032303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212204a998361f0f5665374d8aaeb4227a26c5a52a806a0be4997372508cb9e5e1e7c64736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/MasterChefV2.json b/projects/vecake-farm-booster/v3/test/artifactsFile/MasterChefV2.json new file mode 100644 index 00000000..8e63e6b4 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/MasterChefV2.json @@ -0,0 +1,1051 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MasterChefV2", + "sourceName": "contracts/MasterChefV2.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IMasterChef", + "name": "_MASTER_CHEF", + "type": "address" + }, + { + "internalType": "contract IBEP20", + "name": "_CAKE", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_MASTER_PID", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_burnAdmin", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IBEP20", + "name": "lpToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "name": "AddPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Init", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + } + ], + "name": "SetPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "boostContract", + "type": "address" + } + ], + "name": "UpdateBoostContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMultiplier", + "type": "uint256" + } + ], + "name": "UpdateBoostMultiplier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "UpdateBurnAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "burnRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "regularFarmRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "specialFarmRate", + "type": "uint256" + } + ], + "name": "UpdateCakeRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lpSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + } + ], + "name": "UpdatePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isValid", + "type": "bool" + } + ], + "name": "UpdateWhiteList", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "ACC_CAKE_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CAKE", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CAKE_RATE_TOTAL_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTERCHEF_CAKE_PER_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER_CHEF", + "outputs": [ + { + "internalType": "contract IMasterChef", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER_PID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_lpToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isRegular", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "add", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "boostContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "burnAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "burnCake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_isRegular", + "type": "bool" + } + ], + "name": "cakePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePerBlockToBurn", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToBurn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToRegularFarm", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToSpecialFarm", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "getBoostMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvestFromMasterChef", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBEP20", + "name": "dummyToken", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastBurnedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "lpToken", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingCake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "pools", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalRegularAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSpecialAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newBoostContract", + "type": "address" + } + ], + "name": "updateBoostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newMultiplier", + "type": "uint256" + } + ], + "name": "updateBoostMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newAdmin", + "type": "address" + } + ], + "name": "updateBurnAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_burnRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_regularFarmRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_specialFarmRate", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "updateCakeRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "internalType": "struct MasterChefV2.PoolInfo", + "name": "pool", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isValid", + "type": "bool" + } + ], + "name": "updateWhiteList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "boostMultiplier", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whiteList", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60e060405264ae9f7bcc00600a5564174876e800600b556422ecb25c00600c553480156200002c57600080fd5b5060405162003e6538038062003e658339810160408190526200004f91620000f3565b60006200005b620000ef565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055606093841b6001600160601b03199081166080529290931b90911660a05260c052600280546001600160a01b0319166001600160a01b0390921691909117905562000167565b3390565b6000806000806080858703121562000109578384fd5b845162000116816200014e565b602086015190945062000129816200014e565b60408601516060870151919450925062000143816200014e565b939692955090935050565b6001600160a01b03811681146200016457600080fd5b50565b60805160601c60a05160601c60c051613c9e620001c760003980610f7c528061133552806116925250806112a95280611f7e5280612c0a5280612cdd5280612d8a525080610e955280610f4f5280611308528061278d5250613c9e6000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c80637398b7ea11610191578063ac1d0609116100e3578063dfcedeee11610097578063e39e132311610071578063e39e13231461052b578063edd8b17014610569578063f2fde38b14610571576102e9565b8063dfcedeee14610546578063e0f91f6c1461054e578063e2bbb15814610556576102e9565b8063c507aeaa116100c8578063c507aeaa14610518578063cc6db2da1461052b578063dc6363df14610533576102e9565b8063ac1d0609146104fd578063c40d337b14610510576102e9565b80638da5cb5b116101455780639dcc1b5f1161011f5780639dcc1b5f146104da5780639dd2fcc3146104e2578063aa47bc8e146104f5576102e9565b80638da5cb5b146104a857806393f1a40b146104b057806399d7e84a146104d2576102e9565b806378db4c341161017657806378db4c341461048557806378ed5d1f1461048d57806381bdf98c146104a0576102e9565b80637398b7ea1461046a578063777a97f814610472576102e9565b806339aae5ba1161024a5780635312ea8e116101fe57806364482f79116101d857806364482f791461044757806369b021281461045a578063715018a614610462576102e9565b80635312ea8e1461042457806361621aaa14610437578063630b5ba11461043f576102e9565b80634ca6ef281161022f5780634ca6ef28146103e75780634f70b15a146103fc57806351eb05a614610404576102e9565b806339aae5ba146103cc578063441a3e70146103d4576102e9565b80631526fe27116102a15780631ce06d57116102865780631ce06d57146103915780631e9b828b14610399578063372c12b1146103ac576102e9565b80631526fe271461035a57806319ab453c1461037e576102e9565b8063081e3eda116102d2578063081e3eda1461032c5780630bb844bc146103345780631175a1dd14610347576102e9565b8063033186e8146102ee578063041a84c914610317575b600080fd5b6103016102fc366004613081565b610584565b60405161030e9190613ba7565b60405180910390f35b61032a6103253660046130ac565b6105da565b005b610301610952565b61032a61034236600461302d565b610958565b610301610355366004613148565b610ae4565b61036d610368366004613118565b610c97565b60405161030e959493929190613be4565b61032a61038c36600461302d565b610cd8565b610301611009565b6103016103a73660046130e0565b61100f565b6103bf6103ba36600461302d565b611074565b60405161030e91906132e0565b610301611089565b61032a6103e23660046131be565b611096565b6103ef6112a7565b60405161030e9190613268565b61032a6112cb565b610417610412366004613118565b611394565b60405161030e9190613b6b565b61032a610432366004613118565b611562565b610301611690565b61032a6116b4565b61032a6104553660046131df565b611748565b6103016118d6565b61032a6118e0565b6103016119c2565b61032a6104803660046130e0565b6119ce565b610301611aab565b6103ef61049b366004613118565b611ab1565b6103ef611ae5565b6103ef611b01565b6104c36104be366004613148565b611b1d565b60405161030e93929190613bce565b610301611b49565b610301611b4f565b61032a6104f036600461302d565b611b7d565b610301611cd5565b61032a61050b366004613049565b611cdb565b610301611e26565b61032a61052636600461316c565b611e2c565b61030161221c565b61032a610541366004613217565b612225565b6103ef61239e565b6103016123ba565b61032a6105643660046131be565b6123c0565b6103ef61278b565b61032a61057f36600461302d565b6127af565b600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281206002015464e8d4a5100081116105ce5764e8d4a510006105d0565b805b9150505b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff163314610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061384c565b60405180910390fd5b60026001541415610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015573ffffffffffffffffffffffffffffffffffffffff83166106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906135b2565b600482815481106106d057fe5b600091825260209091206004600590920201015460ff1661071d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613906565b64e8d4a51000811015801561073857506501d1a94a20008111155b61076e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613399565b610776612fdb565b61077f83611394565b600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8916845290915281209192506107bb8686610584565b90506107c88686836128fc565b610808670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8a89600001546129d990919063ffffffff16565b90612a2d565b906129d9565b60018301558154610854906108289064e8d4a51000906107fc90886129d9565b835461084e906108439064e8d4a51000906107fc90876129d9565b606087015190612a79565b90612abb565b6060840152600480548491908790811061086a57fe5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608601516003850155608090950151600490930180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016931515939093179092558883526006815281832073ffffffffffffffffffffffffffffffffffffffff8b1680855291529181902090920186905590517f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba9061093e90889085908990613bce565b60405180910390a250506001805550505050565b60045490565b610960612afa565b73ffffffffffffffffffffffffffffffffffffffff1661097e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8116610a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061360f565b60025473ffffffffffffffffffffffffffffffffffffffff82811691161415610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a8b565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b6000610aee612fdb565b60048481548110610afb57fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301939093526002830154908201526003820154606082015260049091015460ff16151560808201529050610b5561300c565b50600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845282529182902082516060808201855282548252600183015482850152600290920154938101939093528351908401519184015190919043118015610bc357508015155b15610c43576000610be1856020015143612a7990919063ffffffff16565b90506000610c1c8660800151610bf957600954610bfd565b6008545b6107fc8860400151610802610c158b6080015161100f565b87906129d9565b9050610c3e610c37846107fc84670de0b6b3a76400006129d9565b8590612abb565b935050505b6000610c6364e8d4a510006107fc610c5b8a8c610584565b8751906129d9565b6020850151909150610c8b90610c85670de0b6b3a76400006107fc85886129d9565b90612a79565b98975050505050505050565b60048181548110610ca457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610ce0612afa565b73ffffffffffffffffffffffffffffffffffffffff16610cfe611b01565b73ffffffffffffffffffffffffffffffffffffffff1614610d4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610da0903390600401613268565b60206040518083038186803b158015610db857600080fd5b505afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df09190613130565b905080610e29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061333c565b610e4b73ffffffffffffffffffffffffffffffffffffffff8316333084612afe565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610ebf907f00000000000000000000000000000000000000000000000000000000000000009085906004016132ba565b602060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1191906130fc565b506040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890610fa6907f0000000000000000000000000000000000000000000000000000000000000000908590600401613bc0565b600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b505043600d5550506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a15050565b600c5481565b600081156110455761103e64e8d4a510006107fc600b5468022b1c8c1227a000006129d990919063ffffffff16565b905061106f565b61106c64e8d4a510006107fc600c5468022b1c8c1227a000006129d990919063ffffffff16565b90505b919050565b60076020526000908152604090205460ff1681565b68022b1c8c1227a0000081565b600260015414156110d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001556110e0612fdb565b6110e983611394565b60008481526006602090815260408083203384529091529020805491925090831115611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137a9565b600061114d3386610584565b905061115a3386836128fc565b83156111af57815461116c9085612a79565b82600001819055506111af33856005888154811061118657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169190612ba1565b6111e3670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b600183015561122b6111fe64e8d4a510006107fc87856129d9565b6004878154811061120b57fe5b906000526020600020906005020160030154612a7990919063ffffffff16565b6004868154811061123857fe5b906000526020600020906005020160030181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516112949190613ba7565b60405180910390a3505060018055505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890611360907f000000000000000000000000000000000000000000000000000000000000000090600090600401613bc0565b600060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b50505050565b61139c612fdb565b600482815481106113a957fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561106f576060810151608082015160009061141b5760095461141f565b6008545b90506000821180156114315750600081115b1561149757600061144f846020015143612a7990919063ffffffff16565b9050600061146f836107fc8760400151610802610c158a6080015161100f565b905061149261148a856107fc84670de0b6b3a76400006129d9565b865190612abb565b855250505b43602084015260048054849190869081106114ae57fe5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608401516003830155608090930151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558401518451915186927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926115539290918791613bce565b60405180910390a25050919050565b6002600154141561159f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001819055506000600482815481106115b657fe5b60009182526020808320858452600682526040808520338087529352842080548582556001820186905560059094029091019450929061160c9064e8d4a51000906107fc906116059089610584565b85906129d9565b90508084600301541161162057600061162f565b600384015461162f9082612a79565b846003018190555061164933836005888154811061118657fe5b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595846040516112949190613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045460005b81811015611744576116ca612fdb565b600482815481106116d757fe5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff161515608082015291501561173b5761173982611394565b505b506001016116ba565b5050565b611750612afa565b73ffffffffffffffffffffffffffffffffffffffff1661176e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146117bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6117c483611394565b5080156117d3576117d36116b4565b600483815481106117e057fe5b600091825260209091206004600590920201015460ff161561183b576118338261084e6004868154811061181057fe5b906000526020600020906005020160020154600854612a7990919063ffffffff16565b600855611876565b6118728261084e6004868154811061184f57fe5b906000526020600020906005020160020154600954612a7990919063ffffffff16565b6009555b816004848154811061188457fe5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516118c99190613ba7565b60405180910390a2505050565b6501d1a94a200081565b6118e8612afa565b73ffffffffffffffffffffffffffffffffffffffff16611906611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b670de0b6b3a764000081565b6119d6612afa565b73ffffffffffffffffffffffffffffffffffffffff166119f4611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b8015611a4f57611a4f6116b4565b6000611a66600d5443612a7990919063ffffffff16565b90506000611a7c611a75611b4f565b83906129d9565b600254909150611aa29073ffffffffffffffffffffffffffffffffffffffff1682612bc5565b505043600d5550565b600d5481565b60058181548110611abe57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60095481565b6000611b7864e8d4a510006107fc600a5468022b1c8c1227a000006129d990919063ffffffff16565b905090565b611b85612afa565b73ffffffffffffffffffffffffffffffffffffffff16611ba3611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811615801590611c30575060035473ffffffffffffffffffffffffffffffffffffffff828116911614155b611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613b0e565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b600b5481565b611ce3612afa565b73ffffffffffffffffffffffffffffffffffffffff16611d01611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8216611d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613963565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600760205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055517fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d5190611e1a9084906132e0565b60405180910390a25050565b60085481565b611e34612afa565b73ffffffffffffffffffffffffffffffffffffffff16611e52611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611e9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190611ef4903090600401613268565b60206040518083038186803b158015611f0c57600080fd5b505afa158015611f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f449190613130565b1015611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906138a9565b8015612010576120106116b4565b811561202b576008546120239085612abb565b60085561203c565b6009546120389085612abb565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905591546121dd91612a79565b7f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa868560405161220e929190613bb0565b60405180910390a350505050565b64e8d4a5100081565b61222d612afa565b73ffffffffffffffffffffffffffffffffffffffff1661224b611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000841180156122a85750600083115b80156122b45750600082115b6122ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061366c565b64e8d4a510006122fe8361084e8787612abb565b14612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139f7565b8015612343576123436116b4565b61234d60006119ce565b600a849055600b839055600c8290556040517fae2d2e7d1ae84564fc72227253ce0f36a007209f7fd5ec414dea80e5af2fb5b09061239090869086908690613bce565b60405180910390a150505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600260015414156123fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015561240a612fdb565b61241383611394565b600084815260066020908152604080832033845290915290206080820151919250908061244f57503360009081526007602052604090205460ff165b612485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906136c9565b60006124913386610584565b8254909150156124a6576124a63386836128fc565b83156126a2576000600586815481106124bb57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a082319061251a903090600401613268565b60206040518083038186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256a9190613130565b90506125a933308760058a8154811061257f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16929190612afe565b61266981600588815481106125ba57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190612619903090600401613268565b60206040518083038186803b15801561263157600080fd5b505afa158015612645573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c859190613130565b83549095506126789086612abb565b835561269b61269064e8d4a510006107fc88866129d9565b606086015190612abb565b6060850152505b6126d6670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b826001018190555082600486815481106126ec57fe5b6000918252602091829020835160059290920201908155908201516001820155604080830151600283015560608301516003830155608090920151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905551859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611294908890613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b6127b7612afa565b73ffffffffffffffffffffffffffffffffffffffff166127d5611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811661286f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613453565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61290461300c565b50600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906129719064e8d4a51000906107fc90866129d9565b905060006129a9670de0b6b3a76400006107fc6004888154811061299157fe5b600091825260209091206005909102015485906129d9565b905060006129c4846020015183612a7990919063ffffffff16565b90506129d08782612bc5565b50505050505050565b6000826129e8575060006105d4565b828202828482816129f557fe5b04146105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061374c565b6000808211612a68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061357b565b818381612a7157fe5b049392505050565b600082821115612ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134e7565b50900390565b6000828201838110156105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134b0565b3390565b61138e846323b872dd60e01b858585604051602401612b1f93929190613289565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612db1565b612bc08363a9059cbb60e01b8484604051602401612b1f9291906132ba565b505050565b8015611744576040517f70a08231000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612c3f903090600401613268565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190613130565b1015612c9d57612c9d6112cb565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612d12903090600401613268565b60206040518083038186803b158015612d2a57600080fd5b505afa158015612d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d629190613130565b905081811015612d70578091505b612bc073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168484612ba1565b6060612e13826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e679092919063ffffffff16565b805190915015612bc05780806020019051810190612e3191906130fc565b612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906133f6565b6060612e768484600085612e80565b90505b9392505050565b606082471015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061351e565b612ec585612f82565b612efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139c0565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612f25919061324c565b60006040518083038185875af1925050503d8060008114612f62576040519150601f19603f3d011682016040523d82523d6000602084013e612f67565b606091505b5091509150612f77828286612f88565b979650505050505050565b3b151590565b60608315612f97575081612e79565b825115612fa75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b91906132eb565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60405180606001604052806000815260200160008152602001600081525090565b60006020828403121561303e578081fd5b81356105ce81613c35565b6000806040838503121561305b578081fd5b823561306681613c35565b9150602083013561307681613c5a565b809150509250929050565b60008060408385031215613093578182fd5b823561309e81613c35565b946020939093013593505050565b6000806000606084860312156130c0578081fd5b83356130cb81613c35565b95602085013595506040909401359392505050565b6000602082840312156130f1578081fd5b81356105ce81613c5a565b60006020828403121561310d578081fd5b81516105ce81613c5a565b600060208284031215613129578081fd5b5035919050565b600060208284031215613141578081fd5b5051919050565b6000806040838503121561315a578182fd5b82359150602083013561307681613c35565b60008060008060808587031215613181578081fd5b84359350602085013561319381613c35565b925060408501356131a381613c5a565b915060608501356131b381613c5a565b939692955090935050565b600080604083850312156131d0578182fd5b50508035926020909101359150565b6000806000606084860312156131f3578283fd5b8335925060208401359150604084013561320c81613c5a565b809150509250925092565b6000806000806080858703121561322c578384fd5b84359350602085013592506040850135915060608501356131b381613c5a565b6000825161325e818460208701613c09565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261330a816040850160208701613c09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526023908201527f4d61737465724368656656323a2042616c616e6365206d75737420657863656560408201527f6420300000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060408201527f6d756c7469706c69657200000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4d61737465724368656656323a2054686520757365722061646472657373206d60408201527f7573742062652076616c69640000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206d7573742062652076616c6964000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a2043616b652072617465206d7573742062652060408201527f67726561746572207468616e2030000000000000000000000000000000000000606082015260800190565b60208082526042908201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460408201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f60608201527f6f6c000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f77697468647261773a20496e73756666696369656e7400000000000000000000604082015260600190565b60208082526011908201527f4e6f6e6520424550323020746f6b656e73000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f737460408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f43414b4520746f6b656e2063616e277420626520616464656420746f2066617260408201527f6d20706f6f6c7300000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060408201527f636f756c6420626520626f6f7374656400000000000000000000000000000000606082015260800190565b60208082526032908201527f4d61737465724368656656323a20546865207768697465206c6973742061646460408201527f72657373206d7573742062652076616c69640000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526025908201527f4d61737465724368656656323a20546f74616c2072617465206d75737420626560408201527f2031653132000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526041908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206973207468652073616d6520776974682063757272656e742061646472657360608201527f7300000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f4d61737465724368656656323a204e657720626f6f737420636f6e747261637460408201527f2061646472657373206d7573742062652076616c696400000000000000000000606082015260800190565b600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b83811015613c24578181015183820152602001613c0c565b8381111561138e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114613c5757600080fd5b50565b8015158114613c5757600080fdfea2646970667358221220f3bdc87a312c1f6922cc6efd7e791ccbfcc6b4d3913517316c9bb61280affda264736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102e95760003560e01c80637398b7ea11610191578063ac1d0609116100e3578063dfcedeee11610097578063e39e132311610071578063e39e13231461052b578063edd8b17014610569578063f2fde38b14610571576102e9565b8063dfcedeee14610546578063e0f91f6c1461054e578063e2bbb15814610556576102e9565b8063c507aeaa116100c8578063c507aeaa14610518578063cc6db2da1461052b578063dc6363df14610533576102e9565b8063ac1d0609146104fd578063c40d337b14610510576102e9565b80638da5cb5b116101455780639dcc1b5f1161011f5780639dcc1b5f146104da5780639dd2fcc3146104e2578063aa47bc8e146104f5576102e9565b80638da5cb5b146104a857806393f1a40b146104b057806399d7e84a146104d2576102e9565b806378db4c341161017657806378db4c341461048557806378ed5d1f1461048d57806381bdf98c146104a0576102e9565b80637398b7ea1461046a578063777a97f814610472576102e9565b806339aae5ba1161024a5780635312ea8e116101fe57806364482f79116101d857806364482f791461044757806369b021281461045a578063715018a614610462576102e9565b80635312ea8e1461042457806361621aaa14610437578063630b5ba11461043f576102e9565b80634ca6ef281161022f5780634ca6ef28146103e75780634f70b15a146103fc57806351eb05a614610404576102e9565b806339aae5ba146103cc578063441a3e70146103d4576102e9565b80631526fe27116102a15780631ce06d57116102865780631ce06d57146103915780631e9b828b14610399578063372c12b1146103ac576102e9565b80631526fe271461035a57806319ab453c1461037e576102e9565b8063081e3eda116102d2578063081e3eda1461032c5780630bb844bc146103345780631175a1dd14610347576102e9565b8063033186e8146102ee578063041a84c914610317575b600080fd5b6103016102fc366004613081565b610584565b60405161030e9190613ba7565b60405180910390f35b61032a6103253660046130ac565b6105da565b005b610301610952565b61032a61034236600461302d565b610958565b610301610355366004613148565b610ae4565b61036d610368366004613118565b610c97565b60405161030e959493929190613be4565b61032a61038c36600461302d565b610cd8565b610301611009565b6103016103a73660046130e0565b61100f565b6103bf6103ba36600461302d565b611074565b60405161030e91906132e0565b610301611089565b61032a6103e23660046131be565b611096565b6103ef6112a7565b60405161030e9190613268565b61032a6112cb565b610417610412366004613118565b611394565b60405161030e9190613b6b565b61032a610432366004613118565b611562565b610301611690565b61032a6116b4565b61032a6104553660046131df565b611748565b6103016118d6565b61032a6118e0565b6103016119c2565b61032a6104803660046130e0565b6119ce565b610301611aab565b6103ef61049b366004613118565b611ab1565b6103ef611ae5565b6103ef611b01565b6104c36104be366004613148565b611b1d565b60405161030e93929190613bce565b610301611b49565b610301611b4f565b61032a6104f036600461302d565b611b7d565b610301611cd5565b61032a61050b366004613049565b611cdb565b610301611e26565b61032a61052636600461316c565b611e2c565b61030161221c565b61032a610541366004613217565b612225565b6103ef61239e565b6103016123ba565b61032a6105643660046131be565b6123c0565b6103ef61278b565b61032a61057f36600461302d565b6127af565b600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281206002015464e8d4a5100081116105ce5764e8d4a510006105d0565b805b9150505b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff163314610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061384c565b60405180910390fd5b60026001541415610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015573ffffffffffffffffffffffffffffffffffffffff83166106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906135b2565b600482815481106106d057fe5b600091825260209091206004600590920201015460ff1661071d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613906565b64e8d4a51000811015801561073857506501d1a94a20008111155b61076e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613399565b610776612fdb565b61077f83611394565b600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8916845290915281209192506107bb8686610584565b90506107c88686836128fc565b610808670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8a89600001546129d990919063ffffffff16565b90612a2d565b906129d9565b60018301558154610854906108289064e8d4a51000906107fc90886129d9565b835461084e906108439064e8d4a51000906107fc90876129d9565b606087015190612a79565b90612abb565b6060840152600480548491908790811061086a57fe5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608601516003850155608090950151600490930180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016931515939093179092558883526006815281832073ffffffffffffffffffffffffffffffffffffffff8b1680855291529181902090920186905590517f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba9061093e90889085908990613bce565b60405180910390a250506001805550505050565b60045490565b610960612afa565b73ffffffffffffffffffffffffffffffffffffffff1661097e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8116610a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061360f565b60025473ffffffffffffffffffffffffffffffffffffffff82811691161415610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a8b565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b6000610aee612fdb565b60048481548110610afb57fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301939093526002830154908201526003820154606082015260049091015460ff16151560808201529050610b5561300c565b50600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845282529182902082516060808201855282548252600183015482850152600290920154938101939093528351908401519184015190919043118015610bc357508015155b15610c43576000610be1856020015143612a7990919063ffffffff16565b90506000610c1c8660800151610bf957600954610bfd565b6008545b6107fc8860400151610802610c158b6080015161100f565b87906129d9565b9050610c3e610c37846107fc84670de0b6b3a76400006129d9565b8590612abb565b935050505b6000610c6364e8d4a510006107fc610c5b8a8c610584565b8751906129d9565b6020850151909150610c8b90610c85670de0b6b3a76400006107fc85886129d9565b90612a79565b98975050505050505050565b60048181548110610ca457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610ce0612afa565b73ffffffffffffffffffffffffffffffffffffffff16610cfe611b01565b73ffffffffffffffffffffffffffffffffffffffff1614610d4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610da0903390600401613268565b60206040518083038186803b158015610db857600080fd5b505afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df09190613130565b905080610e29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061333c565b610e4b73ffffffffffffffffffffffffffffffffffffffff8316333084612afe565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610ebf907f00000000000000000000000000000000000000000000000000000000000000009085906004016132ba565b602060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1191906130fc565b506040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890610fa6907f0000000000000000000000000000000000000000000000000000000000000000908590600401613bc0565b600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b505043600d5550506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a15050565b600c5481565b600081156110455761103e64e8d4a510006107fc600b5468022b1c8c1227a000006129d990919063ffffffff16565b905061106f565b61106c64e8d4a510006107fc600c5468022b1c8c1227a000006129d990919063ffffffff16565b90505b919050565b60076020526000908152604090205460ff1681565b68022b1c8c1227a0000081565b600260015414156110d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001556110e0612fdb565b6110e983611394565b60008481526006602090815260408083203384529091529020805491925090831115611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137a9565b600061114d3386610584565b905061115a3386836128fc565b83156111af57815461116c9085612a79565b82600001819055506111af33856005888154811061118657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169190612ba1565b6111e3670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b600183015561122b6111fe64e8d4a510006107fc87856129d9565b6004878154811061120b57fe5b906000526020600020906005020160030154612a7990919063ffffffff16565b6004868154811061123857fe5b906000526020600020906005020160030181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516112949190613ba7565b60405180910390a3505060018055505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890611360907f000000000000000000000000000000000000000000000000000000000000000090600090600401613bc0565b600060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b50505050565b61139c612fdb565b600482815481106113a957fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561106f576060810151608082015160009061141b5760095461141f565b6008545b90506000821180156114315750600081115b1561149757600061144f846020015143612a7990919063ffffffff16565b9050600061146f836107fc8760400151610802610c158a6080015161100f565b905061149261148a856107fc84670de0b6b3a76400006129d9565b865190612abb565b855250505b43602084015260048054849190869081106114ae57fe5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608401516003830155608090930151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558401518451915186927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926115539290918791613bce565b60405180910390a25050919050565b6002600154141561159f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001819055506000600482815481106115b657fe5b60009182526020808320858452600682526040808520338087529352842080548582556001820186905560059094029091019450929061160c9064e8d4a51000906107fc906116059089610584565b85906129d9565b90508084600301541161162057600061162f565b600384015461162f9082612a79565b846003018190555061164933836005888154811061118657fe5b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595846040516112949190613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045460005b81811015611744576116ca612fdb565b600482815481106116d757fe5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff161515608082015291501561173b5761173982611394565b505b506001016116ba565b5050565b611750612afa565b73ffffffffffffffffffffffffffffffffffffffff1661176e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146117bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6117c483611394565b5080156117d3576117d36116b4565b600483815481106117e057fe5b600091825260209091206004600590920201015460ff161561183b576118338261084e6004868154811061181057fe5b906000526020600020906005020160020154600854612a7990919063ffffffff16565b600855611876565b6118728261084e6004868154811061184f57fe5b906000526020600020906005020160020154600954612a7990919063ffffffff16565b6009555b816004848154811061188457fe5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516118c99190613ba7565b60405180910390a2505050565b6501d1a94a200081565b6118e8612afa565b73ffffffffffffffffffffffffffffffffffffffff16611906611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b670de0b6b3a764000081565b6119d6612afa565b73ffffffffffffffffffffffffffffffffffffffff166119f4611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b8015611a4f57611a4f6116b4565b6000611a66600d5443612a7990919063ffffffff16565b90506000611a7c611a75611b4f565b83906129d9565b600254909150611aa29073ffffffffffffffffffffffffffffffffffffffff1682612bc5565b505043600d5550565b600d5481565b60058181548110611abe57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60095481565b6000611b7864e8d4a510006107fc600a5468022b1c8c1227a000006129d990919063ffffffff16565b905090565b611b85612afa565b73ffffffffffffffffffffffffffffffffffffffff16611ba3611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811615801590611c30575060035473ffffffffffffffffffffffffffffffffffffffff828116911614155b611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613b0e565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b600b5481565b611ce3612afa565b73ffffffffffffffffffffffffffffffffffffffff16611d01611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8216611d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613963565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600760205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055517fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d5190611e1a9084906132e0565b60405180910390a25050565b60085481565b611e34612afa565b73ffffffffffffffffffffffffffffffffffffffff16611e52611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611e9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190611ef4903090600401613268565b60206040518083038186803b158015611f0c57600080fd5b505afa158015611f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f449190613130565b1015611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906138a9565b8015612010576120106116b4565b811561202b576008546120239085612abb565b60085561203c565b6009546120389085612abb565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905591546121dd91612a79565b7f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa868560405161220e929190613bb0565b60405180910390a350505050565b64e8d4a5100081565b61222d612afa565b73ffffffffffffffffffffffffffffffffffffffff1661224b611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000841180156122a85750600083115b80156122b45750600082115b6122ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061366c565b64e8d4a510006122fe8361084e8787612abb565b14612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139f7565b8015612343576123436116b4565b61234d60006119ce565b600a849055600b839055600c8290556040517fae2d2e7d1ae84564fc72227253ce0f36a007209f7fd5ec414dea80e5af2fb5b09061239090869086908690613bce565b60405180910390a150505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600260015414156123fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015561240a612fdb565b61241383611394565b600084815260066020908152604080832033845290915290206080820151919250908061244f57503360009081526007602052604090205460ff165b612485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906136c9565b60006124913386610584565b8254909150156124a6576124a63386836128fc565b83156126a2576000600586815481106124bb57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a082319061251a903090600401613268565b60206040518083038186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256a9190613130565b90506125a933308760058a8154811061257f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16929190612afe565b61266981600588815481106125ba57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190612619903090600401613268565b60206040518083038186803b15801561263157600080fd5b505afa158015612645573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c859190613130565b83549095506126789086612abb565b835561269b61269064e8d4a510006107fc88866129d9565b606086015190612abb565b6060850152505b6126d6670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b826001018190555082600486815481106126ec57fe5b6000918252602091829020835160059290920201908155908201516001820155604080830151600283015560608301516003830155608090920151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905551859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611294908890613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b6127b7612afa565b73ffffffffffffffffffffffffffffffffffffffff166127d5611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811661286f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613453565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61290461300c565b50600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906129719064e8d4a51000906107fc90866129d9565b905060006129a9670de0b6b3a76400006107fc6004888154811061299157fe5b600091825260209091206005909102015485906129d9565b905060006129c4846020015183612a7990919063ffffffff16565b90506129d08782612bc5565b50505050505050565b6000826129e8575060006105d4565b828202828482816129f557fe5b04146105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061374c565b6000808211612a68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061357b565b818381612a7157fe5b049392505050565b600082821115612ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134e7565b50900390565b6000828201838110156105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134b0565b3390565b61138e846323b872dd60e01b858585604051602401612b1f93929190613289565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612db1565b612bc08363a9059cbb60e01b8484604051602401612b1f9291906132ba565b505050565b8015611744576040517f70a08231000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612c3f903090600401613268565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190613130565b1015612c9d57612c9d6112cb565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612d12903090600401613268565b60206040518083038186803b158015612d2a57600080fd5b505afa158015612d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d629190613130565b905081811015612d70578091505b612bc073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168484612ba1565b6060612e13826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e679092919063ffffffff16565b805190915015612bc05780806020019051810190612e3191906130fc565b612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906133f6565b6060612e768484600085612e80565b90505b9392505050565b606082471015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061351e565b612ec585612f82565b612efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139c0565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612f25919061324c565b60006040518083038185875af1925050503d8060008114612f62576040519150601f19603f3d011682016040523d82523d6000602084013e612f67565b606091505b5091509150612f77828286612f88565b979650505050505050565b3b151590565b60608315612f97575081612e79565b825115612fa75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b91906132eb565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60405180606001604052806000815260200160008152602001600081525090565b60006020828403121561303e578081fd5b81356105ce81613c35565b6000806040838503121561305b578081fd5b823561306681613c35565b9150602083013561307681613c5a565b809150509250929050565b60008060408385031215613093578182fd5b823561309e81613c35565b946020939093013593505050565b6000806000606084860312156130c0578081fd5b83356130cb81613c35565b95602085013595506040909401359392505050565b6000602082840312156130f1578081fd5b81356105ce81613c5a565b60006020828403121561310d578081fd5b81516105ce81613c5a565b600060208284031215613129578081fd5b5035919050565b600060208284031215613141578081fd5b5051919050565b6000806040838503121561315a578182fd5b82359150602083013561307681613c35565b60008060008060808587031215613181578081fd5b84359350602085013561319381613c35565b925060408501356131a381613c5a565b915060608501356131b381613c5a565b939692955090935050565b600080604083850312156131d0578182fd5b50508035926020909101359150565b6000806000606084860312156131f3578283fd5b8335925060208401359150604084013561320c81613c5a565b809150509250925092565b6000806000806080858703121561322c578384fd5b84359350602085013592506040850135915060608501356131b381613c5a565b6000825161325e818460208701613c09565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261330a816040850160208701613c09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526023908201527f4d61737465724368656656323a2042616c616e6365206d75737420657863656560408201527f6420300000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060408201527f6d756c7469706c69657200000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4d61737465724368656656323a2054686520757365722061646472657373206d60408201527f7573742062652076616c69640000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206d7573742062652076616c6964000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a2043616b652072617465206d7573742062652060408201527f67726561746572207468616e2030000000000000000000000000000000000000606082015260800190565b60208082526042908201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460408201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f60608201527f6f6c000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f77697468647261773a20496e73756666696369656e7400000000000000000000604082015260600190565b60208082526011908201527f4e6f6e6520424550323020746f6b656e73000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f737460408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f43414b4520746f6b656e2063616e277420626520616464656420746f2066617260408201527f6d20706f6f6c7300000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060408201527f636f756c6420626520626f6f7374656400000000000000000000000000000000606082015260800190565b60208082526032908201527f4d61737465724368656656323a20546865207768697465206c6973742061646460408201527f72657373206d7573742062652076616c69640000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526025908201527f4d61737465724368656656323a20546f74616c2072617465206d75737420626560408201527f2031653132000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526041908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206973207468652073616d6520776974682063757272656e742061646472657360608201527f7300000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f4d61737465724368656656323a204e657720626f6f737420636f6e747261637460408201527f2061646472657373206d7573742062652076616c696400000000000000000000606082015260800190565b600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b83811015613c24578181015183820152602001613c0c565b8381111561138e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114613c5757600080fd5b50565b8015158114613c5757600080fdfea2646970667358221220f3bdc87a312c1f6922cc6efd7e791ccbfcc6b4d3913517316c9bb61280affda264736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/MasterChefV3.json b/projects/vecake-farm-booster/v3/test/artifactsFile/MasterChefV3.json new file mode 100644 index 00000000..8fe222bc --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/MasterChefV3.json @@ -0,0 +1,1584 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MasterChefV3", + "sourceName": "contracts/MasterChefV3.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_CAKE", + "type": "address" + }, + { + "internalType": "contract INonfungiblePositionManager", + "name": "_nonfungiblePositionManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_WETH", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pid", + "type": "uint256" + } + ], + "name": "DuplicatedPool", + "type": "error" + }, + { + "inputs": [], + "name": "InconsistentAmount", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientAmount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidNFT", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidPeriodDuration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidPid", + "type": "error" + }, + { + "inputs": [], + "name": "NoBalance", + "type": "error" + }, + { + "inputs": [], + "name": "NoLMPool", + "type": "error" + }, + { + "inputs": [], + "name": "NoLiquidity", + "type": "error" + }, + { + "inputs": [], + "name": "NotEmpty", + "type": "error" + }, + { + "inputs": [], + "name": "NotOwner", + "type": "error" + }, + { + "inputs": [], + "name": "NotOwnerOrOperator", + "type": "error" + }, + { + "inputs": [], + "name": "NotPancakeNFT", + "type": "error" + }, + { + "inputs": [], + "name": "WrongReceiver", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IPancakeV3Pool", + "name": "v3Pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract ILMPool", + "name": "lmPool", + "type": "address" + } + ], + "name": "AddPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "indexed": false, + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "name": "Harvest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "deployer", + "type": "address" + } + ], + "name": "NewLMPoolDeployerAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "NewOperatorAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "periodDuration", + "type": "uint256" + } + ], + "name": "NewPeriodDuration", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "NewReceiver", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "periodNumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "startTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "cakePerSecond", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "cakeAmount", + "type": "uint256" + } + ], + "name": "NewUpkeepPeriod", + "type": "event" + }, + { + "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": "bool", + "name": "emergency", + "type": "bool" + } + ], + "name": "SetEmergency", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + } + ], + "name": "SetPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "farmBoostContract", + "type": "address" + } + ], + "name": "UpdateFarmBoostContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int128", + "name": "liquidity", + "type": "int128" + }, + { + "indexed": false, + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "indexed": false, + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + } + ], + "name": "UpdateLiquidity", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "periodNumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldEndTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newEndTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "remainingCake", + "type": "uint256" + } + ], + "name": "UpdateUpkeepPeriod", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CAKE", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FARM_BOOSTER", + "outputs": [ + { + "internalType": "contract IFarmBooster", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "LMPoolDeployer", + "outputs": [ + { + "internalType": "contract ILMPoolDeployer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERIOD_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IPancakeV3Pool", + "name": "_v3Pool", + "type": "address" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "add", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cakeAmountBelongToMC", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint128", + "name": "amount0Max", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1Max", + "type": "uint128" + } + ], + "internalType": "struct INonfungiblePositionManagerStruct.CollectParams", + "name": "params", + "type": "tuple" + } + ], + "name": "collect", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint128", + "name": "amount0Max", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1Max", + "type": "uint128" + } + ], + "internalType": "struct INonfungiblePositionManagerStruct.CollectParams", + "name": "params", + "type": "tuple" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "collectTo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "amount0Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "internalType": "struct INonfungiblePositionManagerStruct.DecreaseLiquidityParams", + "name": "params", + "type": "tuple" + } + ], + "name": "decreaseLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergency", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_v3Pool", + "type": "address" + } + ], + "name": "getLatestPeriodInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "cakePerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "getLatestPeriodInfoByPid", + "outputs": [ + { + "internalType": "uint256", + "name": "cakePerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "harvest", + "outputs": [ + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount0Desired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Desired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount0Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "internalType": "struct INonfungiblePositionManagerStruct.IncreaseLiquidityParams", + "name": "params", + "type": "tuple" + } + ], + "name": "increaseLiquidity", + "outputs": [ + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "latestPeriodCakePerSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestPeriodEndTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestPeriodNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestPeriodStartTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "nonfungiblePositionManager", + "outputs": [ + { + "internalType": "contract INonfungiblePositionManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operatorAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "pendingCake", + "outputs": [ + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IPancakeV3Pool", + "name": "v3Pool", + "type": "address" + }, + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "uint256", + "name": "totalLiquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBoostLiquidity", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "receiver", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_emergency", + "type": "bool" + } + ], + "name": "setEmergency", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ILMPoolDeployer", + "name": "_LMPoolDeployer", + "type": "address" + } + ], + "name": "setLMPoolDeployer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operatorAddress", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_periodDuration", + "type": "uint256" + } + ], + "name": "setPeriodDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_receiver", + "type": "address" + } + ], + "name": "setReceiver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMinimum", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "sweepToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountMinimum", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "unwrapWETH9", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newMultiplier", + "type": "uint256" + } + ], + "name": "updateBoostMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newFarmBoostContract", + "type": "address" + } + ], + "name": "updateFarmBoostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "updateLiquidity", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "pids", + "type": "uint256[]" + } + ], + "name": "updatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_duration", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "upkeep", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "userPositionInfos", + "outputs": [ + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "boostLiquidity", + "type": "uint128" + }, + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "internalType": "uint256", + "name": "rewardGrowthInside", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "boostMultiplier", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "v3PoolAddressPid", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x60e0604052620151806013553480156200001857600080fd5b5060405162005b6438038062005b648339810160408190526200003b91620000d1565b620000463362000068565b600180556001600160a01b0392831660805290821660c0521660a05262000125565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620000ce57600080fd5b50565b600080600060608486031215620000e757600080fd5b8351620000f481620000b8565b60208501519093506200010781620000b8565b60408501519092506200011a81620000b8565b809150509250925092565b60805160a05160c05161593d620002276000396000818161037301528181610a6a01528181611010015281816111e8015281816115c401528181611715015281816117d101528181611f90015281816120160152818161205a015281816120e001528181612505015281816128db01528181613a5601528181613ebe01526148a80152600081816103a7015281816109ff015281816124140152818161245501528181612ba401528181612c56015281816145c701528181614615015281816147ce0152614862015260008181610839015281816113000152818161302a0152818161380b0152818161456e01528181614a4e0152614afa015261593d6000f3fe6080604052600436106103635760003560e01c8063715018a6116101c6578063c4f6a8ce116100f7578063cfb8ccfb11610095578063f7260d3e1161006f578063f7260d3e14610be0578063fbc911d014610c00578063fc6f786514610c20578063fcf0b9d814610c4057600080fd5b8063cfb8ccfb14610b80578063df2ab5bb14610ba0578063f2fde38b14610bc057600080fd5b8063cc6db2da116100d1578063cc6db2da146109b4578063ce5f39c614610b20578063ced0911214610b40578063cf24284914610b6057600080fd5b8063c4f6a8ce14610ac3578063c97cef1e14610ad9578063caa6fea414610aef57600080fd5b8063ac9650d811610164578063b3ab15fb1161013e578063b3ab15fb14610a38578063b44a272214610a58578063b4ce128014610a8c578063b6a6d17714610aac57600080fd5b8063ac9650d8146109cd578063ad5c4648146109ed578063b1724b4614610a2157600080fd5b80638da5cb5b116101a05780638da5cb5b14610956578063a15ea89f14610974578063a80a71bd14610994578063aaf5eb68146109b457600080fd5b8063715018a614610901578063718da7ee146109165780637c2d6e011461093657600080fd5b8063219f5d17116102a05780634ca6ef281161023e57806369746a1d1161021857806369746a1d1461089157806369b02128146108b15780636d4cec78146108cb57806370a08231146108e157600080fd5b80634ca6ef281461082757806364482f791461085b5780636558954f1461087b57600080fd5b80633b1acf741161027a5780633b1acf74146106e757806342966c68146107c757806344780994146107e757806349404b7c1461080757600080fd5b8063219f5d17146106795780632f745c59146106b157806330ec24cc146106d157600080fd5b80630d55f9131161030d5780631526fe27116102e75780631526fe271461056f57806317caf6f11461062357806318fccc76146106395780631eaaa0451461065957600080fd5b80630d55f913146104c6578063127effb2146104e6578063150b7a021461051e57600080fd5b8063081e3eda1161033e578063081e3eda1461045b5780630c49ccbe146104715780630ce5d4cc146104a657600080fd5b8062f714ce146103db5780630501d5561461040e5780630743384d1461042e57600080fd5b366103d657336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015906103ca5750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b156103d457600080fd5b005b600080fd5b3480156103e757600080fd5b506103fb6103f6366004614f58565b610c56565b6040519081526020015b60405180910390f35b34801561041a57600080fd5b506103d4610429366004614f96565b6110c1565b34801561043a57600080fd5b506103fb610449366004614fba565b60096020526000908152604090205481565b34801561046757600080fd5b506103fb60055481565b34801561047d57600080fd5b5061049161048c366004615002565b611140565b60408051928352602083019190915201610405565b3480156104b257600080fd5b506103d46104c136600461507b565b611290565b3480156104d257600080fd5b506104916104e1366004615134565b61149c565b3480156104f257600080fd5b50601254610506906001600160a01b031681565b6040516001600160a01b039091168152602001610405565b34801561052a57600080fd5b5061053e610539366004615161565b611700565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610405565b34801561057b57600080fd5b506105da61058a366004615200565b60066020526000908152604090208054600182015460028301546003840154600485015460059095015493946001600160a01b039384169492841693821692600160a01b90920462ffffff169187565b604080519788526001600160a01b0396871660208901529486169487019490945293909116606085015262ffffff16608084015260a083019190915260c082015260e001610405565b34801561062f57600080fd5b506103fb600d5481565b34801561064557600080fd5b506103fb610654366004614f58565b611c4f565b34801561066557600080fd5b506103d4610674366004615219565b611ce3565b61068c610687366004615250565b61233f565b604080516001600160801b039094168452602084019290925290820152606001610405565b3480156106bd57600080fd5b506103fb6106cc3660046152ca565b61260a565b3480156106dd57600080fd5b506103fb600e5481565b3480156106f357600080fd5b50610767610702366004615200565b6007602052600090815260409020805460018201546002808401546003850154600486015460058701546006909701546001600160801b0380881698600160801b909804169686860b966301000000900490950b946001600160a01b03909216919089565b604080516001600160801b039a8b1681529990981660208a0152600296870b978901979097529390940b6060870152608086019190915260a08501526001600160a01b0390911660c084015260e083015261010082015261012001610405565b3480156107d357600080fd5b506103d46107e2366004615200565b6126c0565b3480156107f357600080fd5b506103d461080236600461533b565b612989565b34801561081357600080fd5b506103d4610822366004614f58565b612b84565b34801561083357600080fd5b506105067f000000000000000000000000000000000000000000000000000000000000000081565b34801561086757600080fd5b506103d461087636600461507b565b612cd2565b34801561088757600080fd5b506103fb60135481565b34801561089d57600080fd5b506103d46108ac36600461537d565b612e7d565b3480156108bd57600080fd5b506103fb6501d1a94a200081565b3480156108d757600080fd5b506103fb60105481565b3480156108ed57600080fd5b506103fb6108fc366004614fba565b612f24565b34801561090d57600080fd5b506103d4612fbe565b34801561092257600080fd5b506103d4610931366004614fba565b612fd2565b34801561094257600080fd5b506103d4610951366004615200565b6130ef565b34801561096257600080fd5b506000546001600160a01b0316610506565b34801561098057600080fd5b5061049161098f366004614fba565b613176565b3480156109a057600080fd5b506104916109af366004615200565b6131d1565b3480156109c057600080fd5b506103fb64e8d4a5100081565b6109e06109db36600461533b565b6131fe565b60405161040591906153f7565b3480156109f957600080fd5b506105067f000000000000000000000000000000000000000000000000000000000000000081565b348015610a2d57600080fd5b506103fb62278d0081565b348015610a4457600080fd5b506103d4610a53366004614fba565b613356565b348015610a6457600080fd5b506105067f000000000000000000000000000000000000000000000000000000000000000081565b348015610a9857600080fd5b50600b54610506906001600160a01b031681565b348015610ab857600080fd5b506103fb6201518081565b348015610acf57600080fd5b506103fb60115481565b348015610ae557600080fd5b506103fb60145481565b348015610afb57600080fd5b50600c54610b1090600160a01b900460ff1681565b6040519015158152602001610405565b348015610b2c57600080fd5b506103fb610b3b366004615200565b6133d3565b348015610b4c57600080fd5b506103d4610b5b366004615200565b61366a565b348015610b6c57600080fd5b506103d4610b7b366004614fba565b6136c5565b348015610b8c57600080fd5b506103d4610b9b366004614fba565b613742565b348015610bac57600080fd5b506103d4610bbb366004615459565b613794565b348015610bcc57600080fd5b506103d4610bdb366004614fba565b6138a1565b348015610bec57600080fd5b50600a54610506906001600160a01b031681565b348015610c0c57600080fd5b50600c54610506906001600160a01b031681565b348015610c2c57600080fd5b50610491610c3b366004615490565b61392e565b348015610c4c57600080fd5b506103fb600f5481565b6000610c60613ad4565b6001600160a01b038216301480610c7e57506001600160a01b038216155b15610cb5576040517f32c98ae600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260076020526040902060048101546001600160a01b03163314610cf0576040516330cd747160e01b815260040160405180910390fd5b610cfb818585613b2e565b6005820154600081815260066020908152604080832060018101548251630a81a92360e31b81529251969850949590946001600160a01b03169263540d491892600480820193918290030181865afa158015610d5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7f91906154bc565b90506001600160a01b03811615801590610da35750600c54600160a01b900460ff16155b15610ea3578354600090610dc690600160801b90046001600160801b03166154ef565b6001860154604051638910faf160e01b8152600282810b6004830152630100000090920490910b6024820152600f82900b60448201529091506001600160a01b03831690638910faf190606401600060405180830381600087803b158015610e2d57600080fd5b505af1158015610e41573d6000803e3d6000fd5b50505050600185015460408051600f84900b8152600283810b6020830152630100000090930490920b908201528890859033907fee8f6362d59839b4b3c990d7e085a63a0fe2c58f4eff4a9a2b6de93a4c645ae39060600160405180910390a4505b83546004830180546001600160801b0390921691600090610ec590849061551f565b90915550508354600583018054600160801b9092046001600160801b031691600090610ef290849061551f565b9091555050600087815260076020526040812081815560018101805465ffffffffffff1916905560028101829055600381018290556004810180546001600160a01b03191690556005810182905560060155610f4e3388613e31565b600c546001600160a01b031615610fcb57600c5460405163622cd4e160e11b815233600482015260248101899052604481018590526001600160a01b039091169063c459a9c290606401600060405180830381600087803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b505050505b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038781166024830152604482018990527f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b15801561105457600080fd5b505af1158015611068573d6000803e3d6000fd5b50506040516001600160a01b038916815289925085915033907ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679060200160405180910390a4505050506110bb60018055565b92915050565b6110c9613e5d565b600c80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b8315158102919091179182905560405160ff9190920416151581527fc749456be5379ac4cfc1f856208b32ddcf01b9db3ce6c37784ad91a8390ae9a8906020015b60405180910390a150565b60008061114b613ad4565b8251600090815260076020526040902060048101546001600160a01b03163314611188576040516330cd747160e01b815260040160405180910390fd5b604080517f0c49ccbe0000000000000000000000000000000000000000000000000000000081528551600482015260208601516001600160801b0316602482015290850151604482015260608501516064820152608085015160848201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630c49ccbe9060a40160408051808303816000875af1158015611238573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125c9190615536565b855191945092506112709082906000613b2e565b506112818185600001516000613eb7565b5061128b60018055565b915091565b600a546001600160a01b031633146112ef5760405162461bcd60e51b815260206004820152600c60248201527f4e6f74207265636569766572000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600a5461132a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911630866142de565b601480548401905580156113405761134061438f565b601354620151808310801590611359575062278d008311155b156113615750815b42600061136e838361555a565b905060008087905083601054111561140557600064e8d4a5100060115486601054611399919061551f565b6113a39190615572565b6113ad9190615591565b600e5460105460408051918252602082018990528101839052919250907f317bea91082b2a8d33761ba0bdd38a785d60acc1b964e3ead01706baaebf548b9060600160405180910390a2611401818361555a565b9150505b8461141564e8d4a5100083615572565b61141f9190615591565b600e8054600190810191829055868101600f5560108690556011839055919350907f44521c2bbb0ee364592908d6177ce446d5554c5a6c4ebd12adf86912c617a78b9061146d90879061555a565b604080519182526020820187905281018590526060810184905260800160405180910390a25050505050505050565b6000806114a7613ad4565b835160009081526007602090815260409182902082516101208101845281546001600160801b038082168352600160801b90910416928101929092526001810154600281810b9484019490945263010000009004830b6060830152918201546080820152600382015460a082015260048201546001600160a01b031660c08201819052600583015460e0830152600690920154610100820152903314611560576040516330cd747160e01b815260040160405180910390fd5b60208501516001600160a01b0316611579573060208601525b6040805163fc6f786560e01b81528651600482015260208701516001600160a01b039081166024830152918701516001600160801b03908116604483015260608801511660648201527f00000000000000000000000000000000000000000000000000000000000000009091169063fc6f78659060840160408051808303816000875af115801561160e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116329190615536565b602087015191945092506001600160a01b03163014156116ef5760e081810151600090815260066020908152604091829020825193840183528054845260018101546001600160a01b0390811692850192909252600281015482169284019290925260038201548082166060850152600160a01b900462ffffff166080840152600482015460a084015260059091015460c083015285166116d1573394505b6116df8160400151866144ff565b6116ed8160600151866144ff565b505b506116f960018055565b9250929050565b600061170a613ad4565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461176c576040517f0bf3405700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160c081018252600080825260208201819052818301819052606082018190526080820181905260a082015290517f99fbab88000000000000000000000000000000000000000000000000000000008152600481018690526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906399fbab889060240161018060405180830381865afa158015611819573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183d91906155e3565b505050506001600160801b031660a08901819052600291820b60808a015291900b606088015262ffffff9190911660408701526001600160a01b03918216602087015291168452151591506118a7905057604051636180f03f60e11b815260040160405180910390fd5b80516001600160a01b0390811660009081526008602090815260408083208286015190941683529281528282208385015162ffffff16835290522054806119015760405163079f151f60e11b815260040160405180910390fd5b6000818152600660209081526040808320815160e0810183528154815260018201546001600160a01b03908116828601819052600284015482168386015260038401549182166060840152600160a01b90910462ffffff16608083015260048084015460a084015260059093015460c08301528351630a81a92360e31b81529351919594909363540d49189381810193918290030181865afa1580156119ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cf91906154bc565b90506001600160a01b0381166119f85760405163ef3d9b2160e01b815260040160405180910390fd5b600088815260076020526040908190206060860151600182018054608089015162ffffff90811663010000000265ffffffffffff19909216931692909217919091179055600480820180546001600160a01b03808f166001600160a01b0319909216919091179091556005830187905592516310a537f160e11b8152919284169163214a6fe291611a979142910163ffffffff91909116815260200190565b600060405180830381600087803b158015611ab157600080fd5b505af1158015611ac5573d6000803e3d6000fd5b50505050611ad5818a6000613eb7565b60608501516080860151604051633816bae960e11b8152600292830b6004820152910b60248201526001600160a01b0383169063702d75d290604401602060405180830381865afa158015611b2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5291906156c4565b6002820155611baa8a8a6001600160a01b039190911660008181526002602081815260408084208054600384528286208187528452828620889055968552600483529084209590955592909152905280546001019055565b60a08501516060808701516080880151604080516001600160801b039095168552600292830b6020860152910b908301528a9186916001600160a01b038e16917fb19157bff94fdd40c58c7d4a5d52e8eb8c2d570ca17b322b49a2bbbeedc82fbf910160405180910390a4507f150b7a0200000000000000000000000000000000000000000000000000000000945050505050611c4660018055565b95945050505050565b6000611c59613ad4565b600083815260076020526040902060048101546001600160a01b03163314611c94576040516330cd747160e01b815260040160405180910390fd5b80546001600160801b0316158015611cae57506003810154155b15611ccc57604051636180f03f60e11b815260040160405180910390fd5b611cd7818585613b2e565b9150506110bb60018055565b611ceb613e5d565b8015611cf957611cf961438f565b600b546040517f4c96a3890000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526000921690634c96a389906024016020604051808303816000875af1158015611d5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8391906154bc565b905083600d6000828254611d97919061555a565b925050819055506000836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0291906154bc565b90506000846001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6891906154bc565b90506000856001600160a01b031663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa158015611eaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ece91906156dd565b6001600160a01b038085166000908152600860209081526040808320938716835292815282822062ffffff851683529052205490915015611f73576001600160a01b038381166000908152600860209081526040808320938616835292815282822062ffffff8516835290528190205490517f7d38f65f00000000000000000000000000000000000000000000000000000000815260048101919091526024016112e6565b604051636eb1769f60e11b81523060048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116602483015284169063dd62ed3e90604401602060405180830381865afa158015611fdf573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200391906156c4565b61203d5761203d6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000600019614697565b604051636eb1769f60e11b81523060048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116602483015283169063dd62ed3e90604401602060405180830381865afa1580156120a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120cd91906156c4565b612107576121076001600160a01b0383167f0000000000000000000000000000000000000000000000000000000000000000600019614697565b6005600081548092919060010191905055506040518060e00160405280888152602001876001600160a01b03168152602001846001600160a01b03168152602001836001600160a01b031681526020018262ffffff1681526020016000815260200160008152506006600060055481526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060808201518160030160146101000a81548162ffffff021916908362ffffff16021790555060a0820151816004015560c0820151816005015590505060055460086000856001600160a01b03166001600160a01b031681526020019081526020016000206000846001600160a01b03166001600160a01b0316815260200190815260200160002060008362ffffff1662ffffff1681526020019081526020016000208190555060055460096000886001600160a01b03166001600160a01b0316815260200190815260200160002081905550836001600160a01b0316866001600160a01b03166005547f0621c8de33a230aec1aee0d4f7b6c81d97bd3ce0a2040ca33fbd668e521ecafe8a60405161232e91815260200190565b60405180910390a450505050505050565b600080600061234c613ad4565b83516000908152600760205260409020600581015461237e5760405163079f151f60e11b815260040160405180910390fd5b600581810154600090815260066020908152604091829020825160e0810184528154815260018201546001600160a01b03908116828501526002830154811694820185905260038301549081166060830152600160a01b900462ffffff166080820152600482015460a082015293015460c084015287015161240091906147cc565b612412816060015187604001516147cc565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681604001516001600160a01b03161415801561248e57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681606001516001600160a01b031614155b801561249a5750600034115b156124a457600080fd5b604080517f219f5d170000000000000000000000000000000000000000000000000000000081528751600482015260208801516024820152908701516044820152606087015160648201526080870151608482015260a087015160a48201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063219f5d1790349060c40160606040518083038185885af1158015612557573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061257c91906156f8565b6020890151929750909550935060009061259790869061551f565b905060008488604001516125ab919061551f565b905081156125c1576125c1836040015183614860565b80156125d5576125d5836060015182614860565b6125e58489600001516000613b2e565b506125f68489600001516000613eb7565b5050505061260360018055565b9193909250565b6001600160a01b03821660009081526002602052604081205482106126975760405162461bcd60e51b815260206004820152602560248201527f456e756d657261626c653a206f776e657220696e646578206f7574206f66206260448201527f6f756e647300000000000000000000000000000000000000000000000000000060648201526084016112e6565b506001600160a01b03919091166000908152600360209081526040808320938352929052205490565b6126c8613ad4565b60008181526007602090815260409182902082516101208101845281546001600160801b038082168352600160801b90910416928101929092526001810154600281810b9484019490945263010000009004830b6060830152918201546080820152600382015460a082015260048201546001600160a01b031660c08201819052600583015460e083015260069092015461010082015290331461277f576040516330cd747160e01b815260040160405180910390fd5b60008160a00151118061279b575080516001600160801b031615155b156127d2576040517f32e7879300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260076020526040812081815560018101805465ffffffffffff1916905560028101829055600381018290556004810180546001600160a01b031916905560058101829055600601556128293383613e31565b600c546001600160a01b0316156128ac57600c5460e082015160405163622cd4e160e11b81523360048201526024810185905260448101919091526001600160a01b039091169063c459a9c290606401600060405180830381600087803b15801561289357600080fd5b505af11580156128a7573d6000803e3d6000fd5b505050505b6040517f42966c68000000000000000000000000000000000000000000000000000000008152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561292757600080fd5b505af115801561293b573d6000803e3d6000fd5b50505060e08201516040516000815284925033907ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679060200160405180910390a45061298660018055565b50565b6012546001600160a01b031633148015906129af57506000546001600160a01b03163314155b156129e6576040517f98f76d0e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4260005b82811015612b7e57600060066000868685818110612a0a57612a0a61572f565b602090810292909201358352508181019290925260409081016000908120825160e0810184528154815260018201546001600160a01b03908116828701819052600284015482168387015260038401549182166060840152600160a01b90910462ffffff16608083015260048084015460a084015260059093015460c08301528451630a81a92360e31b815294519196509294929363540d491893818401939092918290030181865afa158015612ac5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ae991906154bc565b825190915015801590612b0457506001600160a01b03811615155b15612b69576040516310a537f160e11b815263ffffffff851660048201526001600160a01b0382169063214a6fe290602401600060405180830381600087803b158015612b5057600080fd5b505af1158015612b64573d6000803e3d6000fd5b505050505b50508080612b7690615745565b9150506129ea565b50505050565b612b8c613ad4565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015612bf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1791906156c4565b905082811015612c3a57604051632ca2f52b60e11b815260040160405180910390fd5b8015612cc457604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015612ca257600080fd5b505af1158015612cb6573d6000803e3d6000fd5b50505050612cc48282614937565b50612cce60018055565b5050565b612cda613e5d565b82801580612ce9575060055481115b15612d20576040517f87e8068300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084815260066020908152604080832060018101548251630a81a92360e31b815292514295929492936001600160a01b039092169263540d491892600480820193918290030181865afa158015612d7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612da091906154bc565b90506001600160a01b03811615612e11576040516310a537f160e11b815263ffffffff841660048201526001600160a01b0382169063214a6fe290602401600060405180830381600087803b158015612df857600080fd5b505af1158015612e0c573d6000803e3d6000fd5b505050505b8415612e1f57612e1f61438f565b8154600d548791612e2f9161551f565b612e39919061555a565b600d5585825560405186815287907fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f89060200160405180910390a250505050505050565b600c546001600160a01b03163314612ed75760405162461bcd60e51b815260206004820152601760248201527f4e6f74206661726d20626f6f737420636f6e747261637400000000000000000060448201526064016112e6565b60008281526007602052604090206005810154612f075760405163079f151f60e11b815260040160405180910390fd5b612f1381846000613b2e565b50612f1f818484613eb7565b505050565b60006001600160a01b038216612fa25760405162461bcd60e51b815260206004820152602d60248201527f456e756d657261626c653a2061646472657373207a65726f206973206e6f742060448201527f612076616c6964206f776e65720000000000000000000000000000000000000060648201526084016112e6565b506001600160a01b031660009081526002602052604090205490565b612fc6613e5d565b612fd06000614997565b565b612fda613e5d565b6001600160a01b0381166130015760405163d92e233d60e01b815260040160405180910390fd5b604051636eb1769f60e11b81526001600160a01b038281166004830152306024830152600019917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e90604401602060405180830381865afa158015613073573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061309791906156c4565b146130a157600080fd5b600a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f4a2963bfc20b87a0c055468a66e6638d57725e93fb4d65733fb2f25587ae8c4f90602001611135565b6130f7613e5d565b6201518081108061310a575062278d0081115b15613141576040517f9e11b5e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60138190556040518181527fb5521c8a03b484502769158d9dd83186bd0748f3ece2fbf358233994c2a2097690602001611135565b6000806000600d5411156131c757600d546001600160a01b038416600090815260096020908152604080832054835260069091529020546011546131ba9190615572565b6131c49190615591565b91505b6010549050915091565b6000806000600d5411156131c757600d546000848152600660205260409020546011546131ba9190615572565b60608167ffffffffffffffff81111561321957613219614fd7565b60405190808252806020026020018201604052801561324c57816020015b60608152602001906001900390816132375790505b50905060005b8281101561334f57600080308686858181106132705761327061572f565b90506020028101906132829190615760565b6040516132909291906157a7565b600060405180830381855af49150503d80600081146132cb576040519150601f19603f3d011682016040523d82523d6000602084013e6132d0565b606091505b50915091508161331c576044815110156132e957600080fd5b6004810190508080602001905181019061330391906157b7565b60405162461bcd60e51b81526004016112e69190615859565b8084848151811061332f5761332f61572f565b60200260200101819052505050808061334790615745565b915050613252565b5092915050565b61335e613e5d565b6001600160a01b0381166133855760405163d92e233d60e01b815260040160405180910390fd5b601280546001600160a01b0319166001600160a01b0383169081179091556040519081527fc47d127c07bdd56c5ccba00463ce3bd3c1bca71b4670eea6e5d0c02e4aa156e290602001611135565b600081815260076020908152604080832081516101208101835281546001600160801b038082168352600160801b90910416938101939093526001810154600281810b9385019390935263010000009004820b6060840152908101546080830152600381015460a083015260048101546001600160a01b031660c0830152600581015460e08301819052600690910154610100830152156136645760e0818101516000908152600660209081526040808320815194850182528054855260018101546001600160a01b03908116868501819052600283015482168785015260038301549182166060880152600160a01b90910462ffffff16608087015260048083015460a088015260059092015460c08701528251630a81a92360e31b81529251909363540d49189380840193919291908290030181865afa15801561351d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061354191906154bc565b90506001600160a01b038116156136505760408381015160608501519151633816bae960e11b8152600291820b600482015291900b60248201526000906001600160a01b0383169063702d75d290604401602060405180830381865afa1580156135af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135d391906156c4565b905083608001518111801561360f575083602001516001600160801b0316846080015182613601919061551f565b61360d90600019615591565b115b1561364e57600160801b84602001516001600160801b0316856080015183613637919061551f565b6136419190615572565b61364b9190615591565b94505b505b60a083015161365f908561555a565b935050505b50919050565b613672613ad4565b600081815260076020526040902060058101546136a25760405163079f151f60e11b815260040160405180910390fd5b6136ae81836000613b2e565b506136bb81836000613eb7565b5061298660018055565b6136cd613e5d565b6001600160a01b0381166136f45760405163d92e233d60e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f29e3e57b4a1e4513d009781598c7e4b8b2a68e4b71fe977e362d1b591016fade90602001611135565b61374a613e5d565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517ff32244aa081c72b930bb47bb702115e112d779ed353d6b1a70b28babc9822b7a90600090a250565b61379c613ad4565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa1580156137e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061380791906156c4565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316141561385c57601454811061385657601454900361385c565b60145560005b8281101561387d57604051632ca2f52b60e11b815260040160405180910390fd5b8015613897576138976001600160a01b03851683836149e7565b50612f1f60018055565b6138a9613e5d565b6001600160a01b0381166139255760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016112e6565b61298681614997565b600080613939613ad4565b825160009081526007602090815260409182902082516101208101845281546001600160801b038082168352600160801b90910416928101929092526001810154600281810b9484019490945263010000009004830b6060830152918201546080820152600382015460a082015260048201546001600160a01b031660c08201819052600583015460e08301526006909201546101008201529033146139f2576040516330cd747160e01b815260040160405180910390fd5b60208401516001600160a01b0316613a0b573060208501525b6040805163fc6f786560e01b81528551600482015260208601516001600160a01b039081166024830152918601516001600160801b03908116604483015260608701511660648201527f00000000000000000000000000000000000000000000000000000000000000009091169063fc6f78659060840160408051808303816000875af1158015613aa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ac49190615536565b909350915061128b905060018055565b60026001541415613b275760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016112e6565b6002600155565b6005838101546000908152600660209081526040808320815160e0810183528154815260018201546001600160a01b03908116828601819052600284015482168386015260038401549182166060840152600160a01b90910462ffffff16608083015260048084015460a0840152929096015460c08201528251630a81a92360e31b81529251949590948694919363540d4918938181019392918290030181865afa158015613be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c0591906154bc565b90506001600160a01b03811615801590613c295750600c54600160a01b900460ff16155b15613d98576040516310a537f160e11b815263ffffffff421660048201526001600160a01b0382169063214a6fe290602401600060405180830381600087803b158015613c7557600080fd5b505af1158015613c89573d6000803e3d6000fd5b505050506001860154604051633816bae960e11b8152600282810b6004830152630100000090920490910b60248201526000906001600160a01b0383169063702d75d290604401602060405180830381865afa158015613ced573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d1191906156c4565b9050866002015481118015613d52575086546002880154600160801b9091046001600160801b031690613d44908361551f565b613d5090600019615591565b115b15613d925786546002880154600160801b918290046001600160801b031690613d7b908461551f565b613d859190615572565b613d8f9190615591565b93505b60028701555b6003860154613da7908461555a565b92508215613e28576001600160a01b03841615613e205760006003870155613dcf8484614a30565b6005860154604080516001600160a01b03871681526020810186905287929133917fd25759d838eb0a46600f8f327cce144e61d7caefbef27010fe31e2aab091704f910160405180910390a4613e28565b600386018390555b50509392505050565b613e3b8282614b21565b506001600160a01b031660009081526002602052604090208054600019019055565b6000546001600160a01b03163314612fd05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016112e6565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399fbab88866040518263ffffffff1660e01b8152600401613f0a91815260200190565b61018060405180830381865afa158015613f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f4c91906155e3565b5050505060058e015460009081526006602052604090208e54939b50919950975095506001600160801b038088169116149350613fd89250505057865460048201546001600160801b0380851692613fa69291169061551f565b613fb0919061555a565b600482015586546fffffffffffffffffffffffffffffffff19166001600160801b0383161787555b600c5464e8d4a51000906001600160a01b031615801590613ff7575085155b1561408b57600c546040517f44e7bf06000000000000000000000000000000000000000000000000000000008152600481018990526001600160a01b03909116906344e7bf06906024016020604051808303816000875af1158015614060573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061408491906156c4565b9050614094565b85156140945750845b64e8d4a510008110156140ad575064e8d4a510006140c4565b6501d1a94a20008111156140c457506501d1a94a20005b6006880181905560006140f864e8d4a510006140e9846001600160801b038816615572565b6140f39190615591565b614c3b565b895490915060009061411a90600160801b90046001600160801b03168361586c565b905080600f0b6000146142d257895460058501546001600160801b038085169261414f92600160801b9091049091169061551f565b614159919061555a565b600585015589546001600160801b03808416600160801b029116178a55600184015460408051630a81a92360e31b815290516000926001600160a01b03169163540d49189160048083019260209291908290030181865afa1580156141c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141e691906154bc565b90506001600160a01b03811661420f5760405163ef3d9b2160e01b815260040160405180910390fd5b604051638910faf160e01b8152600289810b600483015288900b6024820152600f83900b60448201526001600160a01b03821690638910faf190606401600060405180830381600087803b15801561426657600080fd5b505af115801561427a573d6000803e3d6000fd5b5050505060058b015460408051600f85900b815260028b810b60208301528a900b8183015290518c929133917fee8f6362d59839b4b3c990d7e085a63a0fe2c58f4eff4a9a2b6de93a4c645ae39181900360600190a4505b50505050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612b7e9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614cba565b4260015b6005548111612cce576000818152600660209081526040808320815160e0810183528154815260018201546001600160a01b03908116828601819052600284015482168386015260038401549182166060840152600160a01b90910462ffffff16608083015260048084015460a084015260059093015460c08301528351630a81a92360e31b81529351919594909363540d49189381810193918290030181865afa158015614446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061446a91906154bc565b82519091501580159061448557506001600160a01b03811615155b156144ea576040516310a537f160e11b815263ffffffff851660048201526001600160a01b0382169063214a6fe290602401600060405180830381600087803b1580156144d157600080fd5b505af11580156144e5573d6000803e3d6000fd5b505050505b505080806144f790615745565b915050614393565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015614546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061456a91906156c4565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031614156145bf5760145481106145b95760145490036145bf565b60145560005b8015612f1f577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316141561468357604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561466157600080fd5b505af1158015614675573d6000803e3d6000fd5b50505050612f1f8282614937565b612f1f6001600160a01b03841683836149e7565b8015806147115750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156146eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061470f91906156c4565b155b6147835760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016112e6565b6040516001600160a01b038316602482015260448101829052612f1f9084907f095ea7b3000000000000000000000000000000000000000000000000000000009060640161432b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614801561480d5750600034115b1561484b57803414612cce576040517f4b508fef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612cce6001600160a01b0383163330846142de565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161480156148a15750600034115b15614923577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166312210e8a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561490157600080fd5b505af1158015614915573d6000803e3d6000fd5b50505050612cce3347614937565b612cce6001600160a01b03831633836149e7565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614984576040519150601f19603f3d011682016040523d82523d6000602084013e614989565b606091505b5050905080612f1f57600080fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038316602482015260448101829052612f1f9084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640161432b565b8015612cce576040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015614a9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ac191906156c4565b905081811015614acf578091505b8160145410614ae657601480548390039055614aed565b8181036014555b612f1f6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684846149e7565b6001600160a01b038216600090815260026020526040812054614b469060019061551f565b6000838152600460209081526040808320546001600160a01b03881684526003835281842081855290925290912054919250908314614bc75760405162461bcd60e51b815260206004820152600f60248201527f496e76616c696420746f6b656e4964000000000000000000000000000000000060448201526064016112e6565b818114614c08576001600160a01b03841660009081526003602090815260408083208584528252808320548484528184208190558352600490915290208190555b5060009182526004602090815260408084208490556001600160a01b039094168352600381528383209183525290812055565b6000600160801b8210614cb65760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f323820626974730000000000000000000000000000000000000000000000000060648201526084016112e6565b5090565b6000614d0f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614d9f9092919063ffffffff16565b805190915015612f1f5780806020019051810190614d2d91906158ce565b612f1f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016112e6565b6060614dae8484600085614db6565b949350505050565b606082471015614e2e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016112e6565b600080866001600160a01b03168587604051614e4a91906158eb565b60006040518083038185875af1925050503d8060008114614e87576040519150601f19603f3d011682016040523d82523d6000602084013e614e8c565b606091505b5091509150614e9d87838387614ea8565b979650505050505050565b60608315614f14578251614f0d576001600160a01b0385163b614f0d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016112e6565b5081614dae565b614dae8383815115614f295781518083602001fd5b8060405162461bcd60e51b81526004016112e69190615859565b6001600160a01b038116811461298657600080fd5b60008060408385031215614f6b57600080fd5b823591506020830135614f7d81614f43565b809150509250929050565b801515811461298657600080fd5b600060208284031215614fa857600080fd5b8135614fb381614f88565b9392505050565b600060208284031215614fcc57600080fd5b8135614fb381614f43565b634e487b7160e01b600052604160045260246000fd5b6001600160801b038116811461298657600080fd5b600060a0828403121561501457600080fd5b60405160a0810181811067ffffffffffffffff8211171561503757615037614fd7565b60405282358152602083013561504c81614fed565b806020830152506040830135604082015260608301356060820152608083013560808201528091505092915050565b60008060006060848603121561509057600080fd5b833592506020840135915060408401356150a981614f88565b809150509250925092565b6000608082840312156150c657600080fd5b6040516080810181811067ffffffffffffffff821117156150e9576150e9614fd7565b60405282358152905080602083013561510181614f43565b6020820152604083013561511481614fed565b6040820152606083013561512781614fed565b6060919091015292915050565b60008060a0838503121561514757600080fd5b61515184846150b4565b91506080830135614f7d81614f43565b60008060008060006080868803121561517957600080fd5b853561518481614f43565b9450602086013561519481614f43565b935060408601359250606086013567ffffffffffffffff808211156151b857600080fd5b818801915088601f8301126151cc57600080fd5b8135818111156151db57600080fd5b8960208285010111156151ed57600080fd5b9699959850939650602001949392505050565b60006020828403121561521257600080fd5b5035919050565b60008060006060848603121561522e57600080fd5b83359250602084013561524081614f43565b915060408401356150a981614f88565b600060c0828403121561526257600080fd5b60405160c0810181811067ffffffffffffffff8211171561528557615285614fd7565b8060405250823581526020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a08201528091505092915050565b600080604083850312156152dd57600080fd5b82356152e881614f43565b946020939093013593505050565b60008083601f84011261530857600080fd5b50813567ffffffffffffffff81111561532057600080fd5b6020830191508360208260051b85010111156116f957600080fd5b6000806020838503121561534e57600080fd5b823567ffffffffffffffff81111561536557600080fd5b615371858286016152f6565b90969095509350505050565b6000806040838503121561539057600080fd5b50508035926020909101359150565b60005b838110156153ba5781810151838201526020016153a2565b83811115612b7e5750506000910152565b600081518084526153e381602086016020860161539f565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561544c57603f1988860301845261543a8583516153cb565b9450928501929085019060010161541e565b5092979650505050505050565b60008060006060848603121561546e57600080fd5b833561547981614f43565b92506020840135915060408401356150a981614f43565b6000608082840312156154a257600080fd5b614fb383836150b4565b80516154b781614f43565b919050565b6000602082840312156154ce57600080fd5b8151614fb381614f43565b634e487b7160e01b600052601160045260246000fd5b600081600f0b6f7fffffffffffffffffffffffffffffff19811415615516576155166154d9565b60000392915050565b600082821015615531576155316154d9565b500390565b6000806040838503121561554957600080fd5b505080516020909101519092909150565b6000821982111561556d5761556d6154d9565b500190565b600081600019048311821515161561558c5761558c6154d9565b500290565b6000826155ae57634e487b7160e01b600052601260045260246000fd5b500490565b805162ffffff811681146154b757600080fd5b8051600281900b81146154b757600080fd5b80516154b781614fed565b6000806000806000806000806000806000806101808d8f03121561560657600080fd5b8c516bffffffffffffffffffffffff8116811461562257600080fd5b9b5061563060208e016154ac565b9a5061563e60408e016154ac565b995061564c60608e016154ac565b985061565a60808e016155b3565b975061566860a08e016155c6565b965061567660c08e016155c6565b955061568460e08e016155d8565b94506101008d015193506101208d015192506156a36101408e016155d8565b91506156b26101608e016155d8565b90509295989b509295989b509295989b565b6000602082840312156156d657600080fd5b5051919050565b6000602082840312156156ef57600080fd5b614fb3826155b3565b60008060006060848603121561570d57600080fd5b835161571881614fed565b602085015160409095015190969495509392505050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615759576157596154d9565b5060010190565b6000808335601e1984360301811261577757600080fd5b83018035915067ffffffffffffffff82111561579257600080fd5b6020019150368190038213156116f957600080fd5b8183823760009101908152919050565b6000602082840312156157c957600080fd5b815167ffffffffffffffff808211156157e157600080fd5b818401915084601f8301126157f557600080fd5b81518181111561580757615807614fd7565b604051601f8201601f19908116603f0116810190838211818310171561582f5761582f614fd7565b8160405282815287602084870101111561584857600080fd5b614e9d83602083016020880161539f565b602081526000614fb360208301846153cb565b600081600f0b83600f0b60008112816f7fffffffffffffffffffffffffffffff19018312811516156158a0576158a06154d9565b816f7fffffffffffffffffffffffffffffff0183138116156158c4576158c46154d9565b5090039392505050565b6000602082840312156158e057600080fd5b8151614fb381614f88565b600082516158fd81846020870161539f565b919091019291505056fea2646970667358221220109eb4b53cd461f51ba54c31cc02e2a5f039fad52bcf51fd5c82ea3c35c6bea764736f6c634300080a0033", + "deployedBytecode": "0x6080604052600436106103635760003560e01c8063715018a6116101c6578063c4f6a8ce116100f7578063cfb8ccfb11610095578063f7260d3e1161006f578063f7260d3e14610be0578063fbc911d014610c00578063fc6f786514610c20578063fcf0b9d814610c4057600080fd5b8063cfb8ccfb14610b80578063df2ab5bb14610ba0578063f2fde38b14610bc057600080fd5b8063cc6db2da116100d1578063cc6db2da146109b4578063ce5f39c614610b20578063ced0911214610b40578063cf24284914610b6057600080fd5b8063c4f6a8ce14610ac3578063c97cef1e14610ad9578063caa6fea414610aef57600080fd5b8063ac9650d811610164578063b3ab15fb1161013e578063b3ab15fb14610a38578063b44a272214610a58578063b4ce128014610a8c578063b6a6d17714610aac57600080fd5b8063ac9650d8146109cd578063ad5c4648146109ed578063b1724b4614610a2157600080fd5b80638da5cb5b116101a05780638da5cb5b14610956578063a15ea89f14610974578063a80a71bd14610994578063aaf5eb68146109b457600080fd5b8063715018a614610901578063718da7ee146109165780637c2d6e011461093657600080fd5b8063219f5d17116102a05780634ca6ef281161023e57806369746a1d1161021857806369746a1d1461089157806369b02128146108b15780636d4cec78146108cb57806370a08231146108e157600080fd5b80634ca6ef281461082757806364482f791461085b5780636558954f1461087b57600080fd5b80633b1acf741161027a5780633b1acf74146106e757806342966c68146107c757806344780994146107e757806349404b7c1461080757600080fd5b8063219f5d17146106795780632f745c59146106b157806330ec24cc146106d157600080fd5b80630d55f9131161030d5780631526fe27116102e75780631526fe271461056f57806317caf6f11461062357806318fccc76146106395780631eaaa0451461065957600080fd5b80630d55f913146104c6578063127effb2146104e6578063150b7a021461051e57600080fd5b8063081e3eda1161033e578063081e3eda1461045b5780630c49ccbe146104715780630ce5d4cc146104a657600080fd5b8062f714ce146103db5780630501d5561461040e5780630743384d1461042e57600080fd5b366103d657336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015906103ca5750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b156103d457600080fd5b005b600080fd5b3480156103e757600080fd5b506103fb6103f6366004614f58565b610c56565b6040519081526020015b60405180910390f35b34801561041a57600080fd5b506103d4610429366004614f96565b6110c1565b34801561043a57600080fd5b506103fb610449366004614fba565b60096020526000908152604090205481565b34801561046757600080fd5b506103fb60055481565b34801561047d57600080fd5b5061049161048c366004615002565b611140565b60408051928352602083019190915201610405565b3480156104b257600080fd5b506103d46104c136600461507b565b611290565b3480156104d257600080fd5b506104916104e1366004615134565b61149c565b3480156104f257600080fd5b50601254610506906001600160a01b031681565b6040516001600160a01b039091168152602001610405565b34801561052a57600080fd5b5061053e610539366004615161565b611700565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610405565b34801561057b57600080fd5b506105da61058a366004615200565b60066020526000908152604090208054600182015460028301546003840154600485015460059095015493946001600160a01b039384169492841693821692600160a01b90920462ffffff169187565b604080519788526001600160a01b0396871660208901529486169487019490945293909116606085015262ffffff16608084015260a083019190915260c082015260e001610405565b34801561062f57600080fd5b506103fb600d5481565b34801561064557600080fd5b506103fb610654366004614f58565b611c4f565b34801561066557600080fd5b506103d4610674366004615219565b611ce3565b61068c610687366004615250565b61233f565b604080516001600160801b039094168452602084019290925290820152606001610405565b3480156106bd57600080fd5b506103fb6106cc3660046152ca565b61260a565b3480156106dd57600080fd5b506103fb600e5481565b3480156106f357600080fd5b50610767610702366004615200565b6007602052600090815260409020805460018201546002808401546003850154600486015460058701546006909701546001600160801b0380881698600160801b909804169686860b966301000000900490950b946001600160a01b03909216919089565b604080516001600160801b039a8b1681529990981660208a0152600296870b978901979097529390940b6060870152608086019190915260a08501526001600160a01b0390911660c084015260e083015261010082015261012001610405565b3480156107d357600080fd5b506103d46107e2366004615200565b6126c0565b3480156107f357600080fd5b506103d461080236600461533b565b612989565b34801561081357600080fd5b506103d4610822366004614f58565b612b84565b34801561083357600080fd5b506105067f000000000000000000000000000000000000000000000000000000000000000081565b34801561086757600080fd5b506103d461087636600461507b565b612cd2565b34801561088757600080fd5b506103fb60135481565b34801561089d57600080fd5b506103d46108ac36600461537d565b612e7d565b3480156108bd57600080fd5b506103fb6501d1a94a200081565b3480156108d757600080fd5b506103fb60105481565b3480156108ed57600080fd5b506103fb6108fc366004614fba565b612f24565b34801561090d57600080fd5b506103d4612fbe565b34801561092257600080fd5b506103d4610931366004614fba565b612fd2565b34801561094257600080fd5b506103d4610951366004615200565b6130ef565b34801561096257600080fd5b506000546001600160a01b0316610506565b34801561098057600080fd5b5061049161098f366004614fba565b613176565b3480156109a057600080fd5b506104916109af366004615200565b6131d1565b3480156109c057600080fd5b506103fb64e8d4a5100081565b6109e06109db36600461533b565b6131fe565b60405161040591906153f7565b3480156109f957600080fd5b506105067f000000000000000000000000000000000000000000000000000000000000000081565b348015610a2d57600080fd5b506103fb62278d0081565b348015610a4457600080fd5b506103d4610a53366004614fba565b613356565b348015610a6457600080fd5b506105067f000000000000000000000000000000000000000000000000000000000000000081565b348015610a9857600080fd5b50600b54610506906001600160a01b031681565b348015610ab857600080fd5b506103fb6201518081565b348015610acf57600080fd5b506103fb60115481565b348015610ae557600080fd5b506103fb60145481565b348015610afb57600080fd5b50600c54610b1090600160a01b900460ff1681565b6040519015158152602001610405565b348015610b2c57600080fd5b506103fb610b3b366004615200565b6133d3565b348015610b4c57600080fd5b506103d4610b5b366004615200565b61366a565b348015610b6c57600080fd5b506103d4610b7b366004614fba565b6136c5565b348015610b8c57600080fd5b506103d4610b9b366004614fba565b613742565b348015610bac57600080fd5b506103d4610bbb366004615459565b613794565b348015610bcc57600080fd5b506103d4610bdb366004614fba565b6138a1565b348015610bec57600080fd5b50600a54610506906001600160a01b031681565b348015610c0c57600080fd5b50600c54610506906001600160a01b031681565b348015610c2c57600080fd5b50610491610c3b366004615490565b61392e565b348015610c4c57600080fd5b506103fb600f5481565b6000610c60613ad4565b6001600160a01b038216301480610c7e57506001600160a01b038216155b15610cb5576040517f32c98ae600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260076020526040902060048101546001600160a01b03163314610cf0576040516330cd747160e01b815260040160405180910390fd5b610cfb818585613b2e565b6005820154600081815260066020908152604080832060018101548251630a81a92360e31b81529251969850949590946001600160a01b03169263540d491892600480820193918290030181865afa158015610d5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7f91906154bc565b90506001600160a01b03811615801590610da35750600c54600160a01b900460ff16155b15610ea3578354600090610dc690600160801b90046001600160801b03166154ef565b6001860154604051638910faf160e01b8152600282810b6004830152630100000090920490910b6024820152600f82900b60448201529091506001600160a01b03831690638910faf190606401600060405180830381600087803b158015610e2d57600080fd5b505af1158015610e41573d6000803e3d6000fd5b50505050600185015460408051600f84900b8152600283810b6020830152630100000090930490920b908201528890859033907fee8f6362d59839b4b3c990d7e085a63a0fe2c58f4eff4a9a2b6de93a4c645ae39060600160405180910390a4505b83546004830180546001600160801b0390921691600090610ec590849061551f565b90915550508354600583018054600160801b9092046001600160801b031691600090610ef290849061551f565b9091555050600087815260076020526040812081815560018101805465ffffffffffff1916905560028101829055600381018290556004810180546001600160a01b03191690556005810182905560060155610f4e3388613e31565b600c546001600160a01b031615610fcb57600c5460405163622cd4e160e11b815233600482015260248101899052604481018590526001600160a01b039091169063c459a9c290606401600060405180830381600087803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b505050505b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038781166024830152604482018990527f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b15801561105457600080fd5b505af1158015611068573d6000803e3d6000fd5b50506040516001600160a01b038916815289925085915033907ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679060200160405180910390a4505050506110bb60018055565b92915050565b6110c9613e5d565b600c80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b8315158102919091179182905560405160ff9190920416151581527fc749456be5379ac4cfc1f856208b32ddcf01b9db3ce6c37784ad91a8390ae9a8906020015b60405180910390a150565b60008061114b613ad4565b8251600090815260076020526040902060048101546001600160a01b03163314611188576040516330cd747160e01b815260040160405180910390fd5b604080517f0c49ccbe0000000000000000000000000000000000000000000000000000000081528551600482015260208601516001600160801b0316602482015290850151604482015260608501516064820152608085015160848201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630c49ccbe9060a40160408051808303816000875af1158015611238573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125c9190615536565b855191945092506112709082906000613b2e565b506112818185600001516000613eb7565b5061128b60018055565b915091565b600a546001600160a01b031633146112ef5760405162461bcd60e51b815260206004820152600c60248201527f4e6f74207265636569766572000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600a5461132a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911630866142de565b601480548401905580156113405761134061438f565b601354620151808310801590611359575062278d008311155b156113615750815b42600061136e838361555a565b905060008087905083601054111561140557600064e8d4a5100060115486601054611399919061551f565b6113a39190615572565b6113ad9190615591565b600e5460105460408051918252602082018990528101839052919250907f317bea91082b2a8d33761ba0bdd38a785d60acc1b964e3ead01706baaebf548b9060600160405180910390a2611401818361555a565b9150505b8461141564e8d4a5100083615572565b61141f9190615591565b600e8054600190810191829055868101600f5560108690556011839055919350907f44521c2bbb0ee364592908d6177ce446d5554c5a6c4ebd12adf86912c617a78b9061146d90879061555a565b604080519182526020820187905281018590526060810184905260800160405180910390a25050505050505050565b6000806114a7613ad4565b835160009081526007602090815260409182902082516101208101845281546001600160801b038082168352600160801b90910416928101929092526001810154600281810b9484019490945263010000009004830b6060830152918201546080820152600382015460a082015260048201546001600160a01b031660c08201819052600583015460e0830152600690920154610100820152903314611560576040516330cd747160e01b815260040160405180910390fd5b60208501516001600160a01b0316611579573060208601525b6040805163fc6f786560e01b81528651600482015260208701516001600160a01b039081166024830152918701516001600160801b03908116604483015260608801511660648201527f00000000000000000000000000000000000000000000000000000000000000009091169063fc6f78659060840160408051808303816000875af115801561160e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116329190615536565b602087015191945092506001600160a01b03163014156116ef5760e081810151600090815260066020908152604091829020825193840183528054845260018101546001600160a01b0390811692850192909252600281015482169284019290925260038201548082166060850152600160a01b900462ffffff166080840152600482015460a084015260059091015460c083015285166116d1573394505b6116df8160400151866144ff565b6116ed8160600151866144ff565b505b506116f960018055565b9250929050565b600061170a613ad4565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461176c576040517f0bf3405700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160c081018252600080825260208201819052818301819052606082018190526080820181905260a082015290517f99fbab88000000000000000000000000000000000000000000000000000000008152600481018690526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906399fbab889060240161018060405180830381865afa158015611819573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183d91906155e3565b505050506001600160801b031660a08901819052600291820b60808a015291900b606088015262ffffff9190911660408701526001600160a01b03918216602087015291168452151591506118a7905057604051636180f03f60e11b815260040160405180910390fd5b80516001600160a01b0390811660009081526008602090815260408083208286015190941683529281528282208385015162ffffff16835290522054806119015760405163079f151f60e11b815260040160405180910390fd5b6000818152600660209081526040808320815160e0810183528154815260018201546001600160a01b03908116828601819052600284015482168386015260038401549182166060840152600160a01b90910462ffffff16608083015260048084015460a084015260059093015460c08301528351630a81a92360e31b81529351919594909363540d49189381810193918290030181865afa1580156119ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cf91906154bc565b90506001600160a01b0381166119f85760405163ef3d9b2160e01b815260040160405180910390fd5b600088815260076020526040908190206060860151600182018054608089015162ffffff90811663010000000265ffffffffffff19909216931692909217919091179055600480820180546001600160a01b03808f166001600160a01b0319909216919091179091556005830187905592516310a537f160e11b8152919284169163214a6fe291611a979142910163ffffffff91909116815260200190565b600060405180830381600087803b158015611ab157600080fd5b505af1158015611ac5573d6000803e3d6000fd5b50505050611ad5818a6000613eb7565b60608501516080860151604051633816bae960e11b8152600292830b6004820152910b60248201526001600160a01b0383169063702d75d290604401602060405180830381865afa158015611b2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5291906156c4565b6002820155611baa8a8a6001600160a01b039190911660008181526002602081815260408084208054600384528286208187528452828620889055968552600483529084209590955592909152905280546001019055565b60a08501516060808701516080880151604080516001600160801b039095168552600292830b6020860152910b908301528a9186916001600160a01b038e16917fb19157bff94fdd40c58c7d4a5d52e8eb8c2d570ca17b322b49a2bbbeedc82fbf910160405180910390a4507f150b7a0200000000000000000000000000000000000000000000000000000000945050505050611c4660018055565b95945050505050565b6000611c59613ad4565b600083815260076020526040902060048101546001600160a01b03163314611c94576040516330cd747160e01b815260040160405180910390fd5b80546001600160801b0316158015611cae57506003810154155b15611ccc57604051636180f03f60e11b815260040160405180910390fd5b611cd7818585613b2e565b9150506110bb60018055565b611ceb613e5d565b8015611cf957611cf961438f565b600b546040517f4c96a3890000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526000921690634c96a389906024016020604051808303816000875af1158015611d5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8391906154bc565b905083600d6000828254611d97919061555a565b925050819055506000836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0291906154bc565b90506000846001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6891906154bc565b90506000856001600160a01b031663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa158015611eaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ece91906156dd565b6001600160a01b038085166000908152600860209081526040808320938716835292815282822062ffffff851683529052205490915015611f73576001600160a01b038381166000908152600860209081526040808320938616835292815282822062ffffff8516835290528190205490517f7d38f65f00000000000000000000000000000000000000000000000000000000815260048101919091526024016112e6565b604051636eb1769f60e11b81523060048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116602483015284169063dd62ed3e90604401602060405180830381865afa158015611fdf573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200391906156c4565b61203d5761203d6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000600019614697565b604051636eb1769f60e11b81523060048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116602483015283169063dd62ed3e90604401602060405180830381865afa1580156120a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120cd91906156c4565b612107576121076001600160a01b0383167f0000000000000000000000000000000000000000000000000000000000000000600019614697565b6005600081548092919060010191905055506040518060e00160405280888152602001876001600160a01b03168152602001846001600160a01b03168152602001836001600160a01b031681526020018262ffffff1681526020016000815260200160008152506006600060055481526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060808201518160030160146101000a81548162ffffff021916908362ffffff16021790555060a0820151816004015560c0820151816005015590505060055460086000856001600160a01b03166001600160a01b031681526020019081526020016000206000846001600160a01b03166001600160a01b0316815260200190815260200160002060008362ffffff1662ffffff1681526020019081526020016000208190555060055460096000886001600160a01b03166001600160a01b0316815260200190815260200160002081905550836001600160a01b0316866001600160a01b03166005547f0621c8de33a230aec1aee0d4f7b6c81d97bd3ce0a2040ca33fbd668e521ecafe8a60405161232e91815260200190565b60405180910390a450505050505050565b600080600061234c613ad4565b83516000908152600760205260409020600581015461237e5760405163079f151f60e11b815260040160405180910390fd5b600581810154600090815260066020908152604091829020825160e0810184528154815260018201546001600160a01b03908116828501526002830154811694820185905260038301549081166060830152600160a01b900462ffffff166080820152600482015460a082015293015460c084015287015161240091906147cc565b612412816060015187604001516147cc565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681604001516001600160a01b03161415801561248e57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681606001516001600160a01b031614155b801561249a5750600034115b156124a457600080fd5b604080517f219f5d170000000000000000000000000000000000000000000000000000000081528751600482015260208801516024820152908701516044820152606087015160648201526080870151608482015260a087015160a48201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063219f5d1790349060c40160606040518083038185885af1158015612557573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061257c91906156f8565b6020890151929750909550935060009061259790869061551f565b905060008488604001516125ab919061551f565b905081156125c1576125c1836040015183614860565b80156125d5576125d5836060015182614860565b6125e58489600001516000613b2e565b506125f68489600001516000613eb7565b5050505061260360018055565b9193909250565b6001600160a01b03821660009081526002602052604081205482106126975760405162461bcd60e51b815260206004820152602560248201527f456e756d657261626c653a206f776e657220696e646578206f7574206f66206260448201527f6f756e647300000000000000000000000000000000000000000000000000000060648201526084016112e6565b506001600160a01b03919091166000908152600360209081526040808320938352929052205490565b6126c8613ad4565b60008181526007602090815260409182902082516101208101845281546001600160801b038082168352600160801b90910416928101929092526001810154600281810b9484019490945263010000009004830b6060830152918201546080820152600382015460a082015260048201546001600160a01b031660c08201819052600583015460e083015260069092015461010082015290331461277f576040516330cd747160e01b815260040160405180910390fd5b60008160a00151118061279b575080516001600160801b031615155b156127d2576040517f32e7879300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260076020526040812081815560018101805465ffffffffffff1916905560028101829055600381018290556004810180546001600160a01b031916905560058101829055600601556128293383613e31565b600c546001600160a01b0316156128ac57600c5460e082015160405163622cd4e160e11b81523360048201526024810185905260448101919091526001600160a01b039091169063c459a9c290606401600060405180830381600087803b15801561289357600080fd5b505af11580156128a7573d6000803e3d6000fd5b505050505b6040517f42966c68000000000000000000000000000000000000000000000000000000008152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561292757600080fd5b505af115801561293b573d6000803e3d6000fd5b50505060e08201516040516000815284925033907ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679060200160405180910390a45061298660018055565b50565b6012546001600160a01b031633148015906129af57506000546001600160a01b03163314155b156129e6576040517f98f76d0e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4260005b82811015612b7e57600060066000868685818110612a0a57612a0a61572f565b602090810292909201358352508181019290925260409081016000908120825160e0810184528154815260018201546001600160a01b03908116828701819052600284015482168387015260038401549182166060840152600160a01b90910462ffffff16608083015260048084015460a084015260059093015460c08301528451630a81a92360e31b815294519196509294929363540d491893818401939092918290030181865afa158015612ac5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ae991906154bc565b825190915015801590612b0457506001600160a01b03811615155b15612b69576040516310a537f160e11b815263ffffffff851660048201526001600160a01b0382169063214a6fe290602401600060405180830381600087803b158015612b5057600080fd5b505af1158015612b64573d6000803e3d6000fd5b505050505b50508080612b7690615745565b9150506129ea565b50505050565b612b8c613ad4565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015612bf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1791906156c4565b905082811015612c3a57604051632ca2f52b60e11b815260040160405180910390fd5b8015612cc457604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015612ca257600080fd5b505af1158015612cb6573d6000803e3d6000fd5b50505050612cc48282614937565b50612cce60018055565b5050565b612cda613e5d565b82801580612ce9575060055481115b15612d20576040517f87e8068300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600084815260066020908152604080832060018101548251630a81a92360e31b815292514295929492936001600160a01b039092169263540d491892600480820193918290030181865afa158015612d7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612da091906154bc565b90506001600160a01b03811615612e11576040516310a537f160e11b815263ffffffff841660048201526001600160a01b0382169063214a6fe290602401600060405180830381600087803b158015612df857600080fd5b505af1158015612e0c573d6000803e3d6000fd5b505050505b8415612e1f57612e1f61438f565b8154600d548791612e2f9161551f565b612e39919061555a565b600d5585825560405186815287907fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f89060200160405180910390a250505050505050565b600c546001600160a01b03163314612ed75760405162461bcd60e51b815260206004820152601760248201527f4e6f74206661726d20626f6f737420636f6e747261637400000000000000000060448201526064016112e6565b60008281526007602052604090206005810154612f075760405163079f151f60e11b815260040160405180910390fd5b612f1381846000613b2e565b50612f1f818484613eb7565b505050565b60006001600160a01b038216612fa25760405162461bcd60e51b815260206004820152602d60248201527f456e756d657261626c653a2061646472657373207a65726f206973206e6f742060448201527f612076616c6964206f776e65720000000000000000000000000000000000000060648201526084016112e6565b506001600160a01b031660009081526002602052604090205490565b612fc6613e5d565b612fd06000614997565b565b612fda613e5d565b6001600160a01b0381166130015760405163d92e233d60e01b815260040160405180910390fd5b604051636eb1769f60e11b81526001600160a01b038281166004830152306024830152600019917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e90604401602060405180830381865afa158015613073573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061309791906156c4565b146130a157600080fd5b600a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f4a2963bfc20b87a0c055468a66e6638d57725e93fb4d65733fb2f25587ae8c4f90602001611135565b6130f7613e5d565b6201518081108061310a575062278d0081115b15613141576040517f9e11b5e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60138190556040518181527fb5521c8a03b484502769158d9dd83186bd0748f3ece2fbf358233994c2a2097690602001611135565b6000806000600d5411156131c757600d546001600160a01b038416600090815260096020908152604080832054835260069091529020546011546131ba9190615572565b6131c49190615591565b91505b6010549050915091565b6000806000600d5411156131c757600d546000848152600660205260409020546011546131ba9190615572565b60608167ffffffffffffffff81111561321957613219614fd7565b60405190808252806020026020018201604052801561324c57816020015b60608152602001906001900390816132375790505b50905060005b8281101561334f57600080308686858181106132705761327061572f565b90506020028101906132829190615760565b6040516132909291906157a7565b600060405180830381855af49150503d80600081146132cb576040519150601f19603f3d011682016040523d82523d6000602084013e6132d0565b606091505b50915091508161331c576044815110156132e957600080fd5b6004810190508080602001905181019061330391906157b7565b60405162461bcd60e51b81526004016112e69190615859565b8084848151811061332f5761332f61572f565b60200260200101819052505050808061334790615745565b915050613252565b5092915050565b61335e613e5d565b6001600160a01b0381166133855760405163d92e233d60e01b815260040160405180910390fd5b601280546001600160a01b0319166001600160a01b0383169081179091556040519081527fc47d127c07bdd56c5ccba00463ce3bd3c1bca71b4670eea6e5d0c02e4aa156e290602001611135565b600081815260076020908152604080832081516101208101835281546001600160801b038082168352600160801b90910416938101939093526001810154600281810b9385019390935263010000009004820b6060840152908101546080830152600381015460a083015260048101546001600160a01b031660c0830152600581015460e08301819052600690910154610100830152156136645760e0818101516000908152600660209081526040808320815194850182528054855260018101546001600160a01b03908116868501819052600283015482168785015260038301549182166060880152600160a01b90910462ffffff16608087015260048083015460a088015260059092015460c08701528251630a81a92360e31b81529251909363540d49189380840193919291908290030181865afa15801561351d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061354191906154bc565b90506001600160a01b038116156136505760408381015160608501519151633816bae960e11b8152600291820b600482015291900b60248201526000906001600160a01b0383169063702d75d290604401602060405180830381865afa1580156135af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135d391906156c4565b905083608001518111801561360f575083602001516001600160801b0316846080015182613601919061551f565b61360d90600019615591565b115b1561364e57600160801b84602001516001600160801b0316856080015183613637919061551f565b6136419190615572565b61364b9190615591565b94505b505b60a083015161365f908561555a565b935050505b50919050565b613672613ad4565b600081815260076020526040902060058101546136a25760405163079f151f60e11b815260040160405180910390fd5b6136ae81836000613b2e565b506136bb81836000613eb7565b5061298660018055565b6136cd613e5d565b6001600160a01b0381166136f45760405163d92e233d60e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f29e3e57b4a1e4513d009781598c7e4b8b2a68e4b71fe977e362d1b591016fade90602001611135565b61374a613e5d565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517ff32244aa081c72b930bb47bb702115e112d779ed353d6b1a70b28babc9822b7a90600090a250565b61379c613ad4565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa1580156137e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061380791906156c4565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316141561385c57601454811061385657601454900361385c565b60145560005b8281101561387d57604051632ca2f52b60e11b815260040160405180910390fd5b8015613897576138976001600160a01b03851683836149e7565b50612f1f60018055565b6138a9613e5d565b6001600160a01b0381166139255760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016112e6565b61298681614997565b600080613939613ad4565b825160009081526007602090815260409182902082516101208101845281546001600160801b038082168352600160801b90910416928101929092526001810154600281810b9484019490945263010000009004830b6060830152918201546080820152600382015460a082015260048201546001600160a01b031660c08201819052600583015460e08301526006909201546101008201529033146139f2576040516330cd747160e01b815260040160405180910390fd5b60208401516001600160a01b0316613a0b573060208501525b6040805163fc6f786560e01b81528551600482015260208601516001600160a01b039081166024830152918601516001600160801b03908116604483015260608701511660648201527f00000000000000000000000000000000000000000000000000000000000000009091169063fc6f78659060840160408051808303816000875af1158015613aa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ac49190615536565b909350915061128b905060018055565b60026001541415613b275760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016112e6565b6002600155565b6005838101546000908152600660209081526040808320815160e0810183528154815260018201546001600160a01b03908116828601819052600284015482168386015260038401549182166060840152600160a01b90910462ffffff16608083015260048084015460a0840152929096015460c08201528251630a81a92360e31b81529251949590948694919363540d4918938181019392918290030181865afa158015613be1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c0591906154bc565b90506001600160a01b03811615801590613c295750600c54600160a01b900460ff16155b15613d98576040516310a537f160e11b815263ffffffff421660048201526001600160a01b0382169063214a6fe290602401600060405180830381600087803b158015613c7557600080fd5b505af1158015613c89573d6000803e3d6000fd5b505050506001860154604051633816bae960e11b8152600282810b6004830152630100000090920490910b60248201526000906001600160a01b0383169063702d75d290604401602060405180830381865afa158015613ced573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d1191906156c4565b9050866002015481118015613d52575086546002880154600160801b9091046001600160801b031690613d44908361551f565b613d5090600019615591565b115b15613d925786546002880154600160801b918290046001600160801b031690613d7b908461551f565b613d859190615572565b613d8f9190615591565b93505b60028701555b6003860154613da7908461555a565b92508215613e28576001600160a01b03841615613e205760006003870155613dcf8484614a30565b6005860154604080516001600160a01b03871681526020810186905287929133917fd25759d838eb0a46600f8f327cce144e61d7caefbef27010fe31e2aab091704f910160405180910390a4613e28565b600386018390555b50509392505050565b613e3b8282614b21565b506001600160a01b031660009081526002602052604090208054600019019055565b6000546001600160a01b03163314612fd05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016112e6565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399fbab88866040518263ffffffff1660e01b8152600401613f0a91815260200190565b61018060405180830381865afa158015613f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f4c91906155e3565b5050505060058e015460009081526006602052604090208e54939b50919950975095506001600160801b038088169116149350613fd89250505057865460048201546001600160801b0380851692613fa69291169061551f565b613fb0919061555a565b600482015586546fffffffffffffffffffffffffffffffff19166001600160801b0383161787555b600c5464e8d4a51000906001600160a01b031615801590613ff7575085155b1561408b57600c546040517f44e7bf06000000000000000000000000000000000000000000000000000000008152600481018990526001600160a01b03909116906344e7bf06906024016020604051808303816000875af1158015614060573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061408491906156c4565b9050614094565b85156140945750845b64e8d4a510008110156140ad575064e8d4a510006140c4565b6501d1a94a20008111156140c457506501d1a94a20005b6006880181905560006140f864e8d4a510006140e9846001600160801b038816615572565b6140f39190615591565b614c3b565b895490915060009061411a90600160801b90046001600160801b03168361586c565b905080600f0b6000146142d257895460058501546001600160801b038085169261414f92600160801b9091049091169061551f565b614159919061555a565b600585015589546001600160801b03808416600160801b029116178a55600184015460408051630a81a92360e31b815290516000926001600160a01b03169163540d49189160048083019260209291908290030181865afa1580156141c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141e691906154bc565b90506001600160a01b03811661420f5760405163ef3d9b2160e01b815260040160405180910390fd5b604051638910faf160e01b8152600289810b600483015288900b6024820152600f83900b60448201526001600160a01b03821690638910faf190606401600060405180830381600087803b15801561426657600080fd5b505af115801561427a573d6000803e3d6000fd5b5050505060058b015460408051600f85900b815260028b810b60208301528a900b8183015290518c929133917fee8f6362d59839b4b3c990d7e085a63a0fe2c58f4eff4a9a2b6de93a4c645ae39181900360600190a4505b50505050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612b7e9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614cba565b4260015b6005548111612cce576000818152600660209081526040808320815160e0810183528154815260018201546001600160a01b03908116828601819052600284015482168386015260038401549182166060840152600160a01b90910462ffffff16608083015260048084015460a084015260059093015460c08301528351630a81a92360e31b81529351919594909363540d49189381810193918290030181865afa158015614446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061446a91906154bc565b82519091501580159061448557506001600160a01b03811615155b156144ea576040516310a537f160e11b815263ffffffff851660048201526001600160a01b0382169063214a6fe290602401600060405180830381600087803b1580156144d157600080fd5b505af11580156144e5573d6000803e3d6000fd5b505050505b505080806144f790615745565b915050614393565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015614546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061456a91906156c4565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031614156145bf5760145481106145b95760145490036145bf565b60145560005b8015612f1f577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316141561468357604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561466157600080fd5b505af1158015614675573d6000803e3d6000fd5b50505050612f1f8282614937565b612f1f6001600160a01b03841683836149e7565b8015806147115750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156146eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061470f91906156c4565b155b6147835760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016112e6565b6040516001600160a01b038316602482015260448101829052612f1f9084907f095ea7b3000000000000000000000000000000000000000000000000000000009060640161432b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614801561480d5750600034115b1561484b57803414612cce576040517f4b508fef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612cce6001600160a01b0383163330846142de565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161480156148a15750600034115b15614923577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166312210e8a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561490157600080fd5b505af1158015614915573d6000803e3d6000fd5b50505050612cce3347614937565b612cce6001600160a01b03831633836149e7565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614984576040519150601f19603f3d011682016040523d82523d6000602084013e614989565b606091505b5050905080612f1f57600080fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038316602482015260448101829052612f1f9084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640161432b565b8015612cce576040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015614a9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ac191906156c4565b905081811015614acf578091505b8160145410614ae657601480548390039055614aed565b8181036014555b612f1f6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684846149e7565b6001600160a01b038216600090815260026020526040812054614b469060019061551f565b6000838152600460209081526040808320546001600160a01b03881684526003835281842081855290925290912054919250908314614bc75760405162461bcd60e51b815260206004820152600f60248201527f496e76616c696420746f6b656e4964000000000000000000000000000000000060448201526064016112e6565b818114614c08576001600160a01b03841660009081526003602090815260408083208584528252808320548484528184208190558352600490915290208190555b5060009182526004602090815260408084208490556001600160a01b039094168352600381528383209183525290812055565b6000600160801b8210614cb65760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f323820626974730000000000000000000000000000000000000000000000000060648201526084016112e6565b5090565b6000614d0f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614d9f9092919063ffffffff16565b805190915015612f1f5780806020019051810190614d2d91906158ce565b612f1f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016112e6565b6060614dae8484600085614db6565b949350505050565b606082471015614e2e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016112e6565b600080866001600160a01b03168587604051614e4a91906158eb565b60006040518083038185875af1925050503d8060008114614e87576040519150601f19603f3d011682016040523d82523d6000602084013e614e8c565b606091505b5091509150614e9d87838387614ea8565b979650505050505050565b60608315614f14578251614f0d576001600160a01b0385163b614f0d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016112e6565b5081614dae565b614dae8383815115614f295781518083602001fd5b8060405162461bcd60e51b81526004016112e69190615859565b6001600160a01b038116811461298657600080fd5b60008060408385031215614f6b57600080fd5b823591506020830135614f7d81614f43565b809150509250929050565b801515811461298657600080fd5b600060208284031215614fa857600080fd5b8135614fb381614f88565b9392505050565b600060208284031215614fcc57600080fd5b8135614fb381614f43565b634e487b7160e01b600052604160045260246000fd5b6001600160801b038116811461298657600080fd5b600060a0828403121561501457600080fd5b60405160a0810181811067ffffffffffffffff8211171561503757615037614fd7565b60405282358152602083013561504c81614fed565b806020830152506040830135604082015260608301356060820152608083013560808201528091505092915050565b60008060006060848603121561509057600080fd5b833592506020840135915060408401356150a981614f88565b809150509250925092565b6000608082840312156150c657600080fd5b6040516080810181811067ffffffffffffffff821117156150e9576150e9614fd7565b60405282358152905080602083013561510181614f43565b6020820152604083013561511481614fed565b6040820152606083013561512781614fed565b6060919091015292915050565b60008060a0838503121561514757600080fd5b61515184846150b4565b91506080830135614f7d81614f43565b60008060008060006080868803121561517957600080fd5b853561518481614f43565b9450602086013561519481614f43565b935060408601359250606086013567ffffffffffffffff808211156151b857600080fd5b818801915088601f8301126151cc57600080fd5b8135818111156151db57600080fd5b8960208285010111156151ed57600080fd5b9699959850939650602001949392505050565b60006020828403121561521257600080fd5b5035919050565b60008060006060848603121561522e57600080fd5b83359250602084013561524081614f43565b915060408401356150a981614f88565b600060c0828403121561526257600080fd5b60405160c0810181811067ffffffffffffffff8211171561528557615285614fd7565b8060405250823581526020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a08201528091505092915050565b600080604083850312156152dd57600080fd5b82356152e881614f43565b946020939093013593505050565b60008083601f84011261530857600080fd5b50813567ffffffffffffffff81111561532057600080fd5b6020830191508360208260051b85010111156116f957600080fd5b6000806020838503121561534e57600080fd5b823567ffffffffffffffff81111561536557600080fd5b615371858286016152f6565b90969095509350505050565b6000806040838503121561539057600080fd5b50508035926020909101359150565b60005b838110156153ba5781810151838201526020016153a2565b83811115612b7e5750506000910152565b600081518084526153e381602086016020860161539f565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561544c57603f1988860301845261543a8583516153cb565b9450928501929085019060010161541e565b5092979650505050505050565b60008060006060848603121561546e57600080fd5b833561547981614f43565b92506020840135915060408401356150a981614f43565b6000608082840312156154a257600080fd5b614fb383836150b4565b80516154b781614f43565b919050565b6000602082840312156154ce57600080fd5b8151614fb381614f43565b634e487b7160e01b600052601160045260246000fd5b600081600f0b6f7fffffffffffffffffffffffffffffff19811415615516576155166154d9565b60000392915050565b600082821015615531576155316154d9565b500390565b6000806040838503121561554957600080fd5b505080516020909101519092909150565b6000821982111561556d5761556d6154d9565b500190565b600081600019048311821515161561558c5761558c6154d9565b500290565b6000826155ae57634e487b7160e01b600052601260045260246000fd5b500490565b805162ffffff811681146154b757600080fd5b8051600281900b81146154b757600080fd5b80516154b781614fed565b6000806000806000806000806000806000806101808d8f03121561560657600080fd5b8c516bffffffffffffffffffffffff8116811461562257600080fd5b9b5061563060208e016154ac565b9a5061563e60408e016154ac565b995061564c60608e016154ac565b985061565a60808e016155b3565b975061566860a08e016155c6565b965061567660c08e016155c6565b955061568460e08e016155d8565b94506101008d015193506101208d015192506156a36101408e016155d8565b91506156b26101608e016155d8565b90509295989b509295989b509295989b565b6000602082840312156156d657600080fd5b5051919050565b6000602082840312156156ef57600080fd5b614fb3826155b3565b60008060006060848603121561570d57600080fd5b835161571881614fed565b602085015160409095015190969495509392505050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615759576157596154d9565b5060010190565b6000808335601e1984360301811261577757600080fd5b83018035915067ffffffffffffffff82111561579257600080fd5b6020019150368190038213156116f957600080fd5b8183823760009101908152919050565b6000602082840312156157c957600080fd5b815167ffffffffffffffff808211156157e157600080fd5b818401915084601f8301126157f557600080fd5b81518181111561580757615807614fd7565b604051601f8201601f19908116603f0116810190838211818310171561582f5761582f614fd7565b8160405282815287602084870101111561584857600080fd5b614e9d83602083016020880161539f565b602081526000614fb360208301846153cb565b600081600f0b83600f0b60008112816f7fffffffffffffffffffffffffffffff19018312811516156158a0576158a06154d9565b816f7fffffffffffffffffffffffffffffff0183138116156158c4576158c46154d9565b5090039392505050565b6000602082840312156158e057600080fd5b8151614fb381614f88565b600082516158fd81846020870161539f565b919091019291505056fea2646970667358221220109eb4b53cd461f51ba54c31cc02e2a5f039fad52bcf51fd5c82ea3c35c6bea764736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/MockBoost.json b/projects/vecake-farm-booster/v3/test/artifactsFile/MockBoost.json new file mode 100644 index 00000000..6ab69bc2 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/MockBoost.json @@ -0,0 +1,136 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MockBoost", + "sourceName": "contracts/test/MockBoost.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IMasterChefV2", + "name": "_MASTER_CHEF_V2", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER_CHEF_V2", + "outputs": [ + { + "internalType": "contract IMasterChefV2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_boostMulti", + "type": "uint256" + } + ], + "name": "updateV2BoostMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60a060405234801561001057600080fd5b506040516107683803806107688339818101604052602081101561003357600080fd5b5051600061003f61009e565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060601b6001600160601b0319166080526100a2565b3390565b60805160601c6106a46100c46000398061015b52806103e652506106a46000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100d7578063bdd70edd146100df578063cc6db2da1461011e578063f2fde38b146101265761007d565b806327bf88ad1461008257806369b02128146100b3578063715018a6146100cd575b600080fd5b61008a610159565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100bb61017d565b60408051918252519081900360200190f35b6100d5610187565b005b61008a61029e565b6100d5600480360360608110156100f557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602081013590604001356102ba565b6100bb61049a565b6100d56004803603602081101561013c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a3565b7f000000000000000000000000000000000000000000000000000000000000000081565b6503a35294400081565b61018f610644565b73ffffffffffffffffffffffffffffffffffffffff166101ad61029e565b73ffffffffffffffffffffffffffffffffffffffff161461022f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b6102c2610644565b73ffffffffffffffffffffffffffffffffffffffff166102e061029e565b73ffffffffffffffffffffffffffffffffffffffff161461036257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff83166103e457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f75706461746555736572426f6f73743a20496e76616c69642075736572000000604482015290519081900360640190fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663041a84c98484846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050600060405180830381600087803b15801561047d57600080fd5b505af1158015610491573d6000803e3d6000fd5b50505050505050565b64e8d4a5100081565b6104ab610644565b73ffffffffffffffffffffffffffffffffffffffff166104c961029e565b73ffffffffffffffffffffffffffffffffffffffff161461054b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166105b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806106496026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220fabb96ce808aa91212f257f57242a8f66c8202384758e6660293a4ec909e990364736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100d7578063bdd70edd146100df578063cc6db2da1461011e578063f2fde38b146101265761007d565b806327bf88ad1461008257806369b02128146100b3578063715018a6146100cd575b600080fd5b61008a610159565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100bb61017d565b60408051918252519081900360200190f35b6100d5610187565b005b61008a61029e565b6100d5600480360360608110156100f557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602081013590604001356102ba565b6100bb61049a565b6100d56004803603602081101561013c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104a3565b7f000000000000000000000000000000000000000000000000000000000000000081565b6503a35294400081565b61018f610644565b73ffffffffffffffffffffffffffffffffffffffff166101ad61029e565b73ffffffffffffffffffffffffffffffffffffffff161461022f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b6102c2610644565b73ffffffffffffffffffffffffffffffffffffffff166102e061029e565b73ffffffffffffffffffffffffffffffffffffffff161461036257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff83166103e457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f75706461746555736572426f6f73743a20496e76616c69642075736572000000604482015290519081900360640190fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663041a84c98484846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050600060405180830381600087803b15801561047d57600080fd5b505af1158015610491573d6000803e3d6000fd5b50505050505050565b64e8d4a5100081565b6104ab610644565b73ffffffffffffffffffffffffffffffffffffffff166104c961029e565b73ffffffffffffffffffffffffffffffffffffffff161461054b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166105b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806106496026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220fabb96ce808aa91212f257f57242a8f66c8202384758e6660293a4ec909e990364736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/NonfungiblePositionManager.json b/projects/vecake-farm-booster/v3/test/artifactsFile/NonfungiblePositionManager.json new file mode 100644 index 00000000..d1c35ca4 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/NonfungiblePositionManager.json @@ -0,0 +1,1248 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "NonfungiblePositionManager", + "sourceName": "contracts/NonfungiblePositionManager.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_deployer", + "type": "address" + }, + { + "internalType": "address", + "name": "_factory", + "type": "address" + }, + { + "internalType": "address", + "name": "_WETH9", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenDescriptor_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "Collect", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "DecreaseLiquidity", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "IncreaseLiquidity", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WETH9", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint128", + "name": "amount0Max", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1Max", + "type": "uint128" + } + ], + "internalType": "struct INonfungiblePositionManager.CollectParams", + "name": "params", + "type": "tuple" + } + ], + "name": "collect", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "uint160", + "name": "sqrtPriceX96", + "type": "uint160" + } + ], + "name": "createAndInitializePoolIfNecessary", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "amount0Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "internalType": "struct INonfungiblePositionManager.DecreaseLiquidityParams", + "name": "params", + "type": "tuple" + } + ], + "name": "decreaseLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deployer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount0Desired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Desired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount0Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "internalType": "struct INonfungiblePositionManager.IncreaseLiquidityParams", + "name": "params", + "type": "tuple" + } + ], + "name": "increaseLiquidity", + "outputs": [ + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "internalType": "uint256", + "name": "amount0Desired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Desired", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount0Min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Min", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "internalType": "struct INonfungiblePositionManager.MintParams", + "name": "params", + "type": "tuple" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount0Owed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Owed", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "pancakeV3MintCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "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": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "positions", + "outputs": [ + { + "internalType": "uint96", + "name": "nonce", + "type": "uint96" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "feeGrowthInside0LastX128", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeGrowthInside1LastX128", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "tokensOwed0", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "tokensOwed1", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "refundETH", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "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": "selfPermit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "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": "selfPermitAllowed", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "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": "selfPermitAllowedIfNecessary", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "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": "selfPermitIfNecessary", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMinimum", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "sweepToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountMinimum", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "unwrapWETH9", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x610140604052600d80546001600160b01b0319166001176001600160b01b0316600160b01b1790553480156200003457600080fd5b5060405162006365380380620063658339810160408190526200005791620002e5565b8383836040518060400160405280601b81526020017f50616e63616b6520563320506f736974696f6e73204e46542d563100000000008152506040518060400160405280600a8152602001695043532d56332d504f5360b01b815250604051806040016040528060018152602001603160f81b8152508282620000e76301ffc9a760e01b6200019760201b60201c565b8151620000fc9060069060208501906200021c565b508051620001129060079060208401906200021c565b50620001256380ac58cd60e01b62000197565b62000137635b5e139f60e01b62000197565b6200014963780e9d6360e01b62000197565b50508251602093840120608052805192019190912060a052506001600160601b0319606093841b811660c05291831b821660e052821b81166101005291901b16610120525062000341915050565b6001600160e01b03198082161415620001f7576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200025457600085556200029f565b82601f106200026f57805160ff19168380011785556200029f565b828001600101855582156200029f579182015b828111156200029f57825182559160200191906001019062000282565b50620002ad929150620002b1565b5090565b5b80821115620002ad5760008155600101620002b2565b80516001600160a01b0381168114620002e057600080fd5b919050565b60008060008060808587031215620002fb578384fd5b6200030685620002c8565b93506200031660208601620002c8565b92506200032660408601620002c8565b91506200033660608601620002c8565b905092959194509250565b60805160a05160c05160601c60e05160601c6101005160601c6101205160601c615f92620003d360003980612b315250806102b45280611748528061183e52806118c65280613e5f5280613ea55280613f19525080610e0e5280610ed55280612acb525080610ad752806124165280612bbe5280612e98528061373552508061152f52508061150e5250615f926000f3fe6080604052600436106102a45760003560e01c80636352211e1161016e578063ac9650d8116100cb578063d5f394881161007f578063e985e9c511610064578063e985e9c514610725578063f3995c6714610745578063fc6f78651461075857610328565b8063d5f39488146106fd578063df2ab5bb1461071257610328565b8063c2e3140a116100b0578063c2e3140a146106b5578063c45a0155146106c8578063c87b56dd146106dd57610328565b8063ac9650d814610675578063b88d4fde1461069557610328565b806395d89b411161012257806399fbab881161010757806399fbab881461060a578063a22cb46514610642578063a4a78f0c1461066257610328565b806395d89b41146105d557806399eee9d0146105ea57610328565b806370a082311161015357806370a082311461057f5780637ac2ff7b1461059f57806388316456146105b257610328565b80636352211e1461054a5780636c0360eb1461056a57610328565b806323b872dd1161021c57806342966c68116101d057806349404b7c116101b557806349404b7c146105025780634aa4a4fc146105155780634f6ccce71461052a57610328565b806342966c68146104dc5780634659a494146104ef57610328565b806330adf81f1161020157806330adf81f146104925780633644e515146104a757806342842e0e146104bc57610328565b806323b872dd146104525780632f745c591461047257610328565b80630c49ccbe1161027357806313ead5621161025857806313ead562146103fb57806318160ddd1461040e578063219f5d171461043057610328565b80630c49ccbe146103d257806312210e8a146103f357610328565b806301ffc9a71461032d57806306fdde0314610363578063081812fc14610385578063095ea7b3146103b257610328565b3661032857336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610326576040805162461bcd60e51b815260206004820152600960248201527f4e6f742057455448390000000000000000000000000000000000000000000000604482015290519081900360640190fd5b005b600080fd5b34801561033957600080fd5b5061034d6103483660046153ff565b61076b565b60405161035a919061597f565b60405180910390f35b34801561036f57600080fd5b506103786107a6565b60405161035a91906159d2565b34801561039157600080fd5b506103a56103a0366004615719565b61083c565b60405161035a9190615843565b3480156103be57600080fd5b506103266103cd3660046152c4565b610898565b6103e56103e03660046154dc565b61096e565b60405161035a929190615ba3565b610326610dda565b6103a5610409366004615157565b610dec565b34801561041a57600080fd5b506104236110f9565b60405161035a919061598a565b61044361043e3660046154ed565b61110a565b60405161035a93929190615b5e565b34801561045e57600080fd5b5061032661046d3660046151b0565b611443565b34801561047e57600080fd5b5061042361048d3660046152c4565b61149a565b34801561049e57600080fd5b506104236114c5565b3480156104b357600080fd5b506104236114e9565b3480156104c857600080fd5b506103266104d73660046151b0565b6115a7565b6103266104ea366004615719565b6115c2565b6103266104fd366004615330565b611691565b610326610510366004615731565b611744565b34801561052157600080fd5b506103a56118c4565b34801561053657600080fd5b50610423610545366004615719565b6118e8565b34801561055657600080fd5b506103a5610565366004615719565b6118fe565b34801561057657600080fd5b50610378611926565b34801561058b57600080fd5b5061042361059a366004615103565b61192b565b6103266105ad366004615330565b611993565b6105c56105c03660046155a9565b611e3f565b60405161035a9493929190615b7f565b3480156105e157600080fd5b506103786123a0565b3480156105f657600080fd5b50610326610605366004615778565b612401565b34801561061657600080fd5b5061062a610625366004615719565b61247f565b60405161035a9c9b9a99989796959493929190615bb1565b34801561064e57600080fd5b5061032661065d366004615297565b6126ae565b610326610670366004615330565b6127d1565b610688610683366004615390565b612883565b60405161035a9190615901565b3480156106a157600080fd5b506103266106b03660046151f0565b6129c3565b6103266106c3366004615330565b612a21565b3480156106d457600080fd5b506103a5612ac9565b3480156106e957600080fd5b506103786106f8366004615719565b612aed565b34801561070957600080fd5b506103a5612bbc565b6103266107203660046152ef565b612be0565b34801561073157600080fd5b5061034d61074036600461511f565b612cc3565b610326610753366004615330565b612cf1565b6103e56107663660046154c5565b612d7c565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108325780601f1061080757610100808354040283529160200191610832565b820191906000526020600020905b81548152906001019060200180831161081557829003601f168201915b5050505050905090565b60006108478261329a565b61086c5760405162461bcd60e51b815260040161086390615a1c565b60405180910390fd5b506000908152600c60205260409020546c0100000000000000000000000090046001600160a01b031690565b60006108a3826118fe565b9050806001600160a01b0316836001600160a01b031614156108f65760405162461bcd60e51b8152600401808060200182810382526021815260200180615f346021913960400191505060405180910390fd5b806001600160a01b03166109086132a7565b6001600160a01b031614806109245750610924816107406132a7565b61095f5760405162461bcd60e51b8152600401808060200182810382526038815260200180615e5e6038913960400191505060405180910390fd5b61096983836132ab565b505050565b600080823561097d338261332f565b6109995760405162461bcd60e51b8152600401610863906159e5565b8360800135806109a76133cb565b11156109fa576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b6000610a0c60408701602088016155bb565b6001600160801b031611610a1f57600080fd5b84356000908152600c602090815260409182902060018101549092600160801b9091046001600160801b031691610a5a9189019089016155bb565b6001600160801b0316816001600160801b03161015610a7857600080fd5b60018281015469ffffffffffffffffffff166000908152600b60209081526040808320815160608101835281546001600160a01b039081168252919095015490811692850192909252600160a01b90910462ffffff1690830152610afc7f0000000000000000000000000000000000000000000000000000000000000000836133cf565b60018501549091506001600160a01b0382169063a34123a7906a01000000000000000000008104600290810b91600160681b9004900b610b4260408e0160208f016155bb565b6040518463ffffffff1660e01b8152600401610b60939291906159ac565b6040805180830381600087803b158015610b7957600080fd5b505af1158015610b8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb19190615755565b909850965060408901358810801590610bce575088606001358710155b610bea5760405162461bcd60e51b815260040161086390615a79565b6001840154600090610c1a9030906a01000000000000000000008104600290810b91600160681b9004900b6134cb565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b8152600401610c4b919061598a565b60a06040518083038186803b158015610c6357600080fd5b505afa158015610c77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9b9190615605565b50509250925050610cc087600201548303876001600160801b0316600160801b613525565b6004880180546fffffffffffffffffffffffffffffffff198116928e016001600160801b039182160181169290921790556003880154610d0a91908303908816600160801b613525565b6004880180546001600160801b03808216938e01600160801b9283900482160116029190911790556002870182905560038701819055610d5060408d0160208e016155bb565b86038760010160106101000a8154816001600160801b0302191690836001600160801b031602179055508b600001357f26f6a048ee9138f2c0ce266f322cb99228e8d619ae2bff30c67f8dcf9d2377b48d6020016020810190610db391906155bb565b8d8d604051610dc493929190615b5e565b60405180910390a2505050505050505050915091565b4715610dea57610dea33476135d4565b565b6000836001600160a01b0316856001600160a01b031610610e0c57600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631698ee828686866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018262ffffff168152602001935050505060206040518083038186803b158015610e9757600080fd5b505afa158015610eab573d6000803e3d6000fd5b505050506040513d6020811015610ec157600080fd5b505190506001600160a01b038116611010577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a16712958686866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018262ffffff1681526020019350505050602060405180830381600087803b158015610f6057600080fd5b505af1158015610f74573d6000803e3d6000fd5b505050506040513d6020811015610f8a57600080fd5b5051604080517ff637731d0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291519293509083169163f637731d9160248082019260009290919082900301818387803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b505050506110f1565b6000816001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561104b57600080fd5b505afa15801561105f573d6000803e3d6000fd5b505050506040513d60e081101561107557600080fd5b505190506001600160a01b0381166110ef57816001600160a01b031663f637731d846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156110d657600080fd5b505af11580156110ea573d6000803e3d6000fd5b505050505b505b949350505050565b600061110560026136dd565b905090565b60008060008360a001358061111d6133cb565b1115611170576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b84356000908152600c6020908152604080832060018082015469ffffffffffffffffffff81168652600b855283862084516060808201875282546001600160a01b039081168352929094015480831682890190815262ffffff600160a01b9092048216838901908152885161014081018a528451861681529151909416818a01529251168287015230828501526a01000000000000000000008304600290810b810b608080850191909152600160681b909404810b900b60a0830152958c013560c0820152938b013560e0850152908a0135610100840152890135610120830152929061125c906136e8565b6001870154939a50919850965091506000906112969030906a01000000000000000000008104600290810b91600160681b9004900b6134cb565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b81526004016112c7919061598a565b60a06040518083038186803b1580156112df57600080fd5b505afa1580156112f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113179190615605565b50509250925050611353866002015483038760010160109054906101000a90046001600160801b03166001600160801b0316600160801b613525565b6004870180546001600160801b0380821690930183166fffffffffffffffffffffffffffffffff19909116179055600387015460018801546113a39291840391600160801b918290041690613525565b6004870180546001600160801b03600160801b80830482169094018116840291811691909117909155600288018490556003880183905560018801805483810483168e018316909302929091169190911790556040518b35907f3067048beee31b25b2f1681f88dac838c8bba36af25bfb2b7cf7473a5847e35f9061142d908d908d908d90615b5e565b60405180910390a2505050505050509193909250565b61145461144e6132a7565b8261332f565b61148f5760405162461bcd60e51b8152600401808060200182810382526031815260200180615f556031913960400191505060405180910390fd5b610969838383613923565b6001600160a01b03821660009081526001602052604081206114bc9083613a6f565b90505b92915050565b7f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad81565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611556613a7b565b3060405160200180868152602001858152602001848152602001838152602001826001600160a01b031681526020019550505050505060405160208183030381529060405280519060200120905090565b610969838383604051806020016040528060008152506129c3565b806115cd338261332f565b6115e95760405162461bcd60e51b8152600401610863906159e5565b6000828152600c602052604090206001810154600160801b90046001600160801b0316158015611624575060048101546001600160801b0316155b801561164257506004810154600160801b90046001600160801b0316155b61165e5760405162461bcd60e51b815260040161086390615ae7565b6000838152600c602052604081208181556001810182905560028101829055600381018290556004015561096983613a7f565b604080517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101879052606481018690526001608482015260ff851660a482015260c4810184905260e4810183905290516001600160a01b03881691638fcbaf0c9161010480830192600092919082900301818387803b15801561172457600080fd5b505af1158015611738573d6000803e3d6000fd5b50505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117b357600080fd5b505afa1580156117c7573d6000803e3d6000fd5b505050506040513d60208110156117dd57600080fd5b5051905082811015611836576040805162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e742057455448390000000000000000000000000000604482015290519081900360640190fd5b8015610969577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156118a257600080fd5b505af11580156118b6573d6000803e3d6000fd5b5050505061096982826135d4565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806118f6600284613b4c565b509392505050565b60006114bf82604051806060016040528060298152602001615ec06029913960029190613b6a565b606090565b60006001600160a01b0382166119725760405162461bcd60e51b815260040180806020018281038252602a815260200180615e96602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206114bf906136dd565b8361199c6133cb565b11156119ef576040805162461bcd60e51b815260206004820152600e60248201527f5065726d69742065787069726564000000000000000000000000000000000000604482015290519081900360640190fd5b60006119f96114e9565b7f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad8888611a2581613b77565b604080516020808201969096526001600160a01b03909416848201526060840192909252608083015260a08083018a90528151808403909101815260c0830182528051908401207f190100000000000000000000000000000000000000000000000000000000000060e084015260e283019490945261010280830194909452805180830390940184526101229091019052815191012090506000611ac8876118fe565b9050806001600160a01b0316886001600160a01b03161415611b1b5760405162461bcd60e51b8152600401808060200182810382526027815260200180615dc16027913960400191505060405180910390fd5b611b2481613bb6565b15611cff576040805160208082018790528183018690527fff0000000000000000000000000000000000000000000000000000000000000060f889901b16606083015282516041818403018152606183018085527f1626ba7e0000000000000000000000000000000000000000000000000000000090526065830186815260858401948552815160a585015281516001600160a01b03871695631626ba7e958995919260c59091019185019080838360005b83811015611bee578181015183820152602001611bd6565b50505050905090810190601f168015611c1b5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015611c3957600080fd5b505afa158015611c4d573d6000803e3d6000fd5b505050506040513d6020811015611c6357600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e0000000000000000000000000000000000000000000000000000000014611cfa576040805162461bcd60e51b815260206004820152600c60248201527f556e617574686f72697a65640000000000000000000000000000000000000000604482015290519081900360640190fd5b611e2b565b600060018387878760405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611d5b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611dc3576040805162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015290519081900360640190fd5b816001600160a01b0316816001600160a01b031614611e29576040805162461bcd60e51b815260206004820152600c60248201527f556e617574686f72697a65640000000000000000000000000000000000000000604482015290519081900360640190fd5b505b611e3588886132ab565b5050505050505050565b60008060008084610140013580611e546133cb565b1115611ea7576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b604080516101408101909152600090611f739080611ec860208b018b615103565b6001600160a01b03168152602001896020016020810190611ee99190615103565b6001600160a01b03168152602001611f0760608b0160408c016156ff565b62ffffff168152306020820152604001611f2760808b0160608c0161543f565b60020b8152602001611f3f60a08b0160808c0161543f565b60020b81526020018960a0013581526020018960c0013581526020018960e0013581526020018961010001358152506136e8565b92975090955093509050611fe7611f9261014089016101208a01615103565b600d80547fffffffffffffffffffff000000000000000000000000000000000000000000008116600175ffffffffffffffffffffffffffffffffffffffffffff92831690810190921617909155975087613bbc565b600061201230611ffd60808b0160608c0161543f565b61200d60a08c0160808d0161543f565b6134cb565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b8152600401612043919061598a565b60a06040518083038186803b15801561205b57600080fd5b505afa15801561206f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120939190615605565b50509250925050600061210c8560405180606001604052808e60000160208101906120be9190615103565b6001600160a01b031681526020018e60200160208101906120df9190615103565b6001600160a01b031681526020018e604001602081019061210091906156ff565b62ffffff169052613cea565b905060405180610140016040528060006bffffffffffffffffffffffff16815260200160006001600160a01b031681526020018269ffffffffffffffffffff1681526020018c6060016020810190612164919061543f565b60020b815260200161217c60a08e0160808f0161543f565b60020b81526020018a6001600160801b0316815260200184815260200183815260200160006001600160801b0316815260200160006001600160801b0316815250600c60008c815260200190815260200160002060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160006101000a81548169ffffffffffffffffffff021916908369ffffffffffffffffffff160217905550606082015181600101600a6101000a81548162ffffff021916908360020b62ffffff160217905550608082015181600101600d6101000a81548162ffffff021916908360020b62ffffff16021790555060a08201518160010160106101000a8154816001600160801b0302191690836001600160801b0316021790555060c0820151816002015560e082015181600301556101008201518160040160006101000a8154816001600160801b0302191690836001600160801b031602179055506101208201518160040160106101000a8154816001600160801b0302191690836001600160801b03160217905550905050897f3067048beee31b25b2f1681f88dac838c8bba36af25bfb2b7cf7473a5847e35f8a8a8a60405161238b93929190615b5e565b60405180910390a25050505050509193509193565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108325780601f1061080757610100808354040283529160200191610832565b600061240f828401846154fe565b905061243f7f00000000000000000000000000000000000000000000000000000000000000008260000151613e3a565b50841561245a57805151602082015161245a91903388613e5d565b83156124785761247881600001516020015182602001513387613e5d565b5050505050565b6000818152600c6020908152604080832081516101408101835281546bffffffffffffffffffffffff811682526001600160a01b036c010000000000000000000000009091041693810193909352600181015469ffffffffffffffffffff81169284018390526a01000000000000000000008104600290810b810b810b6060860152600160681b8204810b810b810b60808601526001600160801b03600160801b92839004811660a08701529083015460c0860152600383015460e0860152600490920154808316610100860152041661012083015282918291829182918291829182918291829182918291906125885760405162461bcd60e51b815260040161086390615ab0565b6000600b6000836040015169ffffffffffffffffffff1669ffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160149054906101000a900462ffffff1662ffffff1662ffffff1681525050905081600001518260200151826000015183602001518460400151866060015187608001518860a001518960c001518a60e001518b61010001518c61012001519d509d509d509d509d509d509d509d509d509d509d509d50505091939597999b5091939597999b565b6126b66132a7565b6001600160a01b0316826001600160a01b0316141561271c576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b80600560006127296132a7565b6001600160a01b0390811682526020808301939093526040918201600090812091871680825291909352912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169215159290921790915561278b6132a7565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201529051600019916001600160a01b0389169163dd62ed3e91604480820192602092909190829003018186803b15801561283b57600080fd5b505afa15801561284f573d6000803e3d6000fd5b505050506040513d602081101561286557600080fd5b5051101561287b5761287b868686868686611691565b505050505050565b60608167ffffffffffffffff8111801561289c57600080fd5b506040519080825280602002602001820160405280156128d057816020015b60608152602001906001900390816128bb5790505b50905060005b828110156129bc57600080308686858181106128ee57fe5b90506020028101906129009190615c50565b60405161290e929190615833565b600060405180830381855af49150503d8060008114612949576040519150601f19603f3d011682016040523d82523d6000602084013e61294e565b606091505b50915091508161299a5760448151101561296757600080fd5b60048101905080806020019051810190612981919061545b565b60405162461bcd60e51b815260040161086391906159d2565b808484815181106129a757fe5b602090810291909101015250506001016128d6565b5092915050565b6129d46129ce6132a7565b8361332f565b612a0f5760405162461bcd60e51b8152600401808060200182810382526031815260200180615f556031913960400191505060405180910390fd5b612a1b84848484613fed565b50505050565b604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152905186916001600160a01b0389169163dd62ed3e91604480820192602092909190829003018186803b158015612a8957600080fd5b505afa158015612a9d573d6000803e3d6000fd5b505050506040513d6020811015612ab357600080fd5b5051101561287b5761287b868686868686612cf1565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060612af88261329a565b612b0157600080fd5b6040517fe9dc63750000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e9dc637590612b689030908690600401615993565b60006040518083038186803b158015612b8057600080fd5b505afa158015612b94573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114bf919081019061545b565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612c2f57600080fd5b505afa158015612c43573d6000803e3d6000fd5b505050506040513d6020811015612c5957600080fd5b5051905082811015612cb2576040805162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e7420746f6b656e0000000000000000000000000000604482015290519081900360640190fd5b8015612a1b57612a1b84838361403f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b604080517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c4810183905290516001600160a01b0388169163d505accf9160e480830192600092919082900301818387803b15801561172457600080fd5b6000808235612d8b338261332f565b612da75760405162461bcd60e51b8152600401610863906159e5565b6000612db960608601604087016155bb565b6001600160801b03161180612de657506000612ddb60808601606087016155bb565b6001600160801b0316115b612def57600080fd5b600080612e026040870160208801615103565b6001600160a01b031614612e2557612e206040860160208701615103565b612e27565b305b85356000908152600c6020908152604080832060018082015469ffffffffffffffffffff168552600b8452828520835160608101855281546001600160a01b039081168252919092015490811694820194909452600160a01b90930462ffffff169183019190915292935090612ebd7f0000000000000000000000000000000000000000000000000000000000000000836133cf565b600484015460018501549192506001600160801b0380821692600160801b92839004821692900416156130da5760018501546040517fa34123a70000000000000000000000000000000000000000000000000000000081526001600160a01b0385169163a34123a791612f54916a01000000000000000000008104600290810b92600160681b909204900b906000906004016159ac565b6040805180830381600087803b158015612f6d57600080fd5b505af1158015612f81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa59190615755565b5050600185015460009081906001600160a01b0386169063514ea4bf90612fea9030906a01000000000000000000008104600290810b91600160681b9004900b6134cb565b6040518263ffffffff1660e01b8152600401613006919061598a565b60a06040518083038186803b15801561301e57600080fd5b505afa158015613032573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130569190615605565b50509250925050613092876002015483038860010160109054906101000a90046001600160801b03166001600160801b0316600160801b613525565b840193506130cb876003015482038860010160109054906101000a90046001600160801b03166001600160801b0316600160801b613525565b60028801929092556003870155015b6000806001600160801b0384166130f760608e0160408f016155bb565b6001600160801b03161161311a5761311560608d0160408e016155bb565b61311c565b835b836001600160801b03168d606001602081019061313991906155bb565b6001600160801b03161161315c5761315760808e0160608f016155bb565b61315e565b835b60018901546040517f4f1eb3d80000000000000000000000000000000000000000000000000000000081529294509092506001600160a01b03871691634f1eb3d8916131d1918c916a01000000000000000000008104600290810b92600160681b909204900b908890889060040161589a565b6040805180830381600087803b1580156131ea57600080fd5b505af11580156131fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061322291906155d7565b6004890180546fffffffffffffffffffffffffffffffff196001600160801b03918216600160801b878a0384160217168689038216179091556040519281169d50169a508c35907f40d0efd1a53d60ecbf40971b9daf7dc90178c3aadc7aab1765632738fa8b8f0190610dc4908b90869086906158d7565b60006114bf6002836141cf565b3390565b6000818152600c6020526040902080546bffffffffffffffffffffffff166c010000000000000000000000006001600160a01b0385169081029190911790915581906132f6826118fe565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061333a8261329a565b6133755760405162461bcd60e51b815260040180806020018281038252602c815260200180615e32602c913960400191505060405180910390fd5b6000613380836118fe565b9050806001600160a01b0316846001600160a01b031614806133bb5750836001600160a01b03166133b08461083c565b6001600160a01b0316145b806110f157506110f18185612cc3565b4290565b600081602001516001600160a01b031682600001516001600160a01b0316106133f757600080fd5b50805160208083015160409384015184516001600160a01b0394851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b6bffffffffffffffffffffffff191660a183015260b58201939093527f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e260d5808301919091528251808303909101815260f5909101909152805191012090565b604080516bffffffffffffffffffffffff19606086901b16602080830191909152600285810b60e890811b60348501529085900b901b60378301528251601a818403018152603a90920190925280519101205b9392505050565b600080806000198587098686029250828110908390030390508061355b576000841161355057600080fd5b50829004905061351e565b80841161356757600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b602083106136205780518252601f199092019160209182019101613601565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613682576040519150601f19603f3d011682016040523d82523d6000602084013e613687565b606091505b5050905080610969576040805162461bcd60e51b815260206004820152600360248201527f5354450000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60006114bf826141db565b6000806000806000604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b03168152602001876040015162ffffff16815250905061375a7f0000000000000000000000000000000000000000000000000000000000000000826133cf565b91506000826001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561379757600080fd5b505afa1580156137ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137cf9190615666565b505050505050905060006137e688608001516141df565b905060006137f78960a001516141df565b905061380e8383838c60c001518d60e0015161452d565b9750505050816001600160a01b0316633c8a7d8d876060015188608001518960a00151896040518060400160405280888152602001336001600160a01b03168152506040516020016138609190615b1e565b6040516020818303038152906040526040518663ffffffff1660e01b815260040161388f959493929190615857565b6040805180830381600087803b1580156138a857600080fd5b505af11580156138bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138e09190615755565b610100880151919550935084108015906138ff57508561012001518310155b61391b5760405162461bcd60e51b815260040161086390615a79565b509193509193565b826001600160a01b0316613936826118fe565b6001600160a01b03161461397b5760405162461bcd60e51b8152600401808060200182810382526029815260200180615f0b6029913960400191505060405180910390fd5b6001600160a01b0382166139c05760405162461bcd60e51b8152600401808060200182810382526024815260200180615de86024913960400191505060405180910390fd5b6139cb838383610969565b6139d66000826132ab565b6001600160a01b03831660009081526001602052604090206139f890826145f1565b506001600160a01b0382166000908152600160205260409020613a1b90826145fd565b50613a2860028284614609565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006114bc838361461f565b4690565b6000613a8a826118fe565b9050613a9881600084610969565b613aa36000836132ab565b6000828152600860205260409020546002600019610100600184161502019091160415613ae1576000828152600860205260408120613ae191615073565b6001600160a01b0381166000908152600160205260409020613b0390836145f1565b50613b0f600283614683565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080613b5b868661468f565b909450925050505b9250929050565b60006110f184848461470a565b6000908152600c6020526040902080546bffffffffffffffffffffffff19811660016bffffffffffffffffffffffff9283169081019092161790915590565b3b151590565b6001600160a01b038216613c17576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b613c208161329a565b15613c72576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b613c7e60008383610969565b6001600160a01b0382166000908152600160205260409020613ca090826145fd565b50613cad60028284614609565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0382166000908152600a602052604090205469ffffffffffffffffffff16806114bf5750600d8054600169ffffffffffffffffffff76010000000000000000000000000000000000000000000080840482168381019092160275ffffffffffffffffffffffffffffffffffffffffffff909316929092179092556001600160a01b038085166000908152600a6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffff000000000000000000001686179055848352600b825291829020865181549085167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617825591870151950180549287015162ffffff16600160a01b027fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff969094169290911691909117939093161790915592915050565b6000613e4683836133cf565b9050336001600160a01b038216146114bf57600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316148015613e9e5750804710155b15613fc0577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015613efe57600080fd5b505af1158015613f12573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015613f8e57600080fd5b505af1158015613fa2573d6000803e3d6000fd5b505050506040513d6020811015613fb857600080fd5b50612a1b9050565b6001600160a01b038316301415613fe157613fdc84838361403f565b612a1b565b612a1b848484846147d4565b613ff8848484613923565b6140048484848461496c565b612a1b5760405162461bcd60e51b8152600401808060200182810382526032815260200180615d8f6032913960400191505060405180910390fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251825160009485949389169392918291908083835b602083106140e95780518252601f1990920191602091820191016140ca565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461414b576040519150601f19603f3d011682016040523d82523d6000602084013e614150565b606091505b509150915081801561417e57508051158061417e575080806020019051602081101561417b57600080fd5b50515b612478576040805162461bcd60e51b815260206004820152600260248201527f5354000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60006114bc8383614b48565b5490565b60008060008360020b126141f6578260020b6141fe565b8260020b6000035b9050620d89e8811115614258576040805162461bcd60e51b815260206004820152600160248201527f5400000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60006001821661426c57600160801b61427e565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff16905060028216156142b2576ffff97272373d413259a46990580e213a0260801c5b60048216156142d1576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b60088216156142f0576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b601082161561430f576fffcb9843d60f6159c9db58835c9266440260801c5b602082161561432e576fff973b41fa98c081472e6896dfb254c00260801c5b604082161561434d576fff2ea16466c96a3843ec78b326b528610260801c5b608082161561436c576ffe5dee046a99a2a811c461f1969c30530260801c5b61010082161561438c576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b6102008216156143ac576ff987a7253ac413176f2b074cf7815e540260801c5b6104008216156143cc576ff3392b0822b70005940c7a398e4b70f30260801c5b6108008216156143ec576fe7159475a2c29b7443b29c7fa6e889d90260801c5b61100082161561440c576fd097f3bdfd2022b8845ad8f792aa58250260801c5b61200082161561442c576fa9f746462d870fdf8a65dc1f90e061e50260801c5b61400082161561444c576f70d869a156d2a1b890bb3df62baf32f70260801c5b61800082161561446c576f31be135f97d08fd981231505542fcfa60260801c5b6201000082161561448d576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b620200008216156144ad576e5d6af8dedb81196699c329225ee6040260801c5b620400008216156144cc576d2216e584f5fa1ea926041bedfe980260801c5b620800008216156144e9576b048a170391f7dc42444e8fa20260801c5b60008460020b131561450457806000198161450057fe5b0490505b64010000000081061561451857600161451b565b60005b60ff16602082901c0192505050919050565b6000836001600160a01b0316856001600160a01b0316111561454d579293925b846001600160a01b0316866001600160a01b03161161457857614571858585614b60565b90506145e8565b836001600160a01b0316866001600160a01b031610156145da57600061459f878686614b60565b905060006145ae878986614bcc565b9050806001600160801b0316826001600160801b0316106145cf57806145d1565b815b925050506145e8565b6145e5858584614bcc565b90505b95945050505050565b60006114bc8383614c12565b60006114bc8383614cd8565b60006110f184846001600160a01b038516614d22565b815460009082106146615760405162461bcd60e51b8152600401808060200182810382526022815260200180615d6d6022913960400191505060405180910390fd5b82600001828154811061467057fe5b9060005260206000200154905092915050565b60006114bc8383614db9565b8154600090819083106146d35760405162461bcd60e51b8152600401808060200182810382526022815260200180615ee96022913960400191505060405180910390fd5b60008460000184815481106146e457fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816147a55760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561476a578181015183820152602001614752565b50505050905090810190601f1680156147975780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508460000160018203815481106147b857fe5b9060005260206000209060020201600101549150509392505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000178152925182516000948594938a169392918291908083835b602083106148865780518252601f199092019160209182019101614867565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146148e8576040519150601f19603f3d011682016040523d82523d6000602084013e6148ed565b606091505b509150915081801561491b57508051158061491b575080806020019051602081101561491857600080fd5b50515b61287b576040805162461bcd60e51b815260206004820152600360248201527f5354460000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000614980846001600160a01b0316613bb6565b61498c575060016110f1565b6000614add7f150b7a02000000000000000000000000000000000000000000000000000000006149ba6132a7565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614a21578181015183820152602001614a09565b50505050905090810190601f168015614a4e5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051806060016040528060328152602001615d8f603291396001600160a01b0388169190614e8d565b90506000818060200190516020811015614af657600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001492505050949350505050565b60009081526001919091016020526040902054151590565b6000826001600160a01b0316846001600160a01b03161115614b80579192915b6000614bac856001600160a01b0316856001600160a01b03166c01000000000000000000000000613525565b90506145e8614bc784838888036001600160a01b0316613525565b614e9c565b6000826001600160a01b0316846001600160a01b03161115614bec579192915b6110f1614bc7836c010000000000000000000000008787036001600160a01b0316613525565b60008181526001830160205260408120548015614cce5783546000198083019190810190600090879083908110614c4557fe5b9060005260206000200154905080876000018481548110614c6257fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080614c9257fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506114bf565b60009150506114bf565b6000614ce48383614b48565b614d1a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556114bf565b5060006114bf565b600082815260018401602052604081205480614d8757505060408051808201825283815260208082018481528654600181810189556000898152848120955160029093029095019182559151908201558654868452818801909252929091205561351e565b82856000016001830381548110614d9a57fe5b906000526020600020906002020160010181905550600091505061351e565b60008181526001830160205260408120548015614cce5783546000198083019190810190600090879083908110614dec57fe5b9060005260206000209060020201905080876000018481548110614e0c57fe5b600091825260208083208454600290930201918255600193840154918401919091558354825289830190526040902090840190558654879080614e4b57fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506114bf9350505050565b60606110f18484600085614eb2565b806001600160801b03811681146107a157600080fd5b606082471015614ef35760405162461bcd60e51b8152600401808060200182810382526026815260200180615e0c6026913960400191505060405180910390fd5b614efc85613bb6565b614f4d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310614f8b5780518252601f199092019160209182019101614f6c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614fed576040519150601f19603f3d011682016040523d82523d6000602084013e614ff2565b606091505b509150915061500282828661500d565b979650505050505050565b6060831561501c57508161351e565b82511561502c5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561476a578181015183820152602001614752565b50805460018160011615610100020316600290046000825580601f1061509957506150b7565b601f0160209004906000526020600020908101906150b791906150ba565b50565b5b808211156150cf57600081556001016150bb565b5090565b80356107a181615d25565b805161ffff811681146107a157600080fd5b803562ffffff811681146107a157600080fd5b600060208284031215615114578081fd5b813561351e81615d25565b60008060408385031215615131578081fd5b823561513c81615d25565b9150602083013561514c81615d25565b809150509250929050565b6000806000806080858703121561516c578182fd5b843561517781615d25565b9350602085013561518781615d25565b9250615195604086016150f0565b915060608501356151a581615d25565b939692955090935050565b6000806000606084860312156151c4578081fd5b83356151cf81615d25565b925060208401356151df81615d25565b929592945050506040919091013590565b60008060008060808587031215615205578182fd5b843561521081615d25565b9350602085013561522081615d25565b925060408501359150606085013567ffffffffffffffff811115615242578182fd5b8501601f81018713615252578182fd5b803561526561526082615cd7565b615cb3565b818152886020838501011115615279578384fd5b81602084016020830137908101602001929092525092959194509250565b600080604083850312156152a9578182fd5b82356152b481615d25565b9150602083013561514c81615d3a565b600080604083850312156152d6578182fd5b82356152e181615d25565b946020939093013593505050565b600080600060608486031215615303578081fd5b833561530e81615d25565b925060208401359150604084013561532581615d25565b809150509250925092565b60008060008060008060c08789031215615348578384fd5b863561535381615d25565b95506020870135945060408701359350606087013560ff81168114615376578283fd5b9598949750929560808101359460a0909101359350915050565b600080602083850312156153a2578182fd5b823567ffffffffffffffff808211156153b9578384fd5b818501915085601f8301126153cc578384fd5b8135818111156153da578485fd5b86602080830285010111156153ed578485fd5b60209290920196919550909350505050565b600060208284031215615410578081fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461351e578182fd5b600060208284031215615450578081fd5b813561351e81615d48565b60006020828403121561546c578081fd5b815167ffffffffffffffff811115615482578182fd5b8201601f81018413615492578182fd5b80516154a061526082615cd7565b8181528560208385010111156154b4578384fd5b6145e8826020830160208601615cf9565b6000608082840312156154d6578081fd5b50919050565b600060a082840312156154d6578081fd5b600060c082840312156154d6578081fd5b60008183036080811215615510578182fd5b6040516040810167ffffffffffffffff828210818311171561552e57fe5b81604052606084121561553f578485fd5b60a083019350818410818511171561555357fe5b50826040528435925061556583615d25565b91825260208401359161557783615d25565b826060830152615589604086016150f0565b6080830152815261559c606085016150d3565b6020820152949350505050565b600061016082840312156154d6578081fd5b6000602082840312156155cc578081fd5b813561351e81615d57565b600080604083850312156155e9578182fd5b82516155f481615d57565b602084015190925061514c81615d57565b600080600080600060a0868803121561561c578283fd5b855161562781615d57565b809550506020860151935060408601519250606086015161564781615d57565b608087015190925061565881615d57565b809150509295509295909350565b600080600080600080600060e0888a031215615680578485fd5b875161568b81615d25565b602089015190975061569c81615d48565b95506156aa604089016150de565b94506156b8606089016150de565b93506156c6608089016150de565b925060a088015163ffffffff811681146156de578182fd5b60c08901519092506156ef81615d3a565b8091505092959891949750929550565b600060208284031215615710578081fd5b6114bc826150f0565b60006020828403121561572a578081fd5b5035919050565b60008060408385031215615743578182fd5b82359150602083013561514c81615d25565b60008060408385031215615767578182fd5b505080516020909101519092909150565b6000806000806060858703121561578d578182fd5b8435935060208501359250604085013567ffffffffffffffff808211156157b2578384fd5b818701915087601f8301126157c5578384fd5b8135818111156157d3578485fd5b8860208285010111156157e4578485fd5b95989497505060200194505050565b6000815180845261580b816020860160208601615cf9565b601f01601f19169290920160200192915050565b60020b9052565b6001600160801b03169052565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b60006001600160a01b03871682528560020b60208301528460020b60408301526001600160801b038416606083015260a0608083015261500260a08301846157f3565b6001600160a01b03959095168552600293840b60208601529190920b60408401526001600160801b03918216606084015216608082015260a00190565b6001600160a01b039390931683526001600160801b03918216602084015216604082015260600190565b6000602080830181845280855180835260408601915060408482028701019250838701855b82811015615972577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526159608583516157f3565b94509285019290850190600101615926565b5092979650505050505050565b901515815260200190565b90815260200190565b6001600160a01b03929092168252602082015260400190565b600293840b81529190920b60208201526001600160801b03909116604082015260600190565b6000602082526114bc60208301846157f3565b6020808252600c908201527f4e6f7420617070726f7665640000000000000000000000000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b60208082526014908201527f507269636520736c69707061676520636865636b000000000000000000000000604082015260600190565b60208082526010908201527f496e76616c696420746f6b656e20494400000000000000000000000000000000604082015260600190565b6020808252600b908201527f4e6f7420636c6561726564000000000000000000000000000000000000000000604082015260600190565b815180516001600160a01b03908116835260208083015182168185015260409283015162ffffff1692840192909252920151909116606082015260800190565b6001600160801b039390931683526020830191909152604082015260600190565b9384526001600160801b039290921660208401526040830152606082015260800190565b918252602082015260400190565b6bffffffffffffffffffffffff8d1681526001600160a01b038c811660208301528b811660408301528a16606082015262ffffff89166080820152600288900b60a08201526101808101615c0860c083018961581f565b615c1560e0830188615826565b8561010083015284610120830152615c31610140830185615826565b615c3f610160830184615826565b9d9c50505050505050505050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615c84578283fd5b83018035915067ffffffffffffffff821115615c9e578283fd5b602001915036819003821315613b6357600080fd5b60405181810167ffffffffffffffff81118282101715615ccf57fe5b604052919050565b600067ffffffffffffffff821115615ceb57fe5b50601f01601f191660200190565b60005b83811015615d14578181015183820152602001615cfc565b83811115612a1b5750506000910152565b6001600160a01b03811681146150b757600080fd5b80151581146150b757600080fd5b8060020b81146150b757600080fd5b6001600160801b03811681146150b757600080fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732315065726d69743a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a164736f6c6343000706000a", + "deployedBytecode": "0x6080604052600436106102a45760003560e01c80636352211e1161016e578063ac9650d8116100cb578063d5f394881161007f578063e985e9c511610064578063e985e9c514610725578063f3995c6714610745578063fc6f78651461075857610328565b8063d5f39488146106fd578063df2ab5bb1461071257610328565b8063c2e3140a116100b0578063c2e3140a146106b5578063c45a0155146106c8578063c87b56dd146106dd57610328565b8063ac9650d814610675578063b88d4fde1461069557610328565b806395d89b411161012257806399fbab881161010757806399fbab881461060a578063a22cb46514610642578063a4a78f0c1461066257610328565b806395d89b41146105d557806399eee9d0146105ea57610328565b806370a082311161015357806370a082311461057f5780637ac2ff7b1461059f57806388316456146105b257610328565b80636352211e1461054a5780636c0360eb1461056a57610328565b806323b872dd1161021c57806342966c68116101d057806349404b7c116101b557806349404b7c146105025780634aa4a4fc146105155780634f6ccce71461052a57610328565b806342966c68146104dc5780634659a494146104ef57610328565b806330adf81f1161020157806330adf81f146104925780633644e515146104a757806342842e0e146104bc57610328565b806323b872dd146104525780632f745c591461047257610328565b80630c49ccbe1161027357806313ead5621161025857806313ead562146103fb57806318160ddd1461040e578063219f5d171461043057610328565b80630c49ccbe146103d257806312210e8a146103f357610328565b806301ffc9a71461032d57806306fdde0314610363578063081812fc14610385578063095ea7b3146103b257610328565b3661032857336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610326576040805162461bcd60e51b815260206004820152600960248201527f4e6f742057455448390000000000000000000000000000000000000000000000604482015290519081900360640190fd5b005b600080fd5b34801561033957600080fd5b5061034d6103483660046153ff565b61076b565b60405161035a919061597f565b60405180910390f35b34801561036f57600080fd5b506103786107a6565b60405161035a91906159d2565b34801561039157600080fd5b506103a56103a0366004615719565b61083c565b60405161035a9190615843565b3480156103be57600080fd5b506103266103cd3660046152c4565b610898565b6103e56103e03660046154dc565b61096e565b60405161035a929190615ba3565b610326610dda565b6103a5610409366004615157565b610dec565b34801561041a57600080fd5b506104236110f9565b60405161035a919061598a565b61044361043e3660046154ed565b61110a565b60405161035a93929190615b5e565b34801561045e57600080fd5b5061032661046d3660046151b0565b611443565b34801561047e57600080fd5b5061042361048d3660046152c4565b61149a565b34801561049e57600080fd5b506104236114c5565b3480156104b357600080fd5b506104236114e9565b3480156104c857600080fd5b506103266104d73660046151b0565b6115a7565b6103266104ea366004615719565b6115c2565b6103266104fd366004615330565b611691565b610326610510366004615731565b611744565b34801561052157600080fd5b506103a56118c4565b34801561053657600080fd5b50610423610545366004615719565b6118e8565b34801561055657600080fd5b506103a5610565366004615719565b6118fe565b34801561057657600080fd5b50610378611926565b34801561058b57600080fd5b5061042361059a366004615103565b61192b565b6103266105ad366004615330565b611993565b6105c56105c03660046155a9565b611e3f565b60405161035a9493929190615b7f565b3480156105e157600080fd5b506103786123a0565b3480156105f657600080fd5b50610326610605366004615778565b612401565b34801561061657600080fd5b5061062a610625366004615719565b61247f565b60405161035a9c9b9a99989796959493929190615bb1565b34801561064e57600080fd5b5061032661065d366004615297565b6126ae565b610326610670366004615330565b6127d1565b610688610683366004615390565b612883565b60405161035a9190615901565b3480156106a157600080fd5b506103266106b03660046151f0565b6129c3565b6103266106c3366004615330565b612a21565b3480156106d457600080fd5b506103a5612ac9565b3480156106e957600080fd5b506103786106f8366004615719565b612aed565b34801561070957600080fd5b506103a5612bbc565b6103266107203660046152ef565b612be0565b34801561073157600080fd5b5061034d61074036600461511f565b612cc3565b610326610753366004615330565b612cf1565b6103e56107663660046154c5565b612d7c565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108325780601f1061080757610100808354040283529160200191610832565b820191906000526020600020905b81548152906001019060200180831161081557829003601f168201915b5050505050905090565b60006108478261329a565b61086c5760405162461bcd60e51b815260040161086390615a1c565b60405180910390fd5b506000908152600c60205260409020546c0100000000000000000000000090046001600160a01b031690565b60006108a3826118fe565b9050806001600160a01b0316836001600160a01b031614156108f65760405162461bcd60e51b8152600401808060200182810382526021815260200180615f346021913960400191505060405180910390fd5b806001600160a01b03166109086132a7565b6001600160a01b031614806109245750610924816107406132a7565b61095f5760405162461bcd60e51b8152600401808060200182810382526038815260200180615e5e6038913960400191505060405180910390fd5b61096983836132ab565b505050565b600080823561097d338261332f565b6109995760405162461bcd60e51b8152600401610863906159e5565b8360800135806109a76133cb565b11156109fa576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b6000610a0c60408701602088016155bb565b6001600160801b031611610a1f57600080fd5b84356000908152600c602090815260409182902060018101549092600160801b9091046001600160801b031691610a5a9189019089016155bb565b6001600160801b0316816001600160801b03161015610a7857600080fd5b60018281015469ffffffffffffffffffff166000908152600b60209081526040808320815160608101835281546001600160a01b039081168252919095015490811692850192909252600160a01b90910462ffffff1690830152610afc7f0000000000000000000000000000000000000000000000000000000000000000836133cf565b60018501549091506001600160a01b0382169063a34123a7906a01000000000000000000008104600290810b91600160681b9004900b610b4260408e0160208f016155bb565b6040518463ffffffff1660e01b8152600401610b60939291906159ac565b6040805180830381600087803b158015610b7957600080fd5b505af1158015610b8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb19190615755565b909850965060408901358810801590610bce575088606001358710155b610bea5760405162461bcd60e51b815260040161086390615a79565b6001840154600090610c1a9030906a01000000000000000000008104600290810b91600160681b9004900b6134cb565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b8152600401610c4b919061598a565b60a06040518083038186803b158015610c6357600080fd5b505afa158015610c77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9b9190615605565b50509250925050610cc087600201548303876001600160801b0316600160801b613525565b6004880180546fffffffffffffffffffffffffffffffff198116928e016001600160801b039182160181169290921790556003880154610d0a91908303908816600160801b613525565b6004880180546001600160801b03808216938e01600160801b9283900482160116029190911790556002870182905560038701819055610d5060408d0160208e016155bb565b86038760010160106101000a8154816001600160801b0302191690836001600160801b031602179055508b600001357f26f6a048ee9138f2c0ce266f322cb99228e8d619ae2bff30c67f8dcf9d2377b48d6020016020810190610db391906155bb565b8d8d604051610dc493929190615b5e565b60405180910390a2505050505050505050915091565b4715610dea57610dea33476135d4565b565b6000836001600160a01b0316856001600160a01b031610610e0c57600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631698ee828686866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018262ffffff168152602001935050505060206040518083038186803b158015610e9757600080fd5b505afa158015610eab573d6000803e3d6000fd5b505050506040513d6020811015610ec157600080fd5b505190506001600160a01b038116611010577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a16712958686866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018262ffffff1681526020019350505050602060405180830381600087803b158015610f6057600080fd5b505af1158015610f74573d6000803e3d6000fd5b505050506040513d6020811015610f8a57600080fd5b5051604080517ff637731d0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291519293509083169163f637731d9160248082019260009290919082900301818387803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b505050506110f1565b6000816001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561104b57600080fd5b505afa15801561105f573d6000803e3d6000fd5b505050506040513d60e081101561107557600080fd5b505190506001600160a01b0381166110ef57816001600160a01b031663f637731d846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156110d657600080fd5b505af11580156110ea573d6000803e3d6000fd5b505050505b505b949350505050565b600061110560026136dd565b905090565b60008060008360a001358061111d6133cb565b1115611170576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b84356000908152600c6020908152604080832060018082015469ffffffffffffffffffff81168652600b855283862084516060808201875282546001600160a01b039081168352929094015480831682890190815262ffffff600160a01b9092048216838901908152885161014081018a528451861681529151909416818a01529251168287015230828501526a01000000000000000000008304600290810b810b608080850191909152600160681b909404810b900b60a0830152958c013560c0820152938b013560e0850152908a0135610100840152890135610120830152929061125c906136e8565b6001870154939a50919850965091506000906112969030906a01000000000000000000008104600290810b91600160681b9004900b6134cb565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b81526004016112c7919061598a565b60a06040518083038186803b1580156112df57600080fd5b505afa1580156112f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113179190615605565b50509250925050611353866002015483038760010160109054906101000a90046001600160801b03166001600160801b0316600160801b613525565b6004870180546001600160801b0380821690930183166fffffffffffffffffffffffffffffffff19909116179055600387015460018801546113a39291840391600160801b918290041690613525565b6004870180546001600160801b03600160801b80830482169094018116840291811691909117909155600288018490556003880183905560018801805483810483168e018316909302929091169190911790556040518b35907f3067048beee31b25b2f1681f88dac838c8bba36af25bfb2b7cf7473a5847e35f9061142d908d908d908d90615b5e565b60405180910390a2505050505050509193909250565b61145461144e6132a7565b8261332f565b61148f5760405162461bcd60e51b8152600401808060200182810382526031815260200180615f556031913960400191505060405180910390fd5b610969838383613923565b6001600160a01b03821660009081526001602052604081206114bc9083613a6f565b90505b92915050565b7f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad81565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611556613a7b565b3060405160200180868152602001858152602001848152602001838152602001826001600160a01b031681526020019550505050505060405160208183030381529060405280519060200120905090565b610969838383604051806020016040528060008152506129c3565b806115cd338261332f565b6115e95760405162461bcd60e51b8152600401610863906159e5565b6000828152600c602052604090206001810154600160801b90046001600160801b0316158015611624575060048101546001600160801b0316155b801561164257506004810154600160801b90046001600160801b0316155b61165e5760405162461bcd60e51b815260040161086390615ae7565b6000838152600c602052604081208181556001810182905560028101829055600381018290556004015561096983613a7f565b604080517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101879052606481018690526001608482015260ff851660a482015260c4810184905260e4810183905290516001600160a01b03881691638fcbaf0c9161010480830192600092919082900301818387803b15801561172457600080fd5b505af1158015611738573d6000803e3d6000fd5b50505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117b357600080fd5b505afa1580156117c7573d6000803e3d6000fd5b505050506040513d60208110156117dd57600080fd5b5051905082811015611836576040805162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e742057455448390000000000000000000000000000604482015290519081900360640190fd5b8015610969577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156118a257600080fd5b505af11580156118b6573d6000803e3d6000fd5b5050505061096982826135d4565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806118f6600284613b4c565b509392505050565b60006114bf82604051806060016040528060298152602001615ec06029913960029190613b6a565b606090565b60006001600160a01b0382166119725760405162461bcd60e51b815260040180806020018281038252602a815260200180615e96602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206114bf906136dd565b8361199c6133cb565b11156119ef576040805162461bcd60e51b815260206004820152600e60248201527f5065726d69742065787069726564000000000000000000000000000000000000604482015290519081900360640190fd5b60006119f96114e9565b7f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad8888611a2581613b77565b604080516020808201969096526001600160a01b03909416848201526060840192909252608083015260a08083018a90528151808403909101815260c0830182528051908401207f190100000000000000000000000000000000000000000000000000000000000060e084015260e283019490945261010280830194909452805180830390940184526101229091019052815191012090506000611ac8876118fe565b9050806001600160a01b0316886001600160a01b03161415611b1b5760405162461bcd60e51b8152600401808060200182810382526027815260200180615dc16027913960400191505060405180910390fd5b611b2481613bb6565b15611cff576040805160208082018790528183018690527fff0000000000000000000000000000000000000000000000000000000000000060f889901b16606083015282516041818403018152606183018085527f1626ba7e0000000000000000000000000000000000000000000000000000000090526065830186815260858401948552815160a585015281516001600160a01b03871695631626ba7e958995919260c59091019185019080838360005b83811015611bee578181015183820152602001611bd6565b50505050905090810190601f168015611c1b5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015611c3957600080fd5b505afa158015611c4d573d6000803e3d6000fd5b505050506040513d6020811015611c6357600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e0000000000000000000000000000000000000000000000000000000014611cfa576040805162461bcd60e51b815260206004820152600c60248201527f556e617574686f72697a65640000000000000000000000000000000000000000604482015290519081900360640190fd5b611e2b565b600060018387878760405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611d5b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611dc3576040805162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015290519081900360640190fd5b816001600160a01b0316816001600160a01b031614611e29576040805162461bcd60e51b815260206004820152600c60248201527f556e617574686f72697a65640000000000000000000000000000000000000000604482015290519081900360640190fd5b505b611e3588886132ab565b5050505050505050565b60008060008084610140013580611e546133cb565b1115611ea7576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b604080516101408101909152600090611f739080611ec860208b018b615103565b6001600160a01b03168152602001896020016020810190611ee99190615103565b6001600160a01b03168152602001611f0760608b0160408c016156ff565b62ffffff168152306020820152604001611f2760808b0160608c0161543f565b60020b8152602001611f3f60a08b0160808c0161543f565b60020b81526020018960a0013581526020018960c0013581526020018960e0013581526020018961010001358152506136e8565b92975090955093509050611fe7611f9261014089016101208a01615103565b600d80547fffffffffffffffffffff000000000000000000000000000000000000000000008116600175ffffffffffffffffffffffffffffffffffffffffffff92831690810190921617909155975087613bbc565b600061201230611ffd60808b0160608c0161543f565b61200d60a08c0160808d0161543f565b6134cb565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b8152600401612043919061598a565b60a06040518083038186803b15801561205b57600080fd5b505afa15801561206f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120939190615605565b50509250925050600061210c8560405180606001604052808e60000160208101906120be9190615103565b6001600160a01b031681526020018e60200160208101906120df9190615103565b6001600160a01b031681526020018e604001602081019061210091906156ff565b62ffffff169052613cea565b905060405180610140016040528060006bffffffffffffffffffffffff16815260200160006001600160a01b031681526020018269ffffffffffffffffffff1681526020018c6060016020810190612164919061543f565b60020b815260200161217c60a08e0160808f0161543f565b60020b81526020018a6001600160801b0316815260200184815260200183815260200160006001600160801b0316815260200160006001600160801b0316815250600c60008c815260200190815260200160002060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160006101000a81548169ffffffffffffffffffff021916908369ffffffffffffffffffff160217905550606082015181600101600a6101000a81548162ffffff021916908360020b62ffffff160217905550608082015181600101600d6101000a81548162ffffff021916908360020b62ffffff16021790555060a08201518160010160106101000a8154816001600160801b0302191690836001600160801b0316021790555060c0820151816002015560e082015181600301556101008201518160040160006101000a8154816001600160801b0302191690836001600160801b031602179055506101208201518160040160106101000a8154816001600160801b0302191690836001600160801b03160217905550905050897f3067048beee31b25b2f1681f88dac838c8bba36af25bfb2b7cf7473a5847e35f8a8a8a60405161238b93929190615b5e565b60405180910390a25050505050509193509193565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108325780601f1061080757610100808354040283529160200191610832565b600061240f828401846154fe565b905061243f7f00000000000000000000000000000000000000000000000000000000000000008260000151613e3a565b50841561245a57805151602082015161245a91903388613e5d565b83156124785761247881600001516020015182602001513387613e5d565b5050505050565b6000818152600c6020908152604080832081516101408101835281546bffffffffffffffffffffffff811682526001600160a01b036c010000000000000000000000009091041693810193909352600181015469ffffffffffffffffffff81169284018390526a01000000000000000000008104600290810b810b810b6060860152600160681b8204810b810b810b60808601526001600160801b03600160801b92839004811660a08701529083015460c0860152600383015460e0860152600490920154808316610100860152041661012083015282918291829182918291829182918291829182918291906125885760405162461bcd60e51b815260040161086390615ab0565b6000600b6000836040015169ffffffffffffffffffff1669ffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160149054906101000a900462ffffff1662ffffff1662ffffff1681525050905081600001518260200151826000015183602001518460400151866060015187608001518860a001518960c001518a60e001518b61010001518c61012001519d509d509d509d509d509d509d509d509d509d509d509d50505091939597999b5091939597999b565b6126b66132a7565b6001600160a01b0316826001600160a01b0316141561271c576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b80600560006127296132a7565b6001600160a01b0390811682526020808301939093526040918201600090812091871680825291909352912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169215159290921790915561278b6132a7565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201529051600019916001600160a01b0389169163dd62ed3e91604480820192602092909190829003018186803b15801561283b57600080fd5b505afa15801561284f573d6000803e3d6000fd5b505050506040513d602081101561286557600080fd5b5051101561287b5761287b868686868686611691565b505050505050565b60608167ffffffffffffffff8111801561289c57600080fd5b506040519080825280602002602001820160405280156128d057816020015b60608152602001906001900390816128bb5790505b50905060005b828110156129bc57600080308686858181106128ee57fe5b90506020028101906129009190615c50565b60405161290e929190615833565b600060405180830381855af49150503d8060008114612949576040519150601f19603f3d011682016040523d82523d6000602084013e61294e565b606091505b50915091508161299a5760448151101561296757600080fd5b60048101905080806020019051810190612981919061545b565b60405162461bcd60e51b815260040161086391906159d2565b808484815181106129a757fe5b602090810291909101015250506001016128d6565b5092915050565b6129d46129ce6132a7565b8361332f565b612a0f5760405162461bcd60e51b8152600401808060200182810382526031815260200180615f556031913960400191505060405180910390fd5b612a1b84848484613fed565b50505050565b604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152905186916001600160a01b0389169163dd62ed3e91604480820192602092909190829003018186803b158015612a8957600080fd5b505afa158015612a9d573d6000803e3d6000fd5b505050506040513d6020811015612ab357600080fd5b5051101561287b5761287b868686868686612cf1565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060612af88261329a565b612b0157600080fd5b6040517fe9dc63750000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e9dc637590612b689030908690600401615993565b60006040518083038186803b158015612b8057600080fd5b505afa158015612b94573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114bf919081019061545b565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612c2f57600080fd5b505afa158015612c43573d6000803e3d6000fd5b505050506040513d6020811015612c5957600080fd5b5051905082811015612cb2576040805162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e7420746f6b656e0000000000000000000000000000604482015290519081900360640190fd5b8015612a1b57612a1b84838361403f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b604080517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c4810183905290516001600160a01b0388169163d505accf9160e480830192600092919082900301818387803b15801561172457600080fd5b6000808235612d8b338261332f565b612da75760405162461bcd60e51b8152600401610863906159e5565b6000612db960608601604087016155bb565b6001600160801b03161180612de657506000612ddb60808601606087016155bb565b6001600160801b0316115b612def57600080fd5b600080612e026040870160208801615103565b6001600160a01b031614612e2557612e206040860160208701615103565b612e27565b305b85356000908152600c6020908152604080832060018082015469ffffffffffffffffffff168552600b8452828520835160608101855281546001600160a01b039081168252919092015490811694820194909452600160a01b90930462ffffff169183019190915292935090612ebd7f0000000000000000000000000000000000000000000000000000000000000000836133cf565b600484015460018501549192506001600160801b0380821692600160801b92839004821692900416156130da5760018501546040517fa34123a70000000000000000000000000000000000000000000000000000000081526001600160a01b0385169163a34123a791612f54916a01000000000000000000008104600290810b92600160681b909204900b906000906004016159ac565b6040805180830381600087803b158015612f6d57600080fd5b505af1158015612f81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa59190615755565b5050600185015460009081906001600160a01b0386169063514ea4bf90612fea9030906a01000000000000000000008104600290810b91600160681b9004900b6134cb565b6040518263ffffffff1660e01b8152600401613006919061598a565b60a06040518083038186803b15801561301e57600080fd5b505afa158015613032573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130569190615605565b50509250925050613092876002015483038860010160109054906101000a90046001600160801b03166001600160801b0316600160801b613525565b840193506130cb876003015482038860010160109054906101000a90046001600160801b03166001600160801b0316600160801b613525565b60028801929092556003870155015b6000806001600160801b0384166130f760608e0160408f016155bb565b6001600160801b03161161311a5761311560608d0160408e016155bb565b61311c565b835b836001600160801b03168d606001602081019061313991906155bb565b6001600160801b03161161315c5761315760808e0160608f016155bb565b61315e565b835b60018901546040517f4f1eb3d80000000000000000000000000000000000000000000000000000000081529294509092506001600160a01b03871691634f1eb3d8916131d1918c916a01000000000000000000008104600290810b92600160681b909204900b908890889060040161589a565b6040805180830381600087803b1580156131ea57600080fd5b505af11580156131fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061322291906155d7565b6004890180546fffffffffffffffffffffffffffffffff196001600160801b03918216600160801b878a0384160217168689038216179091556040519281169d50169a508c35907f40d0efd1a53d60ecbf40971b9daf7dc90178c3aadc7aab1765632738fa8b8f0190610dc4908b90869086906158d7565b60006114bf6002836141cf565b3390565b6000818152600c6020526040902080546bffffffffffffffffffffffff166c010000000000000000000000006001600160a01b0385169081029190911790915581906132f6826118fe565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061333a8261329a565b6133755760405162461bcd60e51b815260040180806020018281038252602c815260200180615e32602c913960400191505060405180910390fd5b6000613380836118fe565b9050806001600160a01b0316846001600160a01b031614806133bb5750836001600160a01b03166133b08461083c565b6001600160a01b0316145b806110f157506110f18185612cc3565b4290565b600081602001516001600160a01b031682600001516001600160a01b0316106133f757600080fd5b50805160208083015160409384015184516001600160a01b0394851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b6bffffffffffffffffffffffff191660a183015260b58201939093527f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e260d5808301919091528251808303909101815260f5909101909152805191012090565b604080516bffffffffffffffffffffffff19606086901b16602080830191909152600285810b60e890811b60348501529085900b901b60378301528251601a818403018152603a90920190925280519101205b9392505050565b600080806000198587098686029250828110908390030390508061355b576000841161355057600080fd5b50829004905061351e565b80841161356757600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b602083106136205780518252601f199092019160209182019101613601565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613682576040519150601f19603f3d011682016040523d82523d6000602084013e613687565b606091505b5050905080610969576040805162461bcd60e51b815260206004820152600360248201527f5354450000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60006114bf826141db565b6000806000806000604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b03168152602001876040015162ffffff16815250905061375a7f0000000000000000000000000000000000000000000000000000000000000000826133cf565b91506000826001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561379757600080fd5b505afa1580156137ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137cf9190615666565b505050505050905060006137e688608001516141df565b905060006137f78960a001516141df565b905061380e8383838c60c001518d60e0015161452d565b9750505050816001600160a01b0316633c8a7d8d876060015188608001518960a00151896040518060400160405280888152602001336001600160a01b03168152506040516020016138609190615b1e565b6040516020818303038152906040526040518663ffffffff1660e01b815260040161388f959493929190615857565b6040805180830381600087803b1580156138a857600080fd5b505af11580156138bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138e09190615755565b610100880151919550935084108015906138ff57508561012001518310155b61391b5760405162461bcd60e51b815260040161086390615a79565b509193509193565b826001600160a01b0316613936826118fe565b6001600160a01b03161461397b5760405162461bcd60e51b8152600401808060200182810382526029815260200180615f0b6029913960400191505060405180910390fd5b6001600160a01b0382166139c05760405162461bcd60e51b8152600401808060200182810382526024815260200180615de86024913960400191505060405180910390fd5b6139cb838383610969565b6139d66000826132ab565b6001600160a01b03831660009081526001602052604090206139f890826145f1565b506001600160a01b0382166000908152600160205260409020613a1b90826145fd565b50613a2860028284614609565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006114bc838361461f565b4690565b6000613a8a826118fe565b9050613a9881600084610969565b613aa36000836132ab565b6000828152600860205260409020546002600019610100600184161502019091160415613ae1576000828152600860205260408120613ae191615073565b6001600160a01b0381166000908152600160205260409020613b0390836145f1565b50613b0f600283614683565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080613b5b868661468f565b909450925050505b9250929050565b60006110f184848461470a565b6000908152600c6020526040902080546bffffffffffffffffffffffff19811660016bffffffffffffffffffffffff9283169081019092161790915590565b3b151590565b6001600160a01b038216613c17576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b613c208161329a565b15613c72576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b613c7e60008383610969565b6001600160a01b0382166000908152600160205260409020613ca090826145fd565b50613cad60028284614609565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0382166000908152600a602052604090205469ffffffffffffffffffff16806114bf5750600d8054600169ffffffffffffffffffff76010000000000000000000000000000000000000000000080840482168381019092160275ffffffffffffffffffffffffffffffffffffffffffff909316929092179092556001600160a01b038085166000908152600a6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffff000000000000000000001686179055848352600b825291829020865181549085167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617825591870151950180549287015162ffffff16600160a01b027fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff969094169290911691909117939093161790915592915050565b6000613e4683836133cf565b9050336001600160a01b038216146114bf57600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316148015613e9e5750804710155b15613fc0577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015613efe57600080fd5b505af1158015613f12573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015613f8e57600080fd5b505af1158015613fa2573d6000803e3d6000fd5b505050506040513d6020811015613fb857600080fd5b50612a1b9050565b6001600160a01b038316301415613fe157613fdc84838361403f565b612a1b565b612a1b848484846147d4565b613ff8848484613923565b6140048484848461496c565b612a1b5760405162461bcd60e51b8152600401808060200182810382526032815260200180615d8f6032913960400191505060405180910390fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251825160009485949389169392918291908083835b602083106140e95780518252601f1990920191602091820191016140ca565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461414b576040519150601f19603f3d011682016040523d82523d6000602084013e614150565b606091505b509150915081801561417e57508051158061417e575080806020019051602081101561417b57600080fd5b50515b612478576040805162461bcd60e51b815260206004820152600260248201527f5354000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60006114bc8383614b48565b5490565b60008060008360020b126141f6578260020b6141fe565b8260020b6000035b9050620d89e8811115614258576040805162461bcd60e51b815260206004820152600160248201527f5400000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60006001821661426c57600160801b61427e565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff16905060028216156142b2576ffff97272373d413259a46990580e213a0260801c5b60048216156142d1576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b60088216156142f0576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b601082161561430f576fffcb9843d60f6159c9db58835c9266440260801c5b602082161561432e576fff973b41fa98c081472e6896dfb254c00260801c5b604082161561434d576fff2ea16466c96a3843ec78b326b528610260801c5b608082161561436c576ffe5dee046a99a2a811c461f1969c30530260801c5b61010082161561438c576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b6102008216156143ac576ff987a7253ac413176f2b074cf7815e540260801c5b6104008216156143cc576ff3392b0822b70005940c7a398e4b70f30260801c5b6108008216156143ec576fe7159475a2c29b7443b29c7fa6e889d90260801c5b61100082161561440c576fd097f3bdfd2022b8845ad8f792aa58250260801c5b61200082161561442c576fa9f746462d870fdf8a65dc1f90e061e50260801c5b61400082161561444c576f70d869a156d2a1b890bb3df62baf32f70260801c5b61800082161561446c576f31be135f97d08fd981231505542fcfa60260801c5b6201000082161561448d576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b620200008216156144ad576e5d6af8dedb81196699c329225ee6040260801c5b620400008216156144cc576d2216e584f5fa1ea926041bedfe980260801c5b620800008216156144e9576b048a170391f7dc42444e8fa20260801c5b60008460020b131561450457806000198161450057fe5b0490505b64010000000081061561451857600161451b565b60005b60ff16602082901c0192505050919050565b6000836001600160a01b0316856001600160a01b0316111561454d579293925b846001600160a01b0316866001600160a01b03161161457857614571858585614b60565b90506145e8565b836001600160a01b0316866001600160a01b031610156145da57600061459f878686614b60565b905060006145ae878986614bcc565b9050806001600160801b0316826001600160801b0316106145cf57806145d1565b815b925050506145e8565b6145e5858584614bcc565b90505b95945050505050565b60006114bc8383614c12565b60006114bc8383614cd8565b60006110f184846001600160a01b038516614d22565b815460009082106146615760405162461bcd60e51b8152600401808060200182810382526022815260200180615d6d6022913960400191505060405180910390fd5b82600001828154811061467057fe5b9060005260206000200154905092915050565b60006114bc8383614db9565b8154600090819083106146d35760405162461bcd60e51b8152600401808060200182810382526022815260200180615ee96022913960400191505060405180910390fd5b60008460000184815481106146e457fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816147a55760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561476a578181015183820152602001614752565b50505050905090810190601f1680156147975780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508460000160018203815481106147b857fe5b9060005260206000209060020201600101549150509392505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000178152925182516000948594938a169392918291908083835b602083106148865780518252601f199092019160209182019101614867565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146148e8576040519150601f19603f3d011682016040523d82523d6000602084013e6148ed565b606091505b509150915081801561491b57508051158061491b575080806020019051602081101561491857600080fd5b50515b61287b576040805162461bcd60e51b815260206004820152600360248201527f5354460000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000614980846001600160a01b0316613bb6565b61498c575060016110f1565b6000614add7f150b7a02000000000000000000000000000000000000000000000000000000006149ba6132a7565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614a21578181015183820152602001614a09565b50505050905090810190601f168015614a4e5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051806060016040528060328152602001615d8f603291396001600160a01b0388169190614e8d565b90506000818060200190516020811015614af657600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001492505050949350505050565b60009081526001919091016020526040902054151590565b6000826001600160a01b0316846001600160a01b03161115614b80579192915b6000614bac856001600160a01b0316856001600160a01b03166c01000000000000000000000000613525565b90506145e8614bc784838888036001600160a01b0316613525565b614e9c565b6000826001600160a01b0316846001600160a01b03161115614bec579192915b6110f1614bc7836c010000000000000000000000008787036001600160a01b0316613525565b60008181526001830160205260408120548015614cce5783546000198083019190810190600090879083908110614c4557fe5b9060005260206000200154905080876000018481548110614c6257fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080614c9257fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506114bf565b60009150506114bf565b6000614ce48383614b48565b614d1a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556114bf565b5060006114bf565b600082815260018401602052604081205480614d8757505060408051808201825283815260208082018481528654600181810189556000898152848120955160029093029095019182559151908201558654868452818801909252929091205561351e565b82856000016001830381548110614d9a57fe5b906000526020600020906002020160010181905550600091505061351e565b60008181526001830160205260408120548015614cce5783546000198083019190810190600090879083908110614dec57fe5b9060005260206000209060020201905080876000018481548110614e0c57fe5b600091825260208083208454600290930201918255600193840154918401919091558354825289830190526040902090840190558654879080614e4b57fe5b60008281526020808220600260001990940193840201828155600190810183905592909355888152898201909252604082209190915594506114bf9350505050565b60606110f18484600085614eb2565b806001600160801b03811681146107a157600080fd5b606082471015614ef35760405162461bcd60e51b8152600401808060200182810382526026815260200180615e0c6026913960400191505060405180910390fd5b614efc85613bb6565b614f4d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310614f8b5780518252601f199092019160209182019101614f6c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614fed576040519150601f19603f3d011682016040523d82523d6000602084013e614ff2565b606091505b509150915061500282828661500d565b979650505050505050565b6060831561501c57508161351e565b82511561502c5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561476a578181015183820152602001614752565b50805460018160011615610100020316600290046000825580601f1061509957506150b7565b601f0160209004906000526020600020908101906150b791906150ba565b50565b5b808211156150cf57600081556001016150bb565b5090565b80356107a181615d25565b805161ffff811681146107a157600080fd5b803562ffffff811681146107a157600080fd5b600060208284031215615114578081fd5b813561351e81615d25565b60008060408385031215615131578081fd5b823561513c81615d25565b9150602083013561514c81615d25565b809150509250929050565b6000806000806080858703121561516c578182fd5b843561517781615d25565b9350602085013561518781615d25565b9250615195604086016150f0565b915060608501356151a581615d25565b939692955090935050565b6000806000606084860312156151c4578081fd5b83356151cf81615d25565b925060208401356151df81615d25565b929592945050506040919091013590565b60008060008060808587031215615205578182fd5b843561521081615d25565b9350602085013561522081615d25565b925060408501359150606085013567ffffffffffffffff811115615242578182fd5b8501601f81018713615252578182fd5b803561526561526082615cd7565b615cb3565b818152886020838501011115615279578384fd5b81602084016020830137908101602001929092525092959194509250565b600080604083850312156152a9578182fd5b82356152b481615d25565b9150602083013561514c81615d3a565b600080604083850312156152d6578182fd5b82356152e181615d25565b946020939093013593505050565b600080600060608486031215615303578081fd5b833561530e81615d25565b925060208401359150604084013561532581615d25565b809150509250925092565b60008060008060008060c08789031215615348578384fd5b863561535381615d25565b95506020870135945060408701359350606087013560ff81168114615376578283fd5b9598949750929560808101359460a0909101359350915050565b600080602083850312156153a2578182fd5b823567ffffffffffffffff808211156153b9578384fd5b818501915085601f8301126153cc578384fd5b8135818111156153da578485fd5b86602080830285010111156153ed578485fd5b60209290920196919550909350505050565b600060208284031215615410578081fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461351e578182fd5b600060208284031215615450578081fd5b813561351e81615d48565b60006020828403121561546c578081fd5b815167ffffffffffffffff811115615482578182fd5b8201601f81018413615492578182fd5b80516154a061526082615cd7565b8181528560208385010111156154b4578384fd5b6145e8826020830160208601615cf9565b6000608082840312156154d6578081fd5b50919050565b600060a082840312156154d6578081fd5b600060c082840312156154d6578081fd5b60008183036080811215615510578182fd5b6040516040810167ffffffffffffffff828210818311171561552e57fe5b81604052606084121561553f578485fd5b60a083019350818410818511171561555357fe5b50826040528435925061556583615d25565b91825260208401359161557783615d25565b826060830152615589604086016150f0565b6080830152815261559c606085016150d3565b6020820152949350505050565b600061016082840312156154d6578081fd5b6000602082840312156155cc578081fd5b813561351e81615d57565b600080604083850312156155e9578182fd5b82516155f481615d57565b602084015190925061514c81615d57565b600080600080600060a0868803121561561c578283fd5b855161562781615d57565b809550506020860151935060408601519250606086015161564781615d57565b608087015190925061565881615d57565b809150509295509295909350565b600080600080600080600060e0888a031215615680578485fd5b875161568b81615d25565b602089015190975061569c81615d48565b95506156aa604089016150de565b94506156b8606089016150de565b93506156c6608089016150de565b925060a088015163ffffffff811681146156de578182fd5b60c08901519092506156ef81615d3a565b8091505092959891949750929550565b600060208284031215615710578081fd5b6114bc826150f0565b60006020828403121561572a578081fd5b5035919050565b60008060408385031215615743578182fd5b82359150602083013561514c81615d25565b60008060408385031215615767578182fd5b505080516020909101519092909150565b6000806000806060858703121561578d578182fd5b8435935060208501359250604085013567ffffffffffffffff808211156157b2578384fd5b818701915087601f8301126157c5578384fd5b8135818111156157d3578485fd5b8860208285010111156157e4578485fd5b95989497505060200194505050565b6000815180845261580b816020860160208601615cf9565b601f01601f19169290920160200192915050565b60020b9052565b6001600160801b03169052565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b60006001600160a01b03871682528560020b60208301528460020b60408301526001600160801b038416606083015260a0608083015261500260a08301846157f3565b6001600160a01b03959095168552600293840b60208601529190920b60408401526001600160801b03918216606084015216608082015260a00190565b6001600160a01b039390931683526001600160801b03918216602084015216604082015260600190565b6000602080830181845280855180835260408601915060408482028701019250838701855b82811015615972577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526159608583516157f3565b94509285019290850190600101615926565b5092979650505050505050565b901515815260200190565b90815260200190565b6001600160a01b03929092168252602082015260400190565b600293840b81529190920b60208201526001600160801b03909116604082015260600190565b6000602082526114bc60208301846157f3565b6020808252600c908201527f4e6f7420617070726f7665640000000000000000000000000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b60208082526014908201527f507269636520736c69707061676520636865636b000000000000000000000000604082015260600190565b60208082526010908201527f496e76616c696420746f6b656e20494400000000000000000000000000000000604082015260600190565b6020808252600b908201527f4e6f7420636c6561726564000000000000000000000000000000000000000000604082015260600190565b815180516001600160a01b03908116835260208083015182168185015260409283015162ffffff1692840192909252920151909116606082015260800190565b6001600160801b039390931683526020830191909152604082015260600190565b9384526001600160801b039290921660208401526040830152606082015260800190565b918252602082015260400190565b6bffffffffffffffffffffffff8d1681526001600160a01b038c811660208301528b811660408301528a16606082015262ffffff89166080820152600288900b60a08201526101808101615c0860c083018961581f565b615c1560e0830188615826565b8561010083015284610120830152615c31610140830185615826565b615c3f610160830184615826565b9d9c50505050505050505050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615c84578283fd5b83018035915067ffffffffffffffff821115615c9e578283fd5b602001915036819003821315613b6357600080fd5b60405181810167ffffffffffffffff81118282101715615ccf57fe5b604052919050565b600067ffffffffffffffff821115615ceb57fe5b50601f01601f191660200190565b60005b83811015615d14578181015183820152602001615cfc565b83811115612a1b5750506000910152565b6001600160a01b03811681146150b757600080fd5b80151581146150b757600080fd5b8060020b81146150b757600080fd5b6001600160801b03811681146150b757600080fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732315065726d69743a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a164736f6c6343000706000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3Factory.json b/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3Factory.json new file mode 100644 index 00000000..075fe12f --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3Factory.json @@ -0,0 +1,459 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PancakeV3Factory", + "sourceName": "contracts/PancakeV3Factory.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_poolDeployer", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "indexed": true, + "internalType": "int24", + "name": "tickSpacing", + "type": "int24" + } + ], + "name": "FeeAmountEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "indexed": false, + "internalType": "bool", + "name": "whitelistRequested", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "FeeAmountExtraInfoUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "indexed": false, + "internalType": "int24", + "name": "tickSpacing", + "type": "int24" + }, + { + "indexed": false, + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "PoolCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "lmPoolDeployer", + "type": "address" + } + ], + "name": "SetLmPoolDeployer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "verified", + "type": "bool" + } + ], + "name": "WhiteListAdded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint128", + "name": "amount0Requested", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1Requested", + "type": "uint128" + } + ], + "name": "collectProtocol", + "outputs": [ + { + "internalType": "uint128", + "name": "amount0", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1", + "type": "uint128" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + } + ], + "name": "createPool", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "int24", + "name": "tickSpacing", + "type": "int24" + } + ], + "name": "enableFeeAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint24", + "name": "", + "type": "uint24" + } + ], + "name": "feeAmountTickSpacing", + "outputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint24", + "name": "", + "type": "uint24" + } + ], + "name": "feeAmountTickSpacingExtraInfo", + "outputs": [ + { + "internalType": "bool", + "name": "whitelistRequested", + "type": "bool" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint24", + "name": "", + "type": "uint24" + } + ], + "name": "getPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lmPoolDeployer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolDeployer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "bool", + "name": "whitelistRequested", + "type": "bool" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "setFeeAmountExtraInfo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint32", + "name": "feeProtocol0", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "feeProtocol1", + "type": "uint32" + } + ], + "name": "setFeeProtocol", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "lmPool", + "type": "address" + } + ], + "name": "setLmPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_lmPoolDeployer", + "type": "address" + } + ], + "name": "setLmPoolDeployer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bool", + "name": "verified", + "type": "bool" + } + ], + "name": "setWhiteListAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60a060405234801561001057600080fd5b506040516118753803806118758339818101604052602081101561003357600080fd5b50516001600160601b0319606082901b16608052600080546001600160a01b0319163390811782556040519091907fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c908290a37f1bd07f61ef326b4de236f5b68f225f46ff76ee2c375ae31a06da201c49c70c12805462ffffff19166001908117909155604080518082018252600080825260208281018581526064808452600390925292517f6b16ef514f22b74729cbea5cc7babfecbdc2309e530ca716643d11fe929eed2e8054945115156101000261ff001992151560ff199096169590951791909116939093179092559151909160008051602061183583398151915291a36040805160008152600160208201528151606492600080516020611855833981519152928290030190a27f344a86d038cc67650617710ee5afca4f5d1ed60d199ecd86852cac7a55b2d3e5805462ffffff1916600a9081179091556040805180820182526000808252600160208381019182526101f4808452600390915292517f5ed261ce397475c8f8ccd7526f550ae383248415591df3d1b32ee25c9ab0af2e8054925115156101000261ff001992151560ff1990941693909317919091169190911790559151909160008051602061183583398151915291a360408051600081526001602082015281516101f492600080516020611855833981519152928290030190a27f18ea07d45b61092cf379823b7e255753fc01638d9bcaaef647c0748469d0c8cb805462ffffff191660329081179091556040805180820182526000808252600160208381019182526109c4808452600390915292517f2cb06da9fad5bc9043c9933b28e89aaba34d84764c67113fa1d4256f6b23f7558054925115156101000261ff001992151560ff1990941693909317919091169190911790559151909160008051602061183583398151915291a360408051600081526001602082015281516109c492600080516020611855833981519152928290030190a27f1ca239af1d44623dfaa87ee0cbbbe4bbeb2112df36e66deedafd694350d045cd805462ffffff191660c8908117909155604080518082018252600080825260016020838101918252612710808452600390915292517fbed90d45c8c5fb2e8fcae0027c6e57da3d943cdb82d794c1080bce28e166f2118054925115156101000261ff001992151560ff1990941693909317919091169190911790559151909160008051602061183583398151915291a3604080516000815260016020820152815161271092600080516020611855833981519152928290030190a25060805160601c61141f610416600039806106f352806110db525061141f6000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80637e8435e6116100975780638da5cb5b116100665780638da5cb5b146103a55780638ff38e80146103ad578063a1671295146103df578063e4a86a9914610428576100f5565b80637e8435e6146102c357806380d6a7921461030a57806388e8006d1461033d5780638a7c195f1461037a576100f5565b806322afcccb116100d357806322afcccb146101dc5780633119049a1461021557806343db87da1461021d5780635e492ac8146102bb576100f5565b806311ff5e8d146100fa57806313af4035146101375780631698ee821461016a575b600080fd5b6101356004803603604081101561011057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610463565b005b6101356004803603602081101561014d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610590565b6101b36004803603606081101561018057600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff908116916020810135909116906040013562ffffff166106a3565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101fe600480360360208110156101f257600080fd5b503562ffffff166106dc565b6040805160029290920b8252519081900360200190f35b6101b36106f1565b61027a6004803603608081101561023357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906fffffffffffffffffffffffffffffffff60408201358116916060013516610715565b60405180836fffffffffffffffffffffffffffffffff168152602001826fffffffffffffffffffffffffffffffff1681526020019250505060405180910390f35b6101b361086b565b610135600480360360608110156102d957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169063ffffffff60208201358116916040013516610887565b6101356004803603602081101561032057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109a5565b61035f6004803603602081101561035357600080fd5b503562ffffff16610a9a565b60408051921515835290151560208301528051918290030190f35b6101356004803603604081101561039057600080fd5b5062ffffff813516906020013560020b610ab8565b6101b3610cc3565b610135600480360360608110156103c357600080fd5b5062ffffff813516906020810135151590604001351515610cdf565b6101b3600480360360608110156103f557600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff908116916020810135909116906040013562ffffff16610e50565b6101356004803603604081101561043e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001351515611234565b60005473ffffffffffffffffffffffffffffffffffffffff163314806104a0575060055473ffffffffffffffffffffffffffffffffffffffff1633145b61050b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e6f74206f776e6572206f72204c4d20706f6f6c206465706c6f796572000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff1663cc7e7fa2826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561057457600080fd5b505af1158015610588573d6000803e3d6000fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461061657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600260209081526000938452604080852082529284528284209052825290205473ffffffffffffffffffffffffffffffffffffffff1681565b60016020526000908152604090205460020b81565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008054819073ffffffffffffffffffffffffffffffffffffffff16331461079e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b604080517f85b6672900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301526fffffffffffffffffffffffffffffffff8088166024840152861660448301528251908916926385b6672992606480820193918290030181600087803b15801561082b57600080fd5b505af115801561083f573d6000803e3d6000fd5b505050506040513d604081101561085557600080fd5b5080516020909101519097909650945050505050565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461090d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b604080517fb0d0d21100000000000000000000000000000000000000000000000000000000815263ffffffff808516600483015283166024820152905173ffffffffffffffffffffffffffffffffffffffff85169163b0d0d21191604480830192600092919082900301818387803b15801561098857600080fd5b505af115801561099c573d6000803e3d6000fd5b50505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a2b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c912280cda47bed324de14f601d3f125a98254671772f3f1f491e50fa0ca40790600090a250565b60036020526000908152604090205460ff8082169161010090041682565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b3e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b620f42408262ffffff1610610b5257600080fd5b60008160020b138015610b6957506140008160020b125b610b7257600080fd5b62ffffff8216600090815260016020526040902054600290810b900b15610b9857600080fd5b62ffffff828116600081815260016020818152604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000016600289900b9788161790558051808201825284815280830193845285855260039092528084209151825493517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909416901515177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010093151593909302929092179055517fc66a3fdf07232cdd185febcc6579d408c241b47ae2f9907d84be655141eeaecc9190a3604080516000815260016020820152815162ffffff8516927fed85b616dbfbc54d0f1180a7bd0f6e3bb645b269b234e7a9edcc269ef1443d88928290030190a25050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d6557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b62ffffff8316600090815260016020526040902054600290810b900b610d8a57600080fd5b604080518082018252831515808252831515602080840182815262ffffff89166000818152600384528790209551865492511515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009094169390931716919091179094558451928352820152825191927fed85b616dbfbc54d0f1180a7bd0f6e3bb645b269b234e7a9edcc269ef1443d8892918290030190a2505050565b60008273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610e8b57600080fd5b6000808473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1610610ec8578486610ecb565b85855b909250905073ffffffffffffffffffffffffffffffffffffffff8216610ef057600080fd5b62ffffff8416600090815260016020908152604080832054600383529281902081518083019092525460ff8082161515835261010090910416151591810191909152600291820b9182900b15801590610f4a575080602001515b610fb557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f666565206973206e6f7420617661696c61626c65207965740000000000000000604482015290519081900360640190fd5b805115611024573360009081526004602052604090205460ff16611024576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806113e16032913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84811660009081526002602090815260408083208785168452825280832062ffffff8b168452909152902054161561107057600080fd5b604080517ffad5359f00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152858116604483015262ffffff89166064830152600285900b608483015291517f00000000000000000000000000000000000000000000000000000000000000009092169163fad5359f9160a4808201926020929091908290030181600087803b15801561112657600080fd5b505af115801561113a573d6000803e3d6000fd5b505050506040513d602081101561115057600080fd5b505173ffffffffffffffffffffffffffffffffffffffff80861660008181526002602081815260408084208a871680865290835281852062ffffff8f168087529084528286208054988a167fffffffffffffffffffffffff0000000000000000000000000000000000000000998a1681179091558287528585528387208888528552838720828852855295839020805490981686179097558151938a900b8452918301939093528251959a5093947f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118929181900390910190a4505050509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604090205460ff161515811515141561135557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f7374617465206e6f74206368616e676500000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016851515908117909155825190815291517faec42ac7f1bb8651906ae6522f50a19429e124e8ea678ef59fd27750759288a29281900390910190a2505056fe757365722073686f756c6420626520696e20746865207768697465206c69737420666f722074686973206665652074696572a164736f6c6343000706000ac66a3fdf07232cdd185febcc6579d408c241b47ae2f9907d84be655141eeaecced85b616dbfbc54d0f1180a7bd0f6e3bb645b269b234e7a9edcc269ef1443d88", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80637e8435e6116100975780638da5cb5b116100665780638da5cb5b146103a55780638ff38e80146103ad578063a1671295146103df578063e4a86a9914610428576100f5565b80637e8435e6146102c357806380d6a7921461030a57806388e8006d1461033d5780638a7c195f1461037a576100f5565b806322afcccb116100d357806322afcccb146101dc5780633119049a1461021557806343db87da1461021d5780635e492ac8146102bb576100f5565b806311ff5e8d146100fa57806313af4035146101375780631698ee821461016a575b600080fd5b6101356004803603604081101561011057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610463565b005b6101356004803603602081101561014d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610590565b6101b36004803603606081101561018057600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff908116916020810135909116906040013562ffffff166106a3565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101fe600480360360208110156101f257600080fd5b503562ffffff166106dc565b6040805160029290920b8252519081900360200190f35b6101b36106f1565b61027a6004803603608081101561023357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906fffffffffffffffffffffffffffffffff60408201358116916060013516610715565b60405180836fffffffffffffffffffffffffffffffff168152602001826fffffffffffffffffffffffffffffffff1681526020019250505060405180910390f35b6101b361086b565b610135600480360360608110156102d957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169063ffffffff60208201358116916040013516610887565b6101356004803603602081101561032057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109a5565b61035f6004803603602081101561035357600080fd5b503562ffffff16610a9a565b60408051921515835290151560208301528051918290030190f35b6101356004803603604081101561039057600080fd5b5062ffffff813516906020013560020b610ab8565b6101b3610cc3565b610135600480360360608110156103c357600080fd5b5062ffffff813516906020810135151590604001351515610cdf565b6101b3600480360360608110156103f557600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff908116916020810135909116906040013562ffffff16610e50565b6101356004803603604081101561043e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001351515611234565b60005473ffffffffffffffffffffffffffffffffffffffff163314806104a0575060055473ffffffffffffffffffffffffffffffffffffffff1633145b61050b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e6f74206f776e6572206f72204c4d20706f6f6c206465706c6f796572000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff1663cc7e7fa2826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561057457600080fd5b505af1158015610588573d6000803e3d6000fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461061657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600260209081526000938452604080852082529284528284209052825290205473ffffffffffffffffffffffffffffffffffffffff1681565b60016020526000908152604090205460020b81565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008054819073ffffffffffffffffffffffffffffffffffffffff16331461079e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b604080517f85b6672900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301526fffffffffffffffffffffffffffffffff8088166024840152861660448301528251908916926385b6672992606480820193918290030181600087803b15801561082b57600080fd5b505af115801561083f573d6000803e3d6000fd5b505050506040513d604081101561085557600080fd5b5080516020909101519097909650945050505050565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461090d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b604080517fb0d0d21100000000000000000000000000000000000000000000000000000000815263ffffffff808516600483015283166024820152905173ffffffffffffffffffffffffffffffffffffffff85169163b0d0d21191604480830192600092919082900301818387803b15801561098857600080fd5b505af115801561099c573d6000803e3d6000fd5b50505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a2b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c912280cda47bed324de14f601d3f125a98254671772f3f1f491e50fa0ca40790600090a250565b60036020526000908152604090205460ff8082169161010090041682565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b3e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b620f42408262ffffff1610610b5257600080fd5b60008160020b138015610b6957506140008160020b125b610b7257600080fd5b62ffffff8216600090815260016020526040902054600290810b900b15610b9857600080fd5b62ffffff828116600081815260016020818152604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000016600289900b9788161790558051808201825284815280830193845285855260039092528084209151825493517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909416901515177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010093151593909302929092179055517fc66a3fdf07232cdd185febcc6579d408c241b47ae2f9907d84be655141eeaecc9190a3604080516000815260016020820152815162ffffff8516927fed85b616dbfbc54d0f1180a7bd0f6e3bb645b269b234e7a9edcc269ef1443d88928290030190a25050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d6557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b62ffffff8316600090815260016020526040902054600290810b900b610d8a57600080fd5b604080518082018252831515808252831515602080840182815262ffffff89166000818152600384528790209551865492511515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009094169390931716919091179094558451928352820152825191927fed85b616dbfbc54d0f1180a7bd0f6e3bb645b269b234e7a9edcc269ef1443d8892918290030190a2505050565b60008273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610e8b57600080fd5b6000808473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1610610ec8578486610ecb565b85855b909250905073ffffffffffffffffffffffffffffffffffffffff8216610ef057600080fd5b62ffffff8416600090815260016020908152604080832054600383529281902081518083019092525460ff8082161515835261010090910416151591810191909152600291820b9182900b15801590610f4a575080602001515b610fb557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f666565206973206e6f7420617661696c61626c65207965740000000000000000604482015290519081900360640190fd5b805115611024573360009081526004602052604090205460ff16611024576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806113e16032913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84811660009081526002602090815260408083208785168452825280832062ffffff8b168452909152902054161561107057600080fd5b604080517ffad5359f00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152858116604483015262ffffff89166064830152600285900b608483015291517f00000000000000000000000000000000000000000000000000000000000000009092169163fad5359f9160a4808201926020929091908290030181600087803b15801561112657600080fd5b505af115801561113a573d6000803e3d6000fd5b505050506040513d602081101561115057600080fd5b505173ffffffffffffffffffffffffffffffffffffffff80861660008181526002602081815260408084208a871680865290835281852062ffffff8f168087529084528286208054988a167fffffffffffffffffffffffff0000000000000000000000000000000000000000998a1681179091558287528585528387208888528552838720828852855295839020805490981686179097558151938a900b8452918301939093528251959a5093947f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118929181900390910190a4505050509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604090205460ff161515811515141561135557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f7374617465206e6f74206368616e676500000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016851515908117909155825190815291517faec42ac7f1bb8651906ae6522f50a19429e124e8ea678ef59fd27750759288a29281900390910190a2505056fe757365722073686f756c6420626520696e20746865207768697465206c69737420666f722074686973206665652074696572a164736f6c6343000706000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3LmPool.json b/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3LmPool.json new file mode 100644 index 00000000..a9adf4cc --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3LmPool.json @@ -0,0 +1,273 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PancakeV3LmPool", + "sourceName": "contracts/PancakeV3LmPool.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "REWARD_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "currTimestamp", + "type": "uint32" + } + ], + "name": "accumulateReward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + }, + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "name": "checkNegativeFlag", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "tick", + "type": "int24" + }, + { + "internalType": "bool", + "name": "zeroForOne", + "type": "bool" + } + ], + "name": "crossLmTick", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + } + ], + "name": "getRewardGrowthInside", + "outputs": [ + { + "internalType": "uint256", + "name": "rewardGrowthInsideX128", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastRewardTimestamp", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lmLiquidity", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "name": "lmTicks", + "outputs": [ + { + "internalType": "uint128", + "name": "liquidityGross", + "type": "uint128" + }, + { + "internalType": "int128", + "name": "liquidityNet", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "rewardGrowthOutsideX128", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "masterChef", + "outputs": [ + { + "internalType": "contract IMasterChefV3", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + }, + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "name": "negativeRewardGrowthInsideFlag", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + }, + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "name": "negativeRewardGrowthInsideInitValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pool", + "outputs": [ + { + "internalType": "contract IPancakeV3Pool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardGrowthGlobalX128", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "internalType": "int128", + "name": "liquidityDelta", + "type": "int128" + } + ], + "name": "updatePosition", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60c060405234801561001057600080fd5b506000803373ffffffffffffffffffffffffffffffffffffffff1663890357306040518163ffffffff1660e01b8152600401604080518083038186803b15801561005957600080fd5b505afa15801561006d573d6000803e3d6000fd5b505050506040513d604081101561008357600080fd5b810190808051906020019092919080519060200190929190505050915091508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505042600260106101000a81548163ffffffff021916908363ffffffff160217905550505060805160601c60a05160601c6119666101896000398061050152806106285280610891528061094b52508061048852806104ac52806106645280610a0e5280610af55280610cf4528061100752506119666000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063702d75d21161008c578063c3487ff811610066578063c3487ff81461035d578063f8077fae1461038d578063f9461601146103b1578063fcad09fc14610403576100ea565b8063702d75d2146102835780638910faf1146102d5578063a498463314610320576100ea565b806337182c1b116100c857806337182c1b146101ab5780633d6aa5e114610213578063575a86b21461023157806357806ada14610265576100ea565b806306b712bf146100ef57806316f0115b14610143578063214a6fe214610177575b600080fd5b61012b6004803603604081101561010557600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610457565b60405180821515815260200191505060405180910390f35b61014b610486565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a96004803603602081101561018d57600080fd5b81019080803563ffffffff1690602001909291905050506104aa565b005b6101da600480360360208110156101c157600080fd5b81019080803560020b9060200190929190505050610833565b60405180846fffffffffffffffffffffffffffffffff16815260200183600f0b8152602001828152602001935050505060405180910390f35b61021b610886565b6040518082815260200191505060405180910390f35b61023961088f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61026d6108b3565b6040518082815260200191505060405180910390f35b6102bf6004803603604081101561029957600080fd5b81019080803560020b9060200190929190803560020b90602001909291905050506108b9565b6040518082815260200191505060405180910390f35b61031e600480360360608110156102eb57600080fd5b81019080803560020b9060200190929190803560020b90602001909291908035600f0b9060200190929190505050610949565b005b61035b6004803603604081101561033657600080fd5b81019080803560020b9060200190929190803515159060200190929190505050610cf2565b005b610365610e9a565b60405180826fffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610395610ebc565b604051808263ffffffff16815260200191505060405180910390f35b6103ed600480360360408110156103c757600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610ed2565b6040518082815260200191505060405180910390f35b61043f6004803603604081101561041957600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610ef7565b60405180821515815260200191505060405180910390f35b60036020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061054f57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6105c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e6f7420706f6f6c206f72204d4300000000000000000000000000000000000081525060200191505060405180910390fd5b600260109054906101000a900463ffffffff1663ffffffff168163ffffffff16116105eb57610830565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161461080e576000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a15ea89f7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604080518083038186803b1580156106cc57600080fd5b505afa1580156106e0573d6000803e3d6000fd5b505050506040513d60408110156106f657600080fd5b81019080805190602001909291908051906020019092919050505091509150600081905060008463ffffffff168263ffffffff16111561074c57600260109054906101000a900463ffffffff168503905061078b565b600260109054906101000a900463ffffffff1663ffffffff168263ffffffff16111561078a57600260109054906101000a900463ffffffff16820390505b5b60008163ffffffff1614610809576107fa8163ffffffff166107c48670010000000000000000000000000000000064e8d4a51000610f26565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16610f26565b60008082825401925050819055505b505050505b80600260106101000a81548163ffffffff021916908363ffffffff1602179055505b50565b60016020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a9004600f0b908060010154905083565b64e8d4a5100081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005481565b60006108c58383611000565b5080915050600360008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060009054906101000a900460ff161561094357600460008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002054810390505b92915050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a0a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f4e6f74204d43000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b158015610a7257600080fd5b505afa158015610a86573d6000803e3d6000fd5b505050506040513d60e0811015610a9c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050505050505091505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370cf754a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5957600080fd5b505afa158015610b6d573d6000803e3d6000fd5b505050506040513d6020811015610b8357600080fd5b81019080805190602001909291905050509050600080549050600080600086600f0b14610bed57610bc9888688866000896001611289909695949392919063ffffffff16565b9150610bea878688866001896001611289909695949392919063ffffffff16565b90505b8760020b8560020b12158015610c0857508660020b8560020b125b15610c6e57610c35600260009054906101000a90046fffffffffffffffffffffffffffffffff16876114cf565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505b600086600f0b1215610cb1578115610c9557610c9488600161162890919063ffffffff16565b5b8015610cb057610caf87600161162890919063ffffffff16565b5b5b600086600f0b128015610cc957508180610cc85750805b5b15610cdd57610cd88888611695565b610ce8565b610ce78888611761565b5b5050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610db3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4e6f7420706f6f6c00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160008460020b60020b815260200190815260200160002060000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161415610e0b57610e96565b6000610e258360005460016118899092919063ffffffff16565b90508115610e34578060000390505b610e5c600260009054906101000a90046fffffffffffffffffffffffffffffffff16826114cf565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550505b5050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b600260109054906101000a900463ffffffff1681565b6004602052816000526040600020602052806000526040600020600091509150505481565b60056020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b600080600080198587098587029250828110838203039150506000811415610f615760008411610f5557600080fd5b83820492505050610ff9565b808411610f6d57600080fd5b600084868809905082811182039150808303925060008586600003169050808604955080840493506001818260000304019050808302841793506000600287600302189050808702600203810290508087026002038102905080870260020381029050808702600203810290508087026002038102905080870260020381029050808502955050505050505b9392505050565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561106b57600080fd5b505afa15801561107f573d6000803e3d6000fd5b505050506040513d60e081101561109557600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505050505050509150506000600160008760020b60020b81526020019081526020016000206040518060600160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a9004600f0b600f0b600f0b815260200160018201548152505090506000600160008760020b60020b81526020019081526020016000206040518060600160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a9004600f0b600f0b600f0b8152602001600182015481525050905060008760020b8460020b126112375782604001519050611243565b82604001516000540390505b60008760020b8560020b121561125f578260400151905061126b565b82604001516000540390505b80826000540303965060005481830111955050505050509250929050565b6000808860008960020b60020b8152602001908152602001600020905060008160000160009054906101000a90046fffffffffffffffffffffffffffffffff16905060006112d782896114cf565b9050846fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff161115611373576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c4f00000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000826fffffffffffffffffffffffffffffffff161415156000826fffffffffffffffffffffffffffffffff16141515141593506000826fffffffffffffffffffffffffffffffff1614156113da578860020b8a60020b136113d9578683600101819055505b5b808360000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550856114515761144c61144789600f0b8560000160109054906101000a9004600f0b600f0b6118d190919063ffffffff16565b6118f4565b611484565b61148361147e89600f0b8560000160109054906101000a9004600f0b600f0b61190d90919063ffffffff16565b6118f4565b5b8360000160106101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550505050979650505050505050565b60008082600f0b121561158257826fffffffffffffffffffffffffffffffff168260000384039150816fffffffffffffffffffffffffffffffff161061157d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c5300000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611622565b826fffffffffffffffffffffffffffffffff168284019150816fffffffffffffffffffffffffffffffff161015611621576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c4100000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b92915050565b8160008260020b60020b8152602001908152602001600020600080820160006101000a8154906fffffffffffffffffffffffffffffffff02191690556000820160106101000a8154906fffffffffffffffffffffffffffffffff0219169055600182016000905550505050565b6000600560008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600360008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600460008460020b60020b815260200190815260200160002060008360020b60020b8152602001908152602001600020819055505050565b600560008360020b60020b815260200190815260200160002060008260020b60020b815260200190815260200160002060009054906101000a900460ff16611885576001600560008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000806117f98484611000565b915091508015611882576001600360008660020b60020b815260200190815260200160002060008560020b60020b815260200190815260200160002060006101000a81548160ff02191690831515021790555081600460008660020b60020b815260200190815260200160002060008560020b60020b8152602001908152602001600020819055505b50505b5050565b6000808460008560020b60020b815260200190815260200160002090508060010154830381600101819055508060000160109054906101000a9004600f0b9150509392505050565b60008082121515158383850192508212151515146118ee57600080fd5b92915050565b60008182915081600f0b1461190857600080fd5b919050565b600080821215151583838503925082131515151461192a57600080fd5b9291505056fea264697066735822122027e8d9eb6b5bf40d22433e2d748d6bafc1bb4b5bc03f9b390c65b3ad09e6807364736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063702d75d21161008c578063c3487ff811610066578063c3487ff81461035d578063f8077fae1461038d578063f9461601146103b1578063fcad09fc14610403576100ea565b8063702d75d2146102835780638910faf1146102d5578063a498463314610320576100ea565b806337182c1b116100c857806337182c1b146101ab5780633d6aa5e114610213578063575a86b21461023157806357806ada14610265576100ea565b806306b712bf146100ef57806316f0115b14610143578063214a6fe214610177575b600080fd5b61012b6004803603604081101561010557600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610457565b60405180821515815260200191505060405180910390f35b61014b610486565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a96004803603602081101561018d57600080fd5b81019080803563ffffffff1690602001909291905050506104aa565b005b6101da600480360360208110156101c157600080fd5b81019080803560020b9060200190929190505050610833565b60405180846fffffffffffffffffffffffffffffffff16815260200183600f0b8152602001828152602001935050505060405180910390f35b61021b610886565b6040518082815260200191505060405180910390f35b61023961088f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61026d6108b3565b6040518082815260200191505060405180910390f35b6102bf6004803603604081101561029957600080fd5b81019080803560020b9060200190929190803560020b90602001909291905050506108b9565b6040518082815260200191505060405180910390f35b61031e600480360360608110156102eb57600080fd5b81019080803560020b9060200190929190803560020b90602001909291908035600f0b9060200190929190505050610949565b005b61035b6004803603604081101561033657600080fd5b81019080803560020b9060200190929190803515159060200190929190505050610cf2565b005b610365610e9a565b60405180826fffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610395610ebc565b604051808263ffffffff16815260200191505060405180910390f35b6103ed600480360360408110156103c757600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610ed2565b6040518082815260200191505060405180910390f35b61043f6004803603604081101561041957600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610ef7565b60405180821515815260200191505060405180910390f35b60036020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061054f57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6105c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e6f7420706f6f6c206f72204d4300000000000000000000000000000000000081525060200191505060405180910390fd5b600260109054906101000a900463ffffffff1663ffffffff168163ffffffff16116105eb57610830565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161461080e576000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a15ea89f7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604080518083038186803b1580156106cc57600080fd5b505afa1580156106e0573d6000803e3d6000fd5b505050506040513d60408110156106f657600080fd5b81019080805190602001909291908051906020019092919050505091509150600081905060008463ffffffff168263ffffffff16111561074c57600260109054906101000a900463ffffffff168503905061078b565b600260109054906101000a900463ffffffff1663ffffffff168263ffffffff16111561078a57600260109054906101000a900463ffffffff16820390505b5b60008163ffffffff1614610809576107fa8163ffffffff166107c48670010000000000000000000000000000000064e8d4a51000610f26565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16610f26565b60008082825401925050819055505b505050505b80600260106101000a81548163ffffffff021916908363ffffffff1602179055505b50565b60016020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a9004600f0b908060010154905083565b64e8d4a5100081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005481565b60006108c58383611000565b5080915050600360008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060009054906101000a900460ff161561094357600460008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002054810390505b92915050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a0a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f4e6f74204d43000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b158015610a7257600080fd5b505afa158015610a86573d6000803e3d6000fd5b505050506040513d60e0811015610a9c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050505050505091505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370cf754a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5957600080fd5b505afa158015610b6d573d6000803e3d6000fd5b505050506040513d6020811015610b8357600080fd5b81019080805190602001909291905050509050600080549050600080600086600f0b14610bed57610bc9888688866000896001611289909695949392919063ffffffff16565b9150610bea878688866001896001611289909695949392919063ffffffff16565b90505b8760020b8560020b12158015610c0857508660020b8560020b125b15610c6e57610c35600260009054906101000a90046fffffffffffffffffffffffffffffffff16876114cf565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505b600086600f0b1215610cb1578115610c9557610c9488600161162890919063ffffffff16565b5b8015610cb057610caf87600161162890919063ffffffff16565b5b5b600086600f0b128015610cc957508180610cc85750805b5b15610cdd57610cd88888611695565b610ce8565b610ce78888611761565b5b5050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610db3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4e6f7420706f6f6c00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160008460020b60020b815260200190815260200160002060000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161415610e0b57610e96565b6000610e258360005460016118899092919063ffffffff16565b90508115610e34578060000390505b610e5c600260009054906101000a90046fffffffffffffffffffffffffffffffff16826114cf565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550505b5050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b600260109054906101000a900463ffffffff1681565b6004602052816000526040600020602052806000526040600020600091509150505481565b60056020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b600080600080198587098587029250828110838203039150506000811415610f615760008411610f5557600080fd5b83820492505050610ff9565b808411610f6d57600080fd5b600084868809905082811182039150808303925060008586600003169050808604955080840493506001818260000304019050808302841793506000600287600302189050808702600203810290508087026002038102905080870260020381029050808702600203810290508087026002038102905080870260020381029050808502955050505050505b9392505050565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561106b57600080fd5b505afa15801561107f573d6000803e3d6000fd5b505050506040513d60e081101561109557600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505050505050509150506000600160008760020b60020b81526020019081526020016000206040518060600160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a9004600f0b600f0b600f0b815260200160018201548152505090506000600160008760020b60020b81526020019081526020016000206040518060600160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a9004600f0b600f0b600f0b8152602001600182015481525050905060008760020b8460020b126112375782604001519050611243565b82604001516000540390505b60008760020b8560020b121561125f578260400151905061126b565b82604001516000540390505b80826000540303965060005481830111955050505050509250929050565b6000808860008960020b60020b8152602001908152602001600020905060008160000160009054906101000a90046fffffffffffffffffffffffffffffffff16905060006112d782896114cf565b9050846fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff161115611373576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c4f00000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000826fffffffffffffffffffffffffffffffff161415156000826fffffffffffffffffffffffffffffffff16141515141593506000826fffffffffffffffffffffffffffffffff1614156113da578860020b8a60020b136113d9578683600101819055505b5b808360000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550856114515761144c61144789600f0b8560000160109054906101000a9004600f0b600f0b6118d190919063ffffffff16565b6118f4565b611484565b61148361147e89600f0b8560000160109054906101000a9004600f0b600f0b61190d90919063ffffffff16565b6118f4565b5b8360000160106101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550505050979650505050505050565b60008082600f0b121561158257826fffffffffffffffffffffffffffffffff168260000384039150816fffffffffffffffffffffffffffffffff161061157d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c5300000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611622565b826fffffffffffffffffffffffffffffffff168284019150816fffffffffffffffffffffffffffffffff161015611621576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c4100000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b92915050565b8160008260020b60020b8152602001908152602001600020600080820160006101000a8154906fffffffffffffffffffffffffffffffff02191690556000820160106101000a8154906fffffffffffffffffffffffffffffffff0219169055600182016000905550505050565b6000600560008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600360008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600460008460020b60020b815260200190815260200160002060008360020b60020b8152602001908152602001600020819055505050565b600560008360020b60020b815260200190815260200160002060008260020b60020b815260200190815260200160002060009054906101000a900460ff16611885576001600560008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000806117f98484611000565b915091508015611882576001600360008660020b60020b815260200190815260200160002060008560020b60020b815260200190815260200160002060006101000a81548160ff02191690831515021790555081600460008660020b60020b815260200190815260200160002060008560020b60020b8152602001908152602001600020819055505b50505b5050565b6000808460008560020b60020b815260200190815260200160002090508060010154830381600101819055508060000160109054906101000a9004600f0b9150509392505050565b60008082121515158383850192508212151515146118ee57600080fd5b92915050565b60008182915081600f0b1461190857600080fd5b919050565b600080821215151583838503925082131515151461192a57600080fd5b9291505056fea264697066735822122027e8d9eb6b5bf40d22433e2d748d6bafc1bb4b5bc03f9b390c65b3ad09e6807364736f6c63430007060033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3LmPoolDeployer.json b/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3LmPoolDeployer.json new file mode 100644 index 00000000..58ee15f4 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3LmPoolDeployer.json @@ -0,0 +1,91 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PancakeV3LmPoolDeployer", + "sourceName": "contracts/PancakeV3LmPoolDeployer.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_masterChef", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "LMPool", + "type": "address" + } + ], + "name": "NewLMPool", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "address", + "name": "lmPool", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "masterChef", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parameters", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "masterChef", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60a060405234801561001057600080fd5b506040516122673803806122678339818101604052602081101561003357600080fd5b81019080805190602001909291905050508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505060805160601c6121ba6100ad6000398061013d528061022552806102f252806103f6528061061452506121ba6000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80634c96a38914610046578063575a86b2146100b457806389035730146100e8575b600080fd5b6100886004803603602081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610139565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100bc610612565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100f0610636565b604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390f35b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f4e6f74204d43000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168152506000808201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050817f000000000000000000000000000000000000000000000000000000000000000042604051602001808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200193505050506040516020818303038152906040528051906020012060405161037e90610688565b8190604051809103906000f590508015801561039e573d6000803e3d6000fd5b5090506000806000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b44a27226040518163ffffffff1660e01b815260040160206040518083038186803b15801561045a57600080fd5b505afa15801561046e573d6000803e3d6000fd5b505050506040513d602081101561048457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156104da57600080fd5b505afa1580156104ee573d6000803e3d6000fd5b505050506040513d602081101561050457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166311ff5e8d83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561059b57600080fd5b505af11580156105af573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f5bb4bf299e7bf12fe2acd3682c1d418e9402cbdb22ec051921e516a90a048f2f60405160405180910390a3919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b611aef806106968339019056fe60c060405234801561001057600080fd5b506000803373ffffffffffffffffffffffffffffffffffffffff1663890357306040518163ffffffff1660e01b8152600401604080518083038186803b15801561005957600080fd5b505afa15801561006d573d6000803e3d6000fd5b505050506040513d604081101561008357600080fd5b810190808051906020019092919080519060200190929190505050915091508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505042600260106101000a81548163ffffffff021916908363ffffffff160217905550505060805160601c60a05160601c6119666101896000398061050152806106285280610891528061094b52508061048852806104ac52806106645280610a0e5280610af55280610cf4528061100752506119666000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063702d75d21161008c578063c3487ff811610066578063c3487ff81461035d578063f8077fae1461038d578063f9461601146103b1578063fcad09fc14610403576100ea565b8063702d75d2146102835780638910faf1146102d5578063a498463314610320576100ea565b806337182c1b116100c857806337182c1b146101ab5780633d6aa5e114610213578063575a86b21461023157806357806ada14610265576100ea565b806306b712bf146100ef57806316f0115b14610143578063214a6fe214610177575b600080fd5b61012b6004803603604081101561010557600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610457565b60405180821515815260200191505060405180910390f35b61014b610486565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a96004803603602081101561018d57600080fd5b81019080803563ffffffff1690602001909291905050506104aa565b005b6101da600480360360208110156101c157600080fd5b81019080803560020b9060200190929190505050610833565b60405180846fffffffffffffffffffffffffffffffff16815260200183600f0b8152602001828152602001935050505060405180910390f35b61021b610886565b6040518082815260200191505060405180910390f35b61023961088f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61026d6108b3565b6040518082815260200191505060405180910390f35b6102bf6004803603604081101561029957600080fd5b81019080803560020b9060200190929190803560020b90602001909291905050506108b9565b6040518082815260200191505060405180910390f35b61031e600480360360608110156102eb57600080fd5b81019080803560020b9060200190929190803560020b90602001909291908035600f0b9060200190929190505050610949565b005b61035b6004803603604081101561033657600080fd5b81019080803560020b9060200190929190803515159060200190929190505050610cf2565b005b610365610e9a565b60405180826fffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610395610ebc565b604051808263ffffffff16815260200191505060405180910390f35b6103ed600480360360408110156103c757600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610ed2565b6040518082815260200191505060405180910390f35b61043f6004803603604081101561041957600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610ef7565b60405180821515815260200191505060405180910390f35b60036020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061054f57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6105c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e6f7420706f6f6c206f72204d4300000000000000000000000000000000000081525060200191505060405180910390fd5b600260109054906101000a900463ffffffff1663ffffffff168163ffffffff16116105eb57610830565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161461080e576000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a15ea89f7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604080518083038186803b1580156106cc57600080fd5b505afa1580156106e0573d6000803e3d6000fd5b505050506040513d60408110156106f657600080fd5b81019080805190602001909291908051906020019092919050505091509150600081905060008463ffffffff168263ffffffff16111561074c57600260109054906101000a900463ffffffff168503905061078b565b600260109054906101000a900463ffffffff1663ffffffff168263ffffffff16111561078a57600260109054906101000a900463ffffffff16820390505b5b60008163ffffffff1614610809576107fa8163ffffffff166107c48670010000000000000000000000000000000064e8d4a51000610f26565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16610f26565b60008082825401925050819055505b505050505b80600260106101000a81548163ffffffff021916908363ffffffff1602179055505b50565b60016020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a9004600f0b908060010154905083565b64e8d4a5100081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005481565b60006108c58383611000565b5080915050600360008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060009054906101000a900460ff161561094357600460008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002054810390505b92915050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a0a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f4e6f74204d43000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b158015610a7257600080fd5b505afa158015610a86573d6000803e3d6000fd5b505050506040513d60e0811015610a9c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050505050505091505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370cf754a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5957600080fd5b505afa158015610b6d573d6000803e3d6000fd5b505050506040513d6020811015610b8357600080fd5b81019080805190602001909291905050509050600080549050600080600086600f0b14610bed57610bc9888688866000896001611289909695949392919063ffffffff16565b9150610bea878688866001896001611289909695949392919063ffffffff16565b90505b8760020b8560020b12158015610c0857508660020b8560020b125b15610c6e57610c35600260009054906101000a90046fffffffffffffffffffffffffffffffff16876114cf565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505b600086600f0b1215610cb1578115610c9557610c9488600161162890919063ffffffff16565b5b8015610cb057610caf87600161162890919063ffffffff16565b5b5b600086600f0b128015610cc957508180610cc85750805b5b15610cdd57610cd88888611695565b610ce8565b610ce78888611761565b5b5050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610db3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4e6f7420706f6f6c00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160008460020b60020b815260200190815260200160002060000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161415610e0b57610e96565b6000610e258360005460016118899092919063ffffffff16565b90508115610e34578060000390505b610e5c600260009054906101000a90046fffffffffffffffffffffffffffffffff16826114cf565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550505b5050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b600260109054906101000a900463ffffffff1681565b6004602052816000526040600020602052806000526040600020600091509150505481565b60056020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b600080600080198587098587029250828110838203039150506000811415610f615760008411610f5557600080fd5b83820492505050610ff9565b808411610f6d57600080fd5b600084868809905082811182039150808303925060008586600003169050808604955080840493506001818260000304019050808302841793506000600287600302189050808702600203810290508087026002038102905080870260020381029050808702600203810290508087026002038102905080870260020381029050808502955050505050505b9392505050565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561106b57600080fd5b505afa15801561107f573d6000803e3d6000fd5b505050506040513d60e081101561109557600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505050505050509150506000600160008760020b60020b81526020019081526020016000206040518060600160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a9004600f0b600f0b600f0b815260200160018201548152505090506000600160008760020b60020b81526020019081526020016000206040518060600160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a9004600f0b600f0b600f0b8152602001600182015481525050905060008760020b8460020b126112375782604001519050611243565b82604001516000540390505b60008760020b8560020b121561125f578260400151905061126b565b82604001516000540390505b80826000540303965060005481830111955050505050509250929050565b6000808860008960020b60020b8152602001908152602001600020905060008160000160009054906101000a90046fffffffffffffffffffffffffffffffff16905060006112d782896114cf565b9050846fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff161115611373576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c4f00000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000826fffffffffffffffffffffffffffffffff161415156000826fffffffffffffffffffffffffffffffff16141515141593506000826fffffffffffffffffffffffffffffffff1614156113da578860020b8a60020b136113d9578683600101819055505b5b808360000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550856114515761144c61144789600f0b8560000160109054906101000a9004600f0b600f0b6118d190919063ffffffff16565b6118f4565b611484565b61148361147e89600f0b8560000160109054906101000a9004600f0b600f0b61190d90919063ffffffff16565b6118f4565b5b8360000160106101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550505050979650505050505050565b60008082600f0b121561158257826fffffffffffffffffffffffffffffffff168260000384039150816fffffffffffffffffffffffffffffffff161061157d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c5300000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611622565b826fffffffffffffffffffffffffffffffff168284019150816fffffffffffffffffffffffffffffffff161015611621576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c4100000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b92915050565b8160008260020b60020b8152602001908152602001600020600080820160006101000a8154906fffffffffffffffffffffffffffffffff02191690556000820160106101000a8154906fffffffffffffffffffffffffffffffff0219169055600182016000905550505050565b6000600560008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600360008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600460008460020b60020b815260200190815260200160002060008360020b60020b8152602001908152602001600020819055505050565b600560008360020b60020b815260200190815260200160002060008260020b60020b815260200190815260200160002060009054906101000a900460ff16611885576001600560008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000806117f98484611000565b915091508015611882576001600360008660020b60020b815260200190815260200160002060008560020b60020b815260200190815260200160002060006101000a81548160ff02191690831515021790555081600460008660020b60020b815260200190815260200160002060008560020b60020b8152602001908152602001600020819055505b50505b5050565b6000808460008560020b60020b815260200190815260200160002090508060010154830381600101819055508060000160109054906101000a9004600f0b9150509392505050565b60008082121515158383850192508212151515146118ee57600080fd5b92915050565b60008182915081600f0b1461190857600080fd5b919050565b600080821215151583838503925082131515151461192a57600080fd5b9291505056fea264697066735822122027e8d9eb6b5bf40d22433e2d748d6bafc1bb4b5bc03f9b390c65b3ad09e6807364736f6c63430007060033a264697066735822122000d3593e26b31583ce3365dfffdaea89e9b6ee1c6980aa399170a5af6ff189d164736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80634c96a38914610046578063575a86b2146100b457806389035730146100e8575b600080fd5b6100886004803603602081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610139565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100bc610612565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100f0610636565b604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390f35b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f4e6f74204d43000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168152506000808201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050817f000000000000000000000000000000000000000000000000000000000000000042604051602001808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200193505050506040516020818303038152906040528051906020012060405161037e90610688565b8190604051809103906000f590508015801561039e573d6000803e3d6000fd5b5090506000806000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b44a27226040518163ffffffff1660e01b815260040160206040518083038186803b15801561045a57600080fd5b505afa15801561046e573d6000803e3d6000fd5b505050506040513d602081101561048457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156104da57600080fd5b505afa1580156104ee573d6000803e3d6000fd5b505050506040513d602081101561050457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166311ff5e8d83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561059b57600080fd5b505af11580156105af573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f5bb4bf299e7bf12fe2acd3682c1d418e9402cbdb22ec051921e516a90a048f2f60405160405180910390a3919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b611aef806106968339019056fe60c060405234801561001057600080fd5b506000803373ffffffffffffffffffffffffffffffffffffffff1663890357306040518163ffffffff1660e01b8152600401604080518083038186803b15801561005957600080fd5b505afa15801561006d573d6000803e3d6000fd5b505050506040513d604081101561008357600080fd5b810190808051906020019092919080519060200190929190505050915091508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505042600260106101000a81548163ffffffff021916908363ffffffff160217905550505060805160601c60a05160601c6119666101896000398061050152806106285280610891528061094b52508061048852806104ac52806106645280610a0e5280610af55280610cf4528061100752506119666000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063702d75d21161008c578063c3487ff811610066578063c3487ff81461035d578063f8077fae1461038d578063f9461601146103b1578063fcad09fc14610403576100ea565b8063702d75d2146102835780638910faf1146102d5578063a498463314610320576100ea565b806337182c1b116100c857806337182c1b146101ab5780633d6aa5e114610213578063575a86b21461023157806357806ada14610265576100ea565b806306b712bf146100ef57806316f0115b14610143578063214a6fe214610177575b600080fd5b61012b6004803603604081101561010557600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610457565b60405180821515815260200191505060405180910390f35b61014b610486565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a96004803603602081101561018d57600080fd5b81019080803563ffffffff1690602001909291905050506104aa565b005b6101da600480360360208110156101c157600080fd5b81019080803560020b9060200190929190505050610833565b60405180846fffffffffffffffffffffffffffffffff16815260200183600f0b8152602001828152602001935050505060405180910390f35b61021b610886565b6040518082815260200191505060405180910390f35b61023961088f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61026d6108b3565b6040518082815260200191505060405180910390f35b6102bf6004803603604081101561029957600080fd5b81019080803560020b9060200190929190803560020b90602001909291905050506108b9565b6040518082815260200191505060405180910390f35b61031e600480360360608110156102eb57600080fd5b81019080803560020b9060200190929190803560020b90602001909291908035600f0b9060200190929190505050610949565b005b61035b6004803603604081101561033657600080fd5b81019080803560020b9060200190929190803515159060200190929190505050610cf2565b005b610365610e9a565b60405180826fffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610395610ebc565b604051808263ffffffff16815260200191505060405180910390f35b6103ed600480360360408110156103c757600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610ed2565b6040518082815260200191505060405180910390f35b61043f6004803603604081101561041957600080fd5b81019080803560020b9060200190929190803560020b9060200190929190505050610ef7565b60405180821515815260200191505060405180910390f35b60036020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061054f57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6105c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e6f7420706f6f6c206f72204d4300000000000000000000000000000000000081525060200191505060405180910390fd5b600260109054906101000a900463ffffffff1663ffffffff168163ffffffff16116105eb57610830565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161461080e576000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a15ea89f7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604080518083038186803b1580156106cc57600080fd5b505afa1580156106e0573d6000803e3d6000fd5b505050506040513d60408110156106f657600080fd5b81019080805190602001909291908051906020019092919050505091509150600081905060008463ffffffff168263ffffffff16111561074c57600260109054906101000a900463ffffffff168503905061078b565b600260109054906101000a900463ffffffff1663ffffffff168263ffffffff16111561078a57600260109054906101000a900463ffffffff16820390505b5b60008163ffffffff1614610809576107fa8163ffffffff166107c48670010000000000000000000000000000000064e8d4a51000610f26565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16610f26565b60008082825401925050819055505b505050505b80600260106101000a81548163ffffffff021916908363ffffffff1602179055505b50565b60016020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a9004600f0b908060010154905083565b64e8d4a5100081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005481565b60006108c58383611000565b5080915050600360008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060009054906101000a900460ff161561094357600460008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002054810390505b92915050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a0a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f4e6f74204d43000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b158015610a7257600080fd5b505afa158015610a86573d6000803e3d6000fd5b505050506040513d60e0811015610a9c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050505050505091505060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370cf754a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5957600080fd5b505afa158015610b6d573d6000803e3d6000fd5b505050506040513d6020811015610b8357600080fd5b81019080805190602001909291905050509050600080549050600080600086600f0b14610bed57610bc9888688866000896001611289909695949392919063ffffffff16565b9150610bea878688866001896001611289909695949392919063ffffffff16565b90505b8760020b8560020b12158015610c0857508660020b8560020b125b15610c6e57610c35600260009054906101000a90046fffffffffffffffffffffffffffffffff16876114cf565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505b600086600f0b1215610cb1578115610c9557610c9488600161162890919063ffffffff16565b5b8015610cb057610caf87600161162890919063ffffffff16565b5b5b600086600f0b128015610cc957508180610cc85750805b5b15610cdd57610cd88888611695565b610ce8565b610ce78888611761565b5b5050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610db3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4e6f7420706f6f6c00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160008460020b60020b815260200190815260200160002060000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161415610e0b57610e96565b6000610e258360005460016118899092919063ffffffff16565b90508115610e34578060000390505b610e5c600260009054906101000a90046fffffffffffffffffffffffffffffffff16826114cf565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550505b5050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b600260109054906101000a900463ffffffff1681565b6004602052816000526040600020602052806000526040600020600091509150505481565b60056020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b600080600080198587098587029250828110838203039150506000811415610f615760008411610f5557600080fd5b83820492505050610ff9565b808411610f6d57600080fd5b600084868809905082811182039150808303925060008586600003169050808604955080840493506001818260000304019050808302841793506000600287600302189050808702600203810290508087026002038102905080870260020381029050808702600203810290508087026002038102905080870260020381029050808502955050505050505b9392505050565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561106b57600080fd5b505afa15801561107f573d6000803e3d6000fd5b505050506040513d60e081101561109557600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505050505050509150506000600160008760020b60020b81526020019081526020016000206040518060600160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a9004600f0b600f0b600f0b815260200160018201548152505090506000600160008760020b60020b81526020019081526020016000206040518060600160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a9004600f0b600f0b600f0b8152602001600182015481525050905060008760020b8460020b126112375782604001519050611243565b82604001516000540390505b60008760020b8560020b121561125f578260400151905061126b565b82604001516000540390505b80826000540303965060005481830111955050505050509250929050565b6000808860008960020b60020b8152602001908152602001600020905060008160000160009054906101000a90046fffffffffffffffffffffffffffffffff16905060006112d782896114cf565b9050846fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff161115611373576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c4f00000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000826fffffffffffffffffffffffffffffffff161415156000826fffffffffffffffffffffffffffffffff16141515141593506000826fffffffffffffffffffffffffffffffff1614156113da578860020b8a60020b136113d9578683600101819055505b5b808360000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550856114515761144c61144789600f0b8560000160109054906101000a9004600f0b600f0b6118d190919063ffffffff16565b6118f4565b611484565b61148361147e89600f0b8560000160109054906101000a9004600f0b600f0b61190d90919063ffffffff16565b6118f4565b5b8360000160106101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550505050979650505050505050565b60008082600f0b121561158257826fffffffffffffffffffffffffffffffff168260000384039150816fffffffffffffffffffffffffffffffff161061157d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c5300000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611622565b826fffffffffffffffffffffffffffffffff168284019150816fffffffffffffffffffffffffffffffff161015611621576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260028152602001807f4c4100000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b92915050565b8160008260020b60020b8152602001908152602001600020600080820160006101000a8154906fffffffffffffffffffffffffffffffff02191690556000820160106101000a8154906fffffffffffffffffffffffffffffffff0219169055600182016000905550505050565b6000600560008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600360008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600460008460020b60020b815260200190815260200160002060008360020b60020b8152602001908152602001600020819055505050565b600560008360020b60020b815260200190815260200160002060008260020b60020b815260200190815260200160002060009054906101000a900460ff16611885576001600560008460020b60020b815260200190815260200160002060008360020b60020b815260200190815260200160002060006101000a81548160ff0219169083151502179055506000806117f98484611000565b915091508015611882576001600360008660020b60020b815260200190815260200160002060008560020b60020b815260200190815260200160002060006101000a81548160ff02191690831515021790555081600460008660020b60020b815260200190815260200160002060008560020b60020b8152602001908152602001600020819055505b50505b5050565b6000808460008560020b60020b815260200190815260200160002090508060010154830381600101819055508060000160109054906101000a9004600f0b9150509392505050565b60008082121515158383850192508212151515146118ee57600080fd5b92915050565b60008182915081600f0b1461190857600080fd5b919050565b600080821215151583838503925082131515151461192a57600080fd5b9291505056fea264697066735822122027e8d9eb6b5bf40d22433e2d748d6bafc1bb4b5bc03f9b390c65b3ad09e6807364736f6c63430007060033a264697066735822122000d3593e26b31583ce3365dfffdaea89e9b6ee1c6980aa399170a5af6ff189d164736f6c63430007060033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3Pool.json b/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3Pool.json new file mode 100644 index 00000000..f173e399 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3Pool.json @@ -0,0 +1,1048 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PancakeV3Pool", + "sourceName": "contracts/PancakeV3Pool.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "indexed": true, + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": true, + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "indexed": true, + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount0", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount1", + "type": "uint128" + } + ], + "name": "Collect", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount0", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount1", + "type": "uint128" + } + ], + "name": "CollectProtocol", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "paid0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "paid1", + "type": "uint256" + } + ], + "name": "Flash", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "observationCardinalityNextOld", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "observationCardinalityNextNew", + "type": "uint16" + } + ], + "name": "IncreaseObservationCardinalityNext", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint160", + "name": "sqrtPriceX96", + "type": "uint160" + }, + { + "indexed": false, + "internalType": "int24", + "name": "tick", + "type": "int24" + } + ], + "name": "Initialize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "indexed": true, + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "feeProtocol0Old", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "feeProtocol1Old", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "feeProtocol0New", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "feeProtocol1New", + "type": "uint32" + } + ], + "name": "SetFeeProtocol", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "SetLmPoolEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "int256", + "name": "amount0", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "amount1", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint160", + "name": "sqrtPriceX96", + "type": "uint160" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "int24", + "name": "tick", + "type": "int24" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "protocolFeesToken0", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "protocolFeesToken1", + "type": "uint128" + } + ], + "name": "Swap", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "internalType": "uint128", + "name": "amount0Requested", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1Requested", + "type": "uint128" + } + ], + "name": "collect", + "outputs": [ + { + "internalType": "uint128", + "name": "amount0", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1", + "type": "uint128" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint128", + "name": "amount0Requested", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1Requested", + "type": "uint128" + } + ], + "name": "collectProtocol", + "outputs": [ + { + "internalType": "uint128", + "name": "amount0", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1", + "type": "uint128" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint24", + "name": "", + "type": "uint24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeGrowthGlobal0X128", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeGrowthGlobal1X128", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "flash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "observationCardinalityNext", + "type": "uint16" + } + ], + "name": "increaseObservationCardinalityNext", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint160", + "name": "sqrtPriceX96", + "type": "uint160" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "liquidity", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lmPool", + "outputs": [ + { + "internalType": "contract IPancakeV3LmPool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLiquidityPerTick", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + }, + { + "internalType": "uint128", + "name": "amount", + "type": "uint128" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "observations", + "outputs": [ + { + "internalType": "uint32", + "name": "blockTimestamp", + "type": "uint32" + }, + { + "internalType": "int56", + "name": "tickCumulative", + "type": "int56" + }, + { + "internalType": "uint160", + "name": "secondsPerLiquidityCumulativeX128", + "type": "uint160" + }, + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "secondsAgos", + "type": "uint32[]" + } + ], + "name": "observe", + "outputs": [ + { + "internalType": "int56[]", + "name": "tickCumulatives", + "type": "int56[]" + }, + { + "internalType": "uint160[]", + "name": "secondsPerLiquidityCumulativeX128s", + "type": "uint160[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "positions", + "outputs": [ + { + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "feeGrowthInside0LastX128", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeGrowthInside1LastX128", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "tokensOwed0", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "tokensOwed1", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolFees", + "outputs": [ + { + "internalType": "uint128", + "name": "token0", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "token1", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "feeProtocol0", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "feeProtocol1", + "type": "uint32" + } + ], + "name": "setFeeProtocol", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_lmPool", + "type": "address" + } + ], + "name": "setLmPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "slot0", + "outputs": [ + { + "internalType": "uint160", + "name": "sqrtPriceX96", + "type": "uint160" + }, + { + "internalType": "int24", + "name": "tick", + "type": "int24" + }, + { + "internalType": "uint16", + "name": "observationIndex", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "observationCardinality", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "observationCardinalityNext", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "feeProtocol", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "unlocked", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "tickLower", + "type": "int24" + }, + { + "internalType": "int24", + "name": "tickUpper", + "type": "int24" + } + ], + "name": "snapshotCumulativesInside", + "outputs": [ + { + "internalType": "int56", + "name": "tickCumulativeInside", + "type": "int56" + }, + { + "internalType": "uint160", + "name": "secondsPerLiquidityInsideX128", + "type": "uint160" + }, + { + "internalType": "uint32", + "name": "secondsInside", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "bool", + "name": "zeroForOne", + "type": "bool" + }, + { + "internalType": "int256", + "name": "amountSpecified", + "type": "int256" + }, + { + "internalType": "uint160", + "name": "sqrtPriceLimitX96", + "type": "uint160" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "swap", + "outputs": [ + { + "internalType": "int256", + "name": "amount0", + "type": "int256" + }, + { + "internalType": "int256", + "name": "amount1", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int16", + "name": "", + "type": "int16" + } + ], + "name": "tickBitmap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tickSpacing", + "outputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "name": "ticks", + "outputs": [ + { + "internalType": "uint128", + "name": "liquidityGross", + "type": "uint128" + }, + { + "internalType": "int128", + "name": "liquidityNet", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "feeGrowthOutside0X128", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeGrowthOutside1X128", + "type": "uint256" + }, + { + "internalType": "int56", + "name": "tickCumulativeOutside", + "type": "int56" + }, + { + "internalType": "uint160", + "name": "secondsPerLiquidityOutsideX128", + "type": "uint160" + }, + { + "internalType": "uint32", + "name": "secondsOutside", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token0", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token1", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6101406040523480156200001257600080fd5b506000336001600160a01b031663890357306040518163ffffffff1660e01b815260040160a06040518083038186803b1580156200004f57600080fd5b505afa15801562000064573d6000803e3d6000fd5b505050506040513d60a08110156200007b57600080fd5b50805160208083015160408401516060808601516080968701516001600160e81b031960e892831b1660e0526001600160601b031993831b841660c05293821b831660a05294901b16909352600283810b900b90911b61010052909150620000ee90829062002f5e62000106821b17901c565b60801b6001600160801b031916610120525062000174565b60008082600281900b620d89e719816200011c57fe5b05029050600083600281900b620d89e8816200013457fe5b0502905060008460020b83830360020b816200014c57fe5b0560010190508062ffffff166001600160801b038016816200016a57fe5b0495945050505050565b60805160601c60a05160601c60c05160601c60e05160e81c6101005160e81c6101205160801c6159b26200025c600039806121735280614ecd5280614f04525080610cb15280612be95280614f385280614f6a525080610da05280611b475280611b7e5280612c315280612e005280612e425280612e895280612ed05250806113145280611c01528061206852806123f85280612c0d52806141fd52508061091452806114425280611bd05280612002528061237252806140b45250806121f6528061221f52806128d552806128fe5280612aa35280612ad05280612af952506159b26000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806370cf754a116100f9578063cc7e7fa211610097578063ddca3f4311610071578063ddca3f4314610842578063f305839914610862578063f30dba931461086a578063f637731d146108ec576101c4565b8063cc7e7fa2146107f5578063d0c93a7c1461081b578063d21220a71461083a576101c4565b8063a34123a7116100d3578063a34123a71461072d578063a38807f214610767578063b0d0d211146107c2578063c45a0155146107ed576101c4565b806370cf754a146105e157806385b66729146105e9578063883bdbfd14610626576101c4565b80633c8a7d8d116101665780634f1eb3d8116101405780634f1eb3d81461050f578063514ea4bf146105605780635339c296146105b9578063540d4918146105d9576101c4565b80633c8a7d8d146103cb578063461413191461046b578063490e6cbc14610485576101c4565b80631ad8b03b116101a25780631ad8b03b146102be578063252c09d7146102f557806332148f671461034c5780633850c7bd1461036f576101c4565b80630dfe1681146101c9578063128acb08146101ed5780631a6865021461029a575b600080fd5b6101d1610912565b604080516001600160a01b039092168252519081900360200190f35b610281600480360360a081101561020357600080fd5b6001600160a01b0382358116926020810135151592604082013592606083013516919081019060a081016080820135600160201b81111561024357600080fd5b82018360208201111561025557600080fd5b803590602001918460018302840111600160201b8311171561027657600080fd5b509092509050610936565b6040805192835260208301919091528051918290030190f35b6102a2611633565b604080516001600160801b039092168252519081900360200190f35b6102c6611642565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b6103126004803603602081101561030b57600080fd5b503561165c565b6040805163ffffffff909516855260069390930b60208501526001600160a01b039091168383015215156060830152519081900360800190f35b61036d6004803603602081101561036257600080fd5b503561ffff166116a1565b005b610377611793565b604080516001600160a01b03909816885260029690960b602088015261ffff9485168787015292841660608701529216608085015263ffffffff90911660a0840152151560c0830152519081900360e00190f35b610281600480360360a08110156103e157600080fd5b6001600160a01b03823516916020810135600290810b92604083013590910b916001600160801b036060820135169181019060a081016080820135600160201b81111561042d57600080fd5b82018360208201111561043f57600080fd5b803590602001918460018302840111600160201b8311171561046057600080fd5b5090925090506117e8565b610473611aa6565b60408051918252519081900360200190f35b61036d6004803603608081101561049b57600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b8111156104d157600080fd5b8201836020820111156104e357600080fd5b803590602001918460018302840111600160201b8311171561050457600080fd5b509092509050611aac565b6102c6600480360360a081101561052557600080fd5b506001600160a01b03813516906020810135600290810b91604081013590910b906001600160801b0360608201358116916080013516611ef3565b61057d6004803603602081101561057657600080fd5b5035612111565b604080516001600160801b0396871681526020810195909552848101939093529084166060840152909216608082015290519081900360a00190f35b610473600480360360208110156105cf57600080fd5b503560010b61214e565b6101d1612160565b6102a2612171565b6102c6600480360360608110156105ff57600080fd5b506001600160a01b03813516906001600160801b0360208201358116916040013516612195565b6106946004803603602081101561063c57600080fd5b810190602081018135600160201b81111561065657600080fd5b82018360208201111561066857600080fd5b803590602001918460208302840111600160201b8311171561068957600080fd5b509092509050612490565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156106d85781810151838201526020016106c0565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156107175781810151838201526020016106ff565b5050505090500194505050505060405180910390f35b6102816004803603606081101561074357600080fd5b508035600290810b91602081013590910b90604001356001600160801b0316612515565b6107916004803603604081101561077d57600080fd5b508035600290810b9160200135900b612691565b6040805160069490940b84526001600160a01b03909216602084015263ffffffff1682820152519081900360600190f35b61036d600480360360408110156107d857600080fd5b5063ffffffff81358116916020013516612879565b6101d1612aa1565b61036d6004803603602081101561080b57600080fd5b50356001600160a01b0316612ac5565b610823612be7565b6040805160029290920b8252519081900360200190f35b6101d1612c0b565b61084a612c2f565b6040805162ffffff9092168252519081900360200190f35b610473612c53565b61088a6004803603602081101561088057600080fd5b503560020b612c59565b604080516001600160801b039099168952600f9790970b602089015287870195909552606087019390935260069190910b60808601526001600160a01b031660a085015263ffffffff1660c0840152151560e083015251908190036101000190f35b61036d6004803603602081101561090257600080fd5b50356001600160a01b0316612cc5565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008085610970576040805162461bcd60e51b8152602060048201526002602482015261415360f01b604482015290519081900360640190fd5b6040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b900b602083015261ffff600160b81b8204811693830193909352600160c81b810483166060830152600160d81b9004909116608082015260015463ffffffff811660a083015260ff600160201b90910416151560c08201819052610a28576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b87610a735780600001516001600160a01b0316866001600160a01b0316118015610a6e575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038716105b610aa5565b80600001516001600160a01b0316866001600160a01b0316108015610aa557506401000276a36001600160a01b038716115b610adc576040805162461bcd60e51b815260206004820152600360248201526214d41360ea1b604482015290519081900360640190fd5b6001805460ff60201b191690556040805160c08101909152600090808a610b115760108460a0015163ffffffff16901c610b1b565b60a084015161ffff165b63ffffffff1681526005546001600160801b03166020820152604001610b3f612fca565b63ffffffff1681526000602082018190526040820181905260609091015262010008549091506001600160a01b031615610be557620100085460408083015181516310a537f160e11b815263ffffffff909116600482015290516001600160a01b039092169163214a6fe29160248082019260009290919082900301818387803b158015610bcc57600080fd5b505af1158015610be0573d6000803e3d6000fd5b505050505b6000808913905060006040518060e001604052808b81526020016000815260200185600001516001600160a01b03168152602001856020015160020b81526020018c610c3357600354610c37565b6002545b815260200160006001600160801b0316815260200184602001516001600160801b031681525090505b805115801590610c865750886001600160a01b031681604001516001600160a01b031614155b156110f557610c93615942565b60408201516001600160a01b031681526060820151610cd6906007907f00000000000000000000000000000000000000000000000000000000000000008f612fce565b15156040830152600290810b810b60208301819052620d89e719910b1215610d0757620d89e7196020820152610d26565b6020810151620d89e860029190910b1315610d2657620d89e860208201525b610d338160200151613110565b6001600160a01b031660608201526040820151610dc4908d610d6d578b6001600160a01b031683606001516001600160a01b031611610d87565b8b6001600160a01b031683606001516001600160a01b0316105b610d95578260600151610d97565b8b5b60c085015185517f0000000000000000000000000000000000000000000000000000000000000000613441565b60c085015260a084015260808301526001600160a01b031660408301528215610e2657610dfa8160c00151826080015101613633565b825103825260a0810151610e1c90610e1190613633565b602084015190613649565b6020830152610e61565b610e338160a00151613633565b825101825260c08101516080820151610e5b91610e509101613633565b602084015190613665565b60208301525b835163ffffffff1615610ec1576000612710610e94866000015163ffffffff168460c0015161367b90919063ffffffff16565b81610e9b57fe5b60c0840180519290910491829003905260a0840180519091016001600160801b03169052505b60c08201516001600160801b031615610f0057610ef48160c00151600160801b8460c001516001600160801b031661369f565b60808301805190910190525b80606001516001600160a01b031682604001516001600160a01b031614156110b45780604001511561108b578360a00151610f8a57610f68846040015160008760200151886040015188602001518a60600151600961374f909695949392919063ffffffff16565b6001600160a01b03166080860152600690810b900b6060850152600160a08501525b62010008546001600160a01b03161561101557620100085460208201516040805163a498463360e01b815260029290920b60048301528e15156024830152516001600160a01b039092169163a49846339160448082019260009290919082900301818387803b158015610ffc57600080fd5b505af1158015611010573d6000803e3d6000fd5b505050505b600061106182602001518e61102c57600254611032565b84608001515b8f611041578560800151611045565b6003545b608089015160608a015160408b015160069594939291906138e1565b90508c1561106d576000035b61107b8360c001518261399f565b6001600160801b031660c0840152505b8b61109a5780602001516110a3565b60018160200151035b600290810b900b60608301526110ef565b80600001516001600160a01b031682604001516001600160a01b0316146110ef576110e28260400151613a55565b600290810b900b60608301525b50610c60565b836020015160020b816060015160020b146111c35760008061114386604001518660400151886020015188602001518a606001518b608001516009613d7d909695949392919063ffffffff16565b604085015160608601516000805461ffff60c81b1916600160c81b61ffff958616021761ffff60b81b1916600160b81b95909416949094029290921762ffffff60a01b1916600160a01b62ffffff60029490940b9390931692909202919091176001600160a01b0319166001600160a01b03909116179055506111e89050565b6040810151600080546001600160a01b0319166001600160a01b039092169190911790555b8060c001516001600160801b031683602001516001600160801b03161461122e5760c0810151600580546001600160801b0319166001600160801b039092169190911790555b6000808c1561128857608083015160025560a08301516001600160801b03161561127c5760a0830151600480546001600160801b031981166001600160801b03918216909301169190911790555b8260a0015191506112d5565b608083015160035560a08301516001600160801b0316156112ce5760a0830151600480546001600160801b03808216600160801b92839004821690940116029190911790555b5060a08201515b8315158d1515146112ee57602083015183518d036112fb565b82600001518c0383602001515b90985096508c1561143457600087121561133d5761133d7f00000000000000000000000000000000000000000000000000000000000000008f89600003613f18565b6000611347614066565b9050336001600160a01b03166323a69e758a8a8e8e6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156113cb57600080fd5b505af11580156113df573d6000803e3d6000fd5b505050506113eb614066565b6113f5828b61419f565b111561142e576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b5061155e565b600088121561146b5761146b7f00000000000000000000000000000000000000000000000000000000000000008f8a600003613f18565b60006114756141af565b9050336001600160a01b03166323a69e758a8a8e8e6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156114f957600080fd5b505af115801561150d573d6000803e3d6000fd5b505050506115196141af565b611523828a61419f565b111561155c576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b505b8d6001600160a01b0316336001600160a01b03167f19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc838a8a87604001518860c001518960600151898960405180888152602001878152602001866001600160a01b03168152602001856001600160801b031681526020018460020b8152602001836001600160801b03168152602001826001600160801b0316815260200197505050505050505060405180910390a350506001805460ff60201b1916600160201b17905550939a92995091975050505050505050565b6005546001600160801b031681565b6004546001600160801b0380821691600160801b90041682565b60098161ffff811061166d57600080fd5b015463ffffffff81169150600160201b810460060b90600160581b81046001600160a01b031690600160f81b900460ff1684565b600154600160201b900460ff166116e5576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b1916905560008054600160d81b900461ffff169061170e60098385614247565b6000805461ffff808416600160d81b810261ffff60d81b199093169290921790925591925083161461177b576040805161ffff80851682528316602082015281517fac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a929181900390910190a15b50506001805460ff60201b1916600160201b17905550565b6000546001546001600160a01b03821691600160a01b810460020b9161ffff600160b81b8304811692600160c81b8104821692600160d81b9091049091169063ffffffff81169060ff600160201b9091041687565b6001546000908190600160201b900460ff16611831576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556001600160801b03851661185157600080fd5b60008061189f60405180608001604052808c6001600160a01b031681526020018b60020b81526020018a60020b81526020016118958a6001600160801b03166142ea565b600f0b90526142fb565b925092505081935080925060008060008611156118c1576118be614066565b91505b84156118d2576118cf6141af565b90505b336001600160a01b03166399eee9d087878b8b6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b15801561195457600080fd5b505af1158015611968573d6000803e3d6000fd5b5050505060008611156119bf5761197d614066565b611987838861419f565b11156119bf576040805162461bcd60e51b815260206004820152600260248201526104d360f41b604482015290519081900360640190fd5b8415611a0f576119cd6141af565b6119d7828761419f565b1115611a0f576040805162461bcd60e51b81526020600482015260026024820152614d3160f01b604482015290519081900360640190fd5b8960020b8b60020b8d6001600160a01b03167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde338d8b8b60405180856001600160a01b03168152602001846001600160801b0316815260200183815260200182815260200194505050505060405180910390a450506001805460ff60201b1916600160201b17905550919890975095505050505050565b60035481565b600154600160201b900460ff16611af0576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556005546001600160801b031680611b3f576040805162461bcd60e51b81526020600482015260016024820152601360fa1b604482015290519081900360640190fd5b6000611b74867f000000000000000000000000000000000000000000000000000000000000000062ffffff16620f4240614531565b90506000611bab867f000000000000000000000000000000000000000000000000000000000000000062ffffff16620f4240614531565b90506000611bb7614066565b90506000611bc36141af565b90508815611bf657611bf67f00000000000000000000000000000000000000000000000000000000000000008b8b613f18565b8715611c2757611c277f00000000000000000000000000000000000000000000000000000000000000008b8a613f18565b336001600160a01b031663a1d4833685858a8a6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611ca957600080fd5b505af1158015611cbd573d6000803e3d6000fd5b505050506000611ccb614066565b90506000611cd76141af565b905081611ce4858861419f565b1115611d1c576040805162461bcd60e51b8152602060048201526002602482015261046360f41b604482015290519081900360640190fd5b80611d27848761419f565b1115611d5f576040805162461bcd60e51b8152602060048201526002602482015261463160f01b604482015290519081900360640190fd5b8382038382038115611de85760015461ffff1660008115611d8c5761271063ffffffff8316850204611d8f565b60005b90506001600160801b03811615611dc257600480546001600160801b038082168401166001600160801b03199091161790555b611ddc818503600160801b8d6001600160801b031661369f565b60028054909101905550505b8015611e6d5760015460101c61ffff1660008115611e125761271063ffffffff8316840204611e15565b60005b90506001600160801b03811615611e4757600480546001600160801b03600160801b8083048216850182160291161790555b611e61818403600160801b8d6001600160801b031661369f565b60038054909101905550505b8d6001600160a01b0316336001600160a01b03167fbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca6338f8f86866040518085815260200184815260200183815260200182815260200194505050505060405180910390a350506001805460ff60201b1916600160201b179055505050505050505050505050565b6001546000908190600160201b900460ff16611f3c576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556000611f58600833898961456b565b60038101549091506001600160801b0390811690861611611f795784611f88565b60038101546001600160801b03165b60038201549093506001600160801b03600160801b909104811690851611611fb05783611fc6565b6003810154600160801b90046001600160801b03165b91506001600160801b0383161561202b576003810180546001600160801b031981166001600160801b0391821686900382161790915561202b907f0000000000000000000000000000000000000000000000000000000000000000908a908616613f18565b6001600160801b03821615612091576003810180546001600160801b03600160801b808304821686900382160291811691909117909155612091907f0000000000000000000000000000000000000000000000000000000000000000908a908516613f18565b604080516001600160a01b038a1681526001600160801b0380861660208301528416818301529051600288810b92908a900b9133917f70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0919081900360600190a4506001805460ff60201b1916600160201b17905590969095509350505050565b60086020526000908152604090208054600182015460028301546003909301546001600160801b0392831693919281811691600160801b90041685565b60076020526000908152604090205481565b62010008546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001546000908190600160201b900460ff166121de576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b19169055336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806122ae57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561227657600080fd5b505afa15801561228a573d6000803e3d6000fd5b505050506040513d60208110156122a057600080fd5b50516001600160a01b031633145b6122b757600080fd5b6004546001600160801b03908116908516116122d357836122e0565b6004546001600160801b03165b6004549092506001600160801b03600160801b909104811690841611612306578261231a565b600454600160801b90046001600160801b03165b90506001600160801b0382161561239b576004546001600160801b038381169116141561234957600019909101905b600480546001600160801b031981166001600160801b0391821685900382161790915561239b907f00000000000000000000000000000000000000000000000000000000000000009087908516613f18565b6001600160801b03811615612421576004546001600160801b03828116600160801b9092041614156123cc57600019015b600480546001600160801b03600160801b808304821685900382160291811691909117909155612421907f00000000000000000000000000000000000000000000000000000000000000009087908416613f18565b604080516001600160801b0380851682528316602082015281516001600160a01b0388169233927f596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151929081900390910190a36001805460ff60201b1916600160201b1790559094909350915050565b60608061250a61249e612fca565b858580806020026020016040519081016040528093929190818152602001838360200280828437600092018290525054600554600996959450600160a01b820460020b935061ffff600160b81b8304811693506001600160801b0390911691600160c81b9004166145cf565b915091509250929050565b6001546000908190600160201b900460ff1661255e576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b1916905560408051608081018252338152600287810b602083015286900b91810191909152600090819081906125ba90606081016125ad6001600160801b038a166142ea565b600003600f0b90526142fb565b92509250925081600003945080600003935060008511806125db5750600084115b1561261a576003830180546001600160801b038082168089018216600160801b93849004831689019092169092029091176001600160801b0319161790555b604080516001600160801b0388168152602081018790528082018690529051600289810b92908b900b9133917f0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c919081900360600190a450506001805460ff60201b1916600160201b179055509094909350915050565b60008060006126a08585614729565b600285810b810b600090815260066020819052604080832088850b90940b8352822060038401549182900b93600160381b83046001600160a01b0316928492600160d81b820463ffffffff16928492909190600160f81b900460ff168061270657600080fd5b6003820154600681900b9850600160381b81046001600160a01b03169650600160d81b810463ffffffff169450600160f81b900460ff168061274757600080fd5b50506040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b810b6020840181905261ffff600160b81b8404811695850195909552600160c81b830485166060850152600160d81b909204909316608083015260015463ffffffff811660a084015260ff600160201b90910416151560c08301529093508e820b910b121590506127ef57509390940396509003935090039050612872565b8a60020b816020015160020b121561286357600061280b612fca565b6020830151604084015160055460608601519394506000938493612841936009938893879392916001600160801b03169061374f565b9a9003989098039b505094909603929092039650909103039250612872915050565b50949093039650039350900390505b9250925092565b600154600160201b900460ff166128bd576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b19169055336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061298d57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561295557600080fd5b505afa158015612969573d6000803e3d6000fd5b505050506040513d602081101561297f57600080fd5b50516001600160a01b031633145b61299657600080fd5b63ffffffff821615806129c457506103e88263ffffffff16101580156129c45750610fa08263ffffffff1611155b80156129f9575063ffffffff811615806129f957506103e88163ffffffff16101580156129f95750610fa08163ffffffff1611155b612a0257600080fd5b6001805465ffffffff0000601084901b16840163ffffffff90811663ffffffff19831617909255167fb3159fed3ddfba67bae294599eafe2d0ec98c08bb38e0e5fb87d33154b6e05aa62010000826040805163ffffffff939092068316825261ffff601086901c16602083015286831682820152918516606082015290519081900360800190a150506001805460ff60201b1916600160201b17905550565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480612b8857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b5057600080fd5b505afa158015612b64573d6000803e3d6000fd5b505050506040513d6020811015612b7a57600080fd5b50516001600160a01b031633145b612b9157600080fd5b6201000880546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f29983690a85a11696ce8a357993744f8d5a74fde14653e517cc2f8608a7235e99181900360200190a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025481565b60066020819052600091825260409091208054600182015460028301546003909301546001600160801b03831694600160801b909304600f0b93919281900b90600160381b81046001600160a01b031690600160d81b810463ffffffff1690600160f81b900460ff1688565b6000546001600160a01b031615612d08576040805162461bcd60e51b8152602060048201526002602482015261414960f01b604482015290519081900360640190fd5b6000612d1382613a55565b9050600080612d2b612d23612fca565b6009906147f2565b6040805160e0810182526001600160a01b038816808252600288810b60208401819052600094840185905261ffff8781166060860181905290871660808601819052630c800c8060a08701819052600160c090970187905287546001600160a01b03191690951762ffffff60a01b1916600160a01b62ffffff9490950b8416949094029390931763ffffffff60b81b1916600160c81b9091021761ffff60d81b1916600160d81b909202919091179093558154600160201b63ffffffff1990911690911760ff60201b191617905591935091507f00000000000000000000000000000000000000000000000000000000000000001660641415612e40576001805463ffffffff1916630ce40ce4179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166101f41415612e87576001805463ffffffff1916630d480d48179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166109c41415612ece576001805463ffffffff1916630c800c80179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166127101415612f11576001805463ffffffff1916630c800c801790555b604080516001600160a01b0386168152600285900b602082015281517f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95929181900390910190a150505050565b60008082600281900b620d89e71981612f7357fe5b05029050600083600281900b620d89e881612f8a57fe5b0502905060008460020b83830360020b81612fa157fe5b0560010190508062ffffff166001600160801b03801681612fbe57fe5b0493505050505b919050565b4290565b60008060008460020b8660020b81612fe257fe5b05905060008660020b12801561300957508460020b8660020b8161300257fe5b0760020b15155b1561301357600019015b8315613088576000806130258361483e565b600182810b810b600090815260208d9052604090205460ff83169190911b8001600019019081168015159750929450909250908561306a57888360ff1686030261307d565b8861307482614850565b840360ff168603025b965050505050613106565b6000806130978360010161483e565b91509150600060018260ff166001901b031990506000818b60008660010b60010b81526020019081526020016000205416905080600014159550856130e957888360ff0360ff168660010101026130ff565b88836130f4836148ef565b0360ff168660010101025b9650505050505b5094509492505050565b60008060008360020b12613127578260020b61312f565b8260020b6000035b9050620d89e881111561316d576040805162461bcd60e51b81526020600482015260016024820152601560fa1b604482015290519081900360640190fd5b60006001821661318157600160801b613193565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff16905060028216156131c7576ffff97272373d413259a46990580e213a0260801c5b60048216156131e6576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615613205576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615613224576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615613243576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615613262576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615613281576ffe5dee046a99a2a811c461f1969c30530260801c5b6101008216156132a1576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b6102008216156132c1576ff987a7253ac413176f2b074cf7815e540260801c5b6104008216156132e1576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615613301576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615613321576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615613341576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615613361576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615613381576f31be135f97d08fd981231505542fcfa60260801c5b620100008216156133a2576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b620200008216156133c2576e5d6af8dedb81196699c329225ee6040260801c5b620400008216156133e1576d2216e584f5fa1ea926041bedfe980260801c5b620800008216156133fe576b048a170391f7dc42444e8fa20260801c5b60008460020b131561341957806000198161341557fe5b0490505b600160201b81061561342c57600161342f565b60005b60ff16602082901c0192505050919050565b60008080806001600160a01b03808916908a1610158187128015906134c657600061347a8989620f42400362ffffff16620f424061369f565b9050826134935761348e8c8c8c60016149d9565b6134a0565b6134a08b8d8c6001614a54565b95508581106134b1578a96506134c0565b6134bd8c8b8386614b08565b96505b50613510565b816134dd576134d88b8b8b6000614a54565b6134ea565b6134ea8a8c8b60006149d9565b93508388600003106134fe57899550613510565b61350d8b8a8a60000385614b54565b95505b6001600160a01b038a81169087161482156135735780801561352f5750815b61354557613540878d8c6001614a54565b613547565b855b9550808015613554575081155b61356a57613565878d8c60006149d9565b61356c565b845b94506135bd565b80801561357d5750815b6135935761358e8c888c60016149d9565b613595565b855b95508080156135a2575081155b6135b8576135b38c888c6000614a54565b6135ba565b845b94505b811580156135cd57508860000385115b156135d9578860000394505b8180156135f857508a6001600160a01b0316876001600160a01b031614155b15613607578589039350613624565b613621868962ffffff168a620f42400362ffffff16614531565b93505b50505095509550955095915050565b6000600160ff1b821061364557600080fd5b5090565b8082038281131560008312151461365f57600080fd5b92915050565b8181018281121560008312151461365f57600080fd5b60008215806136965750508181028183828161369357fe5b04145b61365f57600080fd5b60008080600019858709868602925082811090839003039050806136d557600084116136ca57600080fd5b508290049050613748565b8084116136e157600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150505b9392505050565b60008063ffffffff87166137f5576000898661ffff1661ffff811061377057fe5b60408051608081018252919092015463ffffffff808216808452600160201b8304600690810b810b900b6020850152600160581b83046001600160a01b031694840194909452600160f81b90910460ff16151560608301529092508a16146137e1576137de818a8988614ba0565b90505b8060200151816040015192509250506138d5565b86880360008061380a8c8c858c8c8c8c614c43565b91509150816000015163ffffffff168363ffffffff16141561383c5781602001518260400151945094505050506138d5565b805163ffffffff848116911614156138645780602001518160400151945094505050506138d5565b8151815160208085015190840151918390039286039163ffffffff80841692908516910360060b8161389257fe5b05028460200151018263ffffffff168263ffffffff1686604001518660400151036001600160a01b031602816138c457fe5b048560400151019650965050505050505b97509795505050505050565b600295860b860b60009081526020979097526040909620600181018054909503909455938301805490920390915560038201805463ffffffff600160d81b6001600160a01b03600160381b808504821690960316909402670100000000000000600160d81b031990921691909117600681810b90960390950b66ffffffffffffff1666ffffffffffffff199095169490941782810485169095039093160263ffffffff60d81b1990931692909217905554600160801b9004600f0b90565b60008082600f0b1215613a0457826001600160801b03168260000384039150816001600160801b0316106139ff576040805162461bcd60e51b81526020600482015260026024820152614c5360f01b604482015290519081900360640190fd5b61365f565b826001600160801b03168284019150816001600160801b0316101561365f576040805162461bcd60e51b81526020600482015260026024820152614c4160f01b604482015290519081900360640190fd5b60006401000276a36001600160a01b03831610801590613a91575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038316105b613ac6576040805162461bcd60e51b81526020600482015260016024820152602960f91b604482015290519081900360640190fd5b77ffffffffffffffffffffffffffffffffffffffff00000000602083901b166001600160801b03811160071b81811c67ffffffffffffffff811160061b90811c63ffffffff811160051b90811c61ffff811160041b90811c60ff8111600390811b91821c600f811160021b90811c918211600190811b92831c97908811961790941790921717909117171760808110613b6757607f810383901c9150613b71565b80607f0383901b91505b908002607f81811c60ff83811c9190911c800280831c81831c1c800280841c81841c1c800280851c81851c1c800280861c81861c1c800280871c81871c1c800280881c81881c1c800280891c81891c1c8002808a1c818a1c1c8002808b1c818b1c1c8002808c1c818c1c1c8002808d1c818d1c1c8002808e1c9c81901c9c909c1c80029c8d901c9e9d607f198f0160401b60c09190911c678000000000000000161760c19b909b1c674000000000000000169a909a1760c29990991c672000000000000000169890981760c39790971c671000000000000000169690961760c49590951c670800000000000000169490941760c59390931c670400000000000000169290921760c69190911c670200000000000000161760c79190911c600160381b161760c89190911c6680000000000000161760c99190911c6640000000000000161760ca9190911c6620000000000000161760cb9190911c6610000000000000161760cc9190911c6608000000000000161760cd9190911c66040000000000001617693627a301d71055774c8581026f028f6481ab7f045a5af012a19d003aa9198101608090811d906fdb2df09e81959a81455e260799a0632f8301901d600281810b9083900b14613d6e57886001600160a01b0316613d5282613110565b6001600160a01b03161115613d675781613d69565b805b613d70565b815b9998505050505050505050565b6000806000898961ffff1661ffff8110613d9357fe5b60408051608081018252919092015463ffffffff808216808452600160201b8304600690810b810b900b6020850152600160581b83046001600160a01b031694840194909452600160f81b90910460ff161515606083015290925089161415613e0257888592509250506138d5565b8461ffff168461ffff16118015613e2357506001850361ffff168961ffff16145b15613e3057839150613e34565b8491505b8161ffff168960010161ffff1681613e4857fe5b069250613e5781898989614ba0565b8a8461ffff1661ffff8110613e6857fe5b825191018054602084015160408501516060909501511515600160f81b026001600160f81b036001600160a01b03909616600160581b027fff0000000000000000000000000000000000000000ffffffffffffffffffffff60069390930b66ffffffffffffff16600160201b026affffffffffffff000000001963ffffffff90971663ffffffff199095169490941795909516929092171692909217929092161790555097509795505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1781529251825160009485949389169392918291908083835b60208310613f945780518252601f199092019160209182019101613f75565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613ff6576040519150601f19603f3d011682016040523d82523d6000602084013e613ffb565b606091505b5091509150818015614029575080511580614029575080806020019051602081101561402657600080fd5b50515b61405f576040805162461bcd60e51b81526020600482015260026024820152612a2360f11b604482015290519081900360640190fd5b5050505050565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17815291518151600093849384936001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001693919290918291908083835b602083106140ff5780518252601f1990920191602091820191016140e0565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461415f576040519150601f19603f3d011682016040523d82523d6000602084013e614164565b606091505b509150915081801561417857506020815110155b61418157600080fd5b80806020019051602081101561419657600080fd5b50519250505090565b8082018281101561365f57600080fd5b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17815291518151600093849384936001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169391929091829190808383602083106140ff5780518252601f1990920191602091820191016140e0565b6000808361ffff1611614285576040805162461bcd60e51b81526020600482015260016024820152604960f81b604482015290519081900360640190fd5b8261ffff168261ffff161161429b575081613748565b825b8261ffff168161ffff1610156142e1576001858261ffff1661ffff81106142c057fe5b01805463ffffffff191663ffffffff9290921691909117905560010161429d565b50909392505050565b80600f81900b8114612fc557600080fd5b600080600061431284602001518560400151614729565b6040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b900b602080840182905261ffff600160b81b8404811685870152600160c81b84048116606080870191909152600160d81b90940416608085015260015463ffffffff811660a086015260ff600160201b90910416151560c0850152885190890151948901519289015193946143b49491939092909190614e3d565b93508460600151600f0b60001461452957846020015160020b816020015160020b1215614409576144026143eb8660200151613110565b6143f88760400151613110565b8760600151614ff2565b9250614529565b846040015160020b816020015160020b12156144ff5760055460408201516001600160801b039091169061445b9061443f612fca565b6020850151606086015160808701516009949392918791613d7d565b6000805461ffff60c81b1916600160c81b61ffff938416021761ffff60b81b1916600160b81b9390921692909202179055815160408701516144ab91906144a190613110565b8860600151614ff2565b93506144c96144bd8760200151613110565b83516060890151615036565b92506144d981876060015161399f565b600580546001600160801b0319166001600160801b039290921691909117905550614529565b61452661450f8660200151613110565b61451c8760400151613110565b8760600151615036565b91505b509193909250565b600061453e84848461369f565b90506000828061454a57fe5b848609111561374857600019811061456157600080fd5b6001019392505050565b6040805160609490941b6bffffffffffffffffffffffff1916602080860191909152600293840b60e890811b60348701529290930b90911b60378401528051808403601a018152603a90930181528251928201929092206000908152929052902090565b60608060008361ffff161161460f576040805162461bcd60e51b81526020600482015260016024820152604960f81b604482015290519081900360640190fd5b865167ffffffffffffffff8111801561462757600080fd5b50604051908082528060200260200182016040528015614651578160200160208202803683370190505b509150865167ffffffffffffffff8111801561466c57600080fd5b50604051908082528060200260200182016040528015614696578160200160208202803683370190505b50905060005b875181101561471c576146c78a8a8a84815181106146b657fe5b60200260200101518a8a8a8a61374f565b8483815181106146d357fe5b602002602001018484815181106146e657fe5b60200260200101826001600160a01b03166001600160a01b03168152508260060b60060b8152505050808060010191505061469c565b5097509795505050505050565b8060020b8260020b12614769576040805162461bcd60e51b8152602060048201526003602482015262544c5560e81b604482015290519081900360640190fd5b620d89e719600283900b12156147ac576040805162461bcd60e51b8152602060048201526003602482015262544c4d60e81b604482015290519081900360640190fd5b620d89e8600282900b13156147ee576040805162461bcd60e51b815260206004820152600360248201526254554d60e81b604482015290519081900360640190fd5b5050565b6040805160808101825263ffffffff9283168082526000602083018190529282019290925260016060909101819052835463ffffffff1916909117909116600160f81b17909155908190565b60020b600881901d9161010090910790565b600080821161485e57600080fd5b600160801b821061487157608091821c91015b68010000000000000000821061488957604091821c91015b600160201b821061489c57602091821c91015b6201000082106148ae57601091821c91015b61010082106148bf57600891821c91015b601082106148cf57600491821c91015b600482106148df57600291821c91015b60028210612fc557600101919050565b60008082116148fd57600080fd5b5060ff6001600160801b0382161561491857607f1901614920565b608082901c91505b67ffffffffffffffff82161561493957603f1901614941565b604082901c91505b63ffffffff82161561495657601f190161495e565b602082901c91505b61ffff82161561497157600f1901614979565b601082901c91505b60ff82161561498b5760071901614993565b600882901c91505b600f8216156149a557600319016149ad565b600482901c91505b60038216156149bf57600119016149c7565b600282901c91505b6001821615612fc55760001901919050565b6000836001600160a01b0316856001600160a01b031611156149f9579293925b81614a2657614a21836001600160801b03168686036001600160a01b0316600160601b61369f565b614a49565b614a49836001600160801b03168686036001600160a01b0316600160601b614531565b90505b949350505050565b6000836001600160a01b0316856001600160a01b03161115614a74579293925b6fffffffffffffffffffffffffffffffff60601b606084901b166001600160a01b038686038116908716614aa757600080fd5b83614ad757866001600160a01b0316614aca8383896001600160a01b031661369f565b81614ad157fe5b04614afd565b614afd614aee8383896001600160a01b0316614531565b886001600160a01b0316615065565b979650505050505050565b600080856001600160a01b031611614b1f57600080fd5b6000846001600160801b031611614b3557600080fd5b81614b4757614a218585856001615070565b614a498585856001615151565b600080856001600160a01b031611614b6b57600080fd5b6000846001600160801b031611614b8157600080fd5b81614b9357614a218585856000615151565b614a498585856000615070565b614ba861597e565b600085600001518503905060405180608001604052808663ffffffff1681526020018263ffffffff168660020b0288602001510160060b81526020016000856001600160801b031611614bfc576001614bfe565b845b6001600160801b031663ffffffff60801b608085901b1681614c1c57fe5b048860400151016001600160a01b0316815260200160011515815250915050949350505050565b614c4b61597e565b614c5361597e565b888561ffff1661ffff8110614c6457fe5b60408051608081018252919092015463ffffffff8116808352600160201b8204600690810b810b900b6020840152600160581b82046001600160a01b031693830193909352600160f81b900460ff16151560608201529250614cc89089908961523d565b15614d00578663ffffffff16826000015163ffffffff161415614cea576138d5565b81614cf783898988614ba0565b915091506138d5565b888361ffff168660010161ffff1681614d1557fe5b0661ffff1661ffff8110614d2557fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b90910416151560608201819052909250614dda57604080516080810182528a5463ffffffff81168252600160201b8104600690810b810b900b6020830152600160581b81046001600160a01b031692820192909252600160f81b90910460ff161515606082015291505b614de98883600001518961523d565b614e20576040805162461bcd60e51b815260206004820152600360248201526213d31160ea1b604482015290519081900360640190fd5b614e2d89898988876152fe565b9150915097509795505050505050565b6000614e4c600887878761456b565b60025460035491925090600080600f87900b15614f92576000614e6d612fca565b6000805460055492935090918291614eb79160099186918591600160a01b810460020b9161ffff600160b81b83048116926001600160801b0390921691600160c81b90041661374f565b9092509050614ef160068d8b8d8b8b87898b60007f000000000000000000000000000000000000000000000000000000000000000061549c565b9450614f2860068c8b8d8b8b87898b60017f000000000000000000000000000000000000000000000000000000000000000061549c565b93508415614f5c57614f5c60078d7f0000000000000000000000000000000000000000000000000000000000000000615659565b8315614f8e57614f8e60078c7f0000000000000000000000000000000000000000000000000000000000000000615659565b5050505b600080614fa460068c8c8b8a8a6156bf565b9092509050614fb5878a848461576b565b600089600f0b1215614fe3578315614fd257614fd260068c615900565b8215614fe357614fe360068b615900565b50505050505095945050505050565b60008082600f0b126150185761501361500e8585856001614a54565b613633565b614a4c565b61502b61500e8585856000036000614a54565b600003949350505050565b60008082600f0b126150525761501361500e85858560016149d9565b61502b61500e85858560000360006149d9565b808204910615150190565b600081156150e35760006001600160a01b038411156150a6576150a184600160601b876001600160801b031661369f565b6150be565b6001600160801b038516606085901b816150bc57fe5b045b90506150db6150d66001600160a01b0388168361419f565b61592c565b915050614a4c565b60006001600160a01b038411156151115761510c84600160601b876001600160801b0316614531565b615128565b615128606085901b6001600160801b038716615065565b905080866001600160a01b03161161513f57600080fd5b6001600160a01b038616039050614a4c565b60008261515f575083614a4c565b6fffffffffffffffffffffffffffffffff60601b606085901b1682156151f6576001600160a01b0386168481029085828161519657fe5b0414156151c7578181018281106151c5576151bb83896001600160a01b031683614531565b9350505050614a4c565b505b6151ed826151e8878a6001600160a01b031686816151e157fe5b049061419f565b615065565b92505050614a4c565b6001600160a01b0386168481029085828161520d57fe5b0414801561521a57508082115b61522357600080fd5b8082036151bb6150d6846001600160a01b038b1684614531565b60008363ffffffff168363ffffffff161115801561526757508363ffffffff168263ffffffff1611155b15615283578163ffffffff168363ffffffff1611159050613748565b60008463ffffffff168463ffffffff16116152aa578363ffffffff16600160201b016152b2565b8363ffffffff165b64ffffffffff16905060008563ffffffff168463ffffffff16116152e2578363ffffffff16600160201b016152ea565b8363ffffffff165b64ffffffffff169091111595945050505050565b61530661597e565b61530e61597e565b60008361ffff168560010161ffff168161532457fe5b0661ffff169050600060018561ffff16830103905060005b506002818301048961ffff8716828161535157fe5b0661ffff811061535d57fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b909104161515606082018190529095506153c75780600101925061533c565b898661ffff1682600101816153d857fe5b0661ffff81106153e457fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b9091041615156060820152855190945060009061544e908b908b61523d565b905080801561546757506154678a8a876000015161523d565b15615472575061548f565b8061548257600182039250615489565b8160010193505b5061533c565b5050509550959350505050565b60028a810b900b600090815260208c90526040812080546001600160801b0316826154c7828d61399f565b9050846001600160801b0316816001600160801b03161115615515576040805162461bcd60e51b81526020600482015260026024820152614c4f60f01b604482015290519081900360640190fd5b6001600160801b0382811615908216158114159450156155be578c60020b8e60020b136155a657600183018b9055600283018a9055600383018054670100000000000000600160d81b031916600160381b6001600160a01b038c16021766ffffffffffffff191666ffffffffffffff60068b900b161763ffffffff60d81b1916600160d81b63ffffffff8a16021790555b6003830180546001600160f81b0316600160f81b1790555b82546001600160801b0319166001600160801b03821617835585615607578254615602906155fd90600160801b9004600f90810b810b908f900b613665565b6142ea565b615628565b8254615628906155fd90600160801b9004600f90810b810b908f900b613649565b8354600f9190910b6001600160801b03908116600160801b0291161790925550909c9b505050505050505050505050565b8060020b8260020b8161566857fe5b0760020b1561567657600080fd5b6000806156918360020b8560020b8161568b57fe5b0561483e565b600191820b820b60009081526020979097526040909620805460ff9097169190911b90951890945550505050565b600285810b80820b60009081526020899052604080822088850b850b83529082209193849391929184918291908a900b1261570557505060018201546002830154615718565b8360010154880391508360020154870390505b6000808b60020b8b60020b121561573a5750506001830154600284015461574d565b84600101548a0391508460020154890390505b92909803979097039b96909503949094039850939650505050505050565b6040805160a08101825285546001600160801b0390811682526001870154602083015260028701549282019290925260038601548083166060830152600160801b900490911660808201526000600f85900b61580a5781516001600160801b0316615802576040805162461bcd60e51b815260206004820152600260248201526104e560f41b604482015290519081900360640190fd5b508051615819565b8151615816908661399f565b90505b600061583d8360200151860384600001516001600160801b0316600160801b61369f565b905060006158638460400151860385600001516001600160801b0316600160801b61369f565b905086600f0b60001461588a5787546001600160801b0319166001600160801b0384161788555b60018801869055600288018590556001600160801b0382161515806158b857506000816001600160801b0316115b156158f6576003880180546001600160801b031981166001600160801b039182168501821617808216600160801b9182900483168501909216021790555b5050505050505050565b600290810b810b6000908152602092909252604082208281556001810183905590810182905560030155565b806001600160a01b0381168114612fc557600080fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b6040805160808101825260008082526020820181905291810182905260608101919091529056fea164736f6c6343000706000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806370cf754a116100f9578063cc7e7fa211610097578063ddca3f4311610071578063ddca3f4314610842578063f305839914610862578063f30dba931461086a578063f637731d146108ec576101c4565b8063cc7e7fa2146107f5578063d0c93a7c1461081b578063d21220a71461083a576101c4565b8063a34123a7116100d3578063a34123a71461072d578063a38807f214610767578063b0d0d211146107c2578063c45a0155146107ed576101c4565b806370cf754a146105e157806385b66729146105e9578063883bdbfd14610626576101c4565b80633c8a7d8d116101665780634f1eb3d8116101405780634f1eb3d81461050f578063514ea4bf146105605780635339c296146105b9578063540d4918146105d9576101c4565b80633c8a7d8d146103cb578063461413191461046b578063490e6cbc14610485576101c4565b80631ad8b03b116101a25780631ad8b03b146102be578063252c09d7146102f557806332148f671461034c5780633850c7bd1461036f576101c4565b80630dfe1681146101c9578063128acb08146101ed5780631a6865021461029a575b600080fd5b6101d1610912565b604080516001600160a01b039092168252519081900360200190f35b610281600480360360a081101561020357600080fd5b6001600160a01b0382358116926020810135151592604082013592606083013516919081019060a081016080820135600160201b81111561024357600080fd5b82018360208201111561025557600080fd5b803590602001918460018302840111600160201b8311171561027657600080fd5b509092509050610936565b6040805192835260208301919091528051918290030190f35b6102a2611633565b604080516001600160801b039092168252519081900360200190f35b6102c6611642565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b6103126004803603602081101561030b57600080fd5b503561165c565b6040805163ffffffff909516855260069390930b60208501526001600160a01b039091168383015215156060830152519081900360800190f35b61036d6004803603602081101561036257600080fd5b503561ffff166116a1565b005b610377611793565b604080516001600160a01b03909816885260029690960b602088015261ffff9485168787015292841660608701529216608085015263ffffffff90911660a0840152151560c0830152519081900360e00190f35b610281600480360360a08110156103e157600080fd5b6001600160a01b03823516916020810135600290810b92604083013590910b916001600160801b036060820135169181019060a081016080820135600160201b81111561042d57600080fd5b82018360208201111561043f57600080fd5b803590602001918460018302840111600160201b8311171561046057600080fd5b5090925090506117e8565b610473611aa6565b60408051918252519081900360200190f35b61036d6004803603608081101561049b57600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b8111156104d157600080fd5b8201836020820111156104e357600080fd5b803590602001918460018302840111600160201b8311171561050457600080fd5b509092509050611aac565b6102c6600480360360a081101561052557600080fd5b506001600160a01b03813516906020810135600290810b91604081013590910b906001600160801b0360608201358116916080013516611ef3565b61057d6004803603602081101561057657600080fd5b5035612111565b604080516001600160801b0396871681526020810195909552848101939093529084166060840152909216608082015290519081900360a00190f35b610473600480360360208110156105cf57600080fd5b503560010b61214e565b6101d1612160565b6102a2612171565b6102c6600480360360608110156105ff57600080fd5b506001600160a01b03813516906001600160801b0360208201358116916040013516612195565b6106946004803603602081101561063c57600080fd5b810190602081018135600160201b81111561065657600080fd5b82018360208201111561066857600080fd5b803590602001918460208302840111600160201b8311171561068957600080fd5b509092509050612490565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156106d85781810151838201526020016106c0565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156107175781810151838201526020016106ff565b5050505090500194505050505060405180910390f35b6102816004803603606081101561074357600080fd5b508035600290810b91602081013590910b90604001356001600160801b0316612515565b6107916004803603604081101561077d57600080fd5b508035600290810b9160200135900b612691565b6040805160069490940b84526001600160a01b03909216602084015263ffffffff1682820152519081900360600190f35b61036d600480360360408110156107d857600080fd5b5063ffffffff81358116916020013516612879565b6101d1612aa1565b61036d6004803603602081101561080b57600080fd5b50356001600160a01b0316612ac5565b610823612be7565b6040805160029290920b8252519081900360200190f35b6101d1612c0b565b61084a612c2f565b6040805162ffffff9092168252519081900360200190f35b610473612c53565b61088a6004803603602081101561088057600080fd5b503560020b612c59565b604080516001600160801b039099168952600f9790970b602089015287870195909552606087019390935260069190910b60808601526001600160a01b031660a085015263ffffffff1660c0840152151560e083015251908190036101000190f35b61036d6004803603602081101561090257600080fd5b50356001600160a01b0316612cc5565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008085610970576040805162461bcd60e51b8152602060048201526002602482015261415360f01b604482015290519081900360640190fd5b6040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b900b602083015261ffff600160b81b8204811693830193909352600160c81b810483166060830152600160d81b9004909116608082015260015463ffffffff811660a083015260ff600160201b90910416151560c08201819052610a28576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b87610a735780600001516001600160a01b0316866001600160a01b0316118015610a6e575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038716105b610aa5565b80600001516001600160a01b0316866001600160a01b0316108015610aa557506401000276a36001600160a01b038716115b610adc576040805162461bcd60e51b815260206004820152600360248201526214d41360ea1b604482015290519081900360640190fd5b6001805460ff60201b191690556040805160c08101909152600090808a610b115760108460a0015163ffffffff16901c610b1b565b60a084015161ffff165b63ffffffff1681526005546001600160801b03166020820152604001610b3f612fca565b63ffffffff1681526000602082018190526040820181905260609091015262010008549091506001600160a01b031615610be557620100085460408083015181516310a537f160e11b815263ffffffff909116600482015290516001600160a01b039092169163214a6fe29160248082019260009290919082900301818387803b158015610bcc57600080fd5b505af1158015610be0573d6000803e3d6000fd5b505050505b6000808913905060006040518060e001604052808b81526020016000815260200185600001516001600160a01b03168152602001856020015160020b81526020018c610c3357600354610c37565b6002545b815260200160006001600160801b0316815260200184602001516001600160801b031681525090505b805115801590610c865750886001600160a01b031681604001516001600160a01b031614155b156110f557610c93615942565b60408201516001600160a01b031681526060820151610cd6906007907f00000000000000000000000000000000000000000000000000000000000000008f612fce565b15156040830152600290810b810b60208301819052620d89e719910b1215610d0757620d89e7196020820152610d26565b6020810151620d89e860029190910b1315610d2657620d89e860208201525b610d338160200151613110565b6001600160a01b031660608201526040820151610dc4908d610d6d578b6001600160a01b031683606001516001600160a01b031611610d87565b8b6001600160a01b031683606001516001600160a01b0316105b610d95578260600151610d97565b8b5b60c085015185517f0000000000000000000000000000000000000000000000000000000000000000613441565b60c085015260a084015260808301526001600160a01b031660408301528215610e2657610dfa8160c00151826080015101613633565b825103825260a0810151610e1c90610e1190613633565b602084015190613649565b6020830152610e61565b610e338160a00151613633565b825101825260c08101516080820151610e5b91610e509101613633565b602084015190613665565b60208301525b835163ffffffff1615610ec1576000612710610e94866000015163ffffffff168460c0015161367b90919063ffffffff16565b81610e9b57fe5b60c0840180519290910491829003905260a0840180519091016001600160801b03169052505b60c08201516001600160801b031615610f0057610ef48160c00151600160801b8460c001516001600160801b031661369f565b60808301805190910190525b80606001516001600160a01b031682604001516001600160a01b031614156110b45780604001511561108b578360a00151610f8a57610f68846040015160008760200151886040015188602001518a60600151600961374f909695949392919063ffffffff16565b6001600160a01b03166080860152600690810b900b6060850152600160a08501525b62010008546001600160a01b03161561101557620100085460208201516040805163a498463360e01b815260029290920b60048301528e15156024830152516001600160a01b039092169163a49846339160448082019260009290919082900301818387803b158015610ffc57600080fd5b505af1158015611010573d6000803e3d6000fd5b505050505b600061106182602001518e61102c57600254611032565b84608001515b8f611041578560800151611045565b6003545b608089015160608a015160408b015160069594939291906138e1565b90508c1561106d576000035b61107b8360c001518261399f565b6001600160801b031660c0840152505b8b61109a5780602001516110a3565b60018160200151035b600290810b900b60608301526110ef565b80600001516001600160a01b031682604001516001600160a01b0316146110ef576110e28260400151613a55565b600290810b900b60608301525b50610c60565b836020015160020b816060015160020b146111c35760008061114386604001518660400151886020015188602001518a606001518b608001516009613d7d909695949392919063ffffffff16565b604085015160608601516000805461ffff60c81b1916600160c81b61ffff958616021761ffff60b81b1916600160b81b95909416949094029290921762ffffff60a01b1916600160a01b62ffffff60029490940b9390931692909202919091176001600160a01b0319166001600160a01b03909116179055506111e89050565b6040810151600080546001600160a01b0319166001600160a01b039092169190911790555b8060c001516001600160801b031683602001516001600160801b03161461122e5760c0810151600580546001600160801b0319166001600160801b039092169190911790555b6000808c1561128857608083015160025560a08301516001600160801b03161561127c5760a0830151600480546001600160801b031981166001600160801b03918216909301169190911790555b8260a0015191506112d5565b608083015160035560a08301516001600160801b0316156112ce5760a0830151600480546001600160801b03808216600160801b92839004821690940116029190911790555b5060a08201515b8315158d1515146112ee57602083015183518d036112fb565b82600001518c0383602001515b90985096508c1561143457600087121561133d5761133d7f00000000000000000000000000000000000000000000000000000000000000008f89600003613f18565b6000611347614066565b9050336001600160a01b03166323a69e758a8a8e8e6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156113cb57600080fd5b505af11580156113df573d6000803e3d6000fd5b505050506113eb614066565b6113f5828b61419f565b111561142e576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b5061155e565b600088121561146b5761146b7f00000000000000000000000000000000000000000000000000000000000000008f8a600003613f18565b60006114756141af565b9050336001600160a01b03166323a69e758a8a8e8e6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156114f957600080fd5b505af115801561150d573d6000803e3d6000fd5b505050506115196141af565b611523828a61419f565b111561155c576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b505b8d6001600160a01b0316336001600160a01b03167f19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc838a8a87604001518860c001518960600151898960405180888152602001878152602001866001600160a01b03168152602001856001600160801b031681526020018460020b8152602001836001600160801b03168152602001826001600160801b0316815260200197505050505050505060405180910390a350506001805460ff60201b1916600160201b17905550939a92995091975050505050505050565b6005546001600160801b031681565b6004546001600160801b0380821691600160801b90041682565b60098161ffff811061166d57600080fd5b015463ffffffff81169150600160201b810460060b90600160581b81046001600160a01b031690600160f81b900460ff1684565b600154600160201b900460ff166116e5576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b1916905560008054600160d81b900461ffff169061170e60098385614247565b6000805461ffff808416600160d81b810261ffff60d81b199093169290921790925591925083161461177b576040805161ffff80851682528316602082015281517fac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a929181900390910190a15b50506001805460ff60201b1916600160201b17905550565b6000546001546001600160a01b03821691600160a01b810460020b9161ffff600160b81b8304811692600160c81b8104821692600160d81b9091049091169063ffffffff81169060ff600160201b9091041687565b6001546000908190600160201b900460ff16611831576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556001600160801b03851661185157600080fd5b60008061189f60405180608001604052808c6001600160a01b031681526020018b60020b81526020018a60020b81526020016118958a6001600160801b03166142ea565b600f0b90526142fb565b925092505081935080925060008060008611156118c1576118be614066565b91505b84156118d2576118cf6141af565b90505b336001600160a01b03166399eee9d087878b8b6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b15801561195457600080fd5b505af1158015611968573d6000803e3d6000fd5b5050505060008611156119bf5761197d614066565b611987838861419f565b11156119bf576040805162461bcd60e51b815260206004820152600260248201526104d360f41b604482015290519081900360640190fd5b8415611a0f576119cd6141af565b6119d7828761419f565b1115611a0f576040805162461bcd60e51b81526020600482015260026024820152614d3160f01b604482015290519081900360640190fd5b8960020b8b60020b8d6001600160a01b03167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde338d8b8b60405180856001600160a01b03168152602001846001600160801b0316815260200183815260200182815260200194505050505060405180910390a450506001805460ff60201b1916600160201b17905550919890975095505050505050565b60035481565b600154600160201b900460ff16611af0576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556005546001600160801b031680611b3f576040805162461bcd60e51b81526020600482015260016024820152601360fa1b604482015290519081900360640190fd5b6000611b74867f000000000000000000000000000000000000000000000000000000000000000062ffffff16620f4240614531565b90506000611bab867f000000000000000000000000000000000000000000000000000000000000000062ffffff16620f4240614531565b90506000611bb7614066565b90506000611bc36141af565b90508815611bf657611bf67f00000000000000000000000000000000000000000000000000000000000000008b8b613f18565b8715611c2757611c277f00000000000000000000000000000000000000000000000000000000000000008b8a613f18565b336001600160a01b031663a1d4833685858a8a6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611ca957600080fd5b505af1158015611cbd573d6000803e3d6000fd5b505050506000611ccb614066565b90506000611cd76141af565b905081611ce4858861419f565b1115611d1c576040805162461bcd60e51b8152602060048201526002602482015261046360f41b604482015290519081900360640190fd5b80611d27848761419f565b1115611d5f576040805162461bcd60e51b8152602060048201526002602482015261463160f01b604482015290519081900360640190fd5b8382038382038115611de85760015461ffff1660008115611d8c5761271063ffffffff8316850204611d8f565b60005b90506001600160801b03811615611dc257600480546001600160801b038082168401166001600160801b03199091161790555b611ddc818503600160801b8d6001600160801b031661369f565b60028054909101905550505b8015611e6d5760015460101c61ffff1660008115611e125761271063ffffffff8316840204611e15565b60005b90506001600160801b03811615611e4757600480546001600160801b03600160801b8083048216850182160291161790555b611e61818403600160801b8d6001600160801b031661369f565b60038054909101905550505b8d6001600160a01b0316336001600160a01b03167fbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca6338f8f86866040518085815260200184815260200183815260200182815260200194505050505060405180910390a350506001805460ff60201b1916600160201b179055505050505050505050505050565b6001546000908190600160201b900460ff16611f3c576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556000611f58600833898961456b565b60038101549091506001600160801b0390811690861611611f795784611f88565b60038101546001600160801b03165b60038201549093506001600160801b03600160801b909104811690851611611fb05783611fc6565b6003810154600160801b90046001600160801b03165b91506001600160801b0383161561202b576003810180546001600160801b031981166001600160801b0391821686900382161790915561202b907f0000000000000000000000000000000000000000000000000000000000000000908a908616613f18565b6001600160801b03821615612091576003810180546001600160801b03600160801b808304821686900382160291811691909117909155612091907f0000000000000000000000000000000000000000000000000000000000000000908a908516613f18565b604080516001600160a01b038a1681526001600160801b0380861660208301528416818301529051600288810b92908a900b9133917f70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0919081900360600190a4506001805460ff60201b1916600160201b17905590969095509350505050565b60086020526000908152604090208054600182015460028301546003909301546001600160801b0392831693919281811691600160801b90041685565b60076020526000908152604090205481565b62010008546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001546000908190600160201b900460ff166121de576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b19169055336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806122ae57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561227657600080fd5b505afa15801561228a573d6000803e3d6000fd5b505050506040513d60208110156122a057600080fd5b50516001600160a01b031633145b6122b757600080fd5b6004546001600160801b03908116908516116122d357836122e0565b6004546001600160801b03165b6004549092506001600160801b03600160801b909104811690841611612306578261231a565b600454600160801b90046001600160801b03165b90506001600160801b0382161561239b576004546001600160801b038381169116141561234957600019909101905b600480546001600160801b031981166001600160801b0391821685900382161790915561239b907f00000000000000000000000000000000000000000000000000000000000000009087908516613f18565b6001600160801b03811615612421576004546001600160801b03828116600160801b9092041614156123cc57600019015b600480546001600160801b03600160801b808304821685900382160291811691909117909155612421907f00000000000000000000000000000000000000000000000000000000000000009087908416613f18565b604080516001600160801b0380851682528316602082015281516001600160a01b0388169233927f596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151929081900390910190a36001805460ff60201b1916600160201b1790559094909350915050565b60608061250a61249e612fca565b858580806020026020016040519081016040528093929190818152602001838360200280828437600092018290525054600554600996959450600160a01b820460020b935061ffff600160b81b8304811693506001600160801b0390911691600160c81b9004166145cf565b915091509250929050565b6001546000908190600160201b900460ff1661255e576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b1916905560408051608081018252338152600287810b602083015286900b91810191909152600090819081906125ba90606081016125ad6001600160801b038a166142ea565b600003600f0b90526142fb565b92509250925081600003945080600003935060008511806125db5750600084115b1561261a576003830180546001600160801b038082168089018216600160801b93849004831689019092169092029091176001600160801b0319161790555b604080516001600160801b0388168152602081018790528082018690529051600289810b92908b900b9133917f0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c919081900360600190a450506001805460ff60201b1916600160201b179055509094909350915050565b60008060006126a08585614729565b600285810b810b600090815260066020819052604080832088850b90940b8352822060038401549182900b93600160381b83046001600160a01b0316928492600160d81b820463ffffffff16928492909190600160f81b900460ff168061270657600080fd5b6003820154600681900b9850600160381b81046001600160a01b03169650600160d81b810463ffffffff169450600160f81b900460ff168061274757600080fd5b50506040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b810b6020840181905261ffff600160b81b8404811695850195909552600160c81b830485166060850152600160d81b909204909316608083015260015463ffffffff811660a084015260ff600160201b90910416151560c08301529093508e820b910b121590506127ef57509390940396509003935090039050612872565b8a60020b816020015160020b121561286357600061280b612fca565b6020830151604084015160055460608601519394506000938493612841936009938893879392916001600160801b03169061374f565b9a9003989098039b505094909603929092039650909103039250612872915050565b50949093039650039350900390505b9250925092565b600154600160201b900460ff166128bd576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b19169055336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061298d57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561295557600080fd5b505afa158015612969573d6000803e3d6000fd5b505050506040513d602081101561297f57600080fd5b50516001600160a01b031633145b61299657600080fd5b63ffffffff821615806129c457506103e88263ffffffff16101580156129c45750610fa08263ffffffff1611155b80156129f9575063ffffffff811615806129f957506103e88163ffffffff16101580156129f95750610fa08163ffffffff1611155b612a0257600080fd5b6001805465ffffffff0000601084901b16840163ffffffff90811663ffffffff19831617909255167fb3159fed3ddfba67bae294599eafe2d0ec98c08bb38e0e5fb87d33154b6e05aa62010000826040805163ffffffff939092068316825261ffff601086901c16602083015286831682820152918516606082015290519081900360800190a150506001805460ff60201b1916600160201b17905550565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480612b8857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b5057600080fd5b505afa158015612b64573d6000803e3d6000fd5b505050506040513d6020811015612b7a57600080fd5b50516001600160a01b031633145b612b9157600080fd5b6201000880546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f29983690a85a11696ce8a357993744f8d5a74fde14653e517cc2f8608a7235e99181900360200190a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025481565b60066020819052600091825260409091208054600182015460028301546003909301546001600160801b03831694600160801b909304600f0b93919281900b90600160381b81046001600160a01b031690600160d81b810463ffffffff1690600160f81b900460ff1688565b6000546001600160a01b031615612d08576040805162461bcd60e51b8152602060048201526002602482015261414960f01b604482015290519081900360640190fd5b6000612d1382613a55565b9050600080612d2b612d23612fca565b6009906147f2565b6040805160e0810182526001600160a01b038816808252600288810b60208401819052600094840185905261ffff8781166060860181905290871660808601819052630c800c8060a08701819052600160c090970187905287546001600160a01b03191690951762ffffff60a01b1916600160a01b62ffffff9490950b8416949094029390931763ffffffff60b81b1916600160c81b9091021761ffff60d81b1916600160d81b909202919091179093558154600160201b63ffffffff1990911690911760ff60201b191617905591935091507f00000000000000000000000000000000000000000000000000000000000000001660641415612e40576001805463ffffffff1916630ce40ce4179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166101f41415612e87576001805463ffffffff1916630d480d48179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166109c41415612ece576001805463ffffffff1916630c800c80179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166127101415612f11576001805463ffffffff1916630c800c801790555b604080516001600160a01b0386168152600285900b602082015281517f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95929181900390910190a150505050565b60008082600281900b620d89e71981612f7357fe5b05029050600083600281900b620d89e881612f8a57fe5b0502905060008460020b83830360020b81612fa157fe5b0560010190508062ffffff166001600160801b03801681612fbe57fe5b0493505050505b919050565b4290565b60008060008460020b8660020b81612fe257fe5b05905060008660020b12801561300957508460020b8660020b8161300257fe5b0760020b15155b1561301357600019015b8315613088576000806130258361483e565b600182810b810b600090815260208d9052604090205460ff83169190911b8001600019019081168015159750929450909250908561306a57888360ff1686030261307d565b8861307482614850565b840360ff168603025b965050505050613106565b6000806130978360010161483e565b91509150600060018260ff166001901b031990506000818b60008660010b60010b81526020019081526020016000205416905080600014159550856130e957888360ff0360ff168660010101026130ff565b88836130f4836148ef565b0360ff168660010101025b9650505050505b5094509492505050565b60008060008360020b12613127578260020b61312f565b8260020b6000035b9050620d89e881111561316d576040805162461bcd60e51b81526020600482015260016024820152601560fa1b604482015290519081900360640190fd5b60006001821661318157600160801b613193565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff16905060028216156131c7576ffff97272373d413259a46990580e213a0260801c5b60048216156131e6576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615613205576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615613224576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615613243576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615613262576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615613281576ffe5dee046a99a2a811c461f1969c30530260801c5b6101008216156132a1576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b6102008216156132c1576ff987a7253ac413176f2b074cf7815e540260801c5b6104008216156132e1576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615613301576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615613321576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615613341576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615613361576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615613381576f31be135f97d08fd981231505542fcfa60260801c5b620100008216156133a2576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b620200008216156133c2576e5d6af8dedb81196699c329225ee6040260801c5b620400008216156133e1576d2216e584f5fa1ea926041bedfe980260801c5b620800008216156133fe576b048a170391f7dc42444e8fa20260801c5b60008460020b131561341957806000198161341557fe5b0490505b600160201b81061561342c57600161342f565b60005b60ff16602082901c0192505050919050565b60008080806001600160a01b03808916908a1610158187128015906134c657600061347a8989620f42400362ffffff16620f424061369f565b9050826134935761348e8c8c8c60016149d9565b6134a0565b6134a08b8d8c6001614a54565b95508581106134b1578a96506134c0565b6134bd8c8b8386614b08565b96505b50613510565b816134dd576134d88b8b8b6000614a54565b6134ea565b6134ea8a8c8b60006149d9565b93508388600003106134fe57899550613510565b61350d8b8a8a60000385614b54565b95505b6001600160a01b038a81169087161482156135735780801561352f5750815b61354557613540878d8c6001614a54565b613547565b855b9550808015613554575081155b61356a57613565878d8c60006149d9565b61356c565b845b94506135bd565b80801561357d5750815b6135935761358e8c888c60016149d9565b613595565b855b95508080156135a2575081155b6135b8576135b38c888c6000614a54565b6135ba565b845b94505b811580156135cd57508860000385115b156135d9578860000394505b8180156135f857508a6001600160a01b0316876001600160a01b031614155b15613607578589039350613624565b613621868962ffffff168a620f42400362ffffff16614531565b93505b50505095509550955095915050565b6000600160ff1b821061364557600080fd5b5090565b8082038281131560008312151461365f57600080fd5b92915050565b8181018281121560008312151461365f57600080fd5b60008215806136965750508181028183828161369357fe5b04145b61365f57600080fd5b60008080600019858709868602925082811090839003039050806136d557600084116136ca57600080fd5b508290049050613748565b8084116136e157600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150505b9392505050565b60008063ffffffff87166137f5576000898661ffff1661ffff811061377057fe5b60408051608081018252919092015463ffffffff808216808452600160201b8304600690810b810b900b6020850152600160581b83046001600160a01b031694840194909452600160f81b90910460ff16151560608301529092508a16146137e1576137de818a8988614ba0565b90505b8060200151816040015192509250506138d5565b86880360008061380a8c8c858c8c8c8c614c43565b91509150816000015163ffffffff168363ffffffff16141561383c5781602001518260400151945094505050506138d5565b805163ffffffff848116911614156138645780602001518160400151945094505050506138d5565b8151815160208085015190840151918390039286039163ffffffff80841692908516910360060b8161389257fe5b05028460200151018263ffffffff168263ffffffff1686604001518660400151036001600160a01b031602816138c457fe5b048560400151019650965050505050505b97509795505050505050565b600295860b860b60009081526020979097526040909620600181018054909503909455938301805490920390915560038201805463ffffffff600160d81b6001600160a01b03600160381b808504821690960316909402670100000000000000600160d81b031990921691909117600681810b90960390950b66ffffffffffffff1666ffffffffffffff199095169490941782810485169095039093160263ffffffff60d81b1990931692909217905554600160801b9004600f0b90565b60008082600f0b1215613a0457826001600160801b03168260000384039150816001600160801b0316106139ff576040805162461bcd60e51b81526020600482015260026024820152614c5360f01b604482015290519081900360640190fd5b61365f565b826001600160801b03168284019150816001600160801b0316101561365f576040805162461bcd60e51b81526020600482015260026024820152614c4160f01b604482015290519081900360640190fd5b60006401000276a36001600160a01b03831610801590613a91575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038316105b613ac6576040805162461bcd60e51b81526020600482015260016024820152602960f91b604482015290519081900360640190fd5b77ffffffffffffffffffffffffffffffffffffffff00000000602083901b166001600160801b03811160071b81811c67ffffffffffffffff811160061b90811c63ffffffff811160051b90811c61ffff811160041b90811c60ff8111600390811b91821c600f811160021b90811c918211600190811b92831c97908811961790941790921717909117171760808110613b6757607f810383901c9150613b71565b80607f0383901b91505b908002607f81811c60ff83811c9190911c800280831c81831c1c800280841c81841c1c800280851c81851c1c800280861c81861c1c800280871c81871c1c800280881c81881c1c800280891c81891c1c8002808a1c818a1c1c8002808b1c818b1c1c8002808c1c818c1c1c8002808d1c818d1c1c8002808e1c9c81901c9c909c1c80029c8d901c9e9d607f198f0160401b60c09190911c678000000000000000161760c19b909b1c674000000000000000169a909a1760c29990991c672000000000000000169890981760c39790971c671000000000000000169690961760c49590951c670800000000000000169490941760c59390931c670400000000000000169290921760c69190911c670200000000000000161760c79190911c600160381b161760c89190911c6680000000000000161760c99190911c6640000000000000161760ca9190911c6620000000000000161760cb9190911c6610000000000000161760cc9190911c6608000000000000161760cd9190911c66040000000000001617693627a301d71055774c8581026f028f6481ab7f045a5af012a19d003aa9198101608090811d906fdb2df09e81959a81455e260799a0632f8301901d600281810b9083900b14613d6e57886001600160a01b0316613d5282613110565b6001600160a01b03161115613d675781613d69565b805b613d70565b815b9998505050505050505050565b6000806000898961ffff1661ffff8110613d9357fe5b60408051608081018252919092015463ffffffff808216808452600160201b8304600690810b810b900b6020850152600160581b83046001600160a01b031694840194909452600160f81b90910460ff161515606083015290925089161415613e0257888592509250506138d5565b8461ffff168461ffff16118015613e2357506001850361ffff168961ffff16145b15613e3057839150613e34565b8491505b8161ffff168960010161ffff1681613e4857fe5b069250613e5781898989614ba0565b8a8461ffff1661ffff8110613e6857fe5b825191018054602084015160408501516060909501511515600160f81b026001600160f81b036001600160a01b03909616600160581b027fff0000000000000000000000000000000000000000ffffffffffffffffffffff60069390930b66ffffffffffffff16600160201b026affffffffffffff000000001963ffffffff90971663ffffffff199095169490941795909516929092171692909217929092161790555097509795505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1781529251825160009485949389169392918291908083835b60208310613f945780518252601f199092019160209182019101613f75565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613ff6576040519150601f19603f3d011682016040523d82523d6000602084013e613ffb565b606091505b5091509150818015614029575080511580614029575080806020019051602081101561402657600080fd5b50515b61405f576040805162461bcd60e51b81526020600482015260026024820152612a2360f11b604482015290519081900360640190fd5b5050505050565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17815291518151600093849384936001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001693919290918291908083835b602083106140ff5780518252601f1990920191602091820191016140e0565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461415f576040519150601f19603f3d011682016040523d82523d6000602084013e614164565b606091505b509150915081801561417857506020815110155b61418157600080fd5b80806020019051602081101561419657600080fd5b50519250505090565b8082018281101561365f57600080fd5b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17815291518151600093849384936001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169391929091829190808383602083106140ff5780518252601f1990920191602091820191016140e0565b6000808361ffff1611614285576040805162461bcd60e51b81526020600482015260016024820152604960f81b604482015290519081900360640190fd5b8261ffff168261ffff161161429b575081613748565b825b8261ffff168161ffff1610156142e1576001858261ffff1661ffff81106142c057fe5b01805463ffffffff191663ffffffff9290921691909117905560010161429d565b50909392505050565b80600f81900b8114612fc557600080fd5b600080600061431284602001518560400151614729565b6040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b900b602080840182905261ffff600160b81b8404811685870152600160c81b84048116606080870191909152600160d81b90940416608085015260015463ffffffff811660a086015260ff600160201b90910416151560c0850152885190890151948901519289015193946143b49491939092909190614e3d565b93508460600151600f0b60001461452957846020015160020b816020015160020b1215614409576144026143eb8660200151613110565b6143f88760400151613110565b8760600151614ff2565b9250614529565b846040015160020b816020015160020b12156144ff5760055460408201516001600160801b039091169061445b9061443f612fca565b6020850151606086015160808701516009949392918791613d7d565b6000805461ffff60c81b1916600160c81b61ffff938416021761ffff60b81b1916600160b81b9390921692909202179055815160408701516144ab91906144a190613110565b8860600151614ff2565b93506144c96144bd8760200151613110565b83516060890151615036565b92506144d981876060015161399f565b600580546001600160801b0319166001600160801b039290921691909117905550614529565b61452661450f8660200151613110565b61451c8760400151613110565b8760600151615036565b91505b509193909250565b600061453e84848461369f565b90506000828061454a57fe5b848609111561374857600019811061456157600080fd5b6001019392505050565b6040805160609490941b6bffffffffffffffffffffffff1916602080860191909152600293840b60e890811b60348701529290930b90911b60378401528051808403601a018152603a90930181528251928201929092206000908152929052902090565b60608060008361ffff161161460f576040805162461bcd60e51b81526020600482015260016024820152604960f81b604482015290519081900360640190fd5b865167ffffffffffffffff8111801561462757600080fd5b50604051908082528060200260200182016040528015614651578160200160208202803683370190505b509150865167ffffffffffffffff8111801561466c57600080fd5b50604051908082528060200260200182016040528015614696578160200160208202803683370190505b50905060005b875181101561471c576146c78a8a8a84815181106146b657fe5b60200260200101518a8a8a8a61374f565b8483815181106146d357fe5b602002602001018484815181106146e657fe5b60200260200101826001600160a01b03166001600160a01b03168152508260060b60060b8152505050808060010191505061469c565b5097509795505050505050565b8060020b8260020b12614769576040805162461bcd60e51b8152602060048201526003602482015262544c5560e81b604482015290519081900360640190fd5b620d89e719600283900b12156147ac576040805162461bcd60e51b8152602060048201526003602482015262544c4d60e81b604482015290519081900360640190fd5b620d89e8600282900b13156147ee576040805162461bcd60e51b815260206004820152600360248201526254554d60e81b604482015290519081900360640190fd5b5050565b6040805160808101825263ffffffff9283168082526000602083018190529282019290925260016060909101819052835463ffffffff1916909117909116600160f81b17909155908190565b60020b600881901d9161010090910790565b600080821161485e57600080fd5b600160801b821061487157608091821c91015b68010000000000000000821061488957604091821c91015b600160201b821061489c57602091821c91015b6201000082106148ae57601091821c91015b61010082106148bf57600891821c91015b601082106148cf57600491821c91015b600482106148df57600291821c91015b60028210612fc557600101919050565b60008082116148fd57600080fd5b5060ff6001600160801b0382161561491857607f1901614920565b608082901c91505b67ffffffffffffffff82161561493957603f1901614941565b604082901c91505b63ffffffff82161561495657601f190161495e565b602082901c91505b61ffff82161561497157600f1901614979565b601082901c91505b60ff82161561498b5760071901614993565b600882901c91505b600f8216156149a557600319016149ad565b600482901c91505b60038216156149bf57600119016149c7565b600282901c91505b6001821615612fc55760001901919050565b6000836001600160a01b0316856001600160a01b031611156149f9579293925b81614a2657614a21836001600160801b03168686036001600160a01b0316600160601b61369f565b614a49565b614a49836001600160801b03168686036001600160a01b0316600160601b614531565b90505b949350505050565b6000836001600160a01b0316856001600160a01b03161115614a74579293925b6fffffffffffffffffffffffffffffffff60601b606084901b166001600160a01b038686038116908716614aa757600080fd5b83614ad757866001600160a01b0316614aca8383896001600160a01b031661369f565b81614ad157fe5b04614afd565b614afd614aee8383896001600160a01b0316614531565b886001600160a01b0316615065565b979650505050505050565b600080856001600160a01b031611614b1f57600080fd5b6000846001600160801b031611614b3557600080fd5b81614b4757614a218585856001615070565b614a498585856001615151565b600080856001600160a01b031611614b6b57600080fd5b6000846001600160801b031611614b8157600080fd5b81614b9357614a218585856000615151565b614a498585856000615070565b614ba861597e565b600085600001518503905060405180608001604052808663ffffffff1681526020018263ffffffff168660020b0288602001510160060b81526020016000856001600160801b031611614bfc576001614bfe565b845b6001600160801b031663ffffffff60801b608085901b1681614c1c57fe5b048860400151016001600160a01b0316815260200160011515815250915050949350505050565b614c4b61597e565b614c5361597e565b888561ffff1661ffff8110614c6457fe5b60408051608081018252919092015463ffffffff8116808352600160201b8204600690810b810b900b6020840152600160581b82046001600160a01b031693830193909352600160f81b900460ff16151560608201529250614cc89089908961523d565b15614d00578663ffffffff16826000015163ffffffff161415614cea576138d5565b81614cf783898988614ba0565b915091506138d5565b888361ffff168660010161ffff1681614d1557fe5b0661ffff1661ffff8110614d2557fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b90910416151560608201819052909250614dda57604080516080810182528a5463ffffffff81168252600160201b8104600690810b810b900b6020830152600160581b81046001600160a01b031692820192909252600160f81b90910460ff161515606082015291505b614de98883600001518961523d565b614e20576040805162461bcd60e51b815260206004820152600360248201526213d31160ea1b604482015290519081900360640190fd5b614e2d89898988876152fe565b9150915097509795505050505050565b6000614e4c600887878761456b565b60025460035491925090600080600f87900b15614f92576000614e6d612fca565b6000805460055492935090918291614eb79160099186918591600160a01b810460020b9161ffff600160b81b83048116926001600160801b0390921691600160c81b90041661374f565b9092509050614ef160068d8b8d8b8b87898b60007f000000000000000000000000000000000000000000000000000000000000000061549c565b9450614f2860068c8b8d8b8b87898b60017f000000000000000000000000000000000000000000000000000000000000000061549c565b93508415614f5c57614f5c60078d7f0000000000000000000000000000000000000000000000000000000000000000615659565b8315614f8e57614f8e60078c7f0000000000000000000000000000000000000000000000000000000000000000615659565b5050505b600080614fa460068c8c8b8a8a6156bf565b9092509050614fb5878a848461576b565b600089600f0b1215614fe3578315614fd257614fd260068c615900565b8215614fe357614fe360068b615900565b50505050505095945050505050565b60008082600f0b126150185761501361500e8585856001614a54565b613633565b614a4c565b61502b61500e8585856000036000614a54565b600003949350505050565b60008082600f0b126150525761501361500e85858560016149d9565b61502b61500e85858560000360006149d9565b808204910615150190565b600081156150e35760006001600160a01b038411156150a6576150a184600160601b876001600160801b031661369f565b6150be565b6001600160801b038516606085901b816150bc57fe5b045b90506150db6150d66001600160a01b0388168361419f565b61592c565b915050614a4c565b60006001600160a01b038411156151115761510c84600160601b876001600160801b0316614531565b615128565b615128606085901b6001600160801b038716615065565b905080866001600160a01b03161161513f57600080fd5b6001600160a01b038616039050614a4c565b60008261515f575083614a4c565b6fffffffffffffffffffffffffffffffff60601b606085901b1682156151f6576001600160a01b0386168481029085828161519657fe5b0414156151c7578181018281106151c5576151bb83896001600160a01b031683614531565b9350505050614a4c565b505b6151ed826151e8878a6001600160a01b031686816151e157fe5b049061419f565b615065565b92505050614a4c565b6001600160a01b0386168481029085828161520d57fe5b0414801561521a57508082115b61522357600080fd5b8082036151bb6150d6846001600160a01b038b1684614531565b60008363ffffffff168363ffffffff161115801561526757508363ffffffff168263ffffffff1611155b15615283578163ffffffff168363ffffffff1611159050613748565b60008463ffffffff168463ffffffff16116152aa578363ffffffff16600160201b016152b2565b8363ffffffff165b64ffffffffff16905060008563ffffffff168463ffffffff16116152e2578363ffffffff16600160201b016152ea565b8363ffffffff165b64ffffffffff169091111595945050505050565b61530661597e565b61530e61597e565b60008361ffff168560010161ffff168161532457fe5b0661ffff169050600060018561ffff16830103905060005b506002818301048961ffff8716828161535157fe5b0661ffff811061535d57fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b909104161515606082018190529095506153c75780600101925061533c565b898661ffff1682600101816153d857fe5b0661ffff81106153e457fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b9091041615156060820152855190945060009061544e908b908b61523d565b905080801561546757506154678a8a876000015161523d565b15615472575061548f565b8061548257600182039250615489565b8160010193505b5061533c565b5050509550959350505050565b60028a810b900b600090815260208c90526040812080546001600160801b0316826154c7828d61399f565b9050846001600160801b0316816001600160801b03161115615515576040805162461bcd60e51b81526020600482015260026024820152614c4f60f01b604482015290519081900360640190fd5b6001600160801b0382811615908216158114159450156155be578c60020b8e60020b136155a657600183018b9055600283018a9055600383018054670100000000000000600160d81b031916600160381b6001600160a01b038c16021766ffffffffffffff191666ffffffffffffff60068b900b161763ffffffff60d81b1916600160d81b63ffffffff8a16021790555b6003830180546001600160f81b0316600160f81b1790555b82546001600160801b0319166001600160801b03821617835585615607578254615602906155fd90600160801b9004600f90810b810b908f900b613665565b6142ea565b615628565b8254615628906155fd90600160801b9004600f90810b810b908f900b613649565b8354600f9190910b6001600160801b03908116600160801b0291161790925550909c9b505050505050505050505050565b8060020b8260020b8161566857fe5b0760020b1561567657600080fd5b6000806156918360020b8560020b8161568b57fe5b0561483e565b600191820b820b60009081526020979097526040909620805460ff9097169190911b90951890945550505050565b600285810b80820b60009081526020899052604080822088850b850b83529082209193849391929184918291908a900b1261570557505060018201546002830154615718565b8360010154880391508360020154870390505b6000808b60020b8b60020b121561573a5750506001830154600284015461574d565b84600101548a0391508460020154890390505b92909803979097039b96909503949094039850939650505050505050565b6040805160a08101825285546001600160801b0390811682526001870154602083015260028701549282019290925260038601548083166060830152600160801b900490911660808201526000600f85900b61580a5781516001600160801b0316615802576040805162461bcd60e51b815260206004820152600260248201526104e560f41b604482015290519081900360640190fd5b508051615819565b8151615816908661399f565b90505b600061583d8360200151860384600001516001600160801b0316600160801b61369f565b905060006158638460400151860385600001516001600160801b0316600160801b61369f565b905086600f0b60001461588a5787546001600160801b0319166001600160801b0384161788555b60018801869055600288018590556001600160801b0382161515806158b857506000816001600160801b0316115b156158f6576003880180546001600160801b031981166001600160801b039182168501821617808216600160801b9182900483168501909216021790555b5050505050505050565b600290810b810b6000908152602092909252604082208281556001810183905590810182905560030155565b806001600160a01b0381168114612fc557600080fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b6040805160808101825260008082526020820181905291810182905260608101919091529056fea164736f6c6343000706000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3PoolDeployer.json b/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3PoolDeployer.json new file mode 100644 index 00000000..24ba6c86 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/PancakeV3PoolDeployer.json @@ -0,0 +1,122 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PancakeV3PoolDeployer", + "sourceName": "contracts/PancakeV3PoolDeployer.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "factory", + "type": "address" + } + ], + "name": "SetFactoryAddress", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "int24", + "name": "tickSpacing", + "type": "int24" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factoryAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parameters", + "outputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "int24", + "name": "tickSpacing", + "type": "int24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_factoryAddress", + "type": "address" + } + ], + "name": "setFactoryAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50615fec806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806383c17c55146100515780638903573014610079578063966dae0e146100c3578063fad5359f146100e7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b0316610131565b005b6100816101d9565b604080516001600160a01b0396871681529486166020860152929094168383015262ffffff16606083015260029290920b608082015290519081900360a00190f35b6100cb61020f565b604080516001600160a01b039092168252519081900360200190f35b6100cb600480360360a08110156100fd57600080fd5b506001600160a01b03813581169160208101358216916040820135169062ffffff606082013516906080013560020b61021e565b6003546001600160a01b03161561018f576040805162461bcd60e51b815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517fb4dd887347efc97a6ad35fc9824a2ac4c0a6a04344d89bf05f3308c854325a6490600090a250565b600054600154600280546001600160a01b03938416939283169281169162ffffff600160a01b83041691600160b81b9004900b85565b6003546001600160a01b031681565b6003546000906001600160a01b03163314610280576040805162461bcd60e51b815260206004820152601c60248201527f6f6e6c7920666163746f72792063616e2063616c6c206465706c6f7900000000604482015290519081900360640190fd5b6040805160a0810182526001600160a01b03888116808352888216602080850182905292891684860181905262ffffff898116606080880182905260028b810b6080998a01819052600080546001600160a01b03199081169099179055600180548916881790558154909716851762ffffff60a01b1916600160a01b84021762ffffff60b81b1916600160b81b97820b909416969096029290921790945586518086019390935282870191909152818101929092528451808203909201825290920192839052815191012090610355906103c4565b8190604051809103906000f5905080158015610375573d6000803e3d6000fd5b50600080546001600160a01b0319908116909155600180549091169055600280547fffffffffffff00000000000000000000000000000000000000000000000000001690559695505050505050565b615c0e806103d28339019056fe6101406040523480156200001257600080fd5b506000336001600160a01b031663890357306040518163ffffffff1660e01b815260040160a06040518083038186803b1580156200004f57600080fd5b505afa15801562000064573d6000803e3d6000fd5b505050506040513d60a08110156200007b57600080fd5b50805160208083015160408401516060808601516080968701516001600160e81b031960e892831b1660e0526001600160601b031993831b841660c05293821b831660a05294901b16909352600283810b900b90911b61010052909150620000ee90829062002f5e62000106821b17901c565b60801b6001600160801b031916610120525062000174565b60008082600281900b620d89e719816200011c57fe5b05029050600083600281900b620d89e8816200013457fe5b0502905060008460020b83830360020b816200014c57fe5b0560010190508062ffffff166001600160801b038016816200016a57fe5b0495945050505050565b60805160601c60a05160601c60c05160601c60e05160e81c6101005160e81c6101205160801c6159b26200025c600039806121735280614ecd5280614f04525080610cb15280612be95280614f385280614f6a525080610da05280611b475280611b7e5280612c315280612e005280612e425280612e895280612ed05250806113145280611c01528061206852806123f85280612c0d52806141fd52508061091452806114425280611bd05280612002528061237252806140b45250806121f6528061221f52806128d552806128fe5280612aa35280612ad05280612af952506159b26000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806370cf754a116100f9578063cc7e7fa211610097578063ddca3f4311610071578063ddca3f4314610842578063f305839914610862578063f30dba931461086a578063f637731d146108ec576101c4565b8063cc7e7fa2146107f5578063d0c93a7c1461081b578063d21220a71461083a576101c4565b8063a34123a7116100d3578063a34123a71461072d578063a38807f214610767578063b0d0d211146107c2578063c45a0155146107ed576101c4565b806370cf754a146105e157806385b66729146105e9578063883bdbfd14610626576101c4565b80633c8a7d8d116101665780634f1eb3d8116101405780634f1eb3d81461050f578063514ea4bf146105605780635339c296146105b9578063540d4918146105d9576101c4565b80633c8a7d8d146103cb578063461413191461046b578063490e6cbc14610485576101c4565b80631ad8b03b116101a25780631ad8b03b146102be578063252c09d7146102f557806332148f671461034c5780633850c7bd1461036f576101c4565b80630dfe1681146101c9578063128acb08146101ed5780631a6865021461029a575b600080fd5b6101d1610912565b604080516001600160a01b039092168252519081900360200190f35b610281600480360360a081101561020357600080fd5b6001600160a01b0382358116926020810135151592604082013592606083013516919081019060a081016080820135600160201b81111561024357600080fd5b82018360208201111561025557600080fd5b803590602001918460018302840111600160201b8311171561027657600080fd5b509092509050610936565b6040805192835260208301919091528051918290030190f35b6102a2611633565b604080516001600160801b039092168252519081900360200190f35b6102c6611642565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b6103126004803603602081101561030b57600080fd5b503561165c565b6040805163ffffffff909516855260069390930b60208501526001600160a01b039091168383015215156060830152519081900360800190f35b61036d6004803603602081101561036257600080fd5b503561ffff166116a1565b005b610377611793565b604080516001600160a01b03909816885260029690960b602088015261ffff9485168787015292841660608701529216608085015263ffffffff90911660a0840152151560c0830152519081900360e00190f35b610281600480360360a08110156103e157600080fd5b6001600160a01b03823516916020810135600290810b92604083013590910b916001600160801b036060820135169181019060a081016080820135600160201b81111561042d57600080fd5b82018360208201111561043f57600080fd5b803590602001918460018302840111600160201b8311171561046057600080fd5b5090925090506117e8565b610473611aa6565b60408051918252519081900360200190f35b61036d6004803603608081101561049b57600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b8111156104d157600080fd5b8201836020820111156104e357600080fd5b803590602001918460018302840111600160201b8311171561050457600080fd5b509092509050611aac565b6102c6600480360360a081101561052557600080fd5b506001600160a01b03813516906020810135600290810b91604081013590910b906001600160801b0360608201358116916080013516611ef3565b61057d6004803603602081101561057657600080fd5b5035612111565b604080516001600160801b0396871681526020810195909552848101939093529084166060840152909216608082015290519081900360a00190f35b610473600480360360208110156105cf57600080fd5b503560010b61214e565b6101d1612160565b6102a2612171565b6102c6600480360360608110156105ff57600080fd5b506001600160a01b03813516906001600160801b0360208201358116916040013516612195565b6106946004803603602081101561063c57600080fd5b810190602081018135600160201b81111561065657600080fd5b82018360208201111561066857600080fd5b803590602001918460208302840111600160201b8311171561068957600080fd5b509092509050612490565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156106d85781810151838201526020016106c0565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156107175781810151838201526020016106ff565b5050505090500194505050505060405180910390f35b6102816004803603606081101561074357600080fd5b508035600290810b91602081013590910b90604001356001600160801b0316612515565b6107916004803603604081101561077d57600080fd5b508035600290810b9160200135900b612691565b6040805160069490940b84526001600160a01b03909216602084015263ffffffff1682820152519081900360600190f35b61036d600480360360408110156107d857600080fd5b5063ffffffff81358116916020013516612879565b6101d1612aa1565b61036d6004803603602081101561080b57600080fd5b50356001600160a01b0316612ac5565b610823612be7565b6040805160029290920b8252519081900360200190f35b6101d1612c0b565b61084a612c2f565b6040805162ffffff9092168252519081900360200190f35b610473612c53565b61088a6004803603602081101561088057600080fd5b503560020b612c59565b604080516001600160801b039099168952600f9790970b602089015287870195909552606087019390935260069190910b60808601526001600160a01b031660a085015263ffffffff1660c0840152151560e083015251908190036101000190f35b61036d6004803603602081101561090257600080fd5b50356001600160a01b0316612cc5565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008085610970576040805162461bcd60e51b8152602060048201526002602482015261415360f01b604482015290519081900360640190fd5b6040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b900b602083015261ffff600160b81b8204811693830193909352600160c81b810483166060830152600160d81b9004909116608082015260015463ffffffff811660a083015260ff600160201b90910416151560c08201819052610a28576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b87610a735780600001516001600160a01b0316866001600160a01b0316118015610a6e575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038716105b610aa5565b80600001516001600160a01b0316866001600160a01b0316108015610aa557506401000276a36001600160a01b038716115b610adc576040805162461bcd60e51b815260206004820152600360248201526214d41360ea1b604482015290519081900360640190fd5b6001805460ff60201b191690556040805160c08101909152600090808a610b115760108460a0015163ffffffff16901c610b1b565b60a084015161ffff165b63ffffffff1681526005546001600160801b03166020820152604001610b3f612fca565b63ffffffff1681526000602082018190526040820181905260609091015262010008549091506001600160a01b031615610be557620100085460408083015181516310a537f160e11b815263ffffffff909116600482015290516001600160a01b039092169163214a6fe29160248082019260009290919082900301818387803b158015610bcc57600080fd5b505af1158015610be0573d6000803e3d6000fd5b505050505b6000808913905060006040518060e001604052808b81526020016000815260200185600001516001600160a01b03168152602001856020015160020b81526020018c610c3357600354610c37565b6002545b815260200160006001600160801b0316815260200184602001516001600160801b031681525090505b805115801590610c865750886001600160a01b031681604001516001600160a01b031614155b156110f557610c93615942565b60408201516001600160a01b031681526060820151610cd6906007907f00000000000000000000000000000000000000000000000000000000000000008f612fce565b15156040830152600290810b810b60208301819052620d89e719910b1215610d0757620d89e7196020820152610d26565b6020810151620d89e860029190910b1315610d2657620d89e860208201525b610d338160200151613110565b6001600160a01b031660608201526040820151610dc4908d610d6d578b6001600160a01b031683606001516001600160a01b031611610d87565b8b6001600160a01b031683606001516001600160a01b0316105b610d95578260600151610d97565b8b5b60c085015185517f0000000000000000000000000000000000000000000000000000000000000000613441565b60c085015260a084015260808301526001600160a01b031660408301528215610e2657610dfa8160c00151826080015101613633565b825103825260a0810151610e1c90610e1190613633565b602084015190613649565b6020830152610e61565b610e338160a00151613633565b825101825260c08101516080820151610e5b91610e509101613633565b602084015190613665565b60208301525b835163ffffffff1615610ec1576000612710610e94866000015163ffffffff168460c0015161367b90919063ffffffff16565b81610e9b57fe5b60c0840180519290910491829003905260a0840180519091016001600160801b03169052505b60c08201516001600160801b031615610f0057610ef48160c00151600160801b8460c001516001600160801b031661369f565b60808301805190910190525b80606001516001600160a01b031682604001516001600160a01b031614156110b45780604001511561108b578360a00151610f8a57610f68846040015160008760200151886040015188602001518a60600151600961374f909695949392919063ffffffff16565b6001600160a01b03166080860152600690810b900b6060850152600160a08501525b62010008546001600160a01b03161561101557620100085460208201516040805163a498463360e01b815260029290920b60048301528e15156024830152516001600160a01b039092169163a49846339160448082019260009290919082900301818387803b158015610ffc57600080fd5b505af1158015611010573d6000803e3d6000fd5b505050505b600061106182602001518e61102c57600254611032565b84608001515b8f611041578560800151611045565b6003545b608089015160608a015160408b015160069594939291906138e1565b90508c1561106d576000035b61107b8360c001518261399f565b6001600160801b031660c0840152505b8b61109a5780602001516110a3565b60018160200151035b600290810b900b60608301526110ef565b80600001516001600160a01b031682604001516001600160a01b0316146110ef576110e28260400151613a55565b600290810b900b60608301525b50610c60565b836020015160020b816060015160020b146111c35760008061114386604001518660400151886020015188602001518a606001518b608001516009613d7d909695949392919063ffffffff16565b604085015160608601516000805461ffff60c81b1916600160c81b61ffff958616021761ffff60b81b1916600160b81b95909416949094029290921762ffffff60a01b1916600160a01b62ffffff60029490940b9390931692909202919091176001600160a01b0319166001600160a01b03909116179055506111e89050565b6040810151600080546001600160a01b0319166001600160a01b039092169190911790555b8060c001516001600160801b031683602001516001600160801b03161461122e5760c0810151600580546001600160801b0319166001600160801b039092169190911790555b6000808c1561128857608083015160025560a08301516001600160801b03161561127c5760a0830151600480546001600160801b031981166001600160801b03918216909301169190911790555b8260a0015191506112d5565b608083015160035560a08301516001600160801b0316156112ce5760a0830151600480546001600160801b03808216600160801b92839004821690940116029190911790555b5060a08201515b8315158d1515146112ee57602083015183518d036112fb565b82600001518c0383602001515b90985096508c1561143457600087121561133d5761133d7f00000000000000000000000000000000000000000000000000000000000000008f89600003613f18565b6000611347614066565b9050336001600160a01b03166323a69e758a8a8e8e6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156113cb57600080fd5b505af11580156113df573d6000803e3d6000fd5b505050506113eb614066565b6113f5828b61419f565b111561142e576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b5061155e565b600088121561146b5761146b7f00000000000000000000000000000000000000000000000000000000000000008f8a600003613f18565b60006114756141af565b9050336001600160a01b03166323a69e758a8a8e8e6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156114f957600080fd5b505af115801561150d573d6000803e3d6000fd5b505050506115196141af565b611523828a61419f565b111561155c576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b505b8d6001600160a01b0316336001600160a01b03167f19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc838a8a87604001518860c001518960600151898960405180888152602001878152602001866001600160a01b03168152602001856001600160801b031681526020018460020b8152602001836001600160801b03168152602001826001600160801b0316815260200197505050505050505060405180910390a350506001805460ff60201b1916600160201b17905550939a92995091975050505050505050565b6005546001600160801b031681565b6004546001600160801b0380821691600160801b90041682565b60098161ffff811061166d57600080fd5b015463ffffffff81169150600160201b810460060b90600160581b81046001600160a01b031690600160f81b900460ff1684565b600154600160201b900460ff166116e5576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b1916905560008054600160d81b900461ffff169061170e60098385614247565b6000805461ffff808416600160d81b810261ffff60d81b199093169290921790925591925083161461177b576040805161ffff80851682528316602082015281517fac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a929181900390910190a15b50506001805460ff60201b1916600160201b17905550565b6000546001546001600160a01b03821691600160a01b810460020b9161ffff600160b81b8304811692600160c81b8104821692600160d81b9091049091169063ffffffff81169060ff600160201b9091041687565b6001546000908190600160201b900460ff16611831576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556001600160801b03851661185157600080fd5b60008061189f60405180608001604052808c6001600160a01b031681526020018b60020b81526020018a60020b81526020016118958a6001600160801b03166142ea565b600f0b90526142fb565b925092505081935080925060008060008611156118c1576118be614066565b91505b84156118d2576118cf6141af565b90505b336001600160a01b03166399eee9d087878b8b6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b15801561195457600080fd5b505af1158015611968573d6000803e3d6000fd5b5050505060008611156119bf5761197d614066565b611987838861419f565b11156119bf576040805162461bcd60e51b815260206004820152600260248201526104d360f41b604482015290519081900360640190fd5b8415611a0f576119cd6141af565b6119d7828761419f565b1115611a0f576040805162461bcd60e51b81526020600482015260026024820152614d3160f01b604482015290519081900360640190fd5b8960020b8b60020b8d6001600160a01b03167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde338d8b8b60405180856001600160a01b03168152602001846001600160801b0316815260200183815260200182815260200194505050505060405180910390a450506001805460ff60201b1916600160201b17905550919890975095505050505050565b60035481565b600154600160201b900460ff16611af0576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556005546001600160801b031680611b3f576040805162461bcd60e51b81526020600482015260016024820152601360fa1b604482015290519081900360640190fd5b6000611b74867f000000000000000000000000000000000000000000000000000000000000000062ffffff16620f4240614531565b90506000611bab867f000000000000000000000000000000000000000000000000000000000000000062ffffff16620f4240614531565b90506000611bb7614066565b90506000611bc36141af565b90508815611bf657611bf67f00000000000000000000000000000000000000000000000000000000000000008b8b613f18565b8715611c2757611c277f00000000000000000000000000000000000000000000000000000000000000008b8a613f18565b336001600160a01b031663a1d4833685858a8a6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611ca957600080fd5b505af1158015611cbd573d6000803e3d6000fd5b505050506000611ccb614066565b90506000611cd76141af565b905081611ce4858861419f565b1115611d1c576040805162461bcd60e51b8152602060048201526002602482015261046360f41b604482015290519081900360640190fd5b80611d27848761419f565b1115611d5f576040805162461bcd60e51b8152602060048201526002602482015261463160f01b604482015290519081900360640190fd5b8382038382038115611de85760015461ffff1660008115611d8c5761271063ffffffff8316850204611d8f565b60005b90506001600160801b03811615611dc257600480546001600160801b038082168401166001600160801b03199091161790555b611ddc818503600160801b8d6001600160801b031661369f565b60028054909101905550505b8015611e6d5760015460101c61ffff1660008115611e125761271063ffffffff8316840204611e15565b60005b90506001600160801b03811615611e4757600480546001600160801b03600160801b8083048216850182160291161790555b611e61818403600160801b8d6001600160801b031661369f565b60038054909101905550505b8d6001600160a01b0316336001600160a01b03167fbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca6338f8f86866040518085815260200184815260200183815260200182815260200194505050505060405180910390a350506001805460ff60201b1916600160201b179055505050505050505050505050565b6001546000908190600160201b900460ff16611f3c576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556000611f58600833898961456b565b60038101549091506001600160801b0390811690861611611f795784611f88565b60038101546001600160801b03165b60038201549093506001600160801b03600160801b909104811690851611611fb05783611fc6565b6003810154600160801b90046001600160801b03165b91506001600160801b0383161561202b576003810180546001600160801b031981166001600160801b0391821686900382161790915561202b907f0000000000000000000000000000000000000000000000000000000000000000908a908616613f18565b6001600160801b03821615612091576003810180546001600160801b03600160801b808304821686900382160291811691909117909155612091907f0000000000000000000000000000000000000000000000000000000000000000908a908516613f18565b604080516001600160a01b038a1681526001600160801b0380861660208301528416818301529051600288810b92908a900b9133917f70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0919081900360600190a4506001805460ff60201b1916600160201b17905590969095509350505050565b60086020526000908152604090208054600182015460028301546003909301546001600160801b0392831693919281811691600160801b90041685565b60076020526000908152604090205481565b62010008546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001546000908190600160201b900460ff166121de576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b19169055336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806122ae57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561227657600080fd5b505afa15801561228a573d6000803e3d6000fd5b505050506040513d60208110156122a057600080fd5b50516001600160a01b031633145b6122b757600080fd5b6004546001600160801b03908116908516116122d357836122e0565b6004546001600160801b03165b6004549092506001600160801b03600160801b909104811690841611612306578261231a565b600454600160801b90046001600160801b03165b90506001600160801b0382161561239b576004546001600160801b038381169116141561234957600019909101905b600480546001600160801b031981166001600160801b0391821685900382161790915561239b907f00000000000000000000000000000000000000000000000000000000000000009087908516613f18565b6001600160801b03811615612421576004546001600160801b03828116600160801b9092041614156123cc57600019015b600480546001600160801b03600160801b808304821685900382160291811691909117909155612421907f00000000000000000000000000000000000000000000000000000000000000009087908416613f18565b604080516001600160801b0380851682528316602082015281516001600160a01b0388169233927f596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151929081900390910190a36001805460ff60201b1916600160201b1790559094909350915050565b60608061250a61249e612fca565b858580806020026020016040519081016040528093929190818152602001838360200280828437600092018290525054600554600996959450600160a01b820460020b935061ffff600160b81b8304811693506001600160801b0390911691600160c81b9004166145cf565b915091509250929050565b6001546000908190600160201b900460ff1661255e576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b1916905560408051608081018252338152600287810b602083015286900b91810191909152600090819081906125ba90606081016125ad6001600160801b038a166142ea565b600003600f0b90526142fb565b92509250925081600003945080600003935060008511806125db5750600084115b1561261a576003830180546001600160801b038082168089018216600160801b93849004831689019092169092029091176001600160801b0319161790555b604080516001600160801b0388168152602081018790528082018690529051600289810b92908b900b9133917f0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c919081900360600190a450506001805460ff60201b1916600160201b179055509094909350915050565b60008060006126a08585614729565b600285810b810b600090815260066020819052604080832088850b90940b8352822060038401549182900b93600160381b83046001600160a01b0316928492600160d81b820463ffffffff16928492909190600160f81b900460ff168061270657600080fd5b6003820154600681900b9850600160381b81046001600160a01b03169650600160d81b810463ffffffff169450600160f81b900460ff168061274757600080fd5b50506040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b810b6020840181905261ffff600160b81b8404811695850195909552600160c81b830485166060850152600160d81b909204909316608083015260015463ffffffff811660a084015260ff600160201b90910416151560c08301529093508e820b910b121590506127ef57509390940396509003935090039050612872565b8a60020b816020015160020b121561286357600061280b612fca565b6020830151604084015160055460608601519394506000938493612841936009938893879392916001600160801b03169061374f565b9a9003989098039b505094909603929092039650909103039250612872915050565b50949093039650039350900390505b9250925092565b600154600160201b900460ff166128bd576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b19169055336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061298d57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561295557600080fd5b505afa158015612969573d6000803e3d6000fd5b505050506040513d602081101561297f57600080fd5b50516001600160a01b031633145b61299657600080fd5b63ffffffff821615806129c457506103e88263ffffffff16101580156129c45750610fa08263ffffffff1611155b80156129f9575063ffffffff811615806129f957506103e88163ffffffff16101580156129f95750610fa08163ffffffff1611155b612a0257600080fd5b6001805465ffffffff0000601084901b16840163ffffffff90811663ffffffff19831617909255167fb3159fed3ddfba67bae294599eafe2d0ec98c08bb38e0e5fb87d33154b6e05aa62010000826040805163ffffffff939092068316825261ffff601086901c16602083015286831682820152918516606082015290519081900360800190a150506001805460ff60201b1916600160201b17905550565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480612b8857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b5057600080fd5b505afa158015612b64573d6000803e3d6000fd5b505050506040513d6020811015612b7a57600080fd5b50516001600160a01b031633145b612b9157600080fd5b6201000880546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f29983690a85a11696ce8a357993744f8d5a74fde14653e517cc2f8608a7235e99181900360200190a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025481565b60066020819052600091825260409091208054600182015460028301546003909301546001600160801b03831694600160801b909304600f0b93919281900b90600160381b81046001600160a01b031690600160d81b810463ffffffff1690600160f81b900460ff1688565b6000546001600160a01b031615612d08576040805162461bcd60e51b8152602060048201526002602482015261414960f01b604482015290519081900360640190fd5b6000612d1382613a55565b9050600080612d2b612d23612fca565b6009906147f2565b6040805160e0810182526001600160a01b038816808252600288810b60208401819052600094840185905261ffff8781166060860181905290871660808601819052630c800c8060a08701819052600160c090970187905287546001600160a01b03191690951762ffffff60a01b1916600160a01b62ffffff9490950b8416949094029390931763ffffffff60b81b1916600160c81b9091021761ffff60d81b1916600160d81b909202919091179093558154600160201b63ffffffff1990911690911760ff60201b191617905591935091507f00000000000000000000000000000000000000000000000000000000000000001660641415612e40576001805463ffffffff1916630ce40ce4179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166101f41415612e87576001805463ffffffff1916630d480d48179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166109c41415612ece576001805463ffffffff1916630c800c80179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166127101415612f11576001805463ffffffff1916630c800c801790555b604080516001600160a01b0386168152600285900b602082015281517f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95929181900390910190a150505050565b60008082600281900b620d89e71981612f7357fe5b05029050600083600281900b620d89e881612f8a57fe5b0502905060008460020b83830360020b81612fa157fe5b0560010190508062ffffff166001600160801b03801681612fbe57fe5b0493505050505b919050565b4290565b60008060008460020b8660020b81612fe257fe5b05905060008660020b12801561300957508460020b8660020b8161300257fe5b0760020b15155b1561301357600019015b8315613088576000806130258361483e565b600182810b810b600090815260208d9052604090205460ff83169190911b8001600019019081168015159750929450909250908561306a57888360ff1686030261307d565b8861307482614850565b840360ff168603025b965050505050613106565b6000806130978360010161483e565b91509150600060018260ff166001901b031990506000818b60008660010b60010b81526020019081526020016000205416905080600014159550856130e957888360ff0360ff168660010101026130ff565b88836130f4836148ef565b0360ff168660010101025b9650505050505b5094509492505050565b60008060008360020b12613127578260020b61312f565b8260020b6000035b9050620d89e881111561316d576040805162461bcd60e51b81526020600482015260016024820152601560fa1b604482015290519081900360640190fd5b60006001821661318157600160801b613193565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff16905060028216156131c7576ffff97272373d413259a46990580e213a0260801c5b60048216156131e6576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615613205576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615613224576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615613243576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615613262576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615613281576ffe5dee046a99a2a811c461f1969c30530260801c5b6101008216156132a1576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b6102008216156132c1576ff987a7253ac413176f2b074cf7815e540260801c5b6104008216156132e1576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615613301576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615613321576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615613341576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615613361576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615613381576f31be135f97d08fd981231505542fcfa60260801c5b620100008216156133a2576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b620200008216156133c2576e5d6af8dedb81196699c329225ee6040260801c5b620400008216156133e1576d2216e584f5fa1ea926041bedfe980260801c5b620800008216156133fe576b048a170391f7dc42444e8fa20260801c5b60008460020b131561341957806000198161341557fe5b0490505b600160201b81061561342c57600161342f565b60005b60ff16602082901c0192505050919050565b60008080806001600160a01b03808916908a1610158187128015906134c657600061347a8989620f42400362ffffff16620f424061369f565b9050826134935761348e8c8c8c60016149d9565b6134a0565b6134a08b8d8c6001614a54565b95508581106134b1578a96506134c0565b6134bd8c8b8386614b08565b96505b50613510565b816134dd576134d88b8b8b6000614a54565b6134ea565b6134ea8a8c8b60006149d9565b93508388600003106134fe57899550613510565b61350d8b8a8a60000385614b54565b95505b6001600160a01b038a81169087161482156135735780801561352f5750815b61354557613540878d8c6001614a54565b613547565b855b9550808015613554575081155b61356a57613565878d8c60006149d9565b61356c565b845b94506135bd565b80801561357d5750815b6135935761358e8c888c60016149d9565b613595565b855b95508080156135a2575081155b6135b8576135b38c888c6000614a54565b6135ba565b845b94505b811580156135cd57508860000385115b156135d9578860000394505b8180156135f857508a6001600160a01b0316876001600160a01b031614155b15613607578589039350613624565b613621868962ffffff168a620f42400362ffffff16614531565b93505b50505095509550955095915050565b6000600160ff1b821061364557600080fd5b5090565b8082038281131560008312151461365f57600080fd5b92915050565b8181018281121560008312151461365f57600080fd5b60008215806136965750508181028183828161369357fe5b04145b61365f57600080fd5b60008080600019858709868602925082811090839003039050806136d557600084116136ca57600080fd5b508290049050613748565b8084116136e157600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150505b9392505050565b60008063ffffffff87166137f5576000898661ffff1661ffff811061377057fe5b60408051608081018252919092015463ffffffff808216808452600160201b8304600690810b810b900b6020850152600160581b83046001600160a01b031694840194909452600160f81b90910460ff16151560608301529092508a16146137e1576137de818a8988614ba0565b90505b8060200151816040015192509250506138d5565b86880360008061380a8c8c858c8c8c8c614c43565b91509150816000015163ffffffff168363ffffffff16141561383c5781602001518260400151945094505050506138d5565b805163ffffffff848116911614156138645780602001518160400151945094505050506138d5565b8151815160208085015190840151918390039286039163ffffffff80841692908516910360060b8161389257fe5b05028460200151018263ffffffff168263ffffffff1686604001518660400151036001600160a01b031602816138c457fe5b048560400151019650965050505050505b97509795505050505050565b600295860b860b60009081526020979097526040909620600181018054909503909455938301805490920390915560038201805463ffffffff600160d81b6001600160a01b03600160381b808504821690960316909402670100000000000000600160d81b031990921691909117600681810b90960390950b66ffffffffffffff1666ffffffffffffff199095169490941782810485169095039093160263ffffffff60d81b1990931692909217905554600160801b9004600f0b90565b60008082600f0b1215613a0457826001600160801b03168260000384039150816001600160801b0316106139ff576040805162461bcd60e51b81526020600482015260026024820152614c5360f01b604482015290519081900360640190fd5b61365f565b826001600160801b03168284019150816001600160801b0316101561365f576040805162461bcd60e51b81526020600482015260026024820152614c4160f01b604482015290519081900360640190fd5b60006401000276a36001600160a01b03831610801590613a91575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038316105b613ac6576040805162461bcd60e51b81526020600482015260016024820152602960f91b604482015290519081900360640190fd5b77ffffffffffffffffffffffffffffffffffffffff00000000602083901b166001600160801b03811160071b81811c67ffffffffffffffff811160061b90811c63ffffffff811160051b90811c61ffff811160041b90811c60ff8111600390811b91821c600f811160021b90811c918211600190811b92831c97908811961790941790921717909117171760808110613b6757607f810383901c9150613b71565b80607f0383901b91505b908002607f81811c60ff83811c9190911c800280831c81831c1c800280841c81841c1c800280851c81851c1c800280861c81861c1c800280871c81871c1c800280881c81881c1c800280891c81891c1c8002808a1c818a1c1c8002808b1c818b1c1c8002808c1c818c1c1c8002808d1c818d1c1c8002808e1c9c81901c9c909c1c80029c8d901c9e9d607f198f0160401b60c09190911c678000000000000000161760c19b909b1c674000000000000000169a909a1760c29990991c672000000000000000169890981760c39790971c671000000000000000169690961760c49590951c670800000000000000169490941760c59390931c670400000000000000169290921760c69190911c670200000000000000161760c79190911c600160381b161760c89190911c6680000000000000161760c99190911c6640000000000000161760ca9190911c6620000000000000161760cb9190911c6610000000000000161760cc9190911c6608000000000000161760cd9190911c66040000000000001617693627a301d71055774c8581026f028f6481ab7f045a5af012a19d003aa9198101608090811d906fdb2df09e81959a81455e260799a0632f8301901d600281810b9083900b14613d6e57886001600160a01b0316613d5282613110565b6001600160a01b03161115613d675781613d69565b805b613d70565b815b9998505050505050505050565b6000806000898961ffff1661ffff8110613d9357fe5b60408051608081018252919092015463ffffffff808216808452600160201b8304600690810b810b900b6020850152600160581b83046001600160a01b031694840194909452600160f81b90910460ff161515606083015290925089161415613e0257888592509250506138d5565b8461ffff168461ffff16118015613e2357506001850361ffff168961ffff16145b15613e3057839150613e34565b8491505b8161ffff168960010161ffff1681613e4857fe5b069250613e5781898989614ba0565b8a8461ffff1661ffff8110613e6857fe5b825191018054602084015160408501516060909501511515600160f81b026001600160f81b036001600160a01b03909616600160581b027fff0000000000000000000000000000000000000000ffffffffffffffffffffff60069390930b66ffffffffffffff16600160201b026affffffffffffff000000001963ffffffff90971663ffffffff199095169490941795909516929092171692909217929092161790555097509795505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1781529251825160009485949389169392918291908083835b60208310613f945780518252601f199092019160209182019101613f75565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613ff6576040519150601f19603f3d011682016040523d82523d6000602084013e613ffb565b606091505b5091509150818015614029575080511580614029575080806020019051602081101561402657600080fd5b50515b61405f576040805162461bcd60e51b81526020600482015260026024820152612a2360f11b604482015290519081900360640190fd5b5050505050565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17815291518151600093849384936001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001693919290918291908083835b602083106140ff5780518252601f1990920191602091820191016140e0565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461415f576040519150601f19603f3d011682016040523d82523d6000602084013e614164565b606091505b509150915081801561417857506020815110155b61418157600080fd5b80806020019051602081101561419657600080fd5b50519250505090565b8082018281101561365f57600080fd5b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17815291518151600093849384936001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169391929091829190808383602083106140ff5780518252601f1990920191602091820191016140e0565b6000808361ffff1611614285576040805162461bcd60e51b81526020600482015260016024820152604960f81b604482015290519081900360640190fd5b8261ffff168261ffff161161429b575081613748565b825b8261ffff168161ffff1610156142e1576001858261ffff1661ffff81106142c057fe5b01805463ffffffff191663ffffffff9290921691909117905560010161429d565b50909392505050565b80600f81900b8114612fc557600080fd5b600080600061431284602001518560400151614729565b6040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b900b602080840182905261ffff600160b81b8404811685870152600160c81b84048116606080870191909152600160d81b90940416608085015260015463ffffffff811660a086015260ff600160201b90910416151560c0850152885190890151948901519289015193946143b49491939092909190614e3d565b93508460600151600f0b60001461452957846020015160020b816020015160020b1215614409576144026143eb8660200151613110565b6143f88760400151613110565b8760600151614ff2565b9250614529565b846040015160020b816020015160020b12156144ff5760055460408201516001600160801b039091169061445b9061443f612fca565b6020850151606086015160808701516009949392918791613d7d565b6000805461ffff60c81b1916600160c81b61ffff938416021761ffff60b81b1916600160b81b9390921692909202179055815160408701516144ab91906144a190613110565b8860600151614ff2565b93506144c96144bd8760200151613110565b83516060890151615036565b92506144d981876060015161399f565b600580546001600160801b0319166001600160801b039290921691909117905550614529565b61452661450f8660200151613110565b61451c8760400151613110565b8760600151615036565b91505b509193909250565b600061453e84848461369f565b90506000828061454a57fe5b848609111561374857600019811061456157600080fd5b6001019392505050565b6040805160609490941b6bffffffffffffffffffffffff1916602080860191909152600293840b60e890811b60348701529290930b90911b60378401528051808403601a018152603a90930181528251928201929092206000908152929052902090565b60608060008361ffff161161460f576040805162461bcd60e51b81526020600482015260016024820152604960f81b604482015290519081900360640190fd5b865167ffffffffffffffff8111801561462757600080fd5b50604051908082528060200260200182016040528015614651578160200160208202803683370190505b509150865167ffffffffffffffff8111801561466c57600080fd5b50604051908082528060200260200182016040528015614696578160200160208202803683370190505b50905060005b875181101561471c576146c78a8a8a84815181106146b657fe5b60200260200101518a8a8a8a61374f565b8483815181106146d357fe5b602002602001018484815181106146e657fe5b60200260200101826001600160a01b03166001600160a01b03168152508260060b60060b8152505050808060010191505061469c565b5097509795505050505050565b8060020b8260020b12614769576040805162461bcd60e51b8152602060048201526003602482015262544c5560e81b604482015290519081900360640190fd5b620d89e719600283900b12156147ac576040805162461bcd60e51b8152602060048201526003602482015262544c4d60e81b604482015290519081900360640190fd5b620d89e8600282900b13156147ee576040805162461bcd60e51b815260206004820152600360248201526254554d60e81b604482015290519081900360640190fd5b5050565b6040805160808101825263ffffffff9283168082526000602083018190529282019290925260016060909101819052835463ffffffff1916909117909116600160f81b17909155908190565b60020b600881901d9161010090910790565b600080821161485e57600080fd5b600160801b821061487157608091821c91015b68010000000000000000821061488957604091821c91015b600160201b821061489c57602091821c91015b6201000082106148ae57601091821c91015b61010082106148bf57600891821c91015b601082106148cf57600491821c91015b600482106148df57600291821c91015b60028210612fc557600101919050565b60008082116148fd57600080fd5b5060ff6001600160801b0382161561491857607f1901614920565b608082901c91505b67ffffffffffffffff82161561493957603f1901614941565b604082901c91505b63ffffffff82161561495657601f190161495e565b602082901c91505b61ffff82161561497157600f1901614979565b601082901c91505b60ff82161561498b5760071901614993565b600882901c91505b600f8216156149a557600319016149ad565b600482901c91505b60038216156149bf57600119016149c7565b600282901c91505b6001821615612fc55760001901919050565b6000836001600160a01b0316856001600160a01b031611156149f9579293925b81614a2657614a21836001600160801b03168686036001600160a01b0316600160601b61369f565b614a49565b614a49836001600160801b03168686036001600160a01b0316600160601b614531565b90505b949350505050565b6000836001600160a01b0316856001600160a01b03161115614a74579293925b6fffffffffffffffffffffffffffffffff60601b606084901b166001600160a01b038686038116908716614aa757600080fd5b83614ad757866001600160a01b0316614aca8383896001600160a01b031661369f565b81614ad157fe5b04614afd565b614afd614aee8383896001600160a01b0316614531565b886001600160a01b0316615065565b979650505050505050565b600080856001600160a01b031611614b1f57600080fd5b6000846001600160801b031611614b3557600080fd5b81614b4757614a218585856001615070565b614a498585856001615151565b600080856001600160a01b031611614b6b57600080fd5b6000846001600160801b031611614b8157600080fd5b81614b9357614a218585856000615151565b614a498585856000615070565b614ba861597e565b600085600001518503905060405180608001604052808663ffffffff1681526020018263ffffffff168660020b0288602001510160060b81526020016000856001600160801b031611614bfc576001614bfe565b845b6001600160801b031663ffffffff60801b608085901b1681614c1c57fe5b048860400151016001600160a01b0316815260200160011515815250915050949350505050565b614c4b61597e565b614c5361597e565b888561ffff1661ffff8110614c6457fe5b60408051608081018252919092015463ffffffff8116808352600160201b8204600690810b810b900b6020840152600160581b82046001600160a01b031693830193909352600160f81b900460ff16151560608201529250614cc89089908961523d565b15614d00578663ffffffff16826000015163ffffffff161415614cea576138d5565b81614cf783898988614ba0565b915091506138d5565b888361ffff168660010161ffff1681614d1557fe5b0661ffff1661ffff8110614d2557fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b90910416151560608201819052909250614dda57604080516080810182528a5463ffffffff81168252600160201b8104600690810b810b900b6020830152600160581b81046001600160a01b031692820192909252600160f81b90910460ff161515606082015291505b614de98883600001518961523d565b614e20576040805162461bcd60e51b815260206004820152600360248201526213d31160ea1b604482015290519081900360640190fd5b614e2d89898988876152fe565b9150915097509795505050505050565b6000614e4c600887878761456b565b60025460035491925090600080600f87900b15614f92576000614e6d612fca565b6000805460055492935090918291614eb79160099186918591600160a01b810460020b9161ffff600160b81b83048116926001600160801b0390921691600160c81b90041661374f565b9092509050614ef160068d8b8d8b8b87898b60007f000000000000000000000000000000000000000000000000000000000000000061549c565b9450614f2860068c8b8d8b8b87898b60017f000000000000000000000000000000000000000000000000000000000000000061549c565b93508415614f5c57614f5c60078d7f0000000000000000000000000000000000000000000000000000000000000000615659565b8315614f8e57614f8e60078c7f0000000000000000000000000000000000000000000000000000000000000000615659565b5050505b600080614fa460068c8c8b8a8a6156bf565b9092509050614fb5878a848461576b565b600089600f0b1215614fe3578315614fd257614fd260068c615900565b8215614fe357614fe360068b615900565b50505050505095945050505050565b60008082600f0b126150185761501361500e8585856001614a54565b613633565b614a4c565b61502b61500e8585856000036000614a54565b600003949350505050565b60008082600f0b126150525761501361500e85858560016149d9565b61502b61500e85858560000360006149d9565b808204910615150190565b600081156150e35760006001600160a01b038411156150a6576150a184600160601b876001600160801b031661369f565b6150be565b6001600160801b038516606085901b816150bc57fe5b045b90506150db6150d66001600160a01b0388168361419f565b61592c565b915050614a4c565b60006001600160a01b038411156151115761510c84600160601b876001600160801b0316614531565b615128565b615128606085901b6001600160801b038716615065565b905080866001600160a01b03161161513f57600080fd5b6001600160a01b038616039050614a4c565b60008261515f575083614a4c565b6fffffffffffffffffffffffffffffffff60601b606085901b1682156151f6576001600160a01b0386168481029085828161519657fe5b0414156151c7578181018281106151c5576151bb83896001600160a01b031683614531565b9350505050614a4c565b505b6151ed826151e8878a6001600160a01b031686816151e157fe5b049061419f565b615065565b92505050614a4c565b6001600160a01b0386168481029085828161520d57fe5b0414801561521a57508082115b61522357600080fd5b8082036151bb6150d6846001600160a01b038b1684614531565b60008363ffffffff168363ffffffff161115801561526757508363ffffffff168263ffffffff1611155b15615283578163ffffffff168363ffffffff1611159050613748565b60008463ffffffff168463ffffffff16116152aa578363ffffffff16600160201b016152b2565b8363ffffffff165b64ffffffffff16905060008563ffffffff168463ffffffff16116152e2578363ffffffff16600160201b016152ea565b8363ffffffff165b64ffffffffff169091111595945050505050565b61530661597e565b61530e61597e565b60008361ffff168560010161ffff168161532457fe5b0661ffff169050600060018561ffff16830103905060005b506002818301048961ffff8716828161535157fe5b0661ffff811061535d57fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b909104161515606082018190529095506153c75780600101925061533c565b898661ffff1682600101816153d857fe5b0661ffff81106153e457fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b9091041615156060820152855190945060009061544e908b908b61523d565b905080801561546757506154678a8a876000015161523d565b15615472575061548f565b8061548257600182039250615489565b8160010193505b5061533c565b5050509550959350505050565b60028a810b900b600090815260208c90526040812080546001600160801b0316826154c7828d61399f565b9050846001600160801b0316816001600160801b03161115615515576040805162461bcd60e51b81526020600482015260026024820152614c4f60f01b604482015290519081900360640190fd5b6001600160801b0382811615908216158114159450156155be578c60020b8e60020b136155a657600183018b9055600283018a9055600383018054670100000000000000600160d81b031916600160381b6001600160a01b038c16021766ffffffffffffff191666ffffffffffffff60068b900b161763ffffffff60d81b1916600160d81b63ffffffff8a16021790555b6003830180546001600160f81b0316600160f81b1790555b82546001600160801b0319166001600160801b03821617835585615607578254615602906155fd90600160801b9004600f90810b810b908f900b613665565b6142ea565b615628565b8254615628906155fd90600160801b9004600f90810b810b908f900b613649565b8354600f9190910b6001600160801b03908116600160801b0291161790925550909c9b505050505050505050505050565b8060020b8260020b8161566857fe5b0760020b1561567657600080fd5b6000806156918360020b8560020b8161568b57fe5b0561483e565b600191820b820b60009081526020979097526040909620805460ff9097169190911b90951890945550505050565b600285810b80820b60009081526020899052604080822088850b850b83529082209193849391929184918291908a900b1261570557505060018201546002830154615718565b8360010154880391508360020154870390505b6000808b60020b8b60020b121561573a5750506001830154600284015461574d565b84600101548a0391508460020154890390505b92909803979097039b96909503949094039850939650505050505050565b6040805160a08101825285546001600160801b0390811682526001870154602083015260028701549282019290925260038601548083166060830152600160801b900490911660808201526000600f85900b61580a5781516001600160801b0316615802576040805162461bcd60e51b815260206004820152600260248201526104e560f41b604482015290519081900360640190fd5b508051615819565b8151615816908661399f565b90505b600061583d8360200151860384600001516001600160801b0316600160801b61369f565b905060006158638460400151860385600001516001600160801b0316600160801b61369f565b905086600f0b60001461588a5787546001600160801b0319166001600160801b0384161788555b60018801869055600288018590556001600160801b0382161515806158b857506000816001600160801b0316115b156158f6576003880180546001600160801b031981166001600160801b039182168501821617808216600160801b9182900483168501909216021790555b5050505050505050565b600290810b810b6000908152602092909252604082208281556001810183905590810182905560030155565b806001600160a01b0381168114612fc557600080fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b6040805160808101825260008082526020820181905291810182905260608101919091529056fea164736f6c6343000706000aa164736f6c6343000706000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806383c17c55146100515780638903573014610079578063966dae0e146100c3578063fad5359f146100e7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b0316610131565b005b6100816101d9565b604080516001600160a01b0396871681529486166020860152929094168383015262ffffff16606083015260029290920b608082015290519081900360a00190f35b6100cb61020f565b604080516001600160a01b039092168252519081900360200190f35b6100cb600480360360a08110156100fd57600080fd5b506001600160a01b03813581169160208101358216916040820135169062ffffff606082013516906080013560020b61021e565b6003546001600160a01b03161561018f576040805162461bcd60e51b815260206004820152601360248201527f616c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517fb4dd887347efc97a6ad35fc9824a2ac4c0a6a04344d89bf05f3308c854325a6490600090a250565b600054600154600280546001600160a01b03938416939283169281169162ffffff600160a01b83041691600160b81b9004900b85565b6003546001600160a01b031681565b6003546000906001600160a01b03163314610280576040805162461bcd60e51b815260206004820152601c60248201527f6f6e6c7920666163746f72792063616e2063616c6c206465706c6f7900000000604482015290519081900360640190fd5b6040805160a0810182526001600160a01b03888116808352888216602080850182905292891684860181905262ffffff898116606080880182905260028b810b6080998a01819052600080546001600160a01b03199081169099179055600180548916881790558154909716851762ffffff60a01b1916600160a01b84021762ffffff60b81b1916600160b81b97820b909416969096029290921790945586518086019390935282870191909152818101929092528451808203909201825290920192839052815191012090610355906103c4565b8190604051809103906000f5905080158015610375573d6000803e3d6000fd5b50600080546001600160a01b0319908116909155600180549091169055600280547fffffffffffff00000000000000000000000000000000000000000000000000001690559695505050505050565b615c0e806103d28339019056fe6101406040523480156200001257600080fd5b506000336001600160a01b031663890357306040518163ffffffff1660e01b815260040160a06040518083038186803b1580156200004f57600080fd5b505afa15801562000064573d6000803e3d6000fd5b505050506040513d60a08110156200007b57600080fd5b50805160208083015160408401516060808601516080968701516001600160e81b031960e892831b1660e0526001600160601b031993831b841660c05293821b831660a05294901b16909352600283810b900b90911b61010052909150620000ee90829062002f5e62000106821b17901c565b60801b6001600160801b031916610120525062000174565b60008082600281900b620d89e719816200011c57fe5b05029050600083600281900b620d89e8816200013457fe5b0502905060008460020b83830360020b816200014c57fe5b0560010190508062ffffff166001600160801b038016816200016a57fe5b0495945050505050565b60805160601c60a05160601c60c05160601c60e05160e81c6101005160e81c6101205160801c6159b26200025c600039806121735280614ecd5280614f04525080610cb15280612be95280614f385280614f6a525080610da05280611b475280611b7e5280612c315280612e005280612e425280612e895280612ed05250806113145280611c01528061206852806123f85280612c0d52806141fd52508061091452806114425280611bd05280612002528061237252806140b45250806121f6528061221f52806128d552806128fe5280612aa35280612ad05280612af952506159b26000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806370cf754a116100f9578063cc7e7fa211610097578063ddca3f4311610071578063ddca3f4314610842578063f305839914610862578063f30dba931461086a578063f637731d146108ec576101c4565b8063cc7e7fa2146107f5578063d0c93a7c1461081b578063d21220a71461083a576101c4565b8063a34123a7116100d3578063a34123a71461072d578063a38807f214610767578063b0d0d211146107c2578063c45a0155146107ed576101c4565b806370cf754a146105e157806385b66729146105e9578063883bdbfd14610626576101c4565b80633c8a7d8d116101665780634f1eb3d8116101405780634f1eb3d81461050f578063514ea4bf146105605780635339c296146105b9578063540d4918146105d9576101c4565b80633c8a7d8d146103cb578063461413191461046b578063490e6cbc14610485576101c4565b80631ad8b03b116101a25780631ad8b03b146102be578063252c09d7146102f557806332148f671461034c5780633850c7bd1461036f576101c4565b80630dfe1681146101c9578063128acb08146101ed5780631a6865021461029a575b600080fd5b6101d1610912565b604080516001600160a01b039092168252519081900360200190f35b610281600480360360a081101561020357600080fd5b6001600160a01b0382358116926020810135151592604082013592606083013516919081019060a081016080820135600160201b81111561024357600080fd5b82018360208201111561025557600080fd5b803590602001918460018302840111600160201b8311171561027657600080fd5b509092509050610936565b6040805192835260208301919091528051918290030190f35b6102a2611633565b604080516001600160801b039092168252519081900360200190f35b6102c6611642565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b6103126004803603602081101561030b57600080fd5b503561165c565b6040805163ffffffff909516855260069390930b60208501526001600160a01b039091168383015215156060830152519081900360800190f35b61036d6004803603602081101561036257600080fd5b503561ffff166116a1565b005b610377611793565b604080516001600160a01b03909816885260029690960b602088015261ffff9485168787015292841660608701529216608085015263ffffffff90911660a0840152151560c0830152519081900360e00190f35b610281600480360360a08110156103e157600080fd5b6001600160a01b03823516916020810135600290810b92604083013590910b916001600160801b036060820135169181019060a081016080820135600160201b81111561042d57600080fd5b82018360208201111561043f57600080fd5b803590602001918460018302840111600160201b8311171561046057600080fd5b5090925090506117e8565b610473611aa6565b60408051918252519081900360200190f35b61036d6004803603608081101561049b57600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b8111156104d157600080fd5b8201836020820111156104e357600080fd5b803590602001918460018302840111600160201b8311171561050457600080fd5b509092509050611aac565b6102c6600480360360a081101561052557600080fd5b506001600160a01b03813516906020810135600290810b91604081013590910b906001600160801b0360608201358116916080013516611ef3565b61057d6004803603602081101561057657600080fd5b5035612111565b604080516001600160801b0396871681526020810195909552848101939093529084166060840152909216608082015290519081900360a00190f35b610473600480360360208110156105cf57600080fd5b503560010b61214e565b6101d1612160565b6102a2612171565b6102c6600480360360608110156105ff57600080fd5b506001600160a01b03813516906001600160801b0360208201358116916040013516612195565b6106946004803603602081101561063c57600080fd5b810190602081018135600160201b81111561065657600080fd5b82018360208201111561066857600080fd5b803590602001918460208302840111600160201b8311171561068957600080fd5b509092509050612490565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156106d85781810151838201526020016106c0565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156107175781810151838201526020016106ff565b5050505090500194505050505060405180910390f35b6102816004803603606081101561074357600080fd5b508035600290810b91602081013590910b90604001356001600160801b0316612515565b6107916004803603604081101561077d57600080fd5b508035600290810b9160200135900b612691565b6040805160069490940b84526001600160a01b03909216602084015263ffffffff1682820152519081900360600190f35b61036d600480360360408110156107d857600080fd5b5063ffffffff81358116916020013516612879565b6101d1612aa1565b61036d6004803603602081101561080b57600080fd5b50356001600160a01b0316612ac5565b610823612be7565b6040805160029290920b8252519081900360200190f35b6101d1612c0b565b61084a612c2f565b6040805162ffffff9092168252519081900360200190f35b610473612c53565b61088a6004803603602081101561088057600080fd5b503560020b612c59565b604080516001600160801b039099168952600f9790970b602089015287870195909552606087019390935260069190910b60808601526001600160a01b031660a085015263ffffffff1660c0840152151560e083015251908190036101000190f35b61036d6004803603602081101561090257600080fd5b50356001600160a01b0316612cc5565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008085610970576040805162461bcd60e51b8152602060048201526002602482015261415360f01b604482015290519081900360640190fd5b6040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b900b602083015261ffff600160b81b8204811693830193909352600160c81b810483166060830152600160d81b9004909116608082015260015463ffffffff811660a083015260ff600160201b90910416151560c08201819052610a28576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b87610a735780600001516001600160a01b0316866001600160a01b0316118015610a6e575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038716105b610aa5565b80600001516001600160a01b0316866001600160a01b0316108015610aa557506401000276a36001600160a01b038716115b610adc576040805162461bcd60e51b815260206004820152600360248201526214d41360ea1b604482015290519081900360640190fd5b6001805460ff60201b191690556040805160c08101909152600090808a610b115760108460a0015163ffffffff16901c610b1b565b60a084015161ffff165b63ffffffff1681526005546001600160801b03166020820152604001610b3f612fca565b63ffffffff1681526000602082018190526040820181905260609091015262010008549091506001600160a01b031615610be557620100085460408083015181516310a537f160e11b815263ffffffff909116600482015290516001600160a01b039092169163214a6fe29160248082019260009290919082900301818387803b158015610bcc57600080fd5b505af1158015610be0573d6000803e3d6000fd5b505050505b6000808913905060006040518060e001604052808b81526020016000815260200185600001516001600160a01b03168152602001856020015160020b81526020018c610c3357600354610c37565b6002545b815260200160006001600160801b0316815260200184602001516001600160801b031681525090505b805115801590610c865750886001600160a01b031681604001516001600160a01b031614155b156110f557610c93615942565b60408201516001600160a01b031681526060820151610cd6906007907f00000000000000000000000000000000000000000000000000000000000000008f612fce565b15156040830152600290810b810b60208301819052620d89e719910b1215610d0757620d89e7196020820152610d26565b6020810151620d89e860029190910b1315610d2657620d89e860208201525b610d338160200151613110565b6001600160a01b031660608201526040820151610dc4908d610d6d578b6001600160a01b031683606001516001600160a01b031611610d87565b8b6001600160a01b031683606001516001600160a01b0316105b610d95578260600151610d97565b8b5b60c085015185517f0000000000000000000000000000000000000000000000000000000000000000613441565b60c085015260a084015260808301526001600160a01b031660408301528215610e2657610dfa8160c00151826080015101613633565b825103825260a0810151610e1c90610e1190613633565b602084015190613649565b6020830152610e61565b610e338160a00151613633565b825101825260c08101516080820151610e5b91610e509101613633565b602084015190613665565b60208301525b835163ffffffff1615610ec1576000612710610e94866000015163ffffffff168460c0015161367b90919063ffffffff16565b81610e9b57fe5b60c0840180519290910491829003905260a0840180519091016001600160801b03169052505b60c08201516001600160801b031615610f0057610ef48160c00151600160801b8460c001516001600160801b031661369f565b60808301805190910190525b80606001516001600160a01b031682604001516001600160a01b031614156110b45780604001511561108b578360a00151610f8a57610f68846040015160008760200151886040015188602001518a60600151600961374f909695949392919063ffffffff16565b6001600160a01b03166080860152600690810b900b6060850152600160a08501525b62010008546001600160a01b03161561101557620100085460208201516040805163a498463360e01b815260029290920b60048301528e15156024830152516001600160a01b039092169163a49846339160448082019260009290919082900301818387803b158015610ffc57600080fd5b505af1158015611010573d6000803e3d6000fd5b505050505b600061106182602001518e61102c57600254611032565b84608001515b8f611041578560800151611045565b6003545b608089015160608a015160408b015160069594939291906138e1565b90508c1561106d576000035b61107b8360c001518261399f565b6001600160801b031660c0840152505b8b61109a5780602001516110a3565b60018160200151035b600290810b900b60608301526110ef565b80600001516001600160a01b031682604001516001600160a01b0316146110ef576110e28260400151613a55565b600290810b900b60608301525b50610c60565b836020015160020b816060015160020b146111c35760008061114386604001518660400151886020015188602001518a606001518b608001516009613d7d909695949392919063ffffffff16565b604085015160608601516000805461ffff60c81b1916600160c81b61ffff958616021761ffff60b81b1916600160b81b95909416949094029290921762ffffff60a01b1916600160a01b62ffffff60029490940b9390931692909202919091176001600160a01b0319166001600160a01b03909116179055506111e89050565b6040810151600080546001600160a01b0319166001600160a01b039092169190911790555b8060c001516001600160801b031683602001516001600160801b03161461122e5760c0810151600580546001600160801b0319166001600160801b039092169190911790555b6000808c1561128857608083015160025560a08301516001600160801b03161561127c5760a0830151600480546001600160801b031981166001600160801b03918216909301169190911790555b8260a0015191506112d5565b608083015160035560a08301516001600160801b0316156112ce5760a0830151600480546001600160801b03808216600160801b92839004821690940116029190911790555b5060a08201515b8315158d1515146112ee57602083015183518d036112fb565b82600001518c0383602001515b90985096508c1561143457600087121561133d5761133d7f00000000000000000000000000000000000000000000000000000000000000008f89600003613f18565b6000611347614066565b9050336001600160a01b03166323a69e758a8a8e8e6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156113cb57600080fd5b505af11580156113df573d6000803e3d6000fd5b505050506113eb614066565b6113f5828b61419f565b111561142e576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b5061155e565b600088121561146b5761146b7f00000000000000000000000000000000000000000000000000000000000000008f8a600003613f18565b60006114756141af565b9050336001600160a01b03166323a69e758a8a8e8e6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156114f957600080fd5b505af115801561150d573d6000803e3d6000fd5b505050506115196141af565b611523828a61419f565b111561155c576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b505b8d6001600160a01b0316336001600160a01b03167f19b47279256b2a23a1665c810c8d55a1758940ee09377d4f8d26497a3577dc838a8a87604001518860c001518960600151898960405180888152602001878152602001866001600160a01b03168152602001856001600160801b031681526020018460020b8152602001836001600160801b03168152602001826001600160801b0316815260200197505050505050505060405180910390a350506001805460ff60201b1916600160201b17905550939a92995091975050505050505050565b6005546001600160801b031681565b6004546001600160801b0380821691600160801b90041682565b60098161ffff811061166d57600080fd5b015463ffffffff81169150600160201b810460060b90600160581b81046001600160a01b031690600160f81b900460ff1684565b600154600160201b900460ff166116e5576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b1916905560008054600160d81b900461ffff169061170e60098385614247565b6000805461ffff808416600160d81b810261ffff60d81b199093169290921790925591925083161461177b576040805161ffff80851682528316602082015281517fac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a929181900390910190a15b50506001805460ff60201b1916600160201b17905550565b6000546001546001600160a01b03821691600160a01b810460020b9161ffff600160b81b8304811692600160c81b8104821692600160d81b9091049091169063ffffffff81169060ff600160201b9091041687565b6001546000908190600160201b900460ff16611831576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556001600160801b03851661185157600080fd5b60008061189f60405180608001604052808c6001600160a01b031681526020018b60020b81526020018a60020b81526020016118958a6001600160801b03166142ea565b600f0b90526142fb565b925092505081935080925060008060008611156118c1576118be614066565b91505b84156118d2576118cf6141af565b90505b336001600160a01b03166399eee9d087878b8b6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b15801561195457600080fd5b505af1158015611968573d6000803e3d6000fd5b5050505060008611156119bf5761197d614066565b611987838861419f565b11156119bf576040805162461bcd60e51b815260206004820152600260248201526104d360f41b604482015290519081900360640190fd5b8415611a0f576119cd6141af565b6119d7828761419f565b1115611a0f576040805162461bcd60e51b81526020600482015260026024820152614d3160f01b604482015290519081900360640190fd5b8960020b8b60020b8d6001600160a01b03167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde338d8b8b60405180856001600160a01b03168152602001846001600160801b0316815260200183815260200182815260200194505050505060405180910390a450506001805460ff60201b1916600160201b17905550919890975095505050505050565b60035481565b600154600160201b900460ff16611af0576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556005546001600160801b031680611b3f576040805162461bcd60e51b81526020600482015260016024820152601360fa1b604482015290519081900360640190fd5b6000611b74867f000000000000000000000000000000000000000000000000000000000000000062ffffff16620f4240614531565b90506000611bab867f000000000000000000000000000000000000000000000000000000000000000062ffffff16620f4240614531565b90506000611bb7614066565b90506000611bc36141af565b90508815611bf657611bf67f00000000000000000000000000000000000000000000000000000000000000008b8b613f18565b8715611c2757611c277f00000000000000000000000000000000000000000000000000000000000000008b8a613f18565b336001600160a01b031663a1d4833685858a8a6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611ca957600080fd5b505af1158015611cbd573d6000803e3d6000fd5b505050506000611ccb614066565b90506000611cd76141af565b905081611ce4858861419f565b1115611d1c576040805162461bcd60e51b8152602060048201526002602482015261046360f41b604482015290519081900360640190fd5b80611d27848761419f565b1115611d5f576040805162461bcd60e51b8152602060048201526002602482015261463160f01b604482015290519081900360640190fd5b8382038382038115611de85760015461ffff1660008115611d8c5761271063ffffffff8316850204611d8f565b60005b90506001600160801b03811615611dc257600480546001600160801b038082168401166001600160801b03199091161790555b611ddc818503600160801b8d6001600160801b031661369f565b60028054909101905550505b8015611e6d5760015460101c61ffff1660008115611e125761271063ffffffff8316840204611e15565b60005b90506001600160801b03811615611e4757600480546001600160801b03600160801b8083048216850182160291161790555b611e61818403600160801b8d6001600160801b031661369f565b60038054909101905550505b8d6001600160a01b0316336001600160a01b03167fbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca6338f8f86866040518085815260200184815260200183815260200182815260200194505050505060405180910390a350506001805460ff60201b1916600160201b179055505050505050505050505050565b6001546000908190600160201b900460ff16611f3c576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b191690556000611f58600833898961456b565b60038101549091506001600160801b0390811690861611611f795784611f88565b60038101546001600160801b03165b60038201549093506001600160801b03600160801b909104811690851611611fb05783611fc6565b6003810154600160801b90046001600160801b03165b91506001600160801b0383161561202b576003810180546001600160801b031981166001600160801b0391821686900382161790915561202b907f0000000000000000000000000000000000000000000000000000000000000000908a908616613f18565b6001600160801b03821615612091576003810180546001600160801b03600160801b808304821686900382160291811691909117909155612091907f0000000000000000000000000000000000000000000000000000000000000000908a908516613f18565b604080516001600160a01b038a1681526001600160801b0380861660208301528416818301529051600288810b92908a900b9133917f70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0919081900360600190a4506001805460ff60201b1916600160201b17905590969095509350505050565b60086020526000908152604090208054600182015460028301546003909301546001600160801b0392831693919281811691600160801b90041685565b60076020526000908152604090205481565b62010008546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001546000908190600160201b900460ff166121de576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b19169055336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806122ae57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561227657600080fd5b505afa15801561228a573d6000803e3d6000fd5b505050506040513d60208110156122a057600080fd5b50516001600160a01b031633145b6122b757600080fd5b6004546001600160801b03908116908516116122d357836122e0565b6004546001600160801b03165b6004549092506001600160801b03600160801b909104811690841611612306578261231a565b600454600160801b90046001600160801b03165b90506001600160801b0382161561239b576004546001600160801b038381169116141561234957600019909101905b600480546001600160801b031981166001600160801b0391821685900382161790915561239b907f00000000000000000000000000000000000000000000000000000000000000009087908516613f18565b6001600160801b03811615612421576004546001600160801b03828116600160801b9092041614156123cc57600019015b600480546001600160801b03600160801b808304821685900382160291811691909117909155612421907f00000000000000000000000000000000000000000000000000000000000000009087908416613f18565b604080516001600160801b0380851682528316602082015281516001600160a01b0388169233927f596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151929081900390910190a36001805460ff60201b1916600160201b1790559094909350915050565b60608061250a61249e612fca565b858580806020026020016040519081016040528093929190818152602001838360200280828437600092018290525054600554600996959450600160a01b820460020b935061ffff600160b81b8304811693506001600160801b0390911691600160c81b9004166145cf565b915091509250929050565b6001546000908190600160201b900460ff1661255e576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b1916905560408051608081018252338152600287810b602083015286900b91810191909152600090819081906125ba90606081016125ad6001600160801b038a166142ea565b600003600f0b90526142fb565b92509250925081600003945080600003935060008511806125db5750600084115b1561261a576003830180546001600160801b038082168089018216600160801b93849004831689019092169092029091176001600160801b0319161790555b604080516001600160801b0388168152602081018790528082018690529051600289810b92908b900b9133917f0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c919081900360600190a450506001805460ff60201b1916600160201b179055509094909350915050565b60008060006126a08585614729565b600285810b810b600090815260066020819052604080832088850b90940b8352822060038401549182900b93600160381b83046001600160a01b0316928492600160d81b820463ffffffff16928492909190600160f81b900460ff168061270657600080fd5b6003820154600681900b9850600160381b81046001600160a01b03169650600160d81b810463ffffffff169450600160f81b900460ff168061274757600080fd5b50506040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b810b6020840181905261ffff600160b81b8404811695850195909552600160c81b830485166060850152600160d81b909204909316608083015260015463ffffffff811660a084015260ff600160201b90910416151560c08301529093508e820b910b121590506127ef57509390940396509003935090039050612872565b8a60020b816020015160020b121561286357600061280b612fca565b6020830151604084015160055460608601519394506000938493612841936009938893879392916001600160801b03169061374f565b9a9003989098039b505094909603929092039650909103039250612872915050565b50949093039650039350900390505b9250925092565b600154600160201b900460ff166128bd576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6001805460ff60201b19169055336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061298d57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561295557600080fd5b505afa158015612969573d6000803e3d6000fd5b505050506040513d602081101561297f57600080fd5b50516001600160a01b031633145b61299657600080fd5b63ffffffff821615806129c457506103e88263ffffffff16101580156129c45750610fa08263ffffffff1611155b80156129f9575063ffffffff811615806129f957506103e88163ffffffff16101580156129f95750610fa08163ffffffff1611155b612a0257600080fd5b6001805465ffffffff0000601084901b16840163ffffffff90811663ffffffff19831617909255167fb3159fed3ddfba67bae294599eafe2d0ec98c08bb38e0e5fb87d33154b6e05aa62010000826040805163ffffffff939092068316825261ffff601086901c16602083015286831682820152918516606082015290519081900360800190a150506001805460ff60201b1916600160201b17905550565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480612b8857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b5057600080fd5b505afa158015612b64573d6000803e3d6000fd5b505050506040513d6020811015612b7a57600080fd5b50516001600160a01b031633145b612b9157600080fd5b6201000880546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f29983690a85a11696ce8a357993744f8d5a74fde14653e517cc2f8608a7235e99181900360200190a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025481565b60066020819052600091825260409091208054600182015460028301546003909301546001600160801b03831694600160801b909304600f0b93919281900b90600160381b81046001600160a01b031690600160d81b810463ffffffff1690600160f81b900460ff1688565b6000546001600160a01b031615612d08576040805162461bcd60e51b8152602060048201526002602482015261414960f01b604482015290519081900360640190fd5b6000612d1382613a55565b9050600080612d2b612d23612fca565b6009906147f2565b6040805160e0810182526001600160a01b038816808252600288810b60208401819052600094840185905261ffff8781166060860181905290871660808601819052630c800c8060a08701819052600160c090970187905287546001600160a01b03191690951762ffffff60a01b1916600160a01b62ffffff9490950b8416949094029390931763ffffffff60b81b1916600160c81b9091021761ffff60d81b1916600160d81b909202919091179093558154600160201b63ffffffff1990911690911760ff60201b191617905591935091507f00000000000000000000000000000000000000000000000000000000000000001660641415612e40576001805463ffffffff1916630ce40ce4179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166101f41415612e87576001805463ffffffff1916630d480d48179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166109c41415612ece576001805463ffffffff1916630c800c80179055612f11565b7f000000000000000000000000000000000000000000000000000000000000000062ffffff166127101415612f11576001805463ffffffff1916630c800c801790555b604080516001600160a01b0386168152600285900b602082015281517f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95929181900390910190a150505050565b60008082600281900b620d89e71981612f7357fe5b05029050600083600281900b620d89e881612f8a57fe5b0502905060008460020b83830360020b81612fa157fe5b0560010190508062ffffff166001600160801b03801681612fbe57fe5b0493505050505b919050565b4290565b60008060008460020b8660020b81612fe257fe5b05905060008660020b12801561300957508460020b8660020b8161300257fe5b0760020b15155b1561301357600019015b8315613088576000806130258361483e565b600182810b810b600090815260208d9052604090205460ff83169190911b8001600019019081168015159750929450909250908561306a57888360ff1686030261307d565b8861307482614850565b840360ff168603025b965050505050613106565b6000806130978360010161483e565b91509150600060018260ff166001901b031990506000818b60008660010b60010b81526020019081526020016000205416905080600014159550856130e957888360ff0360ff168660010101026130ff565b88836130f4836148ef565b0360ff168660010101025b9650505050505b5094509492505050565b60008060008360020b12613127578260020b61312f565b8260020b6000035b9050620d89e881111561316d576040805162461bcd60e51b81526020600482015260016024820152601560fa1b604482015290519081900360640190fd5b60006001821661318157600160801b613193565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff16905060028216156131c7576ffff97272373d413259a46990580e213a0260801c5b60048216156131e6576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615613205576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615613224576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615613243576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615613262576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615613281576ffe5dee046a99a2a811c461f1969c30530260801c5b6101008216156132a1576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b6102008216156132c1576ff987a7253ac413176f2b074cf7815e540260801c5b6104008216156132e1576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615613301576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615613321576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615613341576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615613361576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615613381576f31be135f97d08fd981231505542fcfa60260801c5b620100008216156133a2576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b620200008216156133c2576e5d6af8dedb81196699c329225ee6040260801c5b620400008216156133e1576d2216e584f5fa1ea926041bedfe980260801c5b620800008216156133fe576b048a170391f7dc42444e8fa20260801c5b60008460020b131561341957806000198161341557fe5b0490505b600160201b81061561342c57600161342f565b60005b60ff16602082901c0192505050919050565b60008080806001600160a01b03808916908a1610158187128015906134c657600061347a8989620f42400362ffffff16620f424061369f565b9050826134935761348e8c8c8c60016149d9565b6134a0565b6134a08b8d8c6001614a54565b95508581106134b1578a96506134c0565b6134bd8c8b8386614b08565b96505b50613510565b816134dd576134d88b8b8b6000614a54565b6134ea565b6134ea8a8c8b60006149d9565b93508388600003106134fe57899550613510565b61350d8b8a8a60000385614b54565b95505b6001600160a01b038a81169087161482156135735780801561352f5750815b61354557613540878d8c6001614a54565b613547565b855b9550808015613554575081155b61356a57613565878d8c60006149d9565b61356c565b845b94506135bd565b80801561357d5750815b6135935761358e8c888c60016149d9565b613595565b855b95508080156135a2575081155b6135b8576135b38c888c6000614a54565b6135ba565b845b94505b811580156135cd57508860000385115b156135d9578860000394505b8180156135f857508a6001600160a01b0316876001600160a01b031614155b15613607578589039350613624565b613621868962ffffff168a620f42400362ffffff16614531565b93505b50505095509550955095915050565b6000600160ff1b821061364557600080fd5b5090565b8082038281131560008312151461365f57600080fd5b92915050565b8181018281121560008312151461365f57600080fd5b60008215806136965750508181028183828161369357fe5b04145b61365f57600080fd5b60008080600019858709868602925082811090839003039050806136d557600084116136ca57600080fd5b508290049050613748565b8084116136e157600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150505b9392505050565b60008063ffffffff87166137f5576000898661ffff1661ffff811061377057fe5b60408051608081018252919092015463ffffffff808216808452600160201b8304600690810b810b900b6020850152600160581b83046001600160a01b031694840194909452600160f81b90910460ff16151560608301529092508a16146137e1576137de818a8988614ba0565b90505b8060200151816040015192509250506138d5565b86880360008061380a8c8c858c8c8c8c614c43565b91509150816000015163ffffffff168363ffffffff16141561383c5781602001518260400151945094505050506138d5565b805163ffffffff848116911614156138645780602001518160400151945094505050506138d5565b8151815160208085015190840151918390039286039163ffffffff80841692908516910360060b8161389257fe5b05028460200151018263ffffffff168263ffffffff1686604001518660400151036001600160a01b031602816138c457fe5b048560400151019650965050505050505b97509795505050505050565b600295860b860b60009081526020979097526040909620600181018054909503909455938301805490920390915560038201805463ffffffff600160d81b6001600160a01b03600160381b808504821690960316909402670100000000000000600160d81b031990921691909117600681810b90960390950b66ffffffffffffff1666ffffffffffffff199095169490941782810485169095039093160263ffffffff60d81b1990931692909217905554600160801b9004600f0b90565b60008082600f0b1215613a0457826001600160801b03168260000384039150816001600160801b0316106139ff576040805162461bcd60e51b81526020600482015260026024820152614c5360f01b604482015290519081900360640190fd5b61365f565b826001600160801b03168284019150816001600160801b0316101561365f576040805162461bcd60e51b81526020600482015260026024820152614c4160f01b604482015290519081900360640190fd5b60006401000276a36001600160a01b03831610801590613a91575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038316105b613ac6576040805162461bcd60e51b81526020600482015260016024820152602960f91b604482015290519081900360640190fd5b77ffffffffffffffffffffffffffffffffffffffff00000000602083901b166001600160801b03811160071b81811c67ffffffffffffffff811160061b90811c63ffffffff811160051b90811c61ffff811160041b90811c60ff8111600390811b91821c600f811160021b90811c918211600190811b92831c97908811961790941790921717909117171760808110613b6757607f810383901c9150613b71565b80607f0383901b91505b908002607f81811c60ff83811c9190911c800280831c81831c1c800280841c81841c1c800280851c81851c1c800280861c81861c1c800280871c81871c1c800280881c81881c1c800280891c81891c1c8002808a1c818a1c1c8002808b1c818b1c1c8002808c1c818c1c1c8002808d1c818d1c1c8002808e1c9c81901c9c909c1c80029c8d901c9e9d607f198f0160401b60c09190911c678000000000000000161760c19b909b1c674000000000000000169a909a1760c29990991c672000000000000000169890981760c39790971c671000000000000000169690961760c49590951c670800000000000000169490941760c59390931c670400000000000000169290921760c69190911c670200000000000000161760c79190911c600160381b161760c89190911c6680000000000000161760c99190911c6640000000000000161760ca9190911c6620000000000000161760cb9190911c6610000000000000161760cc9190911c6608000000000000161760cd9190911c66040000000000001617693627a301d71055774c8581026f028f6481ab7f045a5af012a19d003aa9198101608090811d906fdb2df09e81959a81455e260799a0632f8301901d600281810b9083900b14613d6e57886001600160a01b0316613d5282613110565b6001600160a01b03161115613d675781613d69565b805b613d70565b815b9998505050505050505050565b6000806000898961ffff1661ffff8110613d9357fe5b60408051608081018252919092015463ffffffff808216808452600160201b8304600690810b810b900b6020850152600160581b83046001600160a01b031694840194909452600160f81b90910460ff161515606083015290925089161415613e0257888592509250506138d5565b8461ffff168461ffff16118015613e2357506001850361ffff168961ffff16145b15613e3057839150613e34565b8491505b8161ffff168960010161ffff1681613e4857fe5b069250613e5781898989614ba0565b8a8461ffff1661ffff8110613e6857fe5b825191018054602084015160408501516060909501511515600160f81b026001600160f81b036001600160a01b03909616600160581b027fff0000000000000000000000000000000000000000ffffffffffffffffffffff60069390930b66ffffffffffffff16600160201b026affffffffffffff000000001963ffffffff90971663ffffffff199095169490941795909516929092171692909217929092161790555097509795505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1781529251825160009485949389169392918291908083835b60208310613f945780518252601f199092019160209182019101613f75565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613ff6576040519150601f19603f3d011682016040523d82523d6000602084013e613ffb565b606091505b5091509150818015614029575080511580614029575080806020019051602081101561402657600080fd5b50515b61405f576040805162461bcd60e51b81526020600482015260026024820152612a2360f11b604482015290519081900360640190fd5b5050505050565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17815291518151600093849384936001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001693919290918291908083835b602083106140ff5780518252601f1990920191602091820191016140e0565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461415f576040519150601f19603f3d011682016040523d82523d6000602084013e614164565b606091505b509150915081801561417857506020815110155b61418157600080fd5b80806020019051602081101561419657600080fd5b50519250505090565b8082018281101561365f57600080fd5b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17815291518151600093849384936001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169391929091829190808383602083106140ff5780518252601f1990920191602091820191016140e0565b6000808361ffff1611614285576040805162461bcd60e51b81526020600482015260016024820152604960f81b604482015290519081900360640190fd5b8261ffff168261ffff161161429b575081613748565b825b8261ffff168161ffff1610156142e1576001858261ffff1661ffff81106142c057fe5b01805463ffffffff191663ffffffff9290921691909117905560010161429d565b50909392505050565b80600f81900b8114612fc557600080fd5b600080600061431284602001518560400151614729565b6040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b900b602080840182905261ffff600160b81b8404811685870152600160c81b84048116606080870191909152600160d81b90940416608085015260015463ffffffff811660a086015260ff600160201b90910416151560c0850152885190890151948901519289015193946143b49491939092909190614e3d565b93508460600151600f0b60001461452957846020015160020b816020015160020b1215614409576144026143eb8660200151613110565b6143f88760400151613110565b8760600151614ff2565b9250614529565b846040015160020b816020015160020b12156144ff5760055460408201516001600160801b039091169061445b9061443f612fca565b6020850151606086015160808701516009949392918791613d7d565b6000805461ffff60c81b1916600160c81b61ffff938416021761ffff60b81b1916600160b81b9390921692909202179055815160408701516144ab91906144a190613110565b8860600151614ff2565b93506144c96144bd8760200151613110565b83516060890151615036565b92506144d981876060015161399f565b600580546001600160801b0319166001600160801b039290921691909117905550614529565b61452661450f8660200151613110565b61451c8760400151613110565b8760600151615036565b91505b509193909250565b600061453e84848461369f565b90506000828061454a57fe5b848609111561374857600019811061456157600080fd5b6001019392505050565b6040805160609490941b6bffffffffffffffffffffffff1916602080860191909152600293840b60e890811b60348701529290930b90911b60378401528051808403601a018152603a90930181528251928201929092206000908152929052902090565b60608060008361ffff161161460f576040805162461bcd60e51b81526020600482015260016024820152604960f81b604482015290519081900360640190fd5b865167ffffffffffffffff8111801561462757600080fd5b50604051908082528060200260200182016040528015614651578160200160208202803683370190505b509150865167ffffffffffffffff8111801561466c57600080fd5b50604051908082528060200260200182016040528015614696578160200160208202803683370190505b50905060005b875181101561471c576146c78a8a8a84815181106146b657fe5b60200260200101518a8a8a8a61374f565b8483815181106146d357fe5b602002602001018484815181106146e657fe5b60200260200101826001600160a01b03166001600160a01b03168152508260060b60060b8152505050808060010191505061469c565b5097509795505050505050565b8060020b8260020b12614769576040805162461bcd60e51b8152602060048201526003602482015262544c5560e81b604482015290519081900360640190fd5b620d89e719600283900b12156147ac576040805162461bcd60e51b8152602060048201526003602482015262544c4d60e81b604482015290519081900360640190fd5b620d89e8600282900b13156147ee576040805162461bcd60e51b815260206004820152600360248201526254554d60e81b604482015290519081900360640190fd5b5050565b6040805160808101825263ffffffff9283168082526000602083018190529282019290925260016060909101819052835463ffffffff1916909117909116600160f81b17909155908190565b60020b600881901d9161010090910790565b600080821161485e57600080fd5b600160801b821061487157608091821c91015b68010000000000000000821061488957604091821c91015b600160201b821061489c57602091821c91015b6201000082106148ae57601091821c91015b61010082106148bf57600891821c91015b601082106148cf57600491821c91015b600482106148df57600291821c91015b60028210612fc557600101919050565b60008082116148fd57600080fd5b5060ff6001600160801b0382161561491857607f1901614920565b608082901c91505b67ffffffffffffffff82161561493957603f1901614941565b604082901c91505b63ffffffff82161561495657601f190161495e565b602082901c91505b61ffff82161561497157600f1901614979565b601082901c91505b60ff82161561498b5760071901614993565b600882901c91505b600f8216156149a557600319016149ad565b600482901c91505b60038216156149bf57600119016149c7565b600282901c91505b6001821615612fc55760001901919050565b6000836001600160a01b0316856001600160a01b031611156149f9579293925b81614a2657614a21836001600160801b03168686036001600160a01b0316600160601b61369f565b614a49565b614a49836001600160801b03168686036001600160a01b0316600160601b614531565b90505b949350505050565b6000836001600160a01b0316856001600160a01b03161115614a74579293925b6fffffffffffffffffffffffffffffffff60601b606084901b166001600160a01b038686038116908716614aa757600080fd5b83614ad757866001600160a01b0316614aca8383896001600160a01b031661369f565b81614ad157fe5b04614afd565b614afd614aee8383896001600160a01b0316614531565b886001600160a01b0316615065565b979650505050505050565b600080856001600160a01b031611614b1f57600080fd5b6000846001600160801b031611614b3557600080fd5b81614b4757614a218585856001615070565b614a498585856001615151565b600080856001600160a01b031611614b6b57600080fd5b6000846001600160801b031611614b8157600080fd5b81614b9357614a218585856000615151565b614a498585856000615070565b614ba861597e565b600085600001518503905060405180608001604052808663ffffffff1681526020018263ffffffff168660020b0288602001510160060b81526020016000856001600160801b031611614bfc576001614bfe565b845b6001600160801b031663ffffffff60801b608085901b1681614c1c57fe5b048860400151016001600160a01b0316815260200160011515815250915050949350505050565b614c4b61597e565b614c5361597e565b888561ffff1661ffff8110614c6457fe5b60408051608081018252919092015463ffffffff8116808352600160201b8204600690810b810b900b6020840152600160581b82046001600160a01b031693830193909352600160f81b900460ff16151560608201529250614cc89089908961523d565b15614d00578663ffffffff16826000015163ffffffff161415614cea576138d5565b81614cf783898988614ba0565b915091506138d5565b888361ffff168660010161ffff1681614d1557fe5b0661ffff1661ffff8110614d2557fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b90910416151560608201819052909250614dda57604080516080810182528a5463ffffffff81168252600160201b8104600690810b810b900b6020830152600160581b81046001600160a01b031692820192909252600160f81b90910460ff161515606082015291505b614de98883600001518961523d565b614e20576040805162461bcd60e51b815260206004820152600360248201526213d31160ea1b604482015290519081900360640190fd5b614e2d89898988876152fe565b9150915097509795505050505050565b6000614e4c600887878761456b565b60025460035491925090600080600f87900b15614f92576000614e6d612fca565b6000805460055492935090918291614eb79160099186918591600160a01b810460020b9161ffff600160b81b83048116926001600160801b0390921691600160c81b90041661374f565b9092509050614ef160068d8b8d8b8b87898b60007f000000000000000000000000000000000000000000000000000000000000000061549c565b9450614f2860068c8b8d8b8b87898b60017f000000000000000000000000000000000000000000000000000000000000000061549c565b93508415614f5c57614f5c60078d7f0000000000000000000000000000000000000000000000000000000000000000615659565b8315614f8e57614f8e60078c7f0000000000000000000000000000000000000000000000000000000000000000615659565b5050505b600080614fa460068c8c8b8a8a6156bf565b9092509050614fb5878a848461576b565b600089600f0b1215614fe3578315614fd257614fd260068c615900565b8215614fe357614fe360068b615900565b50505050505095945050505050565b60008082600f0b126150185761501361500e8585856001614a54565b613633565b614a4c565b61502b61500e8585856000036000614a54565b600003949350505050565b60008082600f0b126150525761501361500e85858560016149d9565b61502b61500e85858560000360006149d9565b808204910615150190565b600081156150e35760006001600160a01b038411156150a6576150a184600160601b876001600160801b031661369f565b6150be565b6001600160801b038516606085901b816150bc57fe5b045b90506150db6150d66001600160a01b0388168361419f565b61592c565b915050614a4c565b60006001600160a01b038411156151115761510c84600160601b876001600160801b0316614531565b615128565b615128606085901b6001600160801b038716615065565b905080866001600160a01b03161161513f57600080fd5b6001600160a01b038616039050614a4c565b60008261515f575083614a4c565b6fffffffffffffffffffffffffffffffff60601b606085901b1682156151f6576001600160a01b0386168481029085828161519657fe5b0414156151c7578181018281106151c5576151bb83896001600160a01b031683614531565b9350505050614a4c565b505b6151ed826151e8878a6001600160a01b031686816151e157fe5b049061419f565b615065565b92505050614a4c565b6001600160a01b0386168481029085828161520d57fe5b0414801561521a57508082115b61522357600080fd5b8082036151bb6150d6846001600160a01b038b1684614531565b60008363ffffffff168363ffffffff161115801561526757508363ffffffff168263ffffffff1611155b15615283578163ffffffff168363ffffffff1611159050613748565b60008463ffffffff168463ffffffff16116152aa578363ffffffff16600160201b016152b2565b8363ffffffff165b64ffffffffff16905060008563ffffffff168463ffffffff16116152e2578363ffffffff16600160201b016152ea565b8363ffffffff165b64ffffffffff169091111595945050505050565b61530661597e565b61530e61597e565b60008361ffff168560010161ffff168161532457fe5b0661ffff169050600060018561ffff16830103905060005b506002818301048961ffff8716828161535157fe5b0661ffff811061535d57fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b909104161515606082018190529095506153c75780600101925061533c565b898661ffff1682600101816153d857fe5b0661ffff81106153e457fe5b60408051608081018252929091015463ffffffff81168352600160201b8104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b9091041615156060820152855190945060009061544e908b908b61523d565b905080801561546757506154678a8a876000015161523d565b15615472575061548f565b8061548257600182039250615489565b8160010193505b5061533c565b5050509550959350505050565b60028a810b900b600090815260208c90526040812080546001600160801b0316826154c7828d61399f565b9050846001600160801b0316816001600160801b03161115615515576040805162461bcd60e51b81526020600482015260026024820152614c4f60f01b604482015290519081900360640190fd5b6001600160801b0382811615908216158114159450156155be578c60020b8e60020b136155a657600183018b9055600283018a9055600383018054670100000000000000600160d81b031916600160381b6001600160a01b038c16021766ffffffffffffff191666ffffffffffffff60068b900b161763ffffffff60d81b1916600160d81b63ffffffff8a16021790555b6003830180546001600160f81b0316600160f81b1790555b82546001600160801b0319166001600160801b03821617835585615607578254615602906155fd90600160801b9004600f90810b810b908f900b613665565b6142ea565b615628565b8254615628906155fd90600160801b9004600f90810b810b908f900b613649565b8354600f9190910b6001600160801b03908116600160801b0291161790925550909c9b505050505050505050505050565b8060020b8260020b8161566857fe5b0760020b1561567657600080fd5b6000806156918360020b8560020b8161568b57fe5b0561483e565b600191820b820b60009081526020979097526040909620805460ff9097169190911b90951890945550505050565b600285810b80820b60009081526020899052604080822088850b850b83529082209193849391929184918291908a900b1261570557505060018201546002830154615718565b8360010154880391508360020154870390505b6000808b60020b8b60020b121561573a5750506001830154600284015461574d565b84600101548a0391508460020154890390505b92909803979097039b96909503949094039850939650505050505050565b6040805160a08101825285546001600160801b0390811682526001870154602083015260028701549282019290925260038601548083166060830152600160801b900490911660808201526000600f85900b61580a5781516001600160801b0316615802576040805162461bcd60e51b815260206004820152600260248201526104e560f41b604482015290519081900360640190fd5b508051615819565b8151615816908661399f565b90505b600061583d8360200151860384600001516001600160801b0316600160801b61369f565b905060006158638460400151860385600001516001600160801b0316600160801b61369f565b905086600f0b60001461588a5787546001600160801b0319166001600160801b0384161788555b60018801869055600288018590556001600160801b0382161515806158b857506000816001600160801b0316115b156158f6576003880180546001600160801b031981166001600160801b039182168501821617808216600160801b9182900483168501909216021790555b5050505050505050565b600290810b810b6000908152602092909252604082208281556001810183905590810182905560030155565b806001600160a01b0381168114612fc557600080fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b6040805160808101825260008082526020820181905291810182905260608101919091529056fea164736f6c6343000706000aa164736f6c6343000706000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/ProxyForCakePool.json b/projects/vecake-farm-booster/v3/test/artifactsFile/ProxyForCakePool.json new file mode 100644 index 00000000..d6cd9c1b --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/ProxyForCakePool.json @@ -0,0 +1,67 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ProxyForCakePool", + "sourceName": "contracts/ProxyForCakePool.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "contract IVECake", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePoolUser", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLockForProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60c060405234801561001057600080fd5b50600080336001600160a01b031663890357306040518163ffffffff1660e01b81526004016040805180830381865afa158015610051573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061007591906100ab565b6001600160a01b039182166080521660a052506100de9050565b80516001600160a01b03811681146100a657600080fd5b919050565b600080604083850312156100be57600080fd5b6100c78361008f565b91506100d56020840161008f565b90509250929050565b60805160a0516103cc61011c6000396000605601526000818160bb0152818160fd015281816101bf0152818161024c015261030101526103cc6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea2646970667358221220fb6b5243c5bb972f8430878c3136381885b23a1d97726f744783b5012322a6dc64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea2646970667358221220fb6b5243c5bb972f8430878c3136381885b23a1d97726f744783b5012322a6dc64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/ProxyForCakePoolFactory.json b/projects/vecake-farm-booster/v3/test/artifactsFile/ProxyForCakePoolFactory.json new file mode 100644 index 00000000..8c7628fa --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/ProxyForCakePoolFactory.json @@ -0,0 +1,163 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ProxyForCakePoolFactory", + "sourceName": "contracts/ProxyForCakePoolFactory.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "NewProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialization", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_VECake", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parameters", + "outputs": [ + { + "internalType": "address", + "name": "VECake", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610c108061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b14610148578063c172085e14610166578063c4d66de81461019b578063f2fde38b146101ae57600080fd5b80634c96a3891461008d57806362534e79146100ca578063715018a6146100ea57806389035730146100f4575b600080fd5b6100a061009b3660046106b5565b6101c1565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6003546100a09073ffffffffffffffffffffffffffffffffffffffff1681565b6100f2610392565b005b60015460025461011b9173ffffffffffffffffffffffffffffffffffffffff908116911682565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152016100c1565b60005473ffffffffffffffffffffffffffffffffffffffff166100a0565b60035461018b9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016100c1565b6100f26101a93660046106b5565b61041f565b6100f26101bc3660046106b5565b610503565b60035460009073ffffffffffffffffffffffffffffffffffffffff16331461024a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60408051808201825260035473ffffffffffffffffffffffffffffffffffffffff9081168083529085166020928301819052600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168417909155600280549091168217905583519283019190915291810191909152426060820152608001604051602081830303815290604052805190602001206040516102ef906106a8565b8190604051809103906000f590508015801561030f573d6000803e3d6000fd5b50600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560028054909116905560405190915073ffffffffffffffffffffffffffffffffffffffff83811691908316907fa94ca626c15b5acbc6f820b88b794bce0d7a9198f2ed3e248aa0a362e2bdd60b90600090a3919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610413576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b61041d6000610633565b565b60035474010000000000000000000000000000000000000000900460ff16156104a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610241565b6003805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffff0000000000000000000000000000000000000000009092169190911774010000000000000000000000000000000000000000179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b73ffffffffffffffffffffffffffffffffffffffff8116610627576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610241565b61063081610633565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104e8806106f383390190565b6000602082840312156106c757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146106eb57600080fd5b939250505056fe60c060405234801561001057600080fd5b50600080336001600160a01b031663890357306040518163ffffffff1660e01b81526004016040805180830381865afa158015610051573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061007591906100ab565b6001600160a01b039182166080521660a052506100de9050565b80516001600160a01b03811681146100a657600080fd5b919050565b600080604083850312156100be57600080fd5b6100c78361008f565b91506100d56020840161008f565b90509250929050565b60805160a0516103cc61011c6000396000605601526000818160bb0152818160fd015281816101bf0152818161024c015261030101526103cc6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea26469706673582212201cdfd20073bab94f4cd09fd17babc94971d2402071f6a1620ff7f93144cbac8b64736f6c634300080a0033a2646970667358221220517aa35980d2a494b6e838dc941dea196956d68517cc88a8363cb31705e197dc64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b14610148578063c172085e14610166578063c4d66de81461019b578063f2fde38b146101ae57600080fd5b80634c96a3891461008d57806362534e79146100ca578063715018a6146100ea57806389035730146100f4575b600080fd5b6100a061009b3660046106b5565b6101c1565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6003546100a09073ffffffffffffffffffffffffffffffffffffffff1681565b6100f2610392565b005b60015460025461011b9173ffffffffffffffffffffffffffffffffffffffff908116911682565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152016100c1565b60005473ffffffffffffffffffffffffffffffffffffffff166100a0565b60035461018b9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016100c1565b6100f26101a93660046106b5565b61041f565b6100f26101bc3660046106b5565b610503565b60035460009073ffffffffffffffffffffffffffffffffffffffff16331461024a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60408051808201825260035473ffffffffffffffffffffffffffffffffffffffff9081168083529085166020928301819052600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168417909155600280549091168217905583519283019190915291810191909152426060820152608001604051602081830303815290604052805190602001206040516102ef906106a8565b8190604051809103906000f590508015801561030f573d6000803e3d6000fd5b50600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560028054909116905560405190915073ffffffffffffffffffffffffffffffffffffffff83811691908316907fa94ca626c15b5acbc6f820b88b794bce0d7a9198f2ed3e248aa0a362e2bdd60b90600090a3919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610413576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b61041d6000610633565b565b60035474010000000000000000000000000000000000000000900460ff16156104a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610241565b6003805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffff0000000000000000000000000000000000000000009092169190911774010000000000000000000000000000000000000000179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b73ffffffffffffffffffffffffffffffffffffffff8116610627576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610241565b61063081610633565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104e8806106f383390190565b6000602082840312156106c757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146106eb57600080fd5b939250505056fe60c060405234801561001057600080fd5b50600080336001600160a01b031663890357306040518163ffffffff1660e01b81526004016040805180830381865afa158015610051573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061007591906100ab565b6001600160a01b039182166080521660a052506100de9050565b80516001600160a01b03811681146100a657600080fd5b919050565b600080604083850312156100be57600080fd5b6100c78361008f565b91506100d56020840161008f565b90509250929050565b60805160a0516103cc61011c6000396000605601526000818160bb0152818160fd015281816101bf0152818161024c015261030101526103cc6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea26469706673582212201cdfd20073bab94f4cd09fd17babc94971d2402071f6a1620ff7f93144cbac8b64736f6c634300080a0033a2646970667358221220517aa35980d2a494b6e838dc941dea196956d68517cc88a8363cb31705e197dc64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/SwapRouter.json b/projects/vecake-farm-booster/v3/test/artifactsFile/SwapRouter.json new file mode 100644 index 00000000..a03b123e --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/SwapRouter.json @@ -0,0 +1,592 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SwapRouter", + "sourceName": "contracts/SwapRouter.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_deployer", + "type": "address" + }, + { + "internalType": "address", + "name": "_factory", + "type": "address" + }, + { + "internalType": "address", + "name": "_WETH9", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "WETH9", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deployer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "path", + "type": "bytes" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMinimum", + "type": "uint256" + } + ], + "internalType": "struct ISwapRouter.ExactInputParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactInput", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMinimum", + "type": "uint256" + }, + { + "internalType": "uint160", + "name": "sqrtPriceLimitX96", + "type": "uint160" + } + ], + "internalType": "struct ISwapRouter.ExactInputSingleParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactInputSingle", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "path", + "type": "bytes" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMaximum", + "type": "uint256" + } + ], + "internalType": "struct ISwapRouter.ExactOutputParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactOutput", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMaximum", + "type": "uint256" + }, + { + "internalType": "uint160", + "name": "sqrtPriceLimitX96", + "type": "uint160" + } + ], + "internalType": "struct ISwapRouter.ExactOutputSingleParams", + "name": "params", + "type": "tuple" + } + ], + "name": "exactOutputSingle", + "outputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "amount0Delta", + "type": "int256" + }, + { + "internalType": "int256", + "name": "amount1Delta", + "type": "int256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "pancakeV3SwapCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "refundETH", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "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": "selfPermit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "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": "selfPermitAllowed", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "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": "selfPermitAllowedIfNecessary", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "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": "selfPermitIfNecessary", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMinimum", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "sweepToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountMinimum", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeBips", + "type": "uint256" + }, + { + "internalType": "address", + "name": "feeRecipient", + "type": "address" + } + ], + "name": "sweepTokenWithFee", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountMinimum", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "unwrapWETH9", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountMinimum", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeBips", + "type": "uint256" + }, + { + "internalType": "address", + "name": "feeRecipient", + "type": "address" + } + ], + "name": "unwrapWETH9WithFee", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x60e06040526000196000553480156200001757600080fd5b50604051620030aa380380620030aa8339810160408190526200003a916200007f565b6001600160601b0319606093841b811660805291831b821660a05290911b1660c052620000c8565b80516001600160a01b03811681146200007a57600080fd5b919050565b60008060006060848603121562000094578283fd5b6200009f8462000062565b9250620000af6020850162000062565b9150620000bf6040850162000062565b90509250925092565b60805160601c60a05160601c60c05160601c612f7a620001306000398061014a52806106fa528061082452806108be52806108fe5280610a285280611702528061176252806117e3525080610f3d5250806103c25280610f6152806124db5250612f7a6000f3fe60806040526004361061012d5760003560e01c8063c04b8d59116100a5578063db3e219811610074578063e0e189a011610059578063e0e189a014610332578063f28c049814610345578063f3995c6714610358576101d8565b8063db3e21981461030c578063df2ab5bb1461031f576101d8565b8063c04b8d59146102bc578063c2e3140a146102cf578063c45a0155146102e2578063d5f39488146102f7576101d8565b806349404b7c116100fc5780639b2c0a37116100e15780639b2c0a3714610276578063a4a78f0c14610289578063ac9650d81461029c576101d8565b806349404b7c146102415780634aa4a4fc14610254576101d8565b806312210e8a146101dd57806323a69e75146101e5578063414bf389146102055780634659a4941461022e576101d8565b366101d8573373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101d657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742057455448390000000000000000000000000000000000000000000000604482015290519081900360640190fd5b005b600080fd5b6101d661036b565b3480156101f157600080fd5b506101d66102003660046128bc565b61037d565b610218610213366004612a4c565b6104d0565b6040516102259190612e45565b60405180910390f35b6101d661023c3660046127ca565b610642565b6101d661024f366004612b53565b6106f6565b34801561026057600080fd5b506102696108bc565b6040516102259190612c8b565b6101d6610284366004612b82565b6108e0565b6101d66102973660046127ca565b610af8565b6102af6102aa36600461282a565b610bcd565b6040516102259190612cfe565b6102186102ca3660046129a1565b610d27565b6101d66102dd3660046127ca565b610e86565b3480156102ee57600080fd5b50610269610f3b565b34801561030357600080fd5b50610269610f5f565b61021861031a366004612a4c565b610f83565b6101d661032d36600461272b565b611113565b6101d661034036600461276c565b611230565b610218610353366004612a68565b611396565b6101d66103663660046127ca565b6114ca565b471561037b5761037b3347611562565b565b600084138061038c5750600083135b61039557600080fd5b60006103a382840184612aa0565b905060008060006103b784600001516116b0565b9250925092506103e97f00000000000000000000000000000000000000000000000000000000000000008484846116e1565b5060008060008a1361042a578473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16108961045b565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16108a5b91509150811561047a576104758587602001513384611700565b6104c4565b8551610485906118de565b156104aa578551610495906118ea565b86526104a48133600089611925565b506104c4565b806000819055508394506104c48587602001513384611700565b50505050505050505050565b60008160800135806104e0611ae1565b111561054d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b6105f360a08401356105656080860160608701612708565b610576610100870160e08801612708565b604080518082019091528061058e60208a018a612708565b61059e60608b0160408c01612b30565b6105ae60408c0160208d01612708565b6040516020016105c093929190612c15565b60405160208183030381529060405281526020013373ffffffffffffffffffffffffffffffffffffffff16815250611ae5565b91508260c0013582101561063c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390612dc6565b60405180910390fd5b50919050565b604080517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101879052606481018690526001608482015260ff851660a482015260c4810184905260e48101839052905173ffffffffffffffffffffffffffffffffffffffff881691638fcbaf0c9161010480830192600092919082900301818387803b1580156106e257600080fd5b505af11580156104c4573d6000803e3d6000fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561077f57600080fd5b505afa158015610793573d6000803e3d6000fd5b505050506040513d60208110156107a957600080fd5b505190508281101561081c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e742057455448390000000000000000000000000000604482015290519081900360640190fd5b80156108b7577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561089557600080fd5b505af11580156108a9573d6000803e3d6000fd5b505050506108b78282611562565b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000821180156108f1575060648211155b6108fa57600080fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561098357600080fd5b505afa158015610997573d6000803e3d6000fd5b505050506040513d60208110156109ad57600080fd5b5051905084811015610a2057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e742057455448390000000000000000000000000000604482015290519081900360640190fd5b8015610af1577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610a9957600080fd5b505af1158015610aad573d6000803e3d6000fd5b505050506000612710610ac98584611c6b90919063ffffffff16565b81610ad057fe5b0490508015610ae357610ae38382611562565b610aef85828403611562565b505b5050505050565b604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815233600482015230602482015290517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9173ffffffffffffffffffffffffffffffffffffffff89169163dd62ed3e91604480820192602092909190829003018186803b158015610b8d57600080fd5b505afa158015610ba1573d6000803e3d6000fd5b505050506040513d6020811015610bb757600080fd5b50511015610aef57610aef868686868686610642565b60608167ffffffffffffffff81118015610be657600080fd5b50604051908082528060200260200182016040528015610c1a57816020015b6060815260200190600190039081610c055790505b50905060005b82811015610d205760008030868685818110610c3857fe5b9050602002810190610c4a9190612e4e565b604051610c58929190612c7b565b600060405180830381855af49150503d8060008114610c93576040519150601f19603f3d011682016040523d82523d6000602084013e610c98565b606091505b509150915081610cfe57604481511015610cb157600080fd5b60048101905080806020019051810190610ccb9190612937565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106339190612d7c565b80848481518110610d0b57fe5b60209081029190910101525050600101610c20565b5092915050565b6000816040015180610d37611ae1565b1115610da457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b335b6000610db585600001516118de565b9050610e0e856060015182610dce578660200151610dd0565b305b60006040518060400160405280610dea8b60000151611c8f565b81526020018773ffffffffffffffffffffffffffffffffffffffff16815250611ae5565b60608601528015610e2e578451309250610e27906118ea565b8552610e3b565b8460600151935050610e41565b50610da6565b8360800151831015610e7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390612dc6565b5050919050565b604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201529051869173ffffffffffffffffffffffffffffffffffffffff89169163dd62ed3e91604480820192602092909190829003018186803b158015610efb57600080fd5b505afa158015610f0f573d6000803e3d6000fd5b505050506040513d6020811015610f2557600080fd5b50511015610aef57610aef8686868686866114ca565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000816080013580610f93611ae1565b111561100057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b6110a960a08401356110186080860160608701612708565b611029610100870160e08801612708565b60405180604001604052808860200160208101906110479190612708565b61105760608b0160408c01612b30565b61106460208c018c612708565b60405160200161107693929190612c15565b60405160208183030381529060405281526020013373ffffffffffffffffffffffffffffffffffffffff16815250611925565b91508260c001358211156110e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390612d8f565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600055919050565b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561117c57600080fd5b505afa158015611190573d6000803e3d6000fd5b505050506040513d60208110156111a657600080fd5b505190508281101561121957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e7420746f6b656e0000000000000000000000000000604482015290519081900360640190fd5b801561122a5761122a848383611c9e565b50505050565b600082118015611241575060648211155b61124a57600080fd5b60008573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112b357600080fd5b505afa1580156112c7573d6000803e3d6000fd5b505050506040513d60208110156112dd57600080fd5b505190508481101561135057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e7420746f6b656e0000000000000000000000000000604482015290519081900360640190fd5b8015610aef5760006127106113658386611c6b565b8161136c57fe5b049050801561138057611380878483611c9e565b61138d8786838503611c9e565b50505050505050565b60008160400135806113a6611ae1565b111561141357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b611486606084013561142b6040860160208701612708565b60408051808201909152600090806114438980612e4e565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525033602090910152611925565b50600054915082608001358211156110e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390612d8f565b604080517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c48101839052905173ffffffffffffffffffffffffffffffffffffffff88169163d505accf9160e480830192600092919082900301818387803b1580156106e257600080fd5b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040518082805190602001908083835b602083106115d957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161159c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461163b576040519150601f19603f3d011682016040523d82523d6000602084013e611640565b606091505b50509050806108b757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f5354450000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600080806116be8482611e73565b92506116cb846014611f73565b90506116d8846017611e73565b91509193909250565b60006116f7856116f2868686612063565b6120e0565b95945050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614801561175b5750804710155b156118a4577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156117c857600080fd5b505af11580156117dc573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561187257600080fd5b505af1158015611886573d6000803e3d6000fd5b505050506040513d602081101561189c57600080fd5b5061122a9050565b73ffffffffffffffffffffffffffffffffffffffff83163014156118d2576118cd848383611c9e565b61122a565b61122a84848484612110565b8051604211155b919050565b805160609061191f9083906017907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9016122ed565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff8416611946573093505b600080600061195885600001516116b0565b9194509250905073ffffffffffffffffffffffffffffffffffffffff808416908316106000806119898587866124d4565b73ffffffffffffffffffffffffffffffffffffffff1663128acb088b856119af8f612512565b60000373ffffffffffffffffffffffffffffffffffffffff8e16156119d4578d6119fa565b876119f35773fffd8963efd1fc6a506488495d951d5263988d256119fa565b6401000276a45b8d604051602001611a0b9190612dfd565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401611a3a959493929190612cac565b6040805180830381600087803b158015611a5357600080fd5b505af1158015611a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8b9190612899565b91509150600083611aa0578183600003611aa6565b82826000035b909850905073ffffffffffffffffffffffffffffffffffffffff8a16611ad2578b8114611ad257600080fd5b50505050505050949350505050565b4290565b600073ffffffffffffffffffffffffffffffffffffffff8416611b06573093505b6000806000611b1885600001516116b0565b9194509250905073ffffffffffffffffffffffffffffffffffffffff80831690841610600080611b498686866124d4565b73ffffffffffffffffffffffffffffffffffffffff1663128acb088b85611b6f8f612512565b73ffffffffffffffffffffffffffffffffffffffff8e1615611b91578d611bb7565b87611bb05773fffd8963efd1fc6a506488495d951d5263988d25611bb7565b6401000276a45b8d604051602001611bc89190612dfd565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401611bf7959493929190612cac565b6040805180830381600087803b158015611c1057600080fd5b505af1158015611c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c489190612899565b9150915082611c575781611c59565b805b6000039b9a5050505050505050505050565b6000821580611c8657505081810281838281611c8357fe5b04145b61191f57600080fd5b606061191f826000602b6122ed565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251825160009485949389169392918291908083835b60208310611d7357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611d36565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611dd5576040519150601f19603f3d011682016040523d82523d6000602084013e611dda565b606091505b5091509150818015611e08575080511580611e085750808060200190516020811015611e0557600080fd5b50515b610af157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f5354000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600081826014011015611ee757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f746f416464726573735f6f766572666c6f770000000000000000000000000000604482015290519081900360640190fd5b8160140183511015611f5a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f416464726573735f6f75744f66426f756e64730000000000000000000000604482015290519081900360640190fd5b5001602001516c01000000000000000000000000900490565b600081826003011015611fe757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f746f55696e7432345f6f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b816003018351101561205a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f746f55696e7432345f6f75744f66426f756e6473000000000000000000000000604482015290519081900360640190fd5b50016003015190565b61206b61267a565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1611156120a3579192915b506040805160608101825273ffffffffffffffffffffffffffffffffffffffff948516815292909316602083015262ffffff169181019190915290565b60006120ec8383612544565b90503373ffffffffffffffffffffffffffffffffffffffff82161461191f57600080fd5b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000178152925182516000948594938a169392918291908083835b602083106121ed57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016121b0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461224f576040519150601f19603f3d011682016040523d82523d6000602084013e612254565b606091505b5091509150818015612282575080511580612282575080806020019051602081101561227f57600080fd5b50515b610aef57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f5354460000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60608182601f01101561236157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b8282840110156123d257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b8183018451101561244457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e6473000000000000000000000000000000604482015290519081900360640190fd5b60608215801561246357604051915060008252602082016040526124cb565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561249c578051835260209283019201612484565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b600061250a7f0000000000000000000000000000000000000000000000000000000000000000612505868686612063565b612544565b949350505050565b60007f8000000000000000000000000000000000000000000000000000000000000000821061254057600080fd5b5090565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161061258657600080fd5b508051602080830151604093840151845173ffffffffffffffffffffffffffffffffffffffff94851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660a183015260b58201939093527f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e260d5808301919091528251808303909101815260f5909101909152805191012090565b604080516060810182526000808252602082018190529181019190915290565b80356118e581612f48565b600082601f8301126126b5578081fd5b81356126c86126c382612edc565b612eb8565b8181528460208386010111156126dc578283fd5b816020850160208301379081016020019190915292915050565b6000610100828403121561063c578081fd5b600060208284031215612719578081fd5b813561272481612f48565b9392505050565b60008060006060848603121561273f578182fd5b833561274a81612f48565b925060208401359150604084013561276181612f48565b809150509250925092565b600080600080600060a08688031215612783578081fd5b853561278e81612f48565b94506020860135935060408601356127a581612f48565b92506060860135915060808601356127bc81612f48565b809150509295509295909350565b60008060008060008060c087890312156127e2578081fd5b86356127ed81612f48565b95506020870135945060408701359350606087013560ff81168114612810578182fd5b9598949750929560808101359460a0909101359350915050565b6000806020838503121561283c578182fd5b823567ffffffffffffffff80821115612853578384fd5b818501915085601f830112612866578384fd5b813581811115612874578485fd5b8660208083028501011115612887578485fd5b60209290920196919550909350505050565b600080604083850312156128ab578182fd5b505080516020909101519092909150565b600080600080606085870312156128d1578182fd5b8435935060208501359250604085013567ffffffffffffffff808211156128f6578384fd5b818701915087601f830112612909578384fd5b813581811115612917578485fd5b886020828501011115612928578485fd5b95989497505060200194505050565b600060208284031215612948578081fd5b815167ffffffffffffffff81111561295e578182fd5b8201601f8101841361296e578182fd5b805161297c6126c382612edc565b818152856020838501011115612990578384fd5b6116f7826020830160208601612f1c565b6000602082840312156129b2578081fd5b813567ffffffffffffffff808211156129c9578283fd5b9083019060a082860312156129dc578283fd5b60405160a0810181811083821117156129f157fe5b604052823582811115612a02578485fd5b612a0e878286016126a5565b825250612a1d6020840161269a565b602082015260408301356040820152606083013560608201526080830135608082015280935050505092915050565b60006101008284031215612a5e578081fd5b61272483836126f6565b600060208284031215612a79578081fd5b813567ffffffffffffffff811115612a8f578182fd5b820160a08185031215612724578182fd5b600060208284031215612ab1578081fd5b813567ffffffffffffffff80821115612ac8578283fd5b9083019060408286031215612adb578283fd5b604051604081018181108382111715612af057fe5b604052823582811115612b01578485fd5b612b0d878286016126a5565b82525060208301359250612b2083612f48565b6020810192909252509392505050565b600060208284031215612b41578081fd5b813562ffffff81168114612724578182fd5b60008060408385031215612b65578182fd5b823591506020830135612b7781612f48565b809150509250929050565b60008060008060808587031215612b97578182fd5b843593506020850135612ba981612f48565b9250604085013591506060850135612bc081612f48565b939692955090935050565b60008151808452612be3816020860160208601612f1c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b606093841b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000908116825260e89390931b7fffffff0000000000000000000000000000000000000000000000000000000000166014820152921b166017820152602b0190565b6000828483379101908152919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8088168352861515602084015285604084015280851660608401525060a06080830152612cf360a0830184612bcb565b979650505050505050565b6000602080830181845280855180835260408601915060408482028701019250838701855b82811015612d6f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452612d5d858351612bcb565b94509285019290850190600101612d23565b5092979650505050505050565b6000602082526127246020830184612bcb565b60208082526012908201527f546f6f206d756368207265717565737465640000000000000000000000000000604082015260600190565b60208082526013908201527f546f6f206c6974746c6520726563656976656400000000000000000000000000604082015260600190565b600060208252825160406020840152612e196060840182612bcb565b905073ffffffffffffffffffffffffffffffffffffffff60208501511660408401528091505092915050565b90815260200190565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612e82578283fd5b83018035915067ffffffffffffffff821115612e9c578283fd5b602001915036819003821315612eb157600080fd5b9250929050565b60405181810167ffffffffffffffff81118282101715612ed457fe5b604052919050565b600067ffffffffffffffff821115612ef057fe5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015612f37578181015183820152602001612f1f565b8381111561122a5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114612f6a57600080fd5b5056fea164736f6c6343000706000a", + "deployedBytecode": "0x60806040526004361061012d5760003560e01c8063c04b8d59116100a5578063db3e219811610074578063e0e189a011610059578063e0e189a014610332578063f28c049814610345578063f3995c6714610358576101d8565b8063db3e21981461030c578063df2ab5bb1461031f576101d8565b8063c04b8d59146102bc578063c2e3140a146102cf578063c45a0155146102e2578063d5f39488146102f7576101d8565b806349404b7c116100fc5780639b2c0a37116100e15780639b2c0a3714610276578063a4a78f0c14610289578063ac9650d81461029c576101d8565b806349404b7c146102415780634aa4a4fc14610254576101d8565b806312210e8a146101dd57806323a69e75146101e5578063414bf389146102055780634659a4941461022e576101d8565b366101d8573373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101d657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f742057455448390000000000000000000000000000000000000000000000604482015290519081900360640190fd5b005b600080fd5b6101d661036b565b3480156101f157600080fd5b506101d66102003660046128bc565b61037d565b610218610213366004612a4c565b6104d0565b6040516102259190612e45565b60405180910390f35b6101d661023c3660046127ca565b610642565b6101d661024f366004612b53565b6106f6565b34801561026057600080fd5b506102696108bc565b6040516102259190612c8b565b6101d6610284366004612b82565b6108e0565b6101d66102973660046127ca565b610af8565b6102af6102aa36600461282a565b610bcd565b6040516102259190612cfe565b6102186102ca3660046129a1565b610d27565b6101d66102dd3660046127ca565b610e86565b3480156102ee57600080fd5b50610269610f3b565b34801561030357600080fd5b50610269610f5f565b61021861031a366004612a4c565b610f83565b6101d661032d36600461272b565b611113565b6101d661034036600461276c565b611230565b610218610353366004612a68565b611396565b6101d66103663660046127ca565b6114ca565b471561037b5761037b3347611562565b565b600084138061038c5750600083135b61039557600080fd5b60006103a382840184612aa0565b905060008060006103b784600001516116b0565b9250925092506103e97f00000000000000000000000000000000000000000000000000000000000000008484846116e1565b5060008060008a1361042a578473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16108961045b565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16108a5b91509150811561047a576104758587602001513384611700565b6104c4565b8551610485906118de565b156104aa578551610495906118ea565b86526104a48133600089611925565b506104c4565b806000819055508394506104c48587602001513384611700565b50505050505050505050565b60008160800135806104e0611ae1565b111561054d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b6105f360a08401356105656080860160608701612708565b610576610100870160e08801612708565b604080518082019091528061058e60208a018a612708565b61059e60608b0160408c01612b30565b6105ae60408c0160208d01612708565b6040516020016105c093929190612c15565b60405160208183030381529060405281526020013373ffffffffffffffffffffffffffffffffffffffff16815250611ae5565b91508260c0013582101561063c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390612dc6565b60405180910390fd5b50919050565b604080517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101879052606481018690526001608482015260ff851660a482015260c4810184905260e48101839052905173ffffffffffffffffffffffffffffffffffffffff881691638fcbaf0c9161010480830192600092919082900301818387803b1580156106e257600080fd5b505af11580156104c4573d6000803e3d6000fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561077f57600080fd5b505afa158015610793573d6000803e3d6000fd5b505050506040513d60208110156107a957600080fd5b505190508281101561081c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e742057455448390000000000000000000000000000604482015290519081900360640190fd5b80156108b7577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561089557600080fd5b505af11580156108a9573d6000803e3d6000fd5b505050506108b78282611562565b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000821180156108f1575060648211155b6108fa57600080fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561098357600080fd5b505afa158015610997573d6000803e3d6000fd5b505050506040513d60208110156109ad57600080fd5b5051905084811015610a2057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e742057455448390000000000000000000000000000604482015290519081900360640190fd5b8015610af1577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610a9957600080fd5b505af1158015610aad573d6000803e3d6000fd5b505050506000612710610ac98584611c6b90919063ffffffff16565b81610ad057fe5b0490508015610ae357610ae38382611562565b610aef85828403611562565b505b5050505050565b604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815233600482015230602482015290517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9173ffffffffffffffffffffffffffffffffffffffff89169163dd62ed3e91604480820192602092909190829003018186803b158015610b8d57600080fd5b505afa158015610ba1573d6000803e3d6000fd5b505050506040513d6020811015610bb757600080fd5b50511015610aef57610aef868686868686610642565b60608167ffffffffffffffff81118015610be657600080fd5b50604051908082528060200260200182016040528015610c1a57816020015b6060815260200190600190039081610c055790505b50905060005b82811015610d205760008030868685818110610c3857fe5b9050602002810190610c4a9190612e4e565b604051610c58929190612c7b565b600060405180830381855af49150503d8060008114610c93576040519150601f19603f3d011682016040523d82523d6000602084013e610c98565b606091505b509150915081610cfe57604481511015610cb157600080fd5b60048101905080806020019051810190610ccb9190612937565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106339190612d7c565b80848481518110610d0b57fe5b60209081029190910101525050600101610c20565b5092915050565b6000816040015180610d37611ae1565b1115610da457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b335b6000610db585600001516118de565b9050610e0e856060015182610dce578660200151610dd0565b305b60006040518060400160405280610dea8b60000151611c8f565b81526020018773ffffffffffffffffffffffffffffffffffffffff16815250611ae5565b60608601528015610e2e578451309250610e27906118ea565b8552610e3b565b8460600151935050610e41565b50610da6565b8360800151831015610e7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390612dc6565b5050919050565b604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201529051869173ffffffffffffffffffffffffffffffffffffffff89169163dd62ed3e91604480820192602092909190829003018186803b158015610efb57600080fd5b505afa158015610f0f573d6000803e3d6000fd5b505050506040513d6020811015610f2557600080fd5b50511015610aef57610aef8686868686866114ca565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000816080013580610f93611ae1565b111561100057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b6110a960a08401356110186080860160608701612708565b611029610100870160e08801612708565b60405180604001604052808860200160208101906110479190612708565b61105760608b0160408c01612b30565b61106460208c018c612708565b60405160200161107693929190612c15565b60405160208183030381529060405281526020013373ffffffffffffffffffffffffffffffffffffffff16815250611925565b91508260c001358211156110e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390612d8f565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600055919050565b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561117c57600080fd5b505afa158015611190573d6000803e3d6000fd5b505050506040513d60208110156111a657600080fd5b505190508281101561121957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e7420746f6b656e0000000000000000000000000000604482015290519081900360640190fd5b801561122a5761122a848383611c9e565b50505050565b600082118015611241575060648211155b61124a57600080fd5b60008573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112b357600080fd5b505afa1580156112c7573d6000803e3d6000fd5b505050506040513d60208110156112dd57600080fd5b505190508481101561135057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e73756666696369656e7420746f6b656e0000000000000000000000000000604482015290519081900360640190fd5b8015610aef5760006127106113658386611c6b565b8161136c57fe5b049050801561138057611380878483611c9e565b61138d8786838503611c9e565b50505050505050565b60008160400135806113a6611ae1565b111561141357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b611486606084013561142b6040860160208701612708565b60408051808201909152600090806114438980612e4e565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525033602090910152611925565b50600054915082608001358211156110e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063390612d8f565b604080517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c48101839052905173ffffffffffffffffffffffffffffffffffffffff88169163d505accf9160e480830192600092919082900301818387803b1580156106e257600080fd5b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040518082805190602001908083835b602083106115d957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161159c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461163b576040519150601f19603f3d011682016040523d82523d6000602084013e611640565b606091505b50509050806108b757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f5354450000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600080806116be8482611e73565b92506116cb846014611f73565b90506116d8846017611e73565b91509193909250565b60006116f7856116f2868686612063565b6120e0565b95945050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614801561175b5750804710155b156118a4577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156117c857600080fd5b505af11580156117dc573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561187257600080fd5b505af1158015611886573d6000803e3d6000fd5b505050506040513d602081101561189c57600080fd5b5061122a9050565b73ffffffffffffffffffffffffffffffffffffffff83163014156118d2576118cd848383611c9e565b61122a565b61122a84848484612110565b8051604211155b919050565b805160609061191f9083906017907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9016122ed565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff8416611946573093505b600080600061195885600001516116b0565b9194509250905073ffffffffffffffffffffffffffffffffffffffff808416908316106000806119898587866124d4565b73ffffffffffffffffffffffffffffffffffffffff1663128acb088b856119af8f612512565b60000373ffffffffffffffffffffffffffffffffffffffff8e16156119d4578d6119fa565b876119f35773fffd8963efd1fc6a506488495d951d5263988d256119fa565b6401000276a45b8d604051602001611a0b9190612dfd565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401611a3a959493929190612cac565b6040805180830381600087803b158015611a5357600080fd5b505af1158015611a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8b9190612899565b91509150600083611aa0578183600003611aa6565b82826000035b909850905073ffffffffffffffffffffffffffffffffffffffff8a16611ad2578b8114611ad257600080fd5b50505050505050949350505050565b4290565b600073ffffffffffffffffffffffffffffffffffffffff8416611b06573093505b6000806000611b1885600001516116b0565b9194509250905073ffffffffffffffffffffffffffffffffffffffff80831690841610600080611b498686866124d4565b73ffffffffffffffffffffffffffffffffffffffff1663128acb088b85611b6f8f612512565b73ffffffffffffffffffffffffffffffffffffffff8e1615611b91578d611bb7565b87611bb05773fffd8963efd1fc6a506488495d951d5263988d25611bb7565b6401000276a45b8d604051602001611bc89190612dfd565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401611bf7959493929190612cac565b6040805180830381600087803b158015611c1057600080fd5b505af1158015611c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c489190612899565b9150915082611c575781611c59565b805b6000039b9a5050505050505050505050565b6000821580611c8657505081810281838281611c8357fe5b04145b61191f57600080fd5b606061191f826000602b6122ed565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251825160009485949389169392918291908083835b60208310611d7357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611d36565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611dd5576040519150601f19603f3d011682016040523d82523d6000602084013e611dda565b606091505b5091509150818015611e08575080511580611e085750808060200190516020811015611e0557600080fd5b50515b610af157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f5354000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600081826014011015611ee757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f746f416464726573735f6f766572666c6f770000000000000000000000000000604482015290519081900360640190fd5b8160140183511015611f5a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f416464726573735f6f75744f66426f756e64730000000000000000000000604482015290519081900360640190fd5b5001602001516c01000000000000000000000000900490565b600081826003011015611fe757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f746f55696e7432345f6f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b816003018351101561205a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f746f55696e7432345f6f75744f66426f756e6473000000000000000000000000604482015290519081900360640190fd5b50016003015190565b61206b61267a565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1611156120a3579192915b506040805160608101825273ffffffffffffffffffffffffffffffffffffffff948516815292909316602083015262ffffff169181019190915290565b60006120ec8383612544565b90503373ffffffffffffffffffffffffffffffffffffffff82161461191f57600080fd5b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000178152925182516000948594938a169392918291908083835b602083106121ed57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016121b0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461224f576040519150601f19603f3d011682016040523d82523d6000602084013e612254565b606091505b5091509150818015612282575080511580612282575080806020019051602081101561227f57600080fd5b50515b610aef57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f5354460000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60608182601f01101561236157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b8282840110156123d257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b8183018451101561244457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e6473000000000000000000000000000000604482015290519081900360640190fd5b60608215801561246357604051915060008252602082016040526124cb565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561249c578051835260209283019201612484565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b600061250a7f0000000000000000000000000000000000000000000000000000000000000000612505868686612063565b612544565b949350505050565b60007f8000000000000000000000000000000000000000000000000000000000000000821061254057600080fd5b5090565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161061258657600080fd5b508051602080830151604093840151845173ffffffffffffffffffffffffffffffffffffffff94851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660a183015260b58201939093527f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e260d5808301919091528251808303909101815260f5909101909152805191012090565b604080516060810182526000808252602082018190529181019190915290565b80356118e581612f48565b600082601f8301126126b5578081fd5b81356126c86126c382612edc565b612eb8565b8181528460208386010111156126dc578283fd5b816020850160208301379081016020019190915292915050565b6000610100828403121561063c578081fd5b600060208284031215612719578081fd5b813561272481612f48565b9392505050565b60008060006060848603121561273f578182fd5b833561274a81612f48565b925060208401359150604084013561276181612f48565b809150509250925092565b600080600080600060a08688031215612783578081fd5b853561278e81612f48565b94506020860135935060408601356127a581612f48565b92506060860135915060808601356127bc81612f48565b809150509295509295909350565b60008060008060008060c087890312156127e2578081fd5b86356127ed81612f48565b95506020870135945060408701359350606087013560ff81168114612810578182fd5b9598949750929560808101359460a0909101359350915050565b6000806020838503121561283c578182fd5b823567ffffffffffffffff80821115612853578384fd5b818501915085601f830112612866578384fd5b813581811115612874578485fd5b8660208083028501011115612887578485fd5b60209290920196919550909350505050565b600080604083850312156128ab578182fd5b505080516020909101519092909150565b600080600080606085870312156128d1578182fd5b8435935060208501359250604085013567ffffffffffffffff808211156128f6578384fd5b818701915087601f830112612909578384fd5b813581811115612917578485fd5b886020828501011115612928578485fd5b95989497505060200194505050565b600060208284031215612948578081fd5b815167ffffffffffffffff81111561295e578182fd5b8201601f8101841361296e578182fd5b805161297c6126c382612edc565b818152856020838501011115612990578384fd5b6116f7826020830160208601612f1c565b6000602082840312156129b2578081fd5b813567ffffffffffffffff808211156129c9578283fd5b9083019060a082860312156129dc578283fd5b60405160a0810181811083821117156129f157fe5b604052823582811115612a02578485fd5b612a0e878286016126a5565b825250612a1d6020840161269a565b602082015260408301356040820152606083013560608201526080830135608082015280935050505092915050565b60006101008284031215612a5e578081fd5b61272483836126f6565b600060208284031215612a79578081fd5b813567ffffffffffffffff811115612a8f578182fd5b820160a08185031215612724578182fd5b600060208284031215612ab1578081fd5b813567ffffffffffffffff80821115612ac8578283fd5b9083019060408286031215612adb578283fd5b604051604081018181108382111715612af057fe5b604052823582811115612b01578485fd5b612b0d878286016126a5565b82525060208301359250612b2083612f48565b6020810192909252509392505050565b600060208284031215612b41578081fd5b813562ffffff81168114612724578182fd5b60008060408385031215612b65578182fd5b823591506020830135612b7781612f48565b809150509250929050565b60008060008060808587031215612b97578182fd5b843593506020850135612ba981612f48565b9250604085013591506060850135612bc081612f48565b939692955090935050565b60008151808452612be3816020860160208601612f1c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b606093841b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000908116825260e89390931b7fffffff0000000000000000000000000000000000000000000000000000000000166014820152921b166017820152602b0190565b6000828483379101908152919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8088168352861515602084015285604084015280851660608401525060a06080830152612cf360a0830184612bcb565b979650505050505050565b6000602080830181845280855180835260408601915060408482028701019250838701855b82811015612d6f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452612d5d858351612bcb565b94509285019290850190600101612d23565b5092979650505050505050565b6000602082526127246020830184612bcb565b60208082526012908201527f546f6f206d756368207265717565737465640000000000000000000000000000604082015260600190565b60208082526013908201527f546f6f206c6974746c6520726563656976656400000000000000000000000000604082015260600190565b600060208252825160406020840152612e196060840182612bcb565b905073ffffffffffffffffffffffffffffffffffffffff60208501511660408401528091505092915050565b90815260200190565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612e82578283fd5b83018035915067ffffffffffffffff821115612e9c578283fd5b602001915036819003821315612eb157600080fd5b9250929050565b60405181810167ffffffffffffffff81118282101715612ed457fe5b604052919050565b600067ffffffffffffffff821115612ef057fe5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015612f37578181015183820152602001612f1f565b8381111561122a5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114612f6a57600080fd5b5056fea164736f6c6343000706000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/SyrupBar.json b/projects/vecake-farm-booster/v3/test/artifactsFile/SyrupBar.json new file mode 100644 index 00000000..b0ed0f78 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/SyrupBar.json @@ -0,0 +1,699 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SyrupBar", + "sourceName": "contracts/test/SyrupBar.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract CakeToken", + "name": "_cake", + "type": "address" + } + ], + "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": "value", + "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": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cake", + "outputs": [ + { + "internalType": "contract CakeToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "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" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "safeCakeTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002b0a38038062002b0a833981810160405260208110156200003757600080fd5b5051604080518082018252600e81526d29bcb93ab82130b9102a37b5b2b760911b60208281019190915282518084019093526005835264053595255560dc1b908301529060006200008762000136565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000e69060049060208501906200013a565b508051620000fc9060059060208401906200013a565b5050600680546001600160a01b0390931661010002610100600160a81b031960ff19909416601217939093169290921790915550620001d6565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200017d57805160ff1916838001178555620001ad565b82800160010185558215620001ad579182015b82811115620001ad57825182559160200191906001019062000190565b50620001bb929150620001bf565b5090565b5b80821115620001bb5760008155600101620001c0565b61292480620001e66000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063893d20e811610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146106ca578063e7a324dc14610705578063f1127ed81461070d578063f2fde38b1461076c576101da565b8063a9059cbb14610602578063b4b5ea571461063b578063c3cda5201461066e578063dce17484146106c2576101da565b80639dc29fac116100de5780639dc29fac1461053a578063a0712d6814610573578063a2e6ddcc14610590578063a457c2d7146105c9576101da565b8063893d20e8146105225780638da5cb5b1461052a57806395d89b4114610532576101da565b806340c10f191161017c57806370a082311161014b57806370a082311461047b578063715018a6146104ae578063782d6fe1146104b65780637ecebe00146104ef576101da565b806340c10f1914610365578063587cde1e146103a05780635c19a95c146103fc5780636fcfff451461042f576101da565b806320606b70116101b857806320606b70146102c357806323b872dd146102cb578063313ce5671461030e578063395093511461032c576101da565b806306fdde03146101df578063095ea7b31461025c57806318160ddd146102a9575b600080fd5b6101e761079f565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610221578181015183820152602001610209565b50505050905090810190601f16801561024e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102956004803603604081101561027257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610853565b604080519115158252519081900360200190f35b6102b1610871565b60408051918252519081900360200190f35b6102b1610877565b610295600480360360608110156102e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561089b565b61031661093c565b6040805160ff9092168252519081900360200190f35b6102956004803603604081101561034257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610945565b61039e6004803603604081101561037b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109a0565b005b6103d3600480360360208110156103b657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a88565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039e6004803603602081101561041257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ab3565b6104626004803603602081101561044557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ac0565b6040805163ffffffff9092168252519081900360200190f35b6102b16004803603602081101561049157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ad8565b61039e610b00565b6102b1600480360360408110156104cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c17565b6102b16004803603602081101561050557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ee1565b6103d3610ef3565b6103d3610f02565b6101e7610f1e565b61039e6004803603604081101561055057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f9d565b6102956004803603602081101561058957600080fd5b503561104f565b61039e600480360360408110156105a657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611112565b610295600480360360408110156105df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113ce565b6102956004803603604081101561061857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611443565b6102b16004803603602081101561065157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611457565b61039e600480360360c081101561068457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356114f3565b6103d3611832565b6102b1600480360360408110156106e057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611853565b6102b161188b565b61074c6004803603604081101561072357600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff166118af565b6040805163ffffffff909316835260208301919091528051918290030190f35b61039e6004803603602081101561078257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118dc565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b820191906000526020600020905b81548152906001019060200180831161082c57829003601f168201915b5050505050905090565b6000610867610860611a7d565b8484611a81565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b60006108a8848484611bc8565b610932846108b4611a7d565b61092d856040518060600160405280602881526020016127516028913973ffffffffffffffffffffffffffffffffffffffff8a166000908152600260205260408120906108ff611a7d565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611d8f565b611a81565b5060019392505050565b60065460ff1690565b6000610867610952611a7d565b8461092d8560026000610963611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611e40565b6109a8611a7d565b73ffffffffffffffffffffffffffffffffffffffff166109c6610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610a4857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282611eb4565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054610a84921683611fdb565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610abd33826121bc565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610b08611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610b26610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610ba857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610c71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806127d36027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610cac57600091505061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610d715773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff1683529290522060010154905061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610db957600091505061086b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e9d57600282820363ffffffff16048103610e096126a4565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610e785760200151945061086b9350505050565b805163ffffffff16871115610e8f57819350610e96565b6001820392505b5050610ddf565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610efd610f02565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b610fa5611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610fc3610f02565b73ffffffffffffffffffffffffffffffffffffffff161461104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282612283565b6000611059611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611077610f02565b73ffffffffffffffffffffffffffffffffffffffff16146110f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61110a611104611a7d565b83611eb4565b506001919050565b61111a611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611138610f02565b73ffffffffffffffffffffffffffffffffffffffff16146111ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092610100900473ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561123057600080fd5b505afa158015611244573d6000803e3d6000fd5b505050506040513d602081101561125a57600080fd5b505190508082111561131a57600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b1580156112e857600080fd5b505af11580156112fc573d6000803e3d6000fd5b505050506040513d602081101561131257600080fd5b506113c99050565b600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820186905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b15801561139c57600080fd5b505af11580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b50505b505050565b60006108676113db611a7d565b8461092d856040518060600160405280602581526020016128656025913960026000611405611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611d8f565b6000610867611450611a7d565b8484611bc8565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff168061148f5760006114ec565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86661151e61079f565b8051906020012061152d6123c1565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa1580156116a6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661173d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127796026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146117c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128206022913960400191505060405180910390fd5b8742111561181b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061272b6026913960400191505060405180910390fd5b611825818b6121bc565b505050505b505050505050565b600654610100900473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6118e4611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611902610f02565b73ffffffffffffffffffffffffffffffffffffffff161461198457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166119f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127056026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611aed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806126e16024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128cd6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316611c34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806126bc6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611ca0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806128426023913960400191505060405180910390fd5b611cea816040518060600160405280602681526020016127fa6026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611d269082611e40565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611e38576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dfd578181015183820152602001611de5565b50505050905090810190601f168015611e2a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156114ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611f439082611e40565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611f769082611e40565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120175750600081115b156113c95773ffffffffffffffffffffffffffffffffffffffff8316156120ee5773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff1690816120715760006120ce565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006120dc82856123c5565b90506120ea8684848461243c565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156113c95773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff1690816121435760006121a0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006121ae8285611e40565b905061182a8584848461243c565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054909116906121f084610ad8565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461227d828483611fdb565b50505050565b73ffffffffffffffffffffffffffffffffffffffff82166122ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061288a6021913960400191505060405180910390fd5b612339816040518060600160405280602281526020016128ab6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205560035461236c90826123c5565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b4690565b60008282111561243657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006124604360405180606001604052806034815260200161279f6034913961262c565b905060008463ffffffff161180156124d4575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b1561253c5773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff890116845290915290206001018290556125d5565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b600081640100000000841061269c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611dfd578181015183820152602001611de5565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a206275726e2066726f6d20746865207a65726f206164647265737342455032303a206275726e20616d6f756e7420657863656564732062616c616e636542455032303a20617070726f766520746f20746865207a65726f2061646472657373a26469706673582212201422e88a0353871be13774eb48012ed80d303ace501a54c167b5111bd7069bd664736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063893d20e811610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146106ca578063e7a324dc14610705578063f1127ed81461070d578063f2fde38b1461076c576101da565b8063a9059cbb14610602578063b4b5ea571461063b578063c3cda5201461066e578063dce17484146106c2576101da565b80639dc29fac116100de5780639dc29fac1461053a578063a0712d6814610573578063a2e6ddcc14610590578063a457c2d7146105c9576101da565b8063893d20e8146105225780638da5cb5b1461052a57806395d89b4114610532576101da565b806340c10f191161017c57806370a082311161014b57806370a082311461047b578063715018a6146104ae578063782d6fe1146104b65780637ecebe00146104ef576101da565b806340c10f1914610365578063587cde1e146103a05780635c19a95c146103fc5780636fcfff451461042f576101da565b806320606b70116101b857806320606b70146102c357806323b872dd146102cb578063313ce5671461030e578063395093511461032c576101da565b806306fdde03146101df578063095ea7b31461025c57806318160ddd146102a9575b600080fd5b6101e761079f565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610221578181015183820152602001610209565b50505050905090810190601f16801561024e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102956004803603604081101561027257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610853565b604080519115158252519081900360200190f35b6102b1610871565b60408051918252519081900360200190f35b6102b1610877565b610295600480360360608110156102e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561089b565b61031661093c565b6040805160ff9092168252519081900360200190f35b6102956004803603604081101561034257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610945565b61039e6004803603604081101561037b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109a0565b005b6103d3600480360360208110156103b657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a88565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039e6004803603602081101561041257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ab3565b6104626004803603602081101561044557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ac0565b6040805163ffffffff9092168252519081900360200190f35b6102b16004803603602081101561049157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ad8565b61039e610b00565b6102b1600480360360408110156104cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c17565b6102b16004803603602081101561050557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ee1565b6103d3610ef3565b6103d3610f02565b6101e7610f1e565b61039e6004803603604081101561055057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f9d565b6102956004803603602081101561058957600080fd5b503561104f565b61039e600480360360408110156105a657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611112565b610295600480360360408110156105df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113ce565b6102956004803603604081101561061857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611443565b6102b16004803603602081101561065157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611457565b61039e600480360360c081101561068457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356114f3565b6103d3611832565b6102b1600480360360408110156106e057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611853565b6102b161188b565b61074c6004803603604081101561072357600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff166118af565b6040805163ffffffff909316835260208301919091528051918290030190f35b61039e6004803603602081101561078257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118dc565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b820191906000526020600020905b81548152906001019060200180831161082c57829003601f168201915b5050505050905090565b6000610867610860611a7d565b8484611a81565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b60006108a8848484611bc8565b610932846108b4611a7d565b61092d856040518060600160405280602881526020016127516028913973ffffffffffffffffffffffffffffffffffffffff8a166000908152600260205260408120906108ff611a7d565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611d8f565b611a81565b5060019392505050565b60065460ff1690565b6000610867610952611a7d565b8461092d8560026000610963611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611e40565b6109a8611a7d565b73ffffffffffffffffffffffffffffffffffffffff166109c6610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610a4857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282611eb4565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054610a84921683611fdb565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610abd33826121bc565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610b08611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610b26610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610ba857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610c71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806127d36027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610cac57600091505061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610d715773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff1683529290522060010154905061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610db957600091505061086b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e9d57600282820363ffffffff16048103610e096126a4565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610e785760200151945061086b9350505050565b805163ffffffff16871115610e8f57819350610e96565b6001820392505b5050610ddf565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610efd610f02565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b610fa5611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610fc3610f02565b73ffffffffffffffffffffffffffffffffffffffff161461104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282612283565b6000611059611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611077610f02565b73ffffffffffffffffffffffffffffffffffffffff16146110f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61110a611104611a7d565b83611eb4565b506001919050565b61111a611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611138610f02565b73ffffffffffffffffffffffffffffffffffffffff16146111ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092610100900473ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561123057600080fd5b505afa158015611244573d6000803e3d6000fd5b505050506040513d602081101561125a57600080fd5b505190508082111561131a57600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b1580156112e857600080fd5b505af11580156112fc573d6000803e3d6000fd5b505050506040513d602081101561131257600080fd5b506113c99050565b600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820186905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b15801561139c57600080fd5b505af11580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b50505b505050565b60006108676113db611a7d565b8461092d856040518060600160405280602581526020016128656025913960026000611405611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611d8f565b6000610867611450611a7d565b8484611bc8565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff168061148f5760006114ec565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86661151e61079f565b8051906020012061152d6123c1565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa1580156116a6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661173d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127796026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146117c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128206022913960400191505060405180910390fd5b8742111561181b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061272b6026913960400191505060405180910390fd5b611825818b6121bc565b505050505b505050505050565b600654610100900473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6118e4611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611902610f02565b73ffffffffffffffffffffffffffffffffffffffff161461198457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166119f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127056026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611aed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806126e16024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128cd6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316611c34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806126bc6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611ca0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806128426023913960400191505060405180910390fd5b611cea816040518060600160405280602681526020016127fa6026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611d269082611e40565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611e38576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dfd578181015183820152602001611de5565b50505050905090810190601f168015611e2a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156114ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611f439082611e40565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611f769082611e40565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120175750600081115b156113c95773ffffffffffffffffffffffffffffffffffffffff8316156120ee5773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff1690816120715760006120ce565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006120dc82856123c5565b90506120ea8684848461243c565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156113c95773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff1690816121435760006121a0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006121ae8285611e40565b905061182a8584848461243c565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054909116906121f084610ad8565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461227d828483611fdb565b50505050565b73ffffffffffffffffffffffffffffffffffffffff82166122ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061288a6021913960400191505060405180910390fd5b612339816040518060600160405280602281526020016128ab6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205560035461236c90826123c5565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b4690565b60008282111561243657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006124604360405180606001604052806034815260200161279f6034913961262c565b905060008463ffffffff161180156124d4575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b1561253c5773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff890116845290915290206001018290556125d5565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b600081640100000000841061269c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611dfd578181015183820152602001611de5565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a206275726e2066726f6d20746865207a65726f206164647265737342455032303a206275726e20616d6f756e7420657863656564732062616c616e636542455032303a20617070726f766520746f20746865207a65726f2061646472657373a26469706673582212201422e88a0353871be13774eb48012ed80d303ace501a54c167b5111bd7069bd664736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/test/artifactsFile/VECake.json b/projects/vecake-farm-booster/v3/test/artifactsFile/VECake.json new file mode 100644 index 00000000..db335b18 --- /dev/null +++ b/projects/vecake-farm-booster/v3/test/artifactsFile/VECake.json @@ -0,0 +1,1955 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VECake", + "sourceName": "contracts/VECake.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICakePool", + "name": "_cakePool", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IProxyForCakePoolFactory", + "name": "_ProxyForCakePoolFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "DelegateFromCakePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lockTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "penalty", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "EarlyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InjectToDelegator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "MigrateFromCakePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "MigrationConvertToDelegation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "farmBooster", + "type": "address" + } + ], + "name": "NewFarmBooster", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Redistribute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "previousBreaker", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "breaker", + "type": "uint256" + } + ], + "name": "SetBreaker", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "oldEarlyWithdrawFeeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newEarlyWithdrawFeeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "oldRedistributeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newRedistribiteBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldTreasuryAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasuryAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldRedistributeAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newRedistributeAddr", + "type": "address" + } + ], + "name": "SetEarlyWithdrawConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetEarlyWithdrawSwitch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetEmergencyWithdrawSwitch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "SetLimitTimeOfConvert", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetNoPenaltyForEarlyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "SetWhitelistedCaller", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "SetWhitelistedRedistributors", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "previousSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supply", + "type": "uint256" + } + ], + "name": "Supply", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isDelegator", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint40", + "name": "limitTimestampForEarlyWithdraw", + "type": "uint40" + } + ], + "name": "UpdateDelegator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "WithdrawAll", + "type": "event" + }, + { + "inputs": [], + "name": "ACTION_CREATE_LOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_DEPOSIT_FOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_INCREASE_LOCK_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_INCREASE_UNLOCK_TIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CakePool", + "outputs": [ + { + "internalType": "contract ICakePool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DELEGATION_FROM_CAKE_POOL_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DELEGATOR_FLAG", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FarmBooster", + "outputs": [ + { + "internalType": "contract IFarmBooster", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIGRATION_FROM_CAKE_POOL_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NOT_DELEGATOR_FLAG", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NOT_WITHDRAW_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ProxyForCakePoolFactory", + "outputs": [ + { + "internalType": "contract IProxyForCakePoolFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WEEK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WITHDREW_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accumRedistribute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAtForProxy", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAtUser", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOfForProxy", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOfUser", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "breaker", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpoint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLockForProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + } + ], + "name": "delegateFromCakePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegator", + "outputs": [ + { + "internalType": "uint104", + "name": "delegatedCakeAmount", + "type": "uint104" + }, + { + "internalType": "uint104", + "name": "notInjectedCakeAmount", + "type": "uint104" + }, + { + "internalType": "uint40", + "name": "limitTimestampForEarlyWithdraw", + "type": "uint40" + }, + { + "internalType": "uint8", + "name": "isDelegator", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockDuration", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_for", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "depositFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "earlyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "earlyWithdrawBpsPerWeek", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "earlyWithdrawSwitch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdrawSwitch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "everEmergencyWithdraw", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getUserInfo", + "outputs": [ + { + "internalType": "int128", + "name": "amount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + }, + { + "internalType": "address", + "name": "cakePoolProxy", + "type": "address" + }, + { + "internalType": "uint128", + "name": "cakeAmount", + "type": "uint128" + }, + { + "internalType": "uint48", + "name": "lockEndTime", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "migrationTime", + "type": "uint48" + }, + { + "internalType": "uint16", + "name": "cakePoolType", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "withdrawFlag", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "increaseLockAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newUnlockTime", + "type": "uint256" + } + ], + "name": "increaseUnlockTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialization", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initializeCakePoolMigration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "injectToDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isCakePoolProxy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "limitTimeOfConvert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "locks", + "outputs": [ + { + "internalType": "int128", + "name": "amount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFromCakePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + } + ], + "name": "migrationConvertToDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "noPenaltyForEarlyWithdraw", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redistribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "redistributeAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redistributeBps", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_breaker", + "type": "uint256" + } + ], + "name": "setBreaker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "_newEarlyWithdrawBpsPerWeek", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "_newRedistributeBps", + "type": "uint64" + }, + { + "internalType": "address", + "name": "_newTreasuryAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_newRedistributeAddr", + "type": "address" + } + ], + "name": "setEarlyWithdrawConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_earlyWithdrawSwitch", + "type": "bool" + } + ], + "name": "setEarlyWithdrawSwitch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_emergencyWithdrawSwitch", + "type": "bool" + } + ], + "name": "setEmergencyWithdrawSwitch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_farmBooster", + "type": "address" + } + ], + "name": "setFarmBooster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_limitTime", + "type": "uint256" + } + ], + "name": "setLimitTimeOfConvert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_status", + "type": "bool" + } + ], + "name": "setNoPenaltyForEarlyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "callers", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "setWhitelistedCallers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "callers", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "setWhitelistedRedistributors", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "slopeChanges", + "outputs": [ + { + "internalType": "int128", + "name": "", + "type": "int128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "supply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isDelegator", + "type": "bool" + }, + { + "internalType": "uint40", + "name": "_limitTimestampForEarlyWithdraw", + "type": "uint40" + } + ], + "name": "updateDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "address", + "name": "cakePoolProxy", + "type": "address" + }, + { + "internalType": "uint128", + "name": "cakeAmount", + "type": "uint128" + }, + { + "internalType": "uint48", + "name": "lockEndTime", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "migrationTime", + "type": "uint48" + }, + { + "internalType": "uint16", + "name": "cakePoolType", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "withdrawFlag", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userPointEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "userPointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedCallers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedRedistributors", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60e0604052621275006004553480156200001857600080fd5b5060405162006316380380620063168339810160408190526200003b91620002b8565b6200004633620001a9565b60018080556001600160a01b0380851660a052838116608090815290831660c05260408051918201815260008083526020838101828152428585019081524360608701908152600d80549889018155909452945190516001600160801b03908116600160801b0291161760039095027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019590955592517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb6850155517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb7909301929092556014805460ff19166012908117909155825180840190935280835271566f74652d657363726f7765642043616b6560701b929091019182526200016f9181620001f9565b5060408051808201909152600680825265766543616b6560d01b60209092019182526200019f91601391620001f9565b5050505062000349565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805462000207906200030c565b90600052602060002090601f0160209004810192826200022b576000855562000276565b82601f106200024657805160ff191683800117855562000276565b8280016001018555821562000276579182015b828111156200027657825182559160200191906001019062000259565b506200028492915062000288565b5090565b5b8082111562000284576000815560010162000289565b6001600160a01b0381168114620002b557600080fd5b50565b600080600060608486031215620002ce57600080fd5b8351620002db816200029f565b6020850151909350620002ee816200029f565b604085015190925062000301816200029f565b809150509250925092565b600181811c908216806200032157607f821691505b602082108114156200034357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c051615f2d620003e960003960008181610ae90152612148015260008181610ba00152818161144901528181611d0b01528181611ef60152818161201c0152818161209201528181612f3d0152818161305b015281816130d9015261343c015260008181610d3701528181610e75015281816126b801528181613a8701528181613d4701528181613e5401526142390152615f2d6000f3fe608060405234801561001057600080fd5b50600436106104a05760003560e01c8063705096c71161026d578063b52c05fe11610151578063d73f98a3116100ce578063f4359ce511610092578063f4359ce514610cd7578063f52a36f714610ce1578063fa09e63014610d17578063fb489a7b14610d2a578063fc0c546a14610d32578063ffc97ce914610d5957600080fd5b8063d73f98a314610c8e578063db2e21bc14610ca1578063ec5570d014610ca9578063f2c7a81b14610cbc578063f2fde38b14610cc457600080fd5b8063c172085e11610115578063c172085e14610c32578063c1d1192914610c46578063c2c4c5c114610c4f578063cfee396f14610c57578063d4eda63f14610c6b57600080fd5b8063b52c05fe14610bc2578063b6bbbcd114610bd5578063b6e45a4e14610bef578063c0dd84bd14610bfc578063c12ebb5f14610c1f57600080fd5b80638e900530116101ea5780639d4b4ba1116101ae5780639d4b4ba114610b52578063a621440414610b65578063a63dce7114610b6d578063a7ccf1e014610b75578063a88a885514610b88578063aa94ab5914610b9b57600080fd5b80638e90053014610b26578063900cf0cf14610b2e57806395d89b4114610b37578063981b24d014610b3f5780639c490f19146104f557600080fd5b80637c616fe6116102315780637c616fe614610ab157806381fc83bb14610ac4578063827e8e0c14610ae45780638ad4c44714610b0b5780638da5cb5b14610b1e57600080fd5b8063705096c714610a4d57806370a0823114610a60578063715018a614610a7357806375cd6c6714610a7b5780637c5acb2514610a8e57600080fd5b806330d9a62a1161039457806355ed0a78116103115780636386c1c7116102d55780636386c1c7146108d15780636574deb714610a045780636582a8c014610a1757806365a5d5f014610a2a57806365f9008a14610a3257806367e7a7cb14610a4557600080fd5b806355ed0a781461083357806358fca6a51461083b578063598085ae146108435780635de9a137146108565780635e8bb48e1461089e57600080fd5b80633d5c78bd116103585780633d5c78bd1461075d578063403f4447146107705780634ee2cd7e1461078357806351cff8d914610796578063539e5082146107a957600080fd5b806330d9a62a146106a0578063313ce567146106c057806334d901a4146106df57806336a583911461071a578063399f3a4f1461074a57600080fd5b80630efe6a8b1161042257806319577c6e116103e657806319577c6e146105935780631959a002146105a65780631bb8c61d146106675780632ea1fe7a1461067a5780632f4f21e21461068d57600080fd5b80630efe6a8b146105495780630f41e0d21461055c57806312c470e91461056557806312cae7af1461057857806318160ddd1461058b57600080fd5b806306a4da7e1161046957806306a4da7e146104f557806306fdde031461051057806308154df01461052557806308c3dea71461052d5780630a6373b31461053657600080fd5b8062b79fd4146104a557806302641632146104c0578063047fc9aa146104c8578063052b726f146104d1578063059f8b16146104e6575b600080fd5b6104ad600081565b6040519081526020015b60405180910390f35b6104ad600381565b6104ad60025481565b6104e46104df3660046155ec565b610d7c565b005b6104ad670de0b6b3a764000081565b6104fd600181565b60405161ffff90911681526020016104b7565b610518610ef2565b6040516104b79190615644565b6104fd600081565b6104ad60155481565b6104e4610544366004615677565b610f80565b6104e4610557366004615694565b61143e565b6104ad60115481565b6104ad6105733660046155ec565b61151e565b6104ad610586366004615677565b6115ea565b6104ad6115f5565b6104e46105a13660046156d7565b611665565b6106156105b4366004615677565b600860205260009081526040902080546001909101546001600160a01b03909116906001600160801b0381169065ffffffffffff600160801b8204811691600160b01b81049091169061ffff600160e01b8204811691600160f01b90041686565b604080516001600160a01b0390971687526001600160801b03909516602087015265ffffffffffff938416948601949094529116606084015261ffff90811660808401521660a082015260c0016104b7565b6104e4610675366004615710565b6116eb565b6104e4610688366004615795565b611800565b6104e461069b3660046155ec565b611879565b6016546106b3906001600160a01b031681565b6040516104b791906157b2565b6014546106cd9060ff1681565b60405160ff90911681526020016104b7565b6106f26106ed3660046155ec565b6119b6565b60408051600f95860b81529390940b60208401529282015260608101919091526080016104b7565b6014546107329061010090046001600160401b031681565b6040516001600160401b0390911681526020016104b7565b6104e46107583660046157c6565b611a06565b6104e461076b3660046157e8565b611a5d565b6104e461077e3660046157e8565b611b18565b6104ad6107913660046155ec565b611c26565b6104e46107a4366004615677565b611d00565b6107f96107b7366004615677565b6009602052600090815260409020546001600160681b0380821691600160681b810490911690600160d01b810464ffffffffff1690600160f81b900460ff1684565b604080516001600160681b03958616815294909316602085015264ffffffffff9091169183019190915260ff1660608201526080016104b7565b6104e4611e9e565b6104fd600281565b6104e4610851366004615795565b61230b565b610884610864366004615677565b60076020526000908152604090208054600190910154600f9190910b9082565b60408051600f9390930b83526020830191909152016104b7565b6108c16108ac366004615677565b600b6020526000908152604090205460ff1681565b60405190151581526020016104b7565b61099f6108df366004615677565b6001600160a01b039081166000818152600760209081526040808320815180830183528154600f0b81526001918201548185019081529585526008845293829020825160c08101845281549097168088529101546001600160801b03811693870184905265ffffffffffff600160801b82048116938801849052600160b01b8204166060880181905261ffff600160e01b8304811660808a01819052600160f01b9093041660a09098018890529451955195979596919593949293909190565b60408051600f9990990b895260208901979097526001600160a01b03909516958701959095526001600160801b03909216606086015265ffffffffffff90811660808601521660a084015261ffff91821660c08401521660e0820152610100016104b7565b6104e4610a123660046155ec565b612389565b6017546106b3906001600160a01b031681565b6104ad612748565b6003546106b3906001600160a01b031681565b6104ad600181565b6104e4610a5b3660046157e8565b612765565b6104ad610a6e366004615677565b6127cb565b6104e4612891565b6104e4610a8936600461581d565b6128cc565b6108c1610a9c366004615677565b60196020526000908152604090205460ff1681565b6104e4610abf3660046157e8565b612a9a565b6104ad610ad2366004615677565b600f6020526000908152604090205481565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6106f2610b193660046157e8565b612c47565b6106b3612c8b565b6106cd600081565b6104ad600c5481565b610518612c9a565b6104ad610b4d3660046157e8565b612ca7565b6104e4610b60366004615677565b612ea2565b6104e46133b9565b6106cd600181565b6104e4610b83366004615677565b613518565b6104ad610b96366004615677565b6135e0565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6104e4610bd03660046157c6565b61367d565b60145461073290600160481b90046001600160401b031681565b6005546108c19060ff1681565b6108c1610c0a366004615677565b600a6020526000908152604090205460ff1681565b6104e4610c2d366004615710565b6136e5565b6003546108c190600160a01b900460ff1681565b6104ad60045481565b6104e46137fa565b6017546108c190600160a01b900460ff1681565b6108c1610c79366004615677565b60066020526000908152604090205460ff1681565b6104e4610c9c366004615875565b61381e565b6104e46138fd565b6104ad610cb73660046155ec565b613af3565b6104ad600281565b6104e4610cd2366004615677565b613aff565b6104ad62093a8081565b610d04610cef3660046157e8565b601060205260009081526040902054600f0b81565b604051600f9190910b81526020016104b7565b6104e4610d25366004615677565b613b9c565b6104e4613dbd565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6108c1610d67366004615677565b60186020526000908152604090205460ff1681565b33610d85612c8b565b6001600160a01b031614610db45760405162461bcd60e51b8152600401610dab906158bf565b60405180910390fd5b6001600160a01b03821660009081526009602052604090208054600160f81b900460ff16600114610df75760405162461bcd60e51b8152600401610dab906158f4565b8054600160681b90046001600160681b0316821115610e25578054600160681b90046001600160681b031691505b805482908290600d90610e49908490600160681b90046001600160681b031661592f565b92506101000a8154816001600160681b0302191690836001600160681b03160217905550610ead3330847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613ecc909392919063ffffffff16565b6040518281526001600160a01b0384169033907f7b85c81b5ab23faed50cf05b116ebb10456ca6320721e00b6513babed009b9e29060200160405180910390a3505050565b60128054610eff90615957565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2b90615957565b8015610f785780601f10610f4d57610100808354040283529160200191610f78565b820191906000526020600020905b815481529060010190602001808311610f5b57829003601f168201915b505050505081565b60026001541415610fa35760405162461bcd60e51b8152600401610dab9061598c565b600260019081556001600160a01b038216600090815260096020526040902080549091600160f81b90910460ff1614610fee5760405162461bcd60e51b8152600401610dab906158f4565b336000908152600860205260408120600181015490919061101d90600160801b900465ffffffffffff16613f37565b90504281116110625760405162461bcd60e51b8152602060048201526011602482015270155cd95c881b1bd8dac8195e1c1a5c9959607a1b6044820152606401610dab565b60045461106f90426159c3565b6001830154600160b01b900465ffffffffffff16116110a05760405162461bcd60e51b8152600401610dab906159da565b600182810154600160e01b900461ffff16146110eb5760405162461bcd60e51b815260206004820152600a60248201526908481b5a59dc985d195960b21b6044820152606401610dab565b6001820154600160f01b900461ffff161561113b5760405162461bcd60e51b815260206004820152601060248201526f416c726561647920776974686472617760801b6044820152606401610dab565b6001828101805461ffff60e01b1916600160e11b17905582546001600160a01b0316600090815260076020908152604080832081518083019092528054600f0b808352940154918101919091529161119290613f51565b84549091506111ab906001600160a01b03168383613fa7565b6040805180820182526001600160a01b0388166000818152600760208181529482208054600f90810b865293835290855260010154938301939093528151919291900b1361120b5760405162461bcd60e51b8152600401610dab906159fc565b4281602001511161122e5760405162461bcd60e51b8152600401610dab90615a2a565b6001808601546112509189916001600160801b0316906000908590829061417b565b600185015486546001600160801b0390911690879060009061127c9084906001600160681b0316615a5a565b82546101009290920a6001600160681b03818102199093169183160217909155600187015488546001600160801b0390911692508891600d916112c8918591600160681b900416615a5a565b82546101009290920a6001600160681b0381810219909316919092169190910217905550600185015460405162c2c90f60e11b81523360048201526001600160801b0382166024820152600160801b90910465ffffffffffff1660448201526001600160a01b03881690630185921e90606401600060405180830381600087803b15801561135557600080fd5b505af1158015611369573d6000803e3d6000fd5b505050506001850154604080516001600160801b0383168152600160801b90920465ffffffffffff1660208301526001600160a01b0389169133917f7a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96910160405180910390a36001850154604080516001600160801b0383168152600160801b90920465ffffffffffff1660208301526001600160a01b0389169133917f4af697c81385693e6ee5d15ccb781170dc8241f81c4983bf87cdf268d2fca5f5910160405180910390a35050600180555050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114865760405162461bcd60e51b8152600401610dab90615a85565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a08301521561151857600080fd5b50505050565b6000438211156115405760405162461bcd60e51b8152600401610dab90615aaa565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a0830152156115e25780516115da90846143a0565b9150506115e4565b505b92915050565b60006115e48261461c565b6000611660600d600c548154811061160f5761160f615ad4565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b9383019390935260018301549082015260029091015460608201524261470e565b905090565b3361166e612c8b565b6001600160a01b0316146116945760405162461bcd60e51b8152600401610dab906158bf565b6001600160a01b0382166000818152600b6020526040808220805460ff1916851515908117909155905190929133917f4f4d55f3b98fe4b3fbc9fb5e8ed05483cc8d794638edd690545eb5779e234a499190a45050565b336116f4612c8b565b6001600160a01b03161461171a5760405162461bcd60e51b8152600401610dab906158bf565b60005b8281101561151857816018600086868581811061173c5761173c615ad4565b90506020020160208101906117519190615677565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905583838281811061178b5761178b615ad4565b90506020020160208101906117a09190615677565b6001600160a01b0316336001600160a01b03167fdfad9b83c215ff1a36483cf1688e5aeae2ac60f1c3f62f5229641234748f13b7846040516117e6911515815260200190565b60405180910390a3806117f881615aea565b91505061171d565b33611809612c8b565b6001600160a01b03161461182f5760405162461bcd60e51b8152600401610dab906158bf565b6005805460ff191682151590811790915560405190815233907f539ba344188cde95583cd695fe9a73d66f53c83a48e3d66e5b42a12650d93ecc906020015b60405180910390a250565b6002600154141561189c5760405162461bcd60e51b8152600401610dab9061598c565b60026001556001600160a01b0382166000908152600a602052604090205460ff16156118fc5760405162461bcd60e51b815260206004820152600f60248201526e496e636f72726563742070726f787960881b6044820152606401610dab565b6040805180820182526001600160a01b0384166000818152600760208181529482208054600f0b85529290915283526001015491810191909152816119535760405162461bcd60e51b8152600401610dab90615b05565b60008160000151600f0b1361197a5760405162461bcd60e51b8152600401610dab90615b2a565b4281602001511161199d5760405162461bcd60e51b8152600401610dab90615b51565b6119ad838360008460008061417b565b50506001805550565b600e60205281600052604060002081815481106119d257600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9550600160801b90920490910b925084565b336000908152600a602052604090205460ff16611a4f5760405162461bcd60e51b8152602060048201526007602482015266212070726f787960c81b6044820152606401610dab565b611a598282614806565b5050565b33611a66612c8b565b6001600160a01b031614611a8c5760405162461bcd60e51b8152600401610dab906158bf565b801580611a995750806001145b611ad35760405162461bcd60e51b815260206004820152600b60248201526a4f6e6c792030206f72203160a81b6044820152606401610dab565b601180549082905560408051828152602081018490527f5238fc635590cf5e76ed0f591df4d7f3021d20f58e6d3405390197dd72a575fe910160405180910390a15050565b3360009081526018602052604090205460ff16611b4e57333214611b4e5760405162461bcd60e51b8152600401610dab90615b77565b60026001541415611b715760405162461bcd60e51b8152600401610dab9061598c565b60026001908155604080518082018252336000818152600760208181529482208054600f0b8552929091528352909201549082015281611bc35760405162461bcd60e51b8152600401610dab90615b05565b60008160000151600f0b13611bea5760405162461bcd60e51b8152600401610dab90615b2a565b42816020015111611c0d5760405162461bcd60e51b8152600401610dab90615b51565b611c1e33836000846002600061417b565b505060018055565b600043821115611c485760405162461bcd60e51b8152600401610dab90615aaa565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a083015215611cf6578051611ce290846143a0565b611cec85856143a0565b6115da9190615b9c565b6115da84846143a0565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611d485760405162461bcd60e51b8152600401610dab90615a85565b6001600160a01b03808216600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a083015260021415611ddd57600080fd5b80516001600160a01b031615801590611dfe5750608081015161ffff166001145b8015611e10575060a081015161ffff16155b15611a595780600001516001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611e5457600080fd5b505af1158015611e68573d6000803e3d6000fd5b5050506001600160a01b038316600090815260086020526040902060010180546001600160f01b0316600160f01b179055505050565b60026001541415611ec15760405162461bcd60e51b8152600401610dab9061598c565b6002600155600354600160a01b900460ff16611eef5760405162461bcd60e51b8152600401610dab90615bb4565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401611f4091906157b2565b61012060405180830381865afa158015611f5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f829190615bdb565b505096509650505050509250428211611fad5760405162461bcd60e51b8152600401610dab90615b51565b3360009081526008602052604090206001810154600160e01b900461ffff1615611fe95760405162461bcd60e51b8152600401610dab90615c4f565b60018101805461ffff60e01b1916600160e01b17905560408051633a98ef3960e01b815290516000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691633a98ef39916004808201926020929091908290030181865afa158015612068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208c9190615c79565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121129190615c79565b9050600060018584612124858b615c92565b61212e9190615cc7565b61213891906159c3565b61214291906159c3565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634c96a389336040518263ffffffff1660e01b815260040161219291906157b2565b6020604051808303816000875af11580156121b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121d59190615cdb565b6001600160a01b0381166000818152600a602052604090819020805460ff1916600190811790915588546001600160a01b031916831789558801805465ffffffffffff8c8116600160801b026001600160b01b03194292909216600160b01b02919091166001600160e01b0319909216919091176001600160801b038816171790555163399f3a4f60e01b81529192509063399f3a4f906122859085908b90600401918252602082015260400190565b600060405180830381600087803b15801561229f57600080fd5b505af11580156122b3573d6000803e3d6000fd5b505060408051858152602081018b90526001600160a01b03851693503392507f8519b84e949c6333da21ddea64e2c29ef66709e465ec9b0f24fb32eb2c003843910160405180910390a3505060018055505050505050565b33612314612c8b565b6001600160a01b03161461233a5760405162461bcd60e51b8152600401610dab906158bf565b60178054821515600160a01b0260ff60a01b1990911617905560405133907fdcc751463da04455ac459756e92d5ea118dd0dd631422cbf8353132417a52d9f9061186e90841515815260200190565b600260015414156123ac5760405162461bcd60e51b8152600401610dab9061598c565b6002600155601754600160a01b900460ff166123da5760405162461bcd60e51b8152600401610dab90615cf8565b6001600160a01b0382166123ec573391505b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152816124335760405162461bcd60e51b8152600401610dab90615b05565b806020015142106124565760405162461bcd60e51b8152600401610dab906159da565b601154156124765760405162461bcd60e51b8152600401610dab90615cf8565b33600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b82041692820192909252600160d01b820464ffffffffff1692810192909252600160f81b900460ff1660608201819052600114156125a85742816040015164ffffffffff161061252e5760405162461bcd60e51b8152602060048201526014602482015273466f72626964206561726c79576974686472617760601b6044820152606401610dab565b60006125408360000151600f0b613f51565b60208301519091506001600160681b031661255b85836159c3565b10156125a65760405162461bcd60e51b815260206004820152601a60248201527911195b1959d85d1bdc8818985b185b98d948195e18d95959195960321b6044820152606401610dab565b505b60208201516125b8338486613fa7565b336000908152600b602052604081205460ff161580156125e7575060145461010090046001600160401b031615155b156126e257600062093a80426125fd8286615b9c565b61260791906159c3565b6126119190615cc7565b60145490915061271090879061263690849061010090046001600160401b0316615c92565b6126409190615c92565b61264a9190615cc7565b6014549092506000906127109061267190600160481b90046001600160401b031685615c92565b61267b9190615cc7565b9050806015600082825461268f9190615b9c565b90915550506016546126df906001600160a01b03166126ae83866159c3565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906149a6565b50505b6126f0866126ae83886159c3565b6040805186815260208101839052428183015290516001600160a01b0388169133917f08b526d7537cea7e5a629eb0495b5932c78911fd0bdeb02b822d69a6e25792549181900360600190a350506001805550505050565b600161275862093a8060d1615c92565b61276291906159c3565b81565b3361276e612c8b565b6001600160a01b0316146127945760405162461bcd60e51b8152600401610dab906158bf565b600481905560405181815233907fde15bb8e73a1f43abe6021a8ad5a5d79caf815a4d74e6dbd7d88cd57f06fdd899060200161186e565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a0840152909190156128825780516128689061461c565b6128718461461c565b61287b9190615b9c565b9392505050565b61287b8361461c565b50919050565b3361289a612c8b565b6001600160a01b0316146128c05760405162461bcd60e51b8152600401610dab906158bf565b6128ca60006149d6565b565b336128d5612c8b565b6001600160a01b0316146128fb5760405162461bcd60e51b8152600401610dab906158bf565b60c0846001600160401b031611156129445760405162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606401610dab565b612710836001600160401b0316111561298e5760405162461bcd60e51b815260206004820152600c60248201526b0c4e0e640e8dede40d0d2ced60a31b6044820152606401610dab565b601480546001600160401b03858116600160481b81810267ffffffffffffffff60481b198a8516610100818102928316610100600160881b031989161793909317909755601680546001600160a01b038b81166001600160a01b03198084168217909455601780548d8416958116861790915560408051888d048c16808252602082019e909e5268ffffffffffffffff0019909c1690961797909704909816938901849052606089019690965285166080880181905260a08801969096529290931660c0860181905260e08601929092529193909133917f3de6c016cd3debec574d13c9966e6c847e64ac424da0b1eb70d3c93b68ec0537910160405180910390a25050505050505050565b3360009081526018602052604090205460ff16612ad057333214612ad05760405162461bcd60e51b8152600401610dab90615b77565b60026001541415612af35760405162461bcd60e51b8152600401610dab9061598c565b60026001908155604080518082018252336000818152600760208181529482208054600f0b85529290915283529092015490820152612b3182613f37565b915060008160000151600f0b13612b5a5760405162461bcd60e51b8152600401610dab90615b2a565b42816020015111612b7d5760405162461bcd60e51b8152600401610dab90615b51565b80602001518211612bc95760405162461bcd60e51b815260206004820152601660248201527517db995dd55b9b1bd8dad51a5b59481d1bdbc81bdb1960521b6044820152606401610dab565b6001612bd962093a8060d1615c92565b612be391906159c3565b612bed9042615b9c565b821115612c365760405162461bcd60e51b81526020600482015260176024820152765f6e6577556e6c6f636b54696d6520746f6f206c6f6e6760481b6044820152606401610dab565b611c1e33600084846003600061417b565b600d8181548110612c5757600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9450600160801b90920490910b919084565b6000546001600160a01b031690565b60138054610eff90615957565b600043821115612cec5760405162461bcd60e51b815260206004820152601060248201526f2130b2102fb13637b1b5a73ab6b132b960811b6044820152606401610dab565b600c546000612cfb8483614a26565b90506000600d8281548110612d1257612d12615ad4565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915083831015612e30576000600d612d73856001615b9c565b81548110612d8357612d83615ad4565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905285015191925014612e2a5782606001518160600151612df091906159c3565b83604001518260400151612e0491906159c3565b6060850151612e13908a6159c3565b612e1d9190615c92565b612e279190615cc7565b91505b50612e7f565b43826060015114612e7f576060820151612e4a90436159c3565b6040830151612e5990426159c3565b6060840151612e6890896159c3565b612e729190615c92565b612e7c9190615cc7565b90505b612e9882828460400151612e939190615b9c565b61470e565b9695505050505050565b60026001541415612ec55760405162461bcd60e51b8152600401610dab9061598c565b6002600155600354600160a01b900460ff16612ef35760405162461bcd60e51b8152600401610dab90615bb4565b6001600160a01b03811660009081526009602052604090208054600160f81b900460ff16600114612f365760405162461bcd60e51b8152600401610dab906158f4565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401612f8791906157b2565b61012060405180830381865afa158015612fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fc99190615bdb565b505096509650505050509250428211612ff45760405162461bcd60e51b8152600401610dab90615b51565b3360009081526008602052604090206001810154600160e01b900461ffff16156130305760405162461bcd60e51b8152600401610dab90615c4f565b60018101805461ffff60e01b1916600160e11b17905560408051633a98ef3960e01b815290516000917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691633a98ef39916004808201926020929091908290030181865afa1580156130af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d39190615c79565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015613135573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131599190615c79565b905060006001858461316b858b615c92565b6131759190615cc7565b61317f91906159c3565b61318991906159c3565b600185810180546001600160b01b031916600160801b65ffffffffffff8b16026001600160801b031916176001600160801b0384161790556040805180820182526001600160a01b038d166000818152600760208181529482208054600f0b85529290915283529092015490820152909150816132185760405162461bcd60e51b8152600401610dab90615b05565b60008160000151600f0b1361323f5760405162461bcd60e51b8152600401610dab906159fc565b428160200151116132625760405162461bcd60e51b8152600401610dab90615a2a565b6132738a836000846000600161417b565b885482908a906000906132909084906001600160681b0316615a5a565b92506101000a8154816001600160681b0302191690836001600160681b031602179055508189600001600d8282829054906101000a90046001600160681b03166132da9190615a5a565b82546001600160681b039182166101009390930a92830291909202199091161790555060405162c2c90f60e11b815233600482015260248101839052604481018890526001600160a01b038b1690630185921e90606401600060405180830381600087803b15801561334b57600080fd5b505af115801561335f573d6000803e3d6000fd5b505060408051858152602081018b90526001600160a01b038e1693503392507f7a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96910160405180910390a35050600180555050505050505050565b336133c2612c8b565b6001600160a01b0316146133e85760405162461bcd60e51b8152600401610dab906158bf565b600354600160a01b900460ff16156134385760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610dab565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632d19b9826040518163ffffffff1660e01b8152600401602060405180830381865afa158015613498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134bc9190615cdb565b90506001600160a01b03811630146135025760405162461bcd60e51b8152602060048201526009602482015268426164205643616b6560b81b6044820152606401610dab565b506003805460ff60a01b1916600160a01b179055565b33613521612c8b565b6001600160a01b0316146135475760405162461bcd60e51b8152600401610dab906158bf565b6001600160a01b0381166135965760405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606401610dab565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fd1879d19b7e07327f8e491d8c5e05a4048155b7ee8f97f61e2b2233ae0e3a88890600090a250565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a08401529091901561288b57805161287b9061461c565b3360009081526018602052604090205460ff166136b3573332146136b35760405162461bcd60e51b8152600401610dab90615b77565b600260015414156136d65760405162461bcd60e51b8152600401610dab9061598c565b6002600155611c1e8282614806565b336136ee612c8b565b6001600160a01b0316146137145760405162461bcd60e51b8152600401610dab906158bf565b60005b8281101561151857816019600086868581811061373657613736615ad4565b905060200201602081019061374b9190615677565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905583838281811061378557613785615ad4565b905060200201602081019061379a9190615677565b6001600160a01b0316336001600160a01b03167f0c5e5180b1be108ebc3c1c5939cd6b59ca30067d07c5405f94304bf603c62142846040516137e0911515815260200190565b60405180910390a3806137f281615aea565b915050613717565b6040805180820190915260008082526020820181905261381b908280614ac4565b50565b33613827612c8b565b6001600160a01b03161461384d5760405162461bcd60e51b8152600401610dab906158bf565b6001600160a01b038316600090815260096020526040902082613871576000613874565b60015b81546001600160d01b0316600160f81b60ff929092169190910264ffffffffff60d01b191617600160d01b64ffffffffff841690810291909117825560408051851515815260208101929092526001600160a01b038616917f3fd4b992bc54a5edaa3b29f337c4048b314667d454123fbd81b327aaeea7df67910160405180910390a250505050565b600260015414156139205760405162461bcd60e51b8152600401610dab9061598c565b600260015560055460ff166139735760405162461bcd60e51b8152602060048201526019602482015278466f7262696420656d657267656e637920776974686472617760381b6044820152606401610dab565b3360009081526006602052604090205460ff16156139a35760405162461bcd60e51b8152600401610dab90615d18565b336000908152600660209081526040808320805460ff191660019081179091556007835281842082518084019093528054600f0b808452910154928201929092529112613a255760405162461bcd60e51b815260206004820152601060248201526f139bc81b1bd8dad95908185b5bdd5b9d60821b6044820152606401610dab565b6000613a378260000151600f0b613f51565b33600090815260076020908152604080832080546001600160801b0319168155600101839055600e9091528120919250613a719190615599565b336000818152600f6020526040812055613ab6907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690836149a6565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505060018055565b600061287b83836143a0565b33613b08612c8b565b6001600160a01b031614613b2e5760405162461bcd60e51b8152600401610dab906158bf565b6001600160a01b038116613b935760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dab565b61381b816149d6565b60026001541415613bbf5760405162461bcd60e51b8152600401610dab9061598c565b600260015533600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b820416928201839052600160d01b810464ffffffffff1693820193909352600160f81b90920460ff16606083015215613c7a5760405162461bcd60e51b8152602060048201526024808201527f496e73756666696369656e7420696e6a656374696f6e20666f722064656c656760448201526330ba37b960e11b6064820152608401610dab565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152601154613cf2578060200151421015613cf25760405162461bcd60e51b815260206004820152601060248201526f131bd8dac81b9bdd08195e1c1a5c995960821b6044820152606401610dab565b6001600160a01b038316613d04573392505b6000613d168260000151600f0b613f51565b9050613d23338383613fa7565b336000908152600a602052604090205460ff16613d6e57613d6e6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001685836149a6565b604080518281524260208201526001600160a01b0386169133917f55e21b0674b8095feb63d5336fb7b5b004d267585bfbb58005e8126a8ad7bc54910160405180910390a35050600180555050565b3360009081526019602052604090205460ff16613e125760405162461bcd60e51b81526020600482015260136024820152722120776c2072656469737472696275746f727360681b6044820152606401610dab565b60026001541415613e355760405162461bcd60e51b8152600401610dab9061598c565b6002600155601580546000909155601754613e7d906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116836149a6565b601754604080516001600160a01b0390921682526020820183905233917f73dad76107243dbd9d398020575b5e3ad26d50fe161c81088dc8592a394855b7910160405180910390a25060018055565b6040516001600160a01b03808516602483015283166044820152606481018290526115189085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152615272565b600062093a80613f478184615cc7565b6115e49190615c92565b600080821215613fa35760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610dab565b5090565b6000613fb98360000151600f0b613f51565b905080821115613ffe5760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610dab565b604080518082019091528351600f0b81526020808501519082015281831461402a57836020015161402d565b60005b602085015261404461403f84846159c3565b615344565b600f0b84526001600160a01b0385166000908152600760209081526040909120855181546001600160801b0319166001600160801b039091161781559085015160019091015560025461409784826159c3565b6002556140a5868387614ac4565b6003546001600160a01b0316156141365760035482516020840151604051630f28a72960e31b81526001600160a01b038a81166004830152600f9390930b6024820152604481019190915260648101879052911690637945394890608401600060405180830381600087803b15801561411d57600080fd5b505af1158015614131573d6000803e3d6000fd5b505050505b6002546040805183815260208101929092527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c910160405180910390a1505050505050565b6002546141888682615b9c565b600255604080518082019091528451600f0b8152602080860151908201526141af87615344565b81516141bb9190615d4b565b600f0b815285156141ce57602081018690525b6001600160a01b0388166000908152600760209081526040909120825181546001600160801b0319166001600160801b039091161781559082015160019091015561421a888683614ac4565b8615801590614227575082155b15614261576142616001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308a613ecc565b6003546001600160a01b0316156143085760035485516020870151604051636e85ee4760e01b81526001600160a01b038c81166004830152602482018c9052604482018b9052600f9390930b6064820152608481019190915260a4810187905285151560c4820152911690636e85ee479060e401600060405180830381600087803b1580156142ef57600080fd5b505af1158015614303573d6000803e3d6000fd5b505050505b602080820151604080518a81529283018790524290830152906001600160a01b038a16907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060600160405180910390a36002546040805184815260208101929092527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c910160405180910390a15050505050505050565b6000806143ad84846153c1565b9050806143be5760009150506115e4565b6001600160a01b0384166000908152600e602052604081208054839081106143e8576143e8615ad4565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152600c54909250906144418683614a26565b90506000600d828154811061445857614458615ad4565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b9284019290925260018201549083015260020154606082015291508084841015614546576000600d6144ba866001615b9c565b815481106144ca576144ca615ad4565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905286015191925061452891906159c3565b92508360400151816040015161453e91906159c3565b91505061456a565b606083015161455590436159c3565b915082604001514261456791906159c3565b90505b604083015182156145a7578284606001518b61458691906159c3565b6145909084615c92565b61459a9190615cc7565b6145a49082615b9c565b90505b6145ba87604001518261403f91906159c3565b87602001516145c99190615d9c565b875188906145d8908390615e30565b600f90810b90915288516000910b121590506145ff576000985050505050505050506115e4565b865161460d90600f0b613f51565b9b9a5050505050505050505050565b6001600160a01b0381166000908152600f6020526040812054806146435750600092915050565b6001600160a01b0383166000908152600e6020526040812080548390811061466d5761466d615ad4565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b938301939093526001830154908201819052600290920154606082015291506146ca9061403f90426159c3565b81602001516146d99190615d9c565b81516146e59190615e30565b600f0b808252600013156146f857600081525b805161470690600f0b613f51565b949350505050565b60008083905060006147238560400151613f37565b905060005b60ff8110156147d95761473e62093a8083615b9c565b915060008583111561475257859250614766565b50600082815260106020526040902054600f0b5b61477984604001518461403f91906159c3565b84602001516147889190615d9c565b84516147949190615e30565b600f0b8452828614156147a757506147d9565b8084602001516147b79190615d4b565b600f0b60208501525060408301829052806147d181615aea565b915050614728565b5060008260000151600f0b12156147ef57600082525b81516147fd90600f0b613f51565b95945050505050565b3360009081526006602052604090205460ff16156148365760405162461bcd60e51b8152600401610dab90615d18565b61483f81613f37565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152909150826148895760405162461bcd60e51b8152600401610dab90615b05565b8051600f0b156148cc5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b1bd8dad95960921b6044820152606401610dab565b4282116149115760405162461bcd60e51b815260206004820152601360248201527217dd5b9b1bd8dad51a5b59481d1bdbc81bdb19606a1b6044820152606401610dab565b600161492162093a8060d1615c92565b61492b91906159c3565b6149359042615b9c565b82111561497b5760405162461bcd60e51b81526020600482015260146024820152735f756e6c6f636b54696d6520746f6f206c6f6e6760601b6044820152606401610dab565b336000818152600a60205260409020546149a1919085908590859060019060ff1661417b565b505050565b6040516001600160a01b0383166024820152604481018290526149a190849063a9059cbb60e01b90606401613f00565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008082815b6080811015614aba57818310614a4157614aba565b60006002614a4f8486615b9c565b614a5a906001615b9c565b614a649190615cc7565b905086600d8281548110614a7a57614a7a615ad4565b90600052602060002090600302016002015411614a9957809350614aa7565b614aa46001826159c3565b92505b5080614ab281615aea565b915050614a2c565b5090949350505050565b604080516080808201835260008083526020808401829052838501829052606080850183905285519384018652828452908301829052938201819052928101839052600c549192909181906001600160a01b03881615614d6457428760200151118015614b38575060008760000151600f0b135b15614b9957614b5a6001614b5062093a8060d1615c92565b61403f91906159c3565b8751614b669190615e80565b600f0b602080870191909152870151614b849061403f9042906159c3565b8560200151614b939190615d9c565b600f0b85525b428660200151118015614bb3575060008660000151600f0b135b15614c0a57614bcb6001614b5062093a8060d1615c92565b8651614bd79190615e80565b600f0b602080860191909152860151614bf59061403f9042906159c3565b8460200151614c049190615d9c565b600f0b84525b6001600160a01b0388166000908152600f602052604090205480614c8e576001600160a01b0389166000908152600e60209081526040808320805460018181018355918552938390208a51938b01516001600160801b03908116600160801b0294169390931760039094029092019283558801519082015560608701516002909101555b614c99816001615b9c565b6001600160a01b038a166000818152600f6020818152604080842095909555428a86019081524360608c01908152948452600e82528584208054600181810183559186528386208d518e8601516001600160801b03908116600160801b0291161760039092020190815591519082015593516002909401939093558b8301518252601083529290205490890151910b945015614d6257876020015187602001511415614d4757839250614d62565b602080880151600090815260109091526040902054600f0b92505b505b604080516080810182526000808252602082015242918101919091524360608201528115614ded57600d8281548110614d9f57614d9f615ad4565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015290505b604080820180518251608081018452600080825260208201819052835194820194909452606080860151908201529151909290421115614e64576040840151614e3690426159c3565b6060850151614e4590436159c3565b614e5790670de0b6b3a7640000615c92565b614e619190615cc7565b90505b6000614e6f84613f37565b905060005b60ff81101561505557614e8a62093a8083615b9c565b9150600042831115614e9e57429250614eb2565b50600082815260106020526040902054600f0b5b6000614ec161403f88866159c3565b8860200151614ed09190615d9c565b8851909150614ee0908290615e30565b600f0b88526020880151614ef5908390615d4b565b600f90810b60208a015288516000910b1215614f1057600088525b60008860200151600f0b1215614f2857600060208901525b60408089018590528601519396508693670de0b6b3a764000090614f4c90866159c3565b614f569087615c92565b614f609190615cc7565b8660600151614f6f9190615b9c565b6060890152614f7f896001615b9c565b985042841415614f96575050436060870152615055565b600d8054600181018255600091909152885160208a01516001600160801b03908116600160801b0291161760039091027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019190915560408901517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb682015560608901517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb7909101555050808061504d90615aea565b915050614e74565b50600c8690556001600160a01b038d16156150e2578960200151896020015186602001516150839190615d4b565b61508d9190615e30565b600f0b60208601528951895186516150a59190615d4b565b6150af9190615e30565b600f90810b865260208601516000910b12156150cd57600060208601525b60008560000151600f0b12156150e257600085525b600d8054600181018255600091909152855160208701516001600160801b03908116600160801b0291161760039091027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019190915560408601517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb682015560608601517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb7909101556001600160a01b038d161561526357428c6020015111156152085760208a01516151b69089615d4b565b97508b602001518b6020015114156151da5760208901516151d79089615e30565b97505b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b038a161790555b428b602001511115615263578b602001518b6020015111156152635760208901516152339088615e30565b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b03831617905596505b50505050505050505050505050565b60006152c7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166154859092919063ffffffff16565b8051909150156149a157808060200190518101906152e59190615ebe565b6149a15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610dab565b600060016001607f1b03198212801590615365575060016001607f1b038213155b613fa35760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401610dab565b6001600160a01b0382166000908152600f60205260408120548190815b6080811015614aba578183106153f357614aba565b600060026154018486615b9c565b61540c906001615b9c565b6154169190615cc7565b6001600160a01b0388166000908152600e60205260409020805491925087918390811061544557615445615ad4565b9060005260206000209060030201600201541161546457809350615472565b61546f6001826159c3565b92505b508061547d81615aea565b9150506153de565b60606147068484600085856001600160a01b0385163b6154e75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610dab565b600080866001600160a01b031685876040516155039190615edb565b60006040518083038185875af1925050503d8060008114615540576040519150601f19603f3d011682016040523d82523d6000602084013e615545565b606091505b5091509150615555828286615560565b979650505050505050565b6060831561556f57508161287b565b82511561557f5782518084602001fd5b8160405162461bcd60e51b8152600401610dab9190615644565b508054600082556003029060005260206000209081019061381b91905b80821115613fa35760008082556001820181905560028201556003016155b6565b6001600160a01b038116811461381b57600080fd5b600080604083850312156155ff57600080fd5b823561560a816155d7565b946020939093013593505050565b60005b8381101561563357818101518382015260200161561b565b838111156115185750506000910152565b6020815260008251806020840152615663816040850160208701615618565b601f01601f19169190910160400192915050565b60006020828403121561568957600080fd5b813561287b816155d7565b6000806000606084860312156156a957600080fd5b83356156b4816155d7565b95602085013595506040909401359392505050565b801515811461381b57600080fd5b600080604083850312156156ea57600080fd5b82356156f5816155d7565b91506020830135615705816156c9565b809150509250929050565b60008060006040848603121561572557600080fd5b83356001600160401b038082111561573c57600080fd5b818601915086601f83011261575057600080fd5b81358181111561575f57600080fd5b8760208260051b850101111561577457600080fd5b6020928301955093505084013561578a816156c9565b809150509250925092565b6000602082840312156157a757600080fd5b813561287b816156c9565b6001600160a01b0391909116815260200190565b600080604083850312156157d957600080fd5b50508035926020909101359150565b6000602082840312156157fa57600080fd5b5035919050565b80356001600160401b038116811461581857600080fd5b919050565b6000806000806080858703121561583357600080fd5b61583c85615801565b935061584a60208601615801565b9250604085013561585a816155d7565b9150606085013561586a816155d7565b939692955090935050565b60008060006060848603121561588a57600080fd5b8335615895816155d7565b925060208401356158a5816156c9565b9150604084013564ffffffffff8116811461578a57600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600b908201526a10903232b632b3b0ba37b960a91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001600160681b038381169083168181101561594f5761594f615919565b039392505050565b600181811c9082168061596b57607f821691505b6020821081141561288b57634e487b7160e01b600052602260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000828210156159d5576159d5615919565b500390565b602080825260089082015267546f6f206c61746560c01b604082015260600190565b6020808252601490820152732737903637b1b59037b7103232b632b3b0ba37b960611b604082015260600190565b60208082526016908201527511195b1959d85d1bdc881b1bd8dac8195e1c1a5c995960521b604082015260600190565b60006001600160681b03828116848216808303821115615a7c57615a7c615919565b01949350505050565b6020808252600b908201526a084818d85ad9481c1bdbdb60aa1b604082015260600190565b60208082526010908201526f3130b2102fb13637b1b5a73ab6b132b960811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615afe57615afe615919565b5060010190565b6020808252600b908201526a1098590817d85b5bdd5b9d60aa1b604082015260600190565b6020808252600d908201526c139bc81b1bd8dac8199bdd5b99609a1b604082015260600190565b6020808252600c908201526b131bd8dac8195e1c1a5c995960a21b604082015260600190565b6020808252600b908201526a0848195bd8481bdc881ddb60aa1b604082015260600190565b60008219821115615baf57615baf615919565b500190565b6020808252600d908201526c08481a5b9a5d1a585b1a5e9959609a1b604082015260600190565b60008060008060008060008060006101208a8c031215615bfa57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a0151615c36816156c9565b809250506101008a015190509295985092959850929598565b60208082526010908201526f105b1c9958591e481b5a59dc985d195960821b604082015260600190565b600060208284031215615c8b57600080fd5b5051919050565b6000816000190483118215151615615cac57615cac615919565b500290565b634e487b7160e01b600052601260045260246000fd5b600082615cd657615cd6615cb1565b500490565b600060208284031215615ced57600080fd5b815161287b816155d7565b602080825260069082015265119bdc989a5960d21b604082015260600190565b602080825260199082015278416c726561647920656d657267656e6379576974686472617760381b604082015260600190565b6000600f82810b9084900b828212801560016001607f1b0384900383131615615d7657615d76615919565b60016001607f1b03198390038212811615615d9357615d93615919565b50019392505050565b6000600f82810b9084900b60016001607f1b0383821384841380821684840486111615615dcb57615dcb615919565b60016001607f1b03196000851282811687830587121615615dee57615dee615919565b60008712925085820587128484161615615e0a57615e0a615919565b85850587128184161615615e2057615e20615919565b5050509290910295945050505050565b6000600f82810b9084900b828112801560016001607f1b0319830184121615615e5b57615e5b615919565b60016001607f1b0382018313811615615e7657615e76615919565b5090039392505050565b600081600f0b83600f0b80615e9757615e97615cb1565b60016001607f1b0319821460001982141615615eb557615eb5615919565b90059392505050565b600060208284031215615ed057600080fd5b815161287b816156c9565b60008251615eed818460208701615618565b919091019291505056fea2646970667358221220e35cd770ee0e4f72faeb42d8640c928cb02dbdbdb70506e995053e46bf31075d64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106104a05760003560e01c8063705096c71161026d578063b52c05fe11610151578063d73f98a3116100ce578063f4359ce511610092578063f4359ce514610cd7578063f52a36f714610ce1578063fa09e63014610d17578063fb489a7b14610d2a578063fc0c546a14610d32578063ffc97ce914610d5957600080fd5b8063d73f98a314610c8e578063db2e21bc14610ca1578063ec5570d014610ca9578063f2c7a81b14610cbc578063f2fde38b14610cc457600080fd5b8063c172085e11610115578063c172085e14610c32578063c1d1192914610c46578063c2c4c5c114610c4f578063cfee396f14610c57578063d4eda63f14610c6b57600080fd5b8063b52c05fe14610bc2578063b6bbbcd114610bd5578063b6e45a4e14610bef578063c0dd84bd14610bfc578063c12ebb5f14610c1f57600080fd5b80638e900530116101ea5780639d4b4ba1116101ae5780639d4b4ba114610b52578063a621440414610b65578063a63dce7114610b6d578063a7ccf1e014610b75578063a88a885514610b88578063aa94ab5914610b9b57600080fd5b80638e90053014610b26578063900cf0cf14610b2e57806395d89b4114610b37578063981b24d014610b3f5780639c490f19146104f557600080fd5b80637c616fe6116102315780637c616fe614610ab157806381fc83bb14610ac4578063827e8e0c14610ae45780638ad4c44714610b0b5780638da5cb5b14610b1e57600080fd5b8063705096c714610a4d57806370a0823114610a60578063715018a614610a7357806375cd6c6714610a7b5780637c5acb2514610a8e57600080fd5b806330d9a62a1161039457806355ed0a78116103115780636386c1c7116102d55780636386c1c7146108d15780636574deb714610a045780636582a8c014610a1757806365a5d5f014610a2a57806365f9008a14610a3257806367e7a7cb14610a4557600080fd5b806355ed0a781461083357806358fca6a51461083b578063598085ae146108435780635de9a137146108565780635e8bb48e1461089e57600080fd5b80633d5c78bd116103585780633d5c78bd1461075d578063403f4447146107705780634ee2cd7e1461078357806351cff8d914610796578063539e5082146107a957600080fd5b806330d9a62a146106a0578063313ce567146106c057806334d901a4146106df57806336a583911461071a578063399f3a4f1461074a57600080fd5b80630efe6a8b1161042257806319577c6e116103e657806319577c6e146105935780631959a002146105a65780631bb8c61d146106675780632ea1fe7a1461067a5780632f4f21e21461068d57600080fd5b80630efe6a8b146105495780630f41e0d21461055c57806312c470e91461056557806312cae7af1461057857806318160ddd1461058b57600080fd5b806306a4da7e1161046957806306a4da7e146104f557806306fdde031461051057806308154df01461052557806308c3dea71461052d5780630a6373b31461053657600080fd5b8062b79fd4146104a557806302641632146104c0578063047fc9aa146104c8578063052b726f146104d1578063059f8b16146104e6575b600080fd5b6104ad600081565b6040519081526020015b60405180910390f35b6104ad600381565b6104ad60025481565b6104e46104df3660046155ec565b610d7c565b005b6104ad670de0b6b3a764000081565b6104fd600181565b60405161ffff90911681526020016104b7565b610518610ef2565b6040516104b79190615644565b6104fd600081565b6104ad60155481565b6104e4610544366004615677565b610f80565b6104e4610557366004615694565b61143e565b6104ad60115481565b6104ad6105733660046155ec565b61151e565b6104ad610586366004615677565b6115ea565b6104ad6115f5565b6104e46105a13660046156d7565b611665565b6106156105b4366004615677565b600860205260009081526040902080546001909101546001600160a01b03909116906001600160801b0381169065ffffffffffff600160801b8204811691600160b01b81049091169061ffff600160e01b8204811691600160f01b90041686565b604080516001600160a01b0390971687526001600160801b03909516602087015265ffffffffffff938416948601949094529116606084015261ffff90811660808401521660a082015260c0016104b7565b6104e4610675366004615710565b6116eb565b6104e4610688366004615795565b611800565b6104e461069b3660046155ec565b611879565b6016546106b3906001600160a01b031681565b6040516104b791906157b2565b6014546106cd9060ff1681565b60405160ff90911681526020016104b7565b6106f26106ed3660046155ec565b6119b6565b60408051600f95860b81529390940b60208401529282015260608101919091526080016104b7565b6014546107329061010090046001600160401b031681565b6040516001600160401b0390911681526020016104b7565b6104e46107583660046157c6565b611a06565b6104e461076b3660046157e8565b611a5d565b6104e461077e3660046157e8565b611b18565b6104ad6107913660046155ec565b611c26565b6104e46107a4366004615677565b611d00565b6107f96107b7366004615677565b6009602052600090815260409020546001600160681b0380821691600160681b810490911690600160d01b810464ffffffffff1690600160f81b900460ff1684565b604080516001600160681b03958616815294909316602085015264ffffffffff9091169183019190915260ff1660608201526080016104b7565b6104e4611e9e565b6104fd600281565b6104e4610851366004615795565b61230b565b610884610864366004615677565b60076020526000908152604090208054600190910154600f9190910b9082565b60408051600f9390930b83526020830191909152016104b7565b6108c16108ac366004615677565b600b6020526000908152604090205460ff1681565b60405190151581526020016104b7565b61099f6108df366004615677565b6001600160a01b039081166000818152600760209081526040808320815180830183528154600f0b81526001918201548185019081529585526008845293829020825160c08101845281549097168088529101546001600160801b03811693870184905265ffffffffffff600160801b82048116938801849052600160b01b8204166060880181905261ffff600160e01b8304811660808a01819052600160f01b9093041660a09098018890529451955195979596919593949293909190565b60408051600f9990990b895260208901979097526001600160a01b03909516958701959095526001600160801b03909216606086015265ffffffffffff90811660808601521660a084015261ffff91821660c08401521660e0820152610100016104b7565b6104e4610a123660046155ec565b612389565b6017546106b3906001600160a01b031681565b6104ad612748565b6003546106b3906001600160a01b031681565b6104ad600181565b6104e4610a5b3660046157e8565b612765565b6104ad610a6e366004615677565b6127cb565b6104e4612891565b6104e4610a8936600461581d565b6128cc565b6108c1610a9c366004615677565b60196020526000908152604090205460ff1681565b6104e4610abf3660046157e8565b612a9a565b6104ad610ad2366004615677565b600f6020526000908152604090205481565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6106f2610b193660046157e8565b612c47565b6106b3612c8b565b6106cd600081565b6104ad600c5481565b610518612c9a565b6104ad610b4d3660046157e8565b612ca7565b6104e4610b60366004615677565b612ea2565b6104e46133b9565b6106cd600181565b6104e4610b83366004615677565b613518565b6104ad610b96366004615677565b6135e0565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6104e4610bd03660046157c6565b61367d565b60145461073290600160481b90046001600160401b031681565b6005546108c19060ff1681565b6108c1610c0a366004615677565b600a6020526000908152604090205460ff1681565b6104e4610c2d366004615710565b6136e5565b6003546108c190600160a01b900460ff1681565b6104ad60045481565b6104e46137fa565b6017546108c190600160a01b900460ff1681565b6108c1610c79366004615677565b60066020526000908152604090205460ff1681565b6104e4610c9c366004615875565b61381e565b6104e46138fd565b6104ad610cb73660046155ec565b613af3565b6104ad600281565b6104e4610cd2366004615677565b613aff565b6104ad62093a8081565b610d04610cef3660046157e8565b601060205260009081526040902054600f0b81565b604051600f9190910b81526020016104b7565b6104e4610d25366004615677565b613b9c565b6104e4613dbd565b6106b37f000000000000000000000000000000000000000000000000000000000000000081565b6108c1610d67366004615677565b60186020526000908152604090205460ff1681565b33610d85612c8b565b6001600160a01b031614610db45760405162461bcd60e51b8152600401610dab906158bf565b60405180910390fd5b6001600160a01b03821660009081526009602052604090208054600160f81b900460ff16600114610df75760405162461bcd60e51b8152600401610dab906158f4565b8054600160681b90046001600160681b0316821115610e25578054600160681b90046001600160681b031691505b805482908290600d90610e49908490600160681b90046001600160681b031661592f565b92506101000a8154816001600160681b0302191690836001600160681b03160217905550610ead3330847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613ecc909392919063ffffffff16565b6040518281526001600160a01b0384169033907f7b85c81b5ab23faed50cf05b116ebb10456ca6320721e00b6513babed009b9e29060200160405180910390a3505050565b60128054610eff90615957565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2b90615957565b8015610f785780601f10610f4d57610100808354040283529160200191610f78565b820191906000526020600020905b815481529060010190602001808311610f5b57829003601f168201915b505050505081565b60026001541415610fa35760405162461bcd60e51b8152600401610dab9061598c565b600260019081556001600160a01b038216600090815260096020526040902080549091600160f81b90910460ff1614610fee5760405162461bcd60e51b8152600401610dab906158f4565b336000908152600860205260408120600181015490919061101d90600160801b900465ffffffffffff16613f37565b90504281116110625760405162461bcd60e51b8152602060048201526011602482015270155cd95c881b1bd8dac8195e1c1a5c9959607a1b6044820152606401610dab565b60045461106f90426159c3565b6001830154600160b01b900465ffffffffffff16116110a05760405162461bcd60e51b8152600401610dab906159da565b600182810154600160e01b900461ffff16146110eb5760405162461bcd60e51b815260206004820152600a60248201526908481b5a59dc985d195960b21b6044820152606401610dab565b6001820154600160f01b900461ffff161561113b5760405162461bcd60e51b815260206004820152601060248201526f416c726561647920776974686472617760801b6044820152606401610dab565b6001828101805461ffff60e01b1916600160e11b17905582546001600160a01b0316600090815260076020908152604080832081518083019092528054600f0b808352940154918101919091529161119290613f51565b84549091506111ab906001600160a01b03168383613fa7565b6040805180820182526001600160a01b0388166000818152600760208181529482208054600f90810b865293835290855260010154938301939093528151919291900b1361120b5760405162461bcd60e51b8152600401610dab906159fc565b4281602001511161122e5760405162461bcd60e51b8152600401610dab90615a2a565b6001808601546112509189916001600160801b0316906000908590829061417b565b600185015486546001600160801b0390911690879060009061127c9084906001600160681b0316615a5a565b82546101009290920a6001600160681b03818102199093169183160217909155600187015488546001600160801b0390911692508891600d916112c8918591600160681b900416615a5a565b82546101009290920a6001600160681b0381810219909316919092169190910217905550600185015460405162c2c90f60e11b81523360048201526001600160801b0382166024820152600160801b90910465ffffffffffff1660448201526001600160a01b03881690630185921e90606401600060405180830381600087803b15801561135557600080fd5b505af1158015611369573d6000803e3d6000fd5b505050506001850154604080516001600160801b0383168152600160801b90920465ffffffffffff1660208301526001600160a01b0389169133917f7a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96910160405180910390a36001850154604080516001600160801b0383168152600160801b90920465ffffffffffff1660208301526001600160a01b0389169133917f4af697c81385693e6ee5d15ccb781170dc8241f81c4983bf87cdf268d2fca5f5910160405180910390a35050600180555050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114865760405162461bcd60e51b8152600401610dab90615a85565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a08301521561151857600080fd5b50505050565b6000438211156115405760405162461bcd60e51b8152600401610dab90615aaa565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a0830152156115e25780516115da90846143a0565b9150506115e4565b505b92915050565b60006115e48261461c565b6000611660600d600c548154811061160f5761160f615ad4565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b9383019390935260018301549082015260029091015460608201524261470e565b905090565b3361166e612c8b565b6001600160a01b0316146116945760405162461bcd60e51b8152600401610dab906158bf565b6001600160a01b0382166000818152600b6020526040808220805460ff1916851515908117909155905190929133917f4f4d55f3b98fe4b3fbc9fb5e8ed05483cc8d794638edd690545eb5779e234a499190a45050565b336116f4612c8b565b6001600160a01b03161461171a5760405162461bcd60e51b8152600401610dab906158bf565b60005b8281101561151857816018600086868581811061173c5761173c615ad4565b90506020020160208101906117519190615677565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905583838281811061178b5761178b615ad4565b90506020020160208101906117a09190615677565b6001600160a01b0316336001600160a01b03167fdfad9b83c215ff1a36483cf1688e5aeae2ac60f1c3f62f5229641234748f13b7846040516117e6911515815260200190565b60405180910390a3806117f881615aea565b91505061171d565b33611809612c8b565b6001600160a01b03161461182f5760405162461bcd60e51b8152600401610dab906158bf565b6005805460ff191682151590811790915560405190815233907f539ba344188cde95583cd695fe9a73d66f53c83a48e3d66e5b42a12650d93ecc906020015b60405180910390a250565b6002600154141561189c5760405162461bcd60e51b8152600401610dab9061598c565b60026001556001600160a01b0382166000908152600a602052604090205460ff16156118fc5760405162461bcd60e51b815260206004820152600f60248201526e496e636f72726563742070726f787960881b6044820152606401610dab565b6040805180820182526001600160a01b0384166000818152600760208181529482208054600f0b85529290915283526001015491810191909152816119535760405162461bcd60e51b8152600401610dab90615b05565b60008160000151600f0b1361197a5760405162461bcd60e51b8152600401610dab90615b2a565b4281602001511161199d5760405162461bcd60e51b8152600401610dab90615b51565b6119ad838360008460008061417b565b50506001805550565b600e60205281600052604060002081815481106119d257600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9550600160801b90920490910b925084565b336000908152600a602052604090205460ff16611a4f5760405162461bcd60e51b8152602060048201526007602482015266212070726f787960c81b6044820152606401610dab565b611a598282614806565b5050565b33611a66612c8b565b6001600160a01b031614611a8c5760405162461bcd60e51b8152600401610dab906158bf565b801580611a995750806001145b611ad35760405162461bcd60e51b815260206004820152600b60248201526a4f6e6c792030206f72203160a81b6044820152606401610dab565b601180549082905560408051828152602081018490527f5238fc635590cf5e76ed0f591df4d7f3021d20f58e6d3405390197dd72a575fe910160405180910390a15050565b3360009081526018602052604090205460ff16611b4e57333214611b4e5760405162461bcd60e51b8152600401610dab90615b77565b60026001541415611b715760405162461bcd60e51b8152600401610dab9061598c565b60026001908155604080518082018252336000818152600760208181529482208054600f0b8552929091528352909201549082015281611bc35760405162461bcd60e51b8152600401610dab90615b05565b60008160000151600f0b13611bea5760405162461bcd60e51b8152600401610dab90615b2a565b42816020015111611c0d5760405162461bcd60e51b8152600401610dab90615b51565b611c1e33836000846002600061417b565b505060018055565b600043821115611c485760405162461bcd60e51b8152600401610dab90615aaa565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a083015215611cf6578051611ce290846143a0565b611cec85856143a0565b6115da9190615b9c565b6115da84846143a0565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611d485760405162461bcd60e51b8152600401610dab90615a85565b6001600160a01b03808216600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a083015260021415611ddd57600080fd5b80516001600160a01b031615801590611dfe5750608081015161ffff166001145b8015611e10575060a081015161ffff16155b15611a595780600001516001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611e5457600080fd5b505af1158015611e68573d6000803e3d6000fd5b5050506001600160a01b038316600090815260086020526040902060010180546001600160f01b0316600160f01b179055505050565b60026001541415611ec15760405162461bcd60e51b8152600401610dab9061598c565b6002600155600354600160a01b900460ff16611eef5760405162461bcd60e51b8152600401610dab90615bb4565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401611f4091906157b2565b61012060405180830381865afa158015611f5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f829190615bdb565b505096509650505050509250428211611fad5760405162461bcd60e51b8152600401610dab90615b51565b3360009081526008602052604090206001810154600160e01b900461ffff1615611fe95760405162461bcd60e51b8152600401610dab90615c4f565b60018101805461ffff60e01b1916600160e01b17905560408051633a98ef3960e01b815290516000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691633a98ef39916004808201926020929091908290030181865afa158015612068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208c9190615c79565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121129190615c79565b9050600060018584612124858b615c92565b61212e9190615cc7565b61213891906159c3565b61214291906159c3565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634c96a389336040518263ffffffff1660e01b815260040161219291906157b2565b6020604051808303816000875af11580156121b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121d59190615cdb565b6001600160a01b0381166000818152600a602052604090819020805460ff1916600190811790915588546001600160a01b031916831789558801805465ffffffffffff8c8116600160801b026001600160b01b03194292909216600160b01b02919091166001600160e01b0319909216919091176001600160801b038816171790555163399f3a4f60e01b81529192509063399f3a4f906122859085908b90600401918252602082015260400190565b600060405180830381600087803b15801561229f57600080fd5b505af11580156122b3573d6000803e3d6000fd5b505060408051858152602081018b90526001600160a01b03851693503392507f8519b84e949c6333da21ddea64e2c29ef66709e465ec9b0f24fb32eb2c003843910160405180910390a3505060018055505050505050565b33612314612c8b565b6001600160a01b03161461233a5760405162461bcd60e51b8152600401610dab906158bf565b60178054821515600160a01b0260ff60a01b1990911617905560405133907fdcc751463da04455ac459756e92d5ea118dd0dd631422cbf8353132417a52d9f9061186e90841515815260200190565b600260015414156123ac5760405162461bcd60e51b8152600401610dab9061598c565b6002600155601754600160a01b900460ff166123da5760405162461bcd60e51b8152600401610dab90615cf8565b6001600160a01b0382166123ec573391505b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152816124335760405162461bcd60e51b8152600401610dab90615b05565b806020015142106124565760405162461bcd60e51b8152600401610dab906159da565b601154156124765760405162461bcd60e51b8152600401610dab90615cf8565b33600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b82041692820192909252600160d01b820464ffffffffff1692810192909252600160f81b900460ff1660608201819052600114156125a85742816040015164ffffffffff161061252e5760405162461bcd60e51b8152602060048201526014602482015273466f72626964206561726c79576974686472617760601b6044820152606401610dab565b60006125408360000151600f0b613f51565b60208301519091506001600160681b031661255b85836159c3565b10156125a65760405162461bcd60e51b815260206004820152601a60248201527911195b1959d85d1bdc8818985b185b98d948195e18d95959195960321b6044820152606401610dab565b505b60208201516125b8338486613fa7565b336000908152600b602052604081205460ff161580156125e7575060145461010090046001600160401b031615155b156126e257600062093a80426125fd8286615b9c565b61260791906159c3565b6126119190615cc7565b60145490915061271090879061263690849061010090046001600160401b0316615c92565b6126409190615c92565b61264a9190615cc7565b6014549092506000906127109061267190600160481b90046001600160401b031685615c92565b61267b9190615cc7565b9050806015600082825461268f9190615b9c565b90915550506016546126df906001600160a01b03166126ae83866159c3565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906149a6565b50505b6126f0866126ae83886159c3565b6040805186815260208101839052428183015290516001600160a01b0388169133917f08b526d7537cea7e5a629eb0495b5932c78911fd0bdeb02b822d69a6e25792549181900360600190a350506001805550505050565b600161275862093a8060d1615c92565b61276291906159c3565b81565b3361276e612c8b565b6001600160a01b0316146127945760405162461bcd60e51b8152600401610dab906158bf565b600481905560405181815233907fde15bb8e73a1f43abe6021a8ad5a5d79caf815a4d74e6dbd7d88cd57f06fdd899060200161186e565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a0840152909190156128825780516128689061461c565b6128718461461c565b61287b9190615b9c565b9392505050565b61287b8361461c565b50919050565b3361289a612c8b565b6001600160a01b0316146128c05760405162461bcd60e51b8152600401610dab906158bf565b6128ca60006149d6565b565b336128d5612c8b565b6001600160a01b0316146128fb5760405162461bcd60e51b8152600401610dab906158bf565b60c0846001600160401b031611156129445760405162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606401610dab565b612710836001600160401b0316111561298e5760405162461bcd60e51b815260206004820152600c60248201526b0c4e0e640e8dede40d0d2ced60a31b6044820152606401610dab565b601480546001600160401b03858116600160481b81810267ffffffffffffffff60481b198a8516610100818102928316610100600160881b031989161793909317909755601680546001600160a01b038b81166001600160a01b03198084168217909455601780548d8416958116861790915560408051888d048c16808252602082019e909e5268ffffffffffffffff0019909c1690961797909704909816938901849052606089019690965285166080880181905260a08801969096529290931660c0860181905260e08601929092529193909133917f3de6c016cd3debec574d13c9966e6c847e64ac424da0b1eb70d3c93b68ec0537910160405180910390a25050505050505050565b3360009081526018602052604090205460ff16612ad057333214612ad05760405162461bcd60e51b8152600401610dab90615b77565b60026001541415612af35760405162461bcd60e51b8152600401610dab9061598c565b60026001908155604080518082018252336000818152600760208181529482208054600f0b85529290915283529092015490820152612b3182613f37565b915060008160000151600f0b13612b5a5760405162461bcd60e51b8152600401610dab90615b2a565b42816020015111612b7d5760405162461bcd60e51b8152600401610dab90615b51565b80602001518211612bc95760405162461bcd60e51b815260206004820152601660248201527517db995dd55b9b1bd8dad51a5b59481d1bdbc81bdb1960521b6044820152606401610dab565b6001612bd962093a8060d1615c92565b612be391906159c3565b612bed9042615b9c565b821115612c365760405162461bcd60e51b81526020600482015260176024820152765f6e6577556e6c6f636b54696d6520746f6f206c6f6e6760481b6044820152606401610dab565b611c1e33600084846003600061417b565b600d8181548110612c5757600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9450600160801b90920490910b919084565b6000546001600160a01b031690565b60138054610eff90615957565b600043821115612cec5760405162461bcd60e51b815260206004820152601060248201526f2130b2102fb13637b1b5a73ab6b132b960811b6044820152606401610dab565b600c546000612cfb8483614a26565b90506000600d8281548110612d1257612d12615ad4565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915083831015612e30576000600d612d73856001615b9c565b81548110612d8357612d83615ad4565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905285015191925014612e2a5782606001518160600151612df091906159c3565b83604001518260400151612e0491906159c3565b6060850151612e13908a6159c3565b612e1d9190615c92565b612e279190615cc7565b91505b50612e7f565b43826060015114612e7f576060820151612e4a90436159c3565b6040830151612e5990426159c3565b6060840151612e6890896159c3565b612e729190615c92565b612e7c9190615cc7565b90505b612e9882828460400151612e939190615b9c565b61470e565b9695505050505050565b60026001541415612ec55760405162461bcd60e51b8152600401610dab9061598c565b6002600155600354600160a01b900460ff16612ef35760405162461bcd60e51b8152600401610dab90615bb4565b6001600160a01b03811660009081526009602052604090208054600160f81b900460ff16600114612f365760405162461bcd60e51b8152600401610dab906158f4565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401612f8791906157b2565b61012060405180830381865afa158015612fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fc99190615bdb565b505096509650505050509250428211612ff45760405162461bcd60e51b8152600401610dab90615b51565b3360009081526008602052604090206001810154600160e01b900461ffff16156130305760405162461bcd60e51b8152600401610dab90615c4f565b60018101805461ffff60e01b1916600160e11b17905560408051633a98ef3960e01b815290516000917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691633a98ef39916004808201926020929091908290030181865afa1580156130af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d39190615c79565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015613135573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131599190615c79565b905060006001858461316b858b615c92565b6131759190615cc7565b61317f91906159c3565b61318991906159c3565b600185810180546001600160b01b031916600160801b65ffffffffffff8b16026001600160801b031916176001600160801b0384161790556040805180820182526001600160a01b038d166000818152600760208181529482208054600f0b85529290915283529092015490820152909150816132185760405162461bcd60e51b8152600401610dab90615b05565b60008160000151600f0b1361323f5760405162461bcd60e51b8152600401610dab906159fc565b428160200151116132625760405162461bcd60e51b8152600401610dab90615a2a565b6132738a836000846000600161417b565b885482908a906000906132909084906001600160681b0316615a5a565b92506101000a8154816001600160681b0302191690836001600160681b031602179055508189600001600d8282829054906101000a90046001600160681b03166132da9190615a5a565b82546001600160681b039182166101009390930a92830291909202199091161790555060405162c2c90f60e11b815233600482015260248101839052604481018890526001600160a01b038b1690630185921e90606401600060405180830381600087803b15801561334b57600080fd5b505af115801561335f573d6000803e3d6000fd5b505060408051858152602081018b90526001600160a01b038e1693503392507f7a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96910160405180910390a35050600180555050505050505050565b336133c2612c8b565b6001600160a01b0316146133e85760405162461bcd60e51b8152600401610dab906158bf565b600354600160a01b900460ff16156134385760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610dab565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632d19b9826040518163ffffffff1660e01b8152600401602060405180830381865afa158015613498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134bc9190615cdb565b90506001600160a01b03811630146135025760405162461bcd60e51b8152602060048201526009602482015268426164205643616b6560b81b6044820152606401610dab565b506003805460ff60a01b1916600160a01b179055565b33613521612c8b565b6001600160a01b0316146135475760405162461bcd60e51b8152600401610dab906158bf565b6001600160a01b0381166135965760405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606401610dab565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fd1879d19b7e07327f8e491d8c5e05a4048155b7ee8f97f61e2b2233ae0e3a88890600090a250565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a08401529091901561288b57805161287b9061461c565b3360009081526018602052604090205460ff166136b3573332146136b35760405162461bcd60e51b8152600401610dab90615b77565b600260015414156136d65760405162461bcd60e51b8152600401610dab9061598c565b6002600155611c1e8282614806565b336136ee612c8b565b6001600160a01b0316146137145760405162461bcd60e51b8152600401610dab906158bf565b60005b8281101561151857816019600086868581811061373657613736615ad4565b905060200201602081019061374b9190615677565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905583838281811061378557613785615ad4565b905060200201602081019061379a9190615677565b6001600160a01b0316336001600160a01b03167f0c5e5180b1be108ebc3c1c5939cd6b59ca30067d07c5405f94304bf603c62142846040516137e0911515815260200190565b60405180910390a3806137f281615aea565b915050613717565b6040805180820190915260008082526020820181905261381b908280614ac4565b50565b33613827612c8b565b6001600160a01b03161461384d5760405162461bcd60e51b8152600401610dab906158bf565b6001600160a01b038316600090815260096020526040902082613871576000613874565b60015b81546001600160d01b0316600160f81b60ff929092169190910264ffffffffff60d01b191617600160d01b64ffffffffff841690810291909117825560408051851515815260208101929092526001600160a01b038616917f3fd4b992bc54a5edaa3b29f337c4048b314667d454123fbd81b327aaeea7df67910160405180910390a250505050565b600260015414156139205760405162461bcd60e51b8152600401610dab9061598c565b600260015560055460ff166139735760405162461bcd60e51b8152602060048201526019602482015278466f7262696420656d657267656e637920776974686472617760381b6044820152606401610dab565b3360009081526006602052604090205460ff16156139a35760405162461bcd60e51b8152600401610dab90615d18565b336000908152600660209081526040808320805460ff191660019081179091556007835281842082518084019093528054600f0b808452910154928201929092529112613a255760405162461bcd60e51b815260206004820152601060248201526f139bc81b1bd8dad95908185b5bdd5b9d60821b6044820152606401610dab565b6000613a378260000151600f0b613f51565b33600090815260076020908152604080832080546001600160801b0319168155600101839055600e9091528120919250613a719190615599565b336000818152600f6020526040812055613ab6907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690836149a6565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505060018055565b600061287b83836143a0565b33613b08612c8b565b6001600160a01b031614613b2e5760405162461bcd60e51b8152600401610dab906158bf565b6001600160a01b038116613b935760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dab565b61381b816149d6565b60026001541415613bbf5760405162461bcd60e51b8152600401610dab9061598c565b600260015533600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b820416928201839052600160d01b810464ffffffffff1693820193909352600160f81b90920460ff16606083015215613c7a5760405162461bcd60e51b8152602060048201526024808201527f496e73756666696369656e7420696e6a656374696f6e20666f722064656c656760448201526330ba37b960e11b6064820152608401610dab565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152601154613cf2578060200151421015613cf25760405162461bcd60e51b815260206004820152601060248201526f131bd8dac81b9bdd08195e1c1a5c995960821b6044820152606401610dab565b6001600160a01b038316613d04573392505b6000613d168260000151600f0b613f51565b9050613d23338383613fa7565b336000908152600a602052604090205460ff16613d6e57613d6e6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001685836149a6565b604080518281524260208201526001600160a01b0386169133917f55e21b0674b8095feb63d5336fb7b5b004d267585bfbb58005e8126a8ad7bc54910160405180910390a35050600180555050565b3360009081526019602052604090205460ff16613e125760405162461bcd60e51b81526020600482015260136024820152722120776c2072656469737472696275746f727360681b6044820152606401610dab565b60026001541415613e355760405162461bcd60e51b8152600401610dab9061598c565b6002600155601580546000909155601754613e7d906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116836149a6565b601754604080516001600160a01b0390921682526020820183905233917f73dad76107243dbd9d398020575b5e3ad26d50fe161c81088dc8592a394855b7910160405180910390a25060018055565b6040516001600160a01b03808516602483015283166044820152606481018290526115189085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152615272565b600062093a80613f478184615cc7565b6115e49190615c92565b600080821215613fa35760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610dab565b5090565b6000613fb98360000151600f0b613f51565b905080821115613ffe5760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610dab565b604080518082019091528351600f0b81526020808501519082015281831461402a57836020015161402d565b60005b602085015261404461403f84846159c3565b615344565b600f0b84526001600160a01b0385166000908152600760209081526040909120855181546001600160801b0319166001600160801b039091161781559085015160019091015560025461409784826159c3565b6002556140a5868387614ac4565b6003546001600160a01b0316156141365760035482516020840151604051630f28a72960e31b81526001600160a01b038a81166004830152600f9390930b6024820152604481019190915260648101879052911690637945394890608401600060405180830381600087803b15801561411d57600080fd5b505af1158015614131573d6000803e3d6000fd5b505050505b6002546040805183815260208101929092527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c910160405180910390a1505050505050565b6002546141888682615b9c565b600255604080518082019091528451600f0b8152602080860151908201526141af87615344565b81516141bb9190615d4b565b600f0b815285156141ce57602081018690525b6001600160a01b0388166000908152600760209081526040909120825181546001600160801b0319166001600160801b039091161781559082015160019091015561421a888683614ac4565b8615801590614227575082155b15614261576142616001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308a613ecc565b6003546001600160a01b0316156143085760035485516020870151604051636e85ee4760e01b81526001600160a01b038c81166004830152602482018c9052604482018b9052600f9390930b6064820152608481019190915260a4810187905285151560c4820152911690636e85ee479060e401600060405180830381600087803b1580156142ef57600080fd5b505af1158015614303573d6000803e3d6000fd5b505050505b602080820151604080518a81529283018790524290830152906001600160a01b038a16907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060600160405180910390a36002546040805184815260208101929092527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c910160405180910390a15050505050505050565b6000806143ad84846153c1565b9050806143be5760009150506115e4565b6001600160a01b0384166000908152600e602052604081208054839081106143e8576143e8615ad4565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152600c54909250906144418683614a26565b90506000600d828154811061445857614458615ad4565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b9284019290925260018201549083015260020154606082015291508084841015614546576000600d6144ba866001615b9c565b815481106144ca576144ca615ad4565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905286015191925061452891906159c3565b92508360400151816040015161453e91906159c3565b91505061456a565b606083015161455590436159c3565b915082604001514261456791906159c3565b90505b604083015182156145a7578284606001518b61458691906159c3565b6145909084615c92565b61459a9190615cc7565b6145a49082615b9c565b90505b6145ba87604001518261403f91906159c3565b87602001516145c99190615d9c565b875188906145d8908390615e30565b600f90810b90915288516000910b121590506145ff576000985050505050505050506115e4565b865161460d90600f0b613f51565b9b9a5050505050505050505050565b6001600160a01b0381166000908152600f6020526040812054806146435750600092915050565b6001600160a01b0383166000908152600e6020526040812080548390811061466d5761466d615ad4565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b938301939093526001830154908201819052600290920154606082015291506146ca9061403f90426159c3565b81602001516146d99190615d9c565b81516146e59190615e30565b600f0b808252600013156146f857600081525b805161470690600f0b613f51565b949350505050565b60008083905060006147238560400151613f37565b905060005b60ff8110156147d95761473e62093a8083615b9c565b915060008583111561475257859250614766565b50600082815260106020526040902054600f0b5b61477984604001518461403f91906159c3565b84602001516147889190615d9c565b84516147949190615e30565b600f0b8452828614156147a757506147d9565b8084602001516147b79190615d4b565b600f0b60208501525060408301829052806147d181615aea565b915050614728565b5060008260000151600f0b12156147ef57600082525b81516147fd90600f0b613f51565b95945050505050565b3360009081526006602052604090205460ff16156148365760405162461bcd60e51b8152600401610dab90615d18565b61483f81613f37565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152909150826148895760405162461bcd60e51b8152600401610dab90615b05565b8051600f0b156148cc5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b1bd8dad95960921b6044820152606401610dab565b4282116149115760405162461bcd60e51b815260206004820152601360248201527217dd5b9b1bd8dad51a5b59481d1bdbc81bdb19606a1b6044820152606401610dab565b600161492162093a8060d1615c92565b61492b91906159c3565b6149359042615b9c565b82111561497b5760405162461bcd60e51b81526020600482015260146024820152735f756e6c6f636b54696d6520746f6f206c6f6e6760601b6044820152606401610dab565b336000818152600a60205260409020546149a1919085908590859060019060ff1661417b565b505050565b6040516001600160a01b0383166024820152604481018290526149a190849063a9059cbb60e01b90606401613f00565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008082815b6080811015614aba57818310614a4157614aba565b60006002614a4f8486615b9c565b614a5a906001615b9c565b614a649190615cc7565b905086600d8281548110614a7a57614a7a615ad4565b90600052602060002090600302016002015411614a9957809350614aa7565b614aa46001826159c3565b92505b5080614ab281615aea565b915050614a2c565b5090949350505050565b604080516080808201835260008083526020808401829052838501829052606080850183905285519384018652828452908301829052938201819052928101839052600c549192909181906001600160a01b03881615614d6457428760200151118015614b38575060008760000151600f0b135b15614b9957614b5a6001614b5062093a8060d1615c92565b61403f91906159c3565b8751614b669190615e80565b600f0b602080870191909152870151614b849061403f9042906159c3565b8560200151614b939190615d9c565b600f0b85525b428660200151118015614bb3575060008660000151600f0b135b15614c0a57614bcb6001614b5062093a8060d1615c92565b8651614bd79190615e80565b600f0b602080860191909152860151614bf59061403f9042906159c3565b8460200151614c049190615d9c565b600f0b84525b6001600160a01b0388166000908152600f602052604090205480614c8e576001600160a01b0389166000908152600e60209081526040808320805460018181018355918552938390208a51938b01516001600160801b03908116600160801b0294169390931760039094029092019283558801519082015560608701516002909101555b614c99816001615b9c565b6001600160a01b038a166000818152600f6020818152604080842095909555428a86019081524360608c01908152948452600e82528584208054600181810183559186528386208d518e8601516001600160801b03908116600160801b0291161760039092020190815591519082015593516002909401939093558b8301518252601083529290205490890151910b945015614d6257876020015187602001511415614d4757839250614d62565b602080880151600090815260109091526040902054600f0b92505b505b604080516080810182526000808252602082015242918101919091524360608201528115614ded57600d8281548110614d9f57614d9f615ad4565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015290505b604080820180518251608081018452600080825260208201819052835194820194909452606080860151908201529151909290421115614e64576040840151614e3690426159c3565b6060850151614e4590436159c3565b614e5790670de0b6b3a7640000615c92565b614e619190615cc7565b90505b6000614e6f84613f37565b905060005b60ff81101561505557614e8a62093a8083615b9c565b9150600042831115614e9e57429250614eb2565b50600082815260106020526040902054600f0b5b6000614ec161403f88866159c3565b8860200151614ed09190615d9c565b8851909150614ee0908290615e30565b600f0b88526020880151614ef5908390615d4b565b600f90810b60208a015288516000910b1215614f1057600088525b60008860200151600f0b1215614f2857600060208901525b60408089018590528601519396508693670de0b6b3a764000090614f4c90866159c3565b614f569087615c92565b614f609190615cc7565b8660600151614f6f9190615b9c565b6060890152614f7f896001615b9c565b985042841415614f96575050436060870152615055565b600d8054600181018255600091909152885160208a01516001600160801b03908116600160801b0291161760039091027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019190915560408901517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb682015560608901517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb7909101555050808061504d90615aea565b915050614e74565b50600c8690556001600160a01b038d16156150e2578960200151896020015186602001516150839190615d4b565b61508d9190615e30565b600f0b60208601528951895186516150a59190615d4b565b6150af9190615e30565b600f90810b865260208601516000910b12156150cd57600060208601525b60008560000151600f0b12156150e257600085525b600d8054600181018255600091909152855160208701516001600160801b03908116600160801b0291161760039091027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019190915560408601517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb682015560608601517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb7909101556001600160a01b038d161561526357428c6020015111156152085760208a01516151b69089615d4b565b97508b602001518b6020015114156151da5760208901516151d79089615e30565b97505b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b038a161790555b428b602001511115615263578b602001518b6020015111156152635760208901516152339088615e30565b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b03831617905596505b50505050505050505050505050565b60006152c7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166154859092919063ffffffff16565b8051909150156149a157808060200190518101906152e59190615ebe565b6149a15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610dab565b600060016001607f1b03198212801590615365575060016001607f1b038213155b613fa35760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401610dab565b6001600160a01b0382166000908152600f60205260408120548190815b6080811015614aba578183106153f357614aba565b600060026154018486615b9c565b61540c906001615b9c565b6154169190615cc7565b6001600160a01b0388166000908152600e60205260409020805491925087918390811061544557615445615ad4565b9060005260206000209060030201600201541161546457809350615472565b61546f6001826159c3565b92505b508061547d81615aea565b9150506153de565b60606147068484600085856001600160a01b0385163b6154e75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610dab565b600080866001600160a01b031685876040516155039190615edb565b60006040518083038185875af1925050503d8060008114615540576040519150601f19603f3d011682016040523d82523d6000602084013e615545565b606091505b5091509150615555828286615560565b979650505050505050565b6060831561556f57508161287b565b82511561557f5782518084602001fd5b8160405162461bcd60e51b8152600401610dab9190615644565b508054600082556003029060005260206000209081019061381b91905b80821115613fa35760008082556001820181905560028201556003016155b6565b6001600160a01b038116811461381b57600080fd5b600080604083850312156155ff57600080fd5b823561560a816155d7565b946020939093013593505050565b60005b8381101561563357818101518382015260200161561b565b838111156115185750506000910152565b6020815260008251806020840152615663816040850160208701615618565b601f01601f19169190910160400192915050565b60006020828403121561568957600080fd5b813561287b816155d7565b6000806000606084860312156156a957600080fd5b83356156b4816155d7565b95602085013595506040909401359392505050565b801515811461381b57600080fd5b600080604083850312156156ea57600080fd5b82356156f5816155d7565b91506020830135615705816156c9565b809150509250929050565b60008060006040848603121561572557600080fd5b83356001600160401b038082111561573c57600080fd5b818601915086601f83011261575057600080fd5b81358181111561575f57600080fd5b8760208260051b850101111561577457600080fd5b6020928301955093505084013561578a816156c9565b809150509250925092565b6000602082840312156157a757600080fd5b813561287b816156c9565b6001600160a01b0391909116815260200190565b600080604083850312156157d957600080fd5b50508035926020909101359150565b6000602082840312156157fa57600080fd5b5035919050565b80356001600160401b038116811461581857600080fd5b919050565b6000806000806080858703121561583357600080fd5b61583c85615801565b935061584a60208601615801565b9250604085013561585a816155d7565b9150606085013561586a816155d7565b939692955090935050565b60008060006060848603121561588a57600080fd5b8335615895816155d7565b925060208401356158a5816156c9565b9150604084013564ffffffffff8116811461578a57600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600b908201526a10903232b632b3b0ba37b960a91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001600160681b038381169083168181101561594f5761594f615919565b039392505050565b600181811c9082168061596b57607f821691505b6020821081141561288b57634e487b7160e01b600052602260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000828210156159d5576159d5615919565b500390565b602080825260089082015267546f6f206c61746560c01b604082015260600190565b6020808252601490820152732737903637b1b59037b7103232b632b3b0ba37b960611b604082015260600190565b60208082526016908201527511195b1959d85d1bdc881b1bd8dac8195e1c1a5c995960521b604082015260600190565b60006001600160681b03828116848216808303821115615a7c57615a7c615919565b01949350505050565b6020808252600b908201526a084818d85ad9481c1bdbdb60aa1b604082015260600190565b60208082526010908201526f3130b2102fb13637b1b5a73ab6b132b960811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615afe57615afe615919565b5060010190565b6020808252600b908201526a1098590817d85b5bdd5b9d60aa1b604082015260600190565b6020808252600d908201526c139bc81b1bd8dac8199bdd5b99609a1b604082015260600190565b6020808252600c908201526b131bd8dac8195e1c1a5c995960a21b604082015260600190565b6020808252600b908201526a0848195bd8481bdc881ddb60aa1b604082015260600190565b60008219821115615baf57615baf615919565b500190565b6020808252600d908201526c08481a5b9a5d1a585b1a5e9959609a1b604082015260600190565b60008060008060008060008060006101208a8c031215615bfa57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a0151615c36816156c9565b809250506101008a015190509295985092959850929598565b60208082526010908201526f105b1c9958591e481b5a59dc985d195960821b604082015260600190565b600060208284031215615c8b57600080fd5b5051919050565b6000816000190483118215151615615cac57615cac615919565b500290565b634e487b7160e01b600052601260045260246000fd5b600082615cd657615cd6615cb1565b500490565b600060208284031215615ced57600080fd5b815161287b816155d7565b602080825260069082015265119bdc989a5960d21b604082015260600190565b602080825260199082015278416c726561647920656d657267656e6379576974686472617760381b604082015260600190565b6000600f82810b9084900b828212801560016001607f1b0384900383131615615d7657615d76615919565b60016001607f1b03198390038212811615615d9357615d93615919565b50019392505050565b6000600f82810b9084900b60016001607f1b0383821384841380821684840486111615615dcb57615dcb615919565b60016001607f1b03196000851282811687830587121615615dee57615dee615919565b60008712925085820587128484161615615e0a57615e0a615919565b85850587128184161615615e2057615e20615919565b5050509290910295945050505050565b6000600f82810b9084900b828112801560016001607f1b0319830184121615615e5b57615e5b615919565b60016001607f1b0382018313811615615e7657615e76615919565b5090039392505050565b600081600f0b83600f0b80615e9757615e97615cb1565b60016001607f1b0319821460001982141615615eb557615eb5615919565b90059392505050565b600060208284031215615ed057600080fd5b815161287b816156c9565b60008251615eed818460208701615618565b919091019291505056fea2646970667358221220e35cd770ee0e4f72faeb42d8640c928cb02dbdbdb70506e995053e46bf31075d64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake-farm-booster/v3/tsconfig.json b/projects/vecake-farm-booster/v3/tsconfig.json new file mode 100644 index 00000000..dd966549 --- /dev/null +++ b/projects/vecake-farm-booster/v3/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "noImplicitAny": false + } +} diff --git a/projects/vecake/README.md b/projects/vecake/README.md new file mode 100644 index 00000000..8b44b6fb --- /dev/null +++ b/projects/vecake/README.md @@ -0,0 +1,5 @@ +# Pancake vecake + +## Description + +Pancake vecake diff --git a/projects/vecake/config.ts b/projects/vecake/config.ts new file mode 100644 index 00000000..41bcef1d --- /dev/null +++ b/projects/vecake/config.ts @@ -0,0 +1,26 @@ +export default { + CakePool: { + mainnet: "0x45c54210128a065de780C4B0Df3d16664f7f859e", + testnet: "0x1088Fb24053F03802F673b84d16AE1A7023E400b", + }, + MasterChefV2: { + mainnet: "0xa5f8C5Dbd5F286960b9d90548680aE5ebFf07652", + testnet: "0xf6B427A2Df6E24600e3e3c62634B7c478826619D", + }, + CakeToken: { + mainnet: "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82", + testnet: "0x8d008B313C1d6C7fE2982F62d32Da7507cF43551", + }, + ProxyForCakePoolFactory: { + mainnet: "0x03E80d537dca71E826eac6fe74FBb0DB607A2727", + testnet: "0x4f68968aC090D43966e3CE926aD64a40fE2b767B", + }, + VECake: { + mainnet: "0x5692DB8177a81A6c6afc8084C2976C9933EC1bAB", + testnet: "0x4879fcB447E7F4c7843A6D15dF5526061304dcFb", + }, + cakePoolPID: { + mainnet: 0, + testnet: 2, + }, +}; diff --git a/projects/vecake/contracts/ProxyForCakePool.sol b/projects/vecake/contracts/ProxyForCakePool.sol new file mode 100644 index 00000000..c9246e2d --- /dev/null +++ b/projects/vecake/contracts/ProxyForCakePool.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "./interfaces/IVECake.sol"; +import "./interfaces/IProxyForCakePoolFactory.sol"; + +contract ProxyForCakePool { + IVECake public immutable VECake; + address public immutable cakePoolUser; + + modifier onlyVECake() { + require(msg.sender == address(VECake), "Not VECake"); + _; + } + + /// @notice Constructor + constructor() { + (address VECakeAddress, address user) = IProxyForCakePoolFactory(msg.sender).parameters(); + VECake = IVECake(VECakeAddress); + cakePoolUser = user; + } + + function createLockForProxy(uint256 _amount, uint256 _unlockTime) external onlyVECake { + VECake.createLockForProxy(_amount, _unlockTime); + } + + function withdrawAll() external onlyVECake { + VECake.withdrawAll(address(this)); + } +} diff --git a/projects/vecake/contracts/ProxyForCakePoolFactory.sol b/projects/vecake/contracts/ProxyForCakePoolFactory.sol new file mode 100644 index 00000000..78dd99b3 --- /dev/null +++ b/projects/vecake/contracts/ProxyForCakePoolFactory.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "./ProxyForCakePool.sol"; + +contract ProxyForCakePoolFactory is Ownable { + struct Parameters { + address VECake; + address user; + } + + Parameters public parameters; + + address public VECake; + + bool public initialization; + + event NewProxy(address indexed proxy, address indexed user); + + modifier onlyVECake() { + require(msg.sender == VECake, "Not VECake"); + _; + } + + /// @notice Constructor + constructor() {} + + /// @notice Initialize + /// @param _VECake: VECake contract + function initialize(address _VECake) external onlyOwner { + require(!initialization, "Already initialized"); + initialization = true; + VECake = _VECake; + } + + /// @notice Deploy proxy for cake pool + /// @param _user: Cake pool user + /// @return proxy The proxy address + function deploy(address _user) external onlyVECake returns (address proxy) { + parameters = Parameters({VECake: VECake, user: _user}); + + proxy = address(new ProxyForCakePool{salt: keccak256(abi.encode(VECake, _user, block.timestamp))}()); + + delete parameters; + + emit NewProxy(proxy, _user); + } +} diff --git a/projects/vecake/contracts/VECake.sol b/projects/vecake/contracts/VECake.sol new file mode 100644 index 00000000..3fd22c3c --- /dev/null +++ b/projects/vecake/contracts/VECake.sol @@ -0,0 +1,1211 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "@openzeppelin-4.5.0/contracts/security/ReentrancyGuard.sol"; +import "./libraries/SafeCast.sol"; +import "./interfaces/ICakePool.sol"; +import "./interfaces/IProxyForCakePoolFactory.sol"; +import "./interfaces/IProxyForCakePool.sol"; +import "./interfaces/IDelegator.sol"; +import "./interfaces/IFarmBooster.sol"; + +contract VECake is Ownable, ReentrancyGuard { + using SafeERC20 for IERC20; + + // --- Events --- + event Deposit(address indexed locker, uint256 value, uint256 indexed lockTime, uint256 lockType, uint256 timestamp); + event WithdrawAll(address indexed locker, address indexed to, uint256 value, uint256 timestamp); + event EarlyWithdraw(address indexed locker, address indexed to, uint256 value, uint256 penalty, uint256 timestamp); + event SetBreaker(uint256 previousBreaker, uint256 breaker); + event Supply(uint256 previousSupply, uint256 supply); + event SetEarlyWithdrawConfig( + address indexed caller, + uint64 oldEarlyWithdrawFeeBps, + uint64 newEarlyWithdrawFeeBps, + uint64 oldRedistributeBps, + uint64 newRedistribiteBps, + address oldTreasuryAddr, + address newTreasuryAddr, + address oldRedistributeAddr, + address newRedistributeAddr + ); + event Redistribute(address indexed caller, address destination, uint256 amount); + event SetWhitelistedCaller(address indexed caller, address indexed addr, bool ok); + event SetWhitelistedRedistributors(address indexed caller, address indexed addr, bool ok); + event MigrateFromCakePool(address indexed user, address indexed proxy, uint256 amount, uint256 endTime); + event DelegateFromCakePool(address indexed user, address indexed delegator, uint256 amount, uint256 endTime); + event MigrationConvertToDelegation( + address indexed user, + address indexed delegator, + uint256 amount, + uint256 endTime + ); + event UpdateDelegator(address indexed delegator, bool isDelegator, uint40 limitTimestampForEarlyWithdraw); + event InjectToDelegator(address indexed user, address indexed delegator, uint256 amount); + event SetLimitTimeOfConvert(address indexed user, uint256 newValue); + event SetEarlyWithdrawSwitch(address indexed user, bool newValue); + event SetNoPenaltyForEarlyWithdraw(address indexed owner, address indexed user, bool indexed newValue); + event SetEmergencyWithdrawSwitch(address indexed user, bool newValue); + event EmergencyWithdraw(address indexed user, uint256 amount); + event NewFarmBooster(address indexed farmBooster); + + struct Point { + int128 bias; // Voting weight + int128 slope; // Multiplier factor to get voting weight at a given time + uint256 timestamp; + uint256 blockNumber; + } + + struct LockedBalance { + int128 amount; + uint256 end; + } + + struct UserInfo { + address cakePoolProxy; // Proxy Smart Contract for users who had locked in cake pool. + uint128 cakeAmount; // Cake amount locked in cake pool. + uint48 lockEndTime; // Record the lockEndTime in cake pool. + uint48 migrationTime; // Record the migration time. + uint16 cakePoolType; // 1: Migration, 2: Delegation. + uint16 withdrawFlag; // 0: Not withdraw, 1 : withdrew. + } + + // When user delegated their locked cake to delegator from cake pool, the locked cake will permanently locked in the cake pool, which is equivalent to burn it. + // And pancake team will inject cake to the delegator from the burning part which was originally intended to be burned in the future. + struct Delegator { + uint104 delegatedCakeAmount; // The total cake amount delegated from cake pool. + uint104 notInjectedCakeAmount; // The cake amount which pancake have not injected to the delegator. + uint40 limitTimestampForEarlyWithdraw; // Delegator can not call earlyWithdraw before limit timestamp. + uint8 isDelegator; // 0: Not delegator , 1: Delegator + } + + // --- Constants --- + uint16 public constant MIGRATION_FROM_CAKE_POOL_FLAG = 1; + uint16 public constant DELEGATION_FROM_CAKE_POOL_FLAG = 2; + uint16 public constant NOT_WITHDRAW_FLAG = 0; + uint16 public constant WITHDREW_FLAG = 1; + uint8 public constant NOT_DELEGATOR_FLAG = 0; + uint8 public constant DELEGATOR_FLAG = 1; + + uint256 public constant ACTION_DEPOSIT_FOR = 0; + uint256 public constant ACTION_CREATE_LOCK = 1; + uint256 public constant ACTION_INCREASE_LOCK_AMOUNT = 2; + uint256 public constant ACTION_INCREASE_UNLOCK_TIME = 3; + + uint256 public constant WEEK = 7 days; + // MAX_LOCK 209 weeks - 1 seconds + uint256 public constant MAX_LOCK = (209 * WEEK) - 1; + uint256 public constant MULTIPLIER = 10**18; + + // Token to be locked (Cake) + IERC20 public immutable token; + // Total supply of Cake that get locked + uint256 public supply; + + ICakePool public immutable CakePool; + + IProxyForCakePoolFactory public immutable ProxyForCakePoolFactory; + + IFarmBooster public FarmBooster; + + // Cake pool migation initialization flag + bool public initialization; + + // The limit time for migration convert to delegation, default is 2 weeks + uint256 public limitTimeOfConvert = 2 weeks; + + // Allow to emergency withdraw or not + bool public emergencyWithdrawSwitch; + + // Record whether user had used emergencyWithdraw + mapping(address => bool) public everEmergencyWithdraw; + + // Mapping (user => LockedBalance) to keep locking information for each user + mapping(address => LockedBalance) public locks; + + // Mapping (user => UserInfo) to keep cake pool related information for each user + mapping(address => UserInfo) public userInfo; + + // Mapping (address => Delegator) to keep delegator related information + mapping(address => Delegator) public delegator; + + // Mapping (user => Bool) to check whether this user is cake pool proxy smart contract + mapping(address => bool) public isCakePoolProxy; + + // Mapping (user => Bool) to check whether this user will have penalty for ealy withdraw + mapping(address => bool) public noPenaltyForEarlyWithdraw; + + // A global point of time. + uint256 public epoch; + // An array of points (global). + Point[] public pointHistory; + // Mapping (user => Point) to keep track of user point of a given epoch (index of Point is epoch) + mapping(address => Point[]) public userPointHistory; + // Mapping (user => epoch) to keep track which epoch user at + mapping(address => uint256) public userPointEpoch; + // Mapping (round off timestamp to week => slopeDelta) to keep track slope changes over epoch + mapping(uint256 => int128) public slopeChanges; + + // Circuit breaker + uint256 public breaker; + + string public name; + string public symbol; + uint8 public decimals; + + // --- Early Withdrawal Configs --- + uint64 public earlyWithdrawBpsPerWeek; + uint64 public redistributeBps; + uint256 public accumRedistribute; + address public treasuryAddr; + address public redistributeAddr; + + // Allow to early withdraw or not + bool public earlyWithdrawSwitch; + + // --- whitelist address --- + mapping(address => bool) public whitelistedCallers; + mapping(address => bool) public whitelistedRedistributors; + + modifier onlyRedistributors() { + require(whitelistedRedistributors[msg.sender], "! wl redistributors"); + _; + } + + // If you wish to build on top of VECAKE, contact our BD team via: https://docs.pancakeswap.finance/ecosystem-and-partnerships/business-partnerships for whitelisting + modifier onlyEOAorWhitelisted() { + if (!whitelistedCallers[msg.sender]) { + require(msg.sender == tx.origin, "! eoa or wl"); + } + _; + } + + modifier onlyCakePool() { + require(msg.sender == address(CakePool), "! cake pool"); + _; + } + + /** + * @notice Constructor + * @param _cakePool: Cake Pool contract + * @param _token: Cake Token contract + * @param _ProxyForCakePoolFactory The cake pool proxy factory + */ + constructor( + ICakePool _cakePool, + IERC20 _token, + IProxyForCakePoolFactory _ProxyForCakePoolFactory + ) { + CakePool = _cakePool; + token = _token; + ProxyForCakePoolFactory = _ProxyForCakePoolFactory; + + pointHistory.push(Point({bias: 0, slope: 0, timestamp: block.timestamp, blockNumber: block.number})); + + decimals = 18; + + name = "Vote-escrowed Cake"; + symbol = "veCake"; + } + + /// @notice Initialize for cake pool migration + /// @dev Need to check whether cake pool conditions are met + function initializeCakePoolMigration() external onlyOwner { + require(!initialization, "Already initialized"); + address VCakeInCakePool = CakePool.VCake(); + require(VCakeInCakePool == address(this), "Bad VCake"); + initialization = true; + } + + /// @notice Return user information include LockedBalance and UserInfo + /// @param _user The user address + /// @return amount The user lock amount + /// @return end The user lock end time + /// @return cakePoolProxy Proxy Smart Contract for users who had locked in cake pool + /// @return cakeAmount Cake amount locked in cake pool + /// @return lockEndTime Record the lockEndTime in cake pool + /// @return migrationTime Record the migration time + /// @return cakePoolType 1: Migration, 2: Delegation + /// @return withdrawFlag 0: Not withdraw, 1 : withdrew + function getUserInfo(address _user) + external + view + returns ( + int128 amount, + uint256 end, + address cakePoolProxy, + uint128 cakeAmount, + uint48 lockEndTime, + uint48 migrationTime, + uint16 cakePoolType, + uint16 withdrawFlag + ) + { + LockedBalance memory lock = locks[_user]; + UserInfo memory user = userInfo[_user]; + amount = lock.amount; + end = lock.end; + cakePoolProxy = user.cakePoolProxy; + cakeAmount = user.cakeAmount; + lockEndTime = user.lockEndTime; + migrationTime = user.migrationTime; + cakePoolType = user.cakePoolType; + withdrawFlag = user.withdrawFlag; + } + + /// @notice Return the proxy balance of VECake at a given "_blockNumber" + /// @param _user The proxy owner address to get a balance of VECake + /// @param _blockNumber The speicific block number that you want to check the balance of VECake + function balanceOfAtForProxy(address _user, uint256 _blockNumber) external view returns (uint256) { + require(_blockNumber <= block.number, "bad _blockNumber"); + UserInfo memory user = userInfo[_user]; + if (user.cakePoolProxy != address(0)) { + return _balanceOfAt(user.cakePoolProxy, _blockNumber); + } + } + + /// @notice Return the balance of VECake at a given "_blockNumber" + /// @param _user The address to get a balance of VECake + /// @param _blockNumber The speicific block number that you want to check the balance of VECake + function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256) { + require(_blockNumber <= block.number, "bad _blockNumber"); + UserInfo memory user = userInfo[_user]; + if (user.cakePoolProxy != address(0)) { + return _balanceOfAt(_user, _blockNumber) + _balanceOfAt(user.cakePoolProxy, _blockNumber); + } else { + return _balanceOfAt(_user, _blockNumber); + } + } + + function balanceOfAtUser(address _user, uint256 _blockNumber) external view returns (uint256) { + return _balanceOfAt(_user, _blockNumber); + } + + function _balanceOfAt(address _user, uint256 _blockNumber) internal view returns (uint256) { + // Get most recent user Point to block + uint256 _userEpoch = _findUserBlockEpoch(_user, _blockNumber); + if (_userEpoch == 0) { + return 0; + } + Point memory _userPoint = userPointHistory[_user][_userEpoch]; + + // Get most recent global point to block + uint256 _maxEpoch = epoch; + uint256 _epoch = _findBlockEpoch(_blockNumber, _maxEpoch); + Point memory _point0 = pointHistory[_epoch]; + + uint256 _blockDelta = 0; + uint256 _timeDelta = 0; + if (_epoch < _maxEpoch) { + Point memory _point1 = pointHistory[_epoch + 1]; + _blockDelta = _point1.blockNumber - _point0.blockNumber; + _timeDelta = _point1.timestamp - _point0.timestamp; + } else { + _blockDelta = block.number - _point0.blockNumber; + _timeDelta = block.timestamp - _point0.timestamp; + } + uint256 _blockTime = _point0.timestamp; + if (_blockDelta != 0) { + _blockTime += (_timeDelta * (_blockNumber - _point0.blockNumber)) / _blockDelta; + } + + _userPoint.bias -= (_userPoint.slope * SafeCast.toInt128(int256(_blockTime - _userPoint.timestamp))); + + if (_userPoint.bias < 0) { + return 0; + } + + return SafeCast.toUint256(_userPoint.bias); + } + + /// @notice Return the voting weight of a givne user's proxy + /// @param _user The address of a user + function balanceOfForProxy(address _user) external view returns (uint256) { + UserInfo memory user = userInfo[_user]; + if (user.cakePoolProxy != address(0)) { + return _balanceOf(user.cakePoolProxy, block.timestamp); + } + } + + /// @notice Return the voting weight of a givne user + /// @param _user The address of a user + function balanceOf(address _user) external view returns (uint256) { + UserInfo memory user = userInfo[_user]; + if (user.cakePoolProxy != address(0)) { + return _balanceOf(_user, block.timestamp) + _balanceOf(user.cakePoolProxy, block.timestamp); + } else { + return _balanceOf(_user, block.timestamp); + } + } + + function balanceOfUser(address _user) external view returns (uint256) { + return _balanceOf(_user, block.timestamp); + } + + function balanceOfAtTime(address _user, uint256 _timestamp) external view returns (uint256) { + return _balanceOf(_user, _timestamp); + } + + function _balanceOf(address _user, uint256 _timestamp) internal view returns (uint256) { + uint256 _epoch = userPointEpoch[_user]; + if (_epoch == 0) { + return 0; + } + Point memory _lastPoint = userPointHistory[_user][_epoch]; + _lastPoint.bias = + _lastPoint.bias - + (_lastPoint.slope * SafeCast.toInt128(int256(_timestamp - _lastPoint.timestamp))); + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + return SafeCast.toUint256(_lastPoint.bias); + } + + /// @notice Record global and per-user slope to checkpoint + /// @param _address User's wallet address. Only global if 0x0 + /// @param _prevLocked User's previous locked balance and end lock time + /// @param _newLocked User's new locked balance and end lock time + function _checkpoint( + address _address, + LockedBalance memory _prevLocked, + LockedBalance memory _newLocked + ) internal { + Point memory _userPrevPoint = Point({slope: 0, bias: 0, timestamp: 0, blockNumber: 0}); + Point memory _userNewPoint = Point({slope: 0, bias: 0, timestamp: 0, blockNumber: 0}); + + int128 _prevSlopeDelta = 0; + int128 _newSlopeDelta = 0; + uint256 _epoch = epoch; + + // if not 0x0, then update user's point + if (_address != address(0)) { + // Calculate slopes and biases according to linear decay graph + // slope = lockedAmount / MAX_LOCK => Get the slope of a linear decay graph + // bias = slope * (lockedEnd - currentTimestamp) => Get the voting weight at a given time + // Kept at zero when they have to + if (_prevLocked.end > block.timestamp && _prevLocked.amount > 0) { + // Calculate slope and bias for the prev point + _userPrevPoint.slope = _prevLocked.amount / SafeCast.toInt128(int256(MAX_LOCK)); + _userPrevPoint.bias = + _userPrevPoint.slope * + SafeCast.toInt128(int256(_prevLocked.end - block.timestamp)); + } + if (_newLocked.end > block.timestamp && _newLocked.amount > 0) { + // Calculate slope and bias for the new point + _userNewPoint.slope = _newLocked.amount / SafeCast.toInt128(int256(MAX_LOCK)); + _userNewPoint.bias = _userNewPoint.slope * SafeCast.toInt128(int256(_newLocked.end - block.timestamp)); + } + + // Handle user history here + // Do it here to prevent stack overflow + uint256 _userEpoch = userPointEpoch[_address]; + // If user never ever has any point history, push it here for him. + if (_userEpoch == 0) { + userPointHistory[_address].push(_userPrevPoint); + } + + // Shift user's epoch by 1 as we are writing a new point for a user + userPointEpoch[_address] = _userEpoch + 1; + + // Update timestamp & block number then push new point to user's history + _userNewPoint.timestamp = block.timestamp; + _userNewPoint.blockNumber = block.number; + userPointHistory[_address].push(_userNewPoint); + + // Read values of scheduled changes in the slope + // _prevLocked.end can be in the past and in the future + // _newLocked.end can ONLY be in the FUTURE unless everything expired (anything more than zeros) + _prevSlopeDelta = slopeChanges[_prevLocked.end]; + if (_newLocked.end != 0) { + // Handle when _newLocked.end != 0 + if (_newLocked.end == _prevLocked.end) { + // This will happen when user adjust lock but end remains the same + // Possibly when user deposited more Cake to his locker + _newSlopeDelta = _prevSlopeDelta; + } else { + // This will happen when user increase lock + _newSlopeDelta = slopeChanges[_newLocked.end]; + } + } + } + + // Handle global states here + Point memory _lastPoint = Point({bias: 0, slope: 0, timestamp: block.timestamp, blockNumber: block.number}); + if (_epoch > 0) { + // If _epoch > 0, then there is some history written + // Hence, _lastPoint should be pointHistory[_epoch] + // else _lastPoint should an empty point + _lastPoint = pointHistory[_epoch]; + } + // _lastCheckpoint => timestamp of the latest point + // if no history, _lastCheckpoint should be block.timestamp + // else _lastCheckpoint should be the timestamp of latest pointHistory + uint256 _lastCheckpoint = _lastPoint.timestamp; + + // initialLastPoint is used for extrapolation to calculate block number + // (approximately, for xxxAt methods) and save them + // as we cannot figure that out exactly from inside contract + Point memory _initialLastPoint = Point({ + bias: 0, + slope: 0, + timestamp: _lastPoint.timestamp, + blockNumber: _lastPoint.blockNumber + }); + + // If last point is already recorded in this block, _blockSlope=0 + // That is ok because we know the block in such case + uint256 _blockSlope = 0; + if (block.timestamp > _lastPoint.timestamp) { + // Recalculate _blockSlope if _lastPoint.timestamp < block.timestamp + // Possiblity when epoch = 0 or _blockSlope hasn't get updated in this block + _blockSlope = + (MULTIPLIER * (block.number - _lastPoint.blockNumber)) / + (block.timestamp - _lastPoint.timestamp); + } + + // Go over weeks to fill history and calculate what the current point is + uint256 _weekCursor = _timestampToFloorWeek(_lastCheckpoint); + for (uint256 i = 0; i < 255; i++) { + // This logic will works for 5 years, if more than that vote power will be broken 😟 + // Bump _weekCursor a week + _weekCursor = _weekCursor + WEEK; + int128 _slopeDelta = 0; + if (_weekCursor > block.timestamp) { + // If the given _weekCursor go beyond block.timestamp, + // We take block.timestamp as the cursor + _weekCursor = block.timestamp; + } else { + // If the given _weekCursor is behind block.timestamp + // We take _slopeDelta from the recorded slopeChanges + // We can use _weekCursor directly because key of slopeChanges is timestamp round off to week + _slopeDelta = slopeChanges[_weekCursor]; + } + // Calculate _biasDelta = _lastPoint.slope * (_weekCursor - _lastCheckpoint) + int128 _biasDelta = _lastPoint.slope * SafeCast.toInt128(int256((_weekCursor - _lastCheckpoint))); + _lastPoint.bias = _lastPoint.bias - _biasDelta; + _lastPoint.slope = _lastPoint.slope + _slopeDelta; + if (_lastPoint.bias < 0) { + // This can happen + _lastPoint.bias = 0; + } + if (_lastPoint.slope < 0) { + // This cannot happen, just make sure + _lastPoint.slope = 0; + } + // Update _lastPoint to the new one + _lastCheckpoint = _weekCursor; + _lastPoint.timestamp = _weekCursor; + // As we cannot figure that out block timestamp -> block number exactly + // when query states from xxxAt methods, we need to calculate block number + // based on _initalLastPoint + _lastPoint.blockNumber = + _initialLastPoint.blockNumber + + ((_blockSlope * ((_weekCursor - _initialLastPoint.timestamp))) / MULTIPLIER); + _epoch = _epoch + 1; + if (_weekCursor == block.timestamp) { + // Hard to be happened, but better handling this case too + _lastPoint.blockNumber = block.number; + break; + } else { + pointHistory.push(_lastPoint); + } + } + // Now, each week pointHistory has been filled until current timestamp (round off by week) + // Update epoch to be the latest state + epoch = _epoch; + + if (_address != address(0)) { + // If the last point was in the block, the slope change should have been applied already + // But in such case slope shall be 0 + _lastPoint.slope = _lastPoint.slope + _userNewPoint.slope - _userPrevPoint.slope; + _lastPoint.bias = _lastPoint.bias + _userNewPoint.bias - _userPrevPoint.bias; + if (_lastPoint.slope < 0) { + _lastPoint.slope = 0; + } + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + } + + // Record the new point to pointHistory + // This would be the latest point for global epoch + pointHistory.push(_lastPoint); + + if (_address != address(0)) { + // Schedule the slope changes (slope is going downward) + // We substract _newSlopeDelta from `_newLocked.end` + // and add _prevSlopeDelta to `_prevLocked.end` + if (_prevLocked.end > block.timestamp) { + // _prevSlopeDelta was - _userPrevPoint.slope, so we offset that first + _prevSlopeDelta = _prevSlopeDelta + _userPrevPoint.slope; + if (_newLocked.end == _prevLocked.end) { + // Handle the new deposit. Not increasing lock. + _prevSlopeDelta = _prevSlopeDelta - _userNewPoint.slope; + } + slopeChanges[_prevLocked.end] = _prevSlopeDelta; + } + if (_newLocked.end > block.timestamp) { + if (_newLocked.end > _prevLocked.end) { + // At this line, the old slope should gone + _newSlopeDelta = _newSlopeDelta - _userNewPoint.slope; + slopeChanges[_newLocked.end] = _newSlopeDelta; + } + } + } + } + + /// @notice Trigger global checkpoint + function checkpoint() external { + LockedBalance memory empty = LockedBalance({amount: 0, end: 0}); + _checkpoint(address(0), empty, empty); + } + + /// @notice Deposit in cake pool + /// @param _user user address + /// @param _amount: number of tokens to deposit (in CAKE) + /// @param _lockDuration: Token lock duration + function deposit( + address _user, + uint256 _amount, + uint256 _lockDuration + ) external onlyCakePool { + // Do not allow any user to deposit cake in cake pool now after migration initialized. + // will forbid any deposit operatioin + revert(); + } + + /// @notice Withdraw in cake pool + /// @param _user user address + function withdraw(address _user) external onlyCakePool { + UserInfo memory user = userInfo[_user]; + + // Users who had already delegated can not withdraw cake from cake pool + if (user.cakePoolType == DELEGATION_FROM_CAKE_POOL_FLAG) { + revert(); + } else if ( + user.cakePoolProxy != address(0) && + user.cakePoolType == MIGRATION_FROM_CAKE_POOL_FLAG && + user.withdrawFlag == NOT_WITHDRAW_FLAG + ) { + IProxyForCakePool(user.cakePoolProxy).withdrawAll(); + userInfo[_user].withdrawFlag = WITHDREW_FLAG; + } + } + + /// @notice Migrate from cake pool. + function migrateFromCakePool() external nonReentrant { + require(initialization, "! initialized"); + + (uint256 shares, , , , , uint256 lockEndTime, uint256 userBoostedShare, , ) = CakePool.userInfo(msg.sender); + + require(lockEndTime > block.timestamp, "Lock expired"); + + UserInfo storage user = userInfo[msg.sender]; + require(user.cakePoolType == 0, "Already migrated"); + + user.cakePoolType = MIGRATION_FROM_CAKE_POOL_FLAG; + uint256 totalShares = CakePool.totalShares(); + uint256 balanceOfCakePool = CakePool.balanceOf(); + // Subtract 1 is for precision round loss + uint256 lockedCakeAmount = (shares * balanceOfCakePool) / totalShares - userBoostedShare - 1; + // will lock by proxy smart contract + address proxy = ProxyForCakePoolFactory.deploy(msg.sender); + isCakePoolProxy[proxy] = true; + user.cakePoolProxy = proxy; + user.migrationTime = uint48(block.timestamp); + user.cakeAmount = uint128(lockedCakeAmount); + user.lockEndTime = uint48(lockEndTime); + + IProxyForCakePool(proxy).createLockForProxy(lockedCakeAmount, lockEndTime); + + emit MigrateFromCakePool(msg.sender, proxy, lockedCakeAmount, lockEndTime); + } + + /// @notice Delegate from cake pool. + /// @dev this function will call one function in delegator smart contract, DelegatorSC.delegate(address user, uint256 amount, uint256 endTime). + /// @param _delegator delegation address + function delegateFromCakePool(address _delegator) external nonReentrant { + require(initialization, "! initialized"); + + Delegator storage delegatorInfo = delegator[_delegator]; + require(delegatorInfo.isDelegator == DELEGATOR_FLAG, "! delegator"); + + (uint256 shares, , , , , uint256 lockEndTime, uint256 userBoostedShare, , ) = CakePool.userInfo(msg.sender); + + require(lockEndTime > block.timestamp, "Lock expired"); + + UserInfo storage user = userInfo[msg.sender]; + require(user.cakePoolType == 0, "Already migrated"); + + user.cakePoolType = DELEGATION_FROM_CAKE_POOL_FLAG; + + uint256 totalShares = CakePool.totalShares(); + uint256 balanceOfCakePool = CakePool.balanceOf(); + // Subtract 1 is for precision round loss + uint256 lockedCakeAmount = (shares * balanceOfCakePool) / totalShares - userBoostedShare - 1; + + user.lockEndTime = uint48(lockEndTime); + user.cakeAmount = uint128(lockedCakeAmount); + + // Increase amount for delegator + LockedBalance memory _lock = LockedBalance({amount: locks[_delegator].amount, end: locks[_delegator].end}); + require(lockedCakeAmount > 0, "Bad _amount"); + require(_lock.amount > 0, "No lock on delegator"); + require(_lock.end > block.timestamp, "Delegator lock expired"); + + _depositFor(_delegator, lockedCakeAmount, 0, _lock, ACTION_DEPOSIT_FOR, true); + + delegatorInfo.delegatedCakeAmount += uint104(lockedCakeAmount); + delegatorInfo.notInjectedCakeAmount += uint104(lockedCakeAmount); + + // Call delegate in delegator smart contract + IDelegator(_delegator).delegate(msg.sender, lockedCakeAmount, lockEndTime); + emit DelegateFromCakePool(msg.sender, _delegator, lockedCakeAmount, lockEndTime); + } + + /// @notice Migration convert to delegation. + /// @dev Migration users can delegate within a certain period after migrated. + /// @param _delegator delegation address + function migrationConvertToDelegation(address _delegator) external nonReentrant { + Delegator storage delegatorInfo = delegator[_delegator]; + require(delegatorInfo.isDelegator == DELEGATOR_FLAG, "! delegator"); + + UserInfo storage user = userInfo[msg.sender]; + uint256 _unlockTime = _timestampToFloorWeek(user.lockEndTime); + require(_unlockTime > block.timestamp, "User lock expired"); + require(user.migrationTime > block.timestamp - limitTimeOfConvert, "Too late"); + require(user.cakePoolType == MIGRATION_FROM_CAKE_POOL_FLAG, "! migrated"); + require(user.withdrawFlag == NOT_WITHDRAW_FLAG, "Already withdraw"); + + user.cakePoolType = DELEGATION_FROM_CAKE_POOL_FLAG; + + // Early withdraw all for proxy + LockedBalance memory lockOfProxy = locks[user.cakePoolProxy]; + uint256 _amount = SafeCast.toUint256(lockOfProxy.amount); + _unlock(user.cakePoolProxy, lockOfProxy, _amount); + + // Increase amount for delegator + LockedBalance memory _lock = LockedBalance({amount: locks[_delegator].amount, end: locks[_delegator].end}); + + require(_lock.amount > 0, "No lock on delegator"); + require(_lock.end > block.timestamp, "Delegator lock expired"); + + _depositFor(_delegator, user.cakeAmount, 0, _lock, ACTION_DEPOSIT_FOR, true); + + delegatorInfo.delegatedCakeAmount += uint104(user.cakeAmount); + delegatorInfo.notInjectedCakeAmount += uint104(user.cakeAmount); + + // Call delegate in delegator smart contract + IDelegator(_delegator).delegate(msg.sender, user.cakeAmount, user.lockEndTime); + emit DelegateFromCakePool(msg.sender, _delegator, user.cakeAmount, user.lockEndTime); + emit MigrationConvertToDelegation(msg.sender, _delegator, user.cakeAmount, user.lockEndTime); + } + + /// @notice Create a new lock. + /// @dev This will crate a new lock and deposit Cake to VECake Vault + /// @param _amount the amount that user wishes to deposit + /// @param _unlockTime the timestamp when Cake get unlocked, it will be + /// floored down to whole weeks + function createLock(uint256 _amount, uint256 _unlockTime) external onlyEOAorWhitelisted nonReentrant { + _createLock(_amount, _unlockTime); + } + + function createLockForProxy(uint256 _amount, uint256 _unlockTime) external { + require(isCakePoolProxy[msg.sender], "! proxy"); + _createLock(_amount, _unlockTime); + } + + function _createLock(uint256 _amount, uint256 _unlockTime) internal { + require(!everEmergencyWithdraw[msg.sender], "Already emergencyWithdraw"); + _unlockTime = _timestampToFloorWeek(_unlockTime); + LockedBalance memory _locked = locks[msg.sender]; + + require(_amount > 0, "Bad _amount"); + require(_locked.amount == 0, "Already locked"); + require(_unlockTime > block.timestamp, "_unlockTime too old"); + require(_unlockTime <= block.timestamp + MAX_LOCK, "_unlockTime too long"); + + _depositFor(msg.sender, _amount, _unlockTime, _locked, ACTION_CREATE_LOCK, isCakePoolProxy[msg.sender]); + } + + /// @notice Deposit `_amount` tokens for `_for` and add to `locks[_for]` + /// @dev This function is used for deposit to created lock. Not for extend locktime. + /// @param _for The address to do the deposit + /// @param _amount The amount that user wishes to deposit + function depositFor(address _for, uint256 _amount) external nonReentrant { + require(!isCakePoolProxy[_for], "Incorrect proxy"); + LockedBalance memory _lock = LockedBalance({amount: locks[_for].amount, end: locks[_for].end}); + + require(_amount > 0, "Bad _amount"); + require(_lock.amount > 0, "No lock found"); + require(_lock.end > block.timestamp, "Lock expired"); + + _depositFor(_for, _amount, 0, _lock, ACTION_DEPOSIT_FOR, false); + } + + /// @notice Internal function to perform deposit and lock Cake for a user + /// @param _for The address to be locked and received VECake + /// @param _amount The amount to deposit + /// @param _unlockTime New time to unlock Cake. Pass 0 if no change. + /// @param _prevLocked Existed locks[_for] + /// @param _actionType The action that user did as this internal function shared among + /// @param _isCakePoolUser This user is cake pool user or not + /// several external functions + function _depositFor( + address _for, + uint256 _amount, + uint256 _unlockTime, + LockedBalance memory _prevLocked, + uint256 _actionType, + bool _isCakePoolUser + ) internal { + // Initiate _supplyBefore & update supply + uint256 _supplyBefore = supply; + supply = _supplyBefore + _amount; + + // Store _prevLocked + LockedBalance memory _newLocked = LockedBalance({amount: _prevLocked.amount, end: _prevLocked.end}); + + // Adding new lock to existing lock, or if lock is expired + // - creating a new one + _newLocked.amount = _newLocked.amount + SafeCast.toInt128(int256(_amount)); + if (_unlockTime != 0) { + _newLocked.end = _unlockTime; + } + locks[_for] = _newLocked; + + // Handling checkpoint here + _checkpoint(_for, _prevLocked, _newLocked); + + // Cake pool user do not need to transfer cake + if (_amount != 0 && !_isCakePoolUser) { + token.safeTransferFrom(msg.sender, address(this), _amount); + } + + if (address(FarmBooster) != address(0)) { + FarmBooster.depositFor( + _for, + _amount, + _unlockTime, + _prevLocked.amount, + _prevLocked.end, + _actionType, + _isCakePoolUser + ); + } + + emit Deposit(_for, _amount, _newLocked.end, _actionType, block.timestamp); + emit Supply(_supplyBefore, supply); + } + + /// @notice Do Binary Search to find out block timestamp for block number + /// @param _blockNumber The block number to find timestamp + /// @param _maxEpoch No beyond this timestamp + function _findBlockEpoch(uint256 _blockNumber, uint256 _maxEpoch) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = _maxEpoch; + // Loop for 128 times -> enough for 128-bit numbers + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + if (pointHistory[_mid].blockNumber <= _blockNumber) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + /// @notice Do Binary Search to find the most recent user point history preceeding block + /// @param _user The address of user to find + /// @param _blockNumber Find the most recent point history before this block number + function _findUserBlockEpoch(address _user, uint256 _blockNumber) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = userPointEpoch[_user]; + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + if (userPointHistory[_user][_mid].blockNumber <= _blockNumber) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + /// @notice Increase lock amount without increase "end" + /// @param _amount The amount of Cake to be added to the lock + function increaseLockAmount(uint256 _amount) external onlyEOAorWhitelisted nonReentrant { + LockedBalance memory _lock = LockedBalance({amount: locks[msg.sender].amount, end: locks[msg.sender].end}); + + require(_amount > 0, "Bad _amount"); + require(_lock.amount > 0, "No lock found"); + require(_lock.end > block.timestamp, "Lock expired"); + + _depositFor(msg.sender, _amount, 0, _lock, ACTION_INCREASE_LOCK_AMOUNT, false); + } + + /// @notice Increase unlock time without changing locked amount + /// @param _newUnlockTime The new unlock time to be updated + function increaseUnlockTime(uint256 _newUnlockTime) external onlyEOAorWhitelisted nonReentrant { + LockedBalance memory _lock = LockedBalance({amount: locks[msg.sender].amount, end: locks[msg.sender].end}); + _newUnlockTime = _timestampToFloorWeek(_newUnlockTime); + + require(_lock.amount > 0, "No lock found"); + require(_lock.end > block.timestamp, "Lock expired"); + require(_newUnlockTime > _lock.end, "_newUnlockTime too old"); + require(_newUnlockTime <= block.timestamp + MAX_LOCK, "_newUnlockTime too long"); + + _depositFor(msg.sender, 0, _newUnlockTime, _lock, ACTION_INCREASE_UNLOCK_TIME, false); + } + + /// @notice Round off random timestamp to week + /// @param _timestamp The timestamp to be rounded off + function _timestampToFloorWeek(uint256 _timestamp) internal pure returns (uint256) { + return (_timestamp / WEEK) * WEEK; + } + + /// @notice Calculate total supply of VECake (voting power) + function totalSupply() external view returns (uint256) { + return _totalSupplyAt(pointHistory[epoch], block.timestamp); + } + + /// @notice Calculate total supply of VECake (voting power) at at specific timestamp + /// @param _timestamp The specific timestamp to calculate totalSupply + function totalSupplyAtTime(uint256 _timestamp) external view returns (uint256) { + return _totalSupplyAt(pointHistory[epoch], _timestamp); + } + + /// @notice Calculate total supply of VECake at specific block + /// @param _blockNumber The specific block number to calculate totalSupply + function totalSupplyAt(uint256 _blockNumber) external view returns (uint256) { + require(_blockNumber <= block.number, "Bad _blockNumber"); + uint256 _epoch = epoch; + uint256 _targetEpoch = _findBlockEpoch(_blockNumber, _epoch); + + Point memory _point = pointHistory[_targetEpoch]; + uint256 _timeDelta = 0; + if (_targetEpoch < _epoch) { + Point memory _nextPoint = pointHistory[_targetEpoch + 1]; + if (_point.blockNumber != _nextPoint.blockNumber) { + _timeDelta = + ((_blockNumber - _point.blockNumber) * (_nextPoint.timestamp - _point.timestamp)) / + (_nextPoint.blockNumber - _point.blockNumber); + } + } else { + if (_point.blockNumber != block.number) { + _timeDelta = + ((_blockNumber - _point.blockNumber) * (block.timestamp - _point.timestamp)) / + (block.number - _point.blockNumber); + } + } + + return _totalSupplyAt(_point, _point.timestamp + _timeDelta); + } + + /// @notice Calculate total supply of VECake (voting power) at some point in the past + /// @param _point The point to start to search from + /// @param _timestamp The timestamp to calculate the total voting power at + function _totalSupplyAt(Point memory _point, uint256 _timestamp) internal view returns (uint256) { + Point memory _lastPoint = _point; + uint256 _weekCursor = _timestampToFloorWeek(_point.timestamp); + // Iterate through weeks to take slopChanges into the account + for (uint256 i = 0; i < 255; i++) { + _weekCursor = _weekCursor + WEEK; + int128 _slopeDelta = 0; + if (_weekCursor > _timestamp) { + // If _weekCursor goes beyond _timestamp -> leave _slopeDelta + // to be 0 as there is no more slopeChanges + _weekCursor = _timestamp; + } else { + // If _weekCursor still behind _timestamp, then _slopeDelta + // should be taken into the account. + _slopeDelta = slopeChanges[_weekCursor]; + } + // Update bias at _weekCursor + _lastPoint.bias = + _lastPoint.bias - + (_lastPoint.slope * SafeCast.toInt128(int256(_weekCursor - _lastPoint.timestamp))); + if (_weekCursor == _timestamp) { + break; + } + // Update slope and timestamp + _lastPoint.slope = _lastPoint.slope + _slopeDelta; + _lastPoint.timestamp = _weekCursor; + } + + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + + return SafeCast.toUint256(_lastPoint.bias); + } + + /// @notice Set breaker + /// @param _breaker The new value of breaker 0 if off, 1 if on + function setBreaker(uint256 _breaker) external onlyOwner { + require(_breaker == 0 || _breaker == 1, "Only 0 or 1"); + uint256 _previousBreaker = breaker; + breaker = _breaker; + emit SetBreaker(_previousBreaker, breaker); + } + + /// @notice Withdraw all Cake when lock has expired. + /// @param _to The address which will receive the cake + function withdrawAll(address _to) external nonReentrant { + Delegator memory delegatorInfo = delegator[msg.sender]; + require(delegatorInfo.notInjectedCakeAmount == 0, "Insufficient injection for delegator"); + + LockedBalance memory _lock = locks[msg.sender]; + if (breaker == 0) require(block.timestamp >= _lock.end, "Lock not expired"); + + if (_to == address(0)) { + _to = msg.sender; + } + + uint256 _amount = SafeCast.toUint256(_lock.amount); + + _unlock(msg.sender, _lock, _amount); + + // Cake pool proxy do not need to transfer cake. + if (!isCakePoolProxy[msg.sender]) token.safeTransfer(_to, _amount); + + emit WithdrawAll(msg.sender, _to, _amount, block.timestamp); + } + + /// @notice Early withdraw Cake with penalty. + /// @param _to The address which will receive the cake + /// @param _amount Cake amount + function earlyWithdraw(address _to, uint256 _amount) external nonReentrant { + require(earlyWithdrawSwitch, "Forbid"); + + if (_to == address(0)) { + _to = msg.sender; + } + + LockedBalance memory _lock = locks[msg.sender]; + + require(_amount > 0, "Bad _amount"); + require(block.timestamp < _lock.end, "Too late"); + require(breaker == 0, "Forbid"); + + Delegator memory delegatorInfo = delegator[msg.sender]; + if (delegatorInfo.isDelegator == DELEGATOR_FLAG) { + require(delegatorInfo.limitTimestampForEarlyWithdraw < block.timestamp, "Forbid earlyWithdraw"); + uint256 lockedAmount = SafeCast.toUint256(_lock.amount); + require(lockedAmount - _amount >= delegatorInfo.notInjectedCakeAmount, "Delegator balance exceeded"); + } + + // prevent mutated memory in _unlock() function as it will be used in fee calculation afterward + uint256 _prevLockEnd = _lock.end; + _unlock(msg.sender, _lock, _amount); + + uint256 _penalty; + + if (!noPenaltyForEarlyWithdraw[msg.sender] && earlyWithdrawBpsPerWeek > 0) { + // ceil the week by adding 1 week first + uint256 remainingWeeks = (_prevLockEnd + WEEK - block.timestamp) / WEEK; + + // calculate penalty + _penalty = (earlyWithdrawBpsPerWeek * remainingWeeks * _amount) / 10000; + + // split penalty into two parts + uint256 _redistribute = (_penalty * redistributeBps) / 10000; + // accumulate cake for redistribution + accumRedistribute += _redistribute; + + // transfer one part of the penalty to treasury + token.safeTransfer(treasuryAddr, _penalty - _redistribute); + } + + // transfer remaining back to owner + token.safeTransfer(_to, _amount - _penalty); + + emit EarlyWithdraw(msg.sender, _to, _amount, _penalty, block.timestamp); + } + + /// @notice Emergency withdraw Cake. + /// @dev Under any circumstances, it is guaranteed that the user’s assets will not be locked + function emergencyWithdraw() external nonReentrant { + require(emergencyWithdrawSwitch, "Forbid emergency withdraw"); + require(!everEmergencyWithdraw[msg.sender], "Already emergencyWithdraw"); + everEmergencyWithdraw[msg.sender] = true; + + LockedBalance memory _lock = locks[msg.sender]; + + require(_lock.amount > 0, "No locked amount"); + + uint256 amount = SafeCast.toUint256(_lock.amount); + // clear user data + delete locks[msg.sender]; + delete userPointHistory[msg.sender]; + delete userPointEpoch[msg.sender]; + + // transfer remaining back to owner + token.safeTransfer(msg.sender, amount); + + emit EmergencyWithdraw(msg.sender, amount); + } + + function redistribute() external onlyRedistributors nonReentrant { + uint256 _amount = accumRedistribute; + + accumRedistribute = 0; + + token.safeTransfer(redistributeAddr, _amount); + + emit Redistribute(msg.sender, redistributeAddr, _amount); + } + + function _unlock( + address _user, + LockedBalance memory _lock, + uint256 _withdrawAmount + ) internal { + // Cast here for readability + uint256 _lockedAmount = SafeCast.toUint256(_lock.amount); + require(_withdrawAmount <= _lockedAmount, "Amount too large"); + + LockedBalance memory _prevLock = LockedBalance({end: _lock.end, amount: _lock.amount}); + //_lock.end should remain the same if we do partially withdraw + _lock.end = _lockedAmount == _withdrawAmount ? 0 : _lock.end; + _lock.amount = SafeCast.toInt128(int256(_lockedAmount - _withdrawAmount)); + locks[_user] = _lock; + + uint256 _supplyBefore = supply; + supply = _supplyBefore - _withdrawAmount; + + // _prevLock can have either block.timstamp >= _lock.end or zero end + // _lock has only 0 end + // Both can have >= 0 amount + _checkpoint(_user, _prevLock, _lock); + + if (address(FarmBooster) != address(0)) { + FarmBooster.unlock(_user, _prevLock.amount, _prevLock.end, _withdrawAmount); + } + emit Supply(_supplyBefore, supply); + } + + function setEarlyWithdrawConfig( + uint64 _newEarlyWithdrawBpsPerWeek, + uint64 _newRedistributeBps, + address _newTreasuryAddr, + address _newRedistributeAddr + ) external onlyOwner { + // Maximum early withdraw fee per week bps = 100% / 52 week = 1.923%) + require(_newEarlyWithdrawBpsPerWeek <= 192, "Fee too high"); + // Maximum redistributeBps = 10000 (100%) + require(_newRedistributeBps <= 10000, "bps too high"); + + uint64 _oldEarlyWithdrawBpsPerWeek = earlyWithdrawBpsPerWeek; + earlyWithdrawBpsPerWeek = _newEarlyWithdrawBpsPerWeek; + + uint64 _oldRedistributeBps = redistributeBps; + redistributeBps = _newRedistributeBps; + + address _oldTreasuryAddr = treasuryAddr; + treasuryAddr = _newTreasuryAddr; + address _oldRedistributeAddr = redistributeAddr; + redistributeAddr = _newRedistributeAddr; + + emit SetEarlyWithdrawConfig( + msg.sender, + _oldEarlyWithdrawBpsPerWeek, + _newEarlyWithdrawBpsPerWeek, + _oldRedistributeBps, + _newRedistributeBps, + _oldTreasuryAddr, + _newTreasuryAddr, + _oldRedistributeAddr, + _newRedistributeAddr + ); + } + + function setWhitelistedCallers(address[] calldata callers, bool ok) external onlyOwner { + for (uint256 idx = 0; idx < callers.length; idx++) { + whitelistedCallers[callers[idx]] = ok; + emit SetWhitelistedCaller(_msgSender(), callers[idx], ok); + } + } + + function setWhitelistedRedistributors(address[] calldata callers, bool ok) external onlyOwner { + for (uint256 idx = 0; idx < callers.length; idx++) { + whitelistedRedistributors[callers[idx]] = ok; + emit SetWhitelistedRedistributors(_msgSender(), callers[idx], ok); + } + } + + /// @notice Update delegator + /// @param _delegator The delegator address + /// @param _isDelegator Is delegator or not + /// @param _limitTimestampForEarlyWithdraw Delegator can not call earlyWithdraw before limit time. + function updateDelegator( + address _delegator, + bool _isDelegator, + uint40 _limitTimestampForEarlyWithdraw + ) external onlyOwner { + Delegator storage delegatorInfo = delegator[_delegator]; + delegatorInfo.isDelegator = _isDelegator ? DELEGATOR_FLAG : NOT_DELEGATOR_FLAG; + delegatorInfo.limitTimestampForEarlyWithdraw = _limitTimestampForEarlyWithdraw; + emit UpdateDelegator(_delegator, _isDelegator, _limitTimestampForEarlyWithdraw); + } + + /// @notice Set limitTimeOfConvert + /// @param _limitTime The limit time + function setLimitTimeOfConvert(uint256 _limitTime) external onlyOwner { + limitTimeOfConvert = _limitTime; + emit SetLimitTimeOfConvert(msg.sender, _limitTime); + } + + /// @notice Set ealy withdraw switch + /// @param _earlyWithdrawSwitch early withdraw switch + function setEarlyWithdrawSwitch(bool _earlyWithdrawSwitch) external onlyOwner { + earlyWithdrawSwitch = _earlyWithdrawSwitch; + emit SetEarlyWithdrawSwitch(msg.sender, _earlyWithdrawSwitch); + } + + /// @notice Set emergency withdraw switch + /// @param _emergencyWithdrawSwitch early withdraw switch + function setEmergencyWithdrawSwitch(bool _emergencyWithdrawSwitch) external onlyOwner { + emergencyWithdrawSwitch = _emergencyWithdrawSwitch; + emit SetEmergencyWithdrawSwitch(msg.sender, _emergencyWithdrawSwitch); + } + + /// @notice Set no penalty early withdraw user + /// @param _user no penalty early withdraw user + /// @param _status no penalty or not + function setNoPenaltyForEarlyWithdraw(address _user, bool _status) external onlyOwner { + noPenaltyForEarlyWithdraw[_user] = _status; + emit SetNoPenaltyForEarlyWithdraw(msg.sender, _user, _status); + } + + /// @notice Inject cake for delegator + /// @param _delegator The delegator address + /// @param _amount Cake amount + function injectToDelegator(address _delegator, uint256 _amount) external onlyOwner { + Delegator storage delegatorInfo = delegator[_delegator]; + require(delegatorInfo.isDelegator == DELEGATOR_FLAG, "! delegator"); + if (_amount > delegatorInfo.notInjectedCakeAmount) { + _amount = delegatorInfo.notInjectedCakeAmount; + } + delegatorInfo.notInjectedCakeAmount -= uint104(_amount); + token.safeTransferFrom(msg.sender, address(this), _amount); + emit InjectToDelegator(msg.sender, _delegator, _amount); + } + + /// @notice Set farm booster Contract address + /// @param _farmBooster The farm booster Contract address + function setFarmBooster(address _farmBooster) external onlyOwner { + require(_farmBooster != address(0), "Cannot be zero address"); + FarmBooster = IFarmBooster(_farmBooster); + emit NewFarmBooster(_farmBooster); + } +} diff --git a/projects/vecake/contracts/interfaces/ICakePool.sol b/projects/vecake/contracts/interfaces/ICakePool.sol new file mode 100644 index 00000000..71bac7de --- /dev/null +++ b/projects/vecake/contracts/interfaces/ICakePool.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface ICakePool { + function userInfo(address user) + external + view + returns ( + uint256, + uint256, + uint256, + uint256, + uint256, + uint256, + uint256, + bool, + uint256 + ); + + function totalShares() external view returns (uint256); + + function totalBoostDebt() external view returns (uint256); + + function balanceOf() external view returns (uint256); + + function available() external view returns (uint256); + + function VCake() external view returns (address); +} diff --git a/projects/vecake/contracts/interfaces/IDelegator.sol b/projects/vecake/contracts/interfaces/IDelegator.sol new file mode 100644 index 00000000..7afbd877 --- /dev/null +++ b/projects/vecake/contracts/interfaces/IDelegator.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IDelegator { + /// @notice Delegate in delegator smart contract. + /// @param user The user address + /// @param amount The delegated cake amount + /// @param lockEndTime The lock end time in cake pool. + function delegate( + address user, + uint256 amount, + uint256 lockEndTime + ) external; +} diff --git a/projects/vecake/contracts/interfaces/IFarmBooster.sol b/projects/vecake/contracts/interfaces/IFarmBooster.sol new file mode 100644 index 00000000..ff373f24 --- /dev/null +++ b/projects/vecake/contracts/interfaces/IFarmBooster.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IFarmBooster { + // uint256 public constant ACTION_DEPOSIT_FOR = 0; + // uint256 public constant ACTION_CREATE_LOCK = 1; + // uint256 public constant ACTION_INCREASE_LOCK_AMOUNT = 2; + // uint256 public constant ACTION_INCREASE_UNLOCK_TIME = 3; + + /// @notice function to perform deposit and lock Cake for a user + /// @param _for The address to be locked and received VECake + /// @param _amount The amount to deposit + /// @param _unlockTime New time to unlock Cake. Pass 0 if no change. + /// @param _prevLockedAmount Existed locks[_for].amount + /// @param _prevLockedEnd Existed locks[_for].end + /// @param _actionType The action that user did as this internal function shared among + /// @param _isCakePoolUser This user is cake pool user or not + /// several external functions + function depositFor( + address _for, + uint256 _amount, + uint256 _unlockTime, + int128 _prevLockedAmount, + uint256 _prevLockedEnd, + uint256 _actionType, + bool _isCakePoolUser + ) external; + + /// @notice function to perform withdraw and unlock Cake for a user + /// @param _user The address to be unlocked + /// @param _prevLockedAmount Existed locks[_user].amount + /// @param _prevLockedEnd Existed locks[_user].end + /// @param _withdrawAmount Cake amount + function unlock( + address _user, + int128 _prevLockedAmount, + uint256 _prevLockedEnd, + uint256 _withdrawAmount + ) external; +} diff --git a/projects/vecake/contracts/interfaces/IProxyForCakePool.sol b/projects/vecake/contracts/interfaces/IProxyForCakePool.sol new file mode 100644 index 00000000..97c5f8ff --- /dev/null +++ b/projects/vecake/contracts/interfaces/IProxyForCakePool.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IProxyForCakePool { + function createLockForProxy(uint256 _amount, uint256 _unlockTime) external; + + function withdrawAll() external; +} diff --git a/projects/vecake/contracts/interfaces/IProxyForCakePoolFactory.sol b/projects/vecake/contracts/interfaces/IProxyForCakePoolFactory.sol new file mode 100644 index 00000000..98c8a459 --- /dev/null +++ b/projects/vecake/contracts/interfaces/IProxyForCakePoolFactory.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +interface IProxyForCakePoolFactory { + function parameters() external view returns (address VECake, address user); + + /// @notice Deploy proxy for cake pool + /// @param _user: Cake pool user + /// @return proxy The proxy address + function deploy(address _user) external returns (address proxy); +} diff --git a/projects/vecake/contracts/interfaces/IVECake.sol b/projects/vecake/contracts/interfaces/IVECake.sol new file mode 100644 index 00000000..87cd51e0 --- /dev/null +++ b/projects/vecake/contracts/interfaces/IVECake.sol @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +struct Point { + int128 bias; // Voting weight + int128 slope; // Multiplier factor to get voting weight at a given time + uint256 timestamp; + uint256 blockNumber; +} + +interface IVECake { + /// @dev Cake pool deposit will trigger this + function deposit( + address _user, + uint256 _amount, + uint256 _lockDuration + ) external; + + /// @dev Cake pool withdraw will trigger this + function withdraw(address _user) external; + + /// @dev Return the max epoch of the given "_user" + function userPointEpoch(address _user) external view returns (uint256); + + /// @dev Return the max global epoch + function epoch() external view returns (uint256); + + /// @dev Return the recorded point for _user at specific _epoch + function userPointHistory(address _user, uint256 _epoch) external view returns (Point memory); + + /// @dev Return the recorded global point at specific _epoch + function pointHistory(uint256 _epoch) external view returns (Point memory); + + /// @dev Trigger global check point + function checkpoint() external; + + /// @notice Return the proxy balance of VECake at a given "_blockNumber" + /// @param _user The proxy owner address to get a balance of VECake + /// @param _blockNumber The speicific block number that you want to check the balance of VECake + function balanceOfAtForProxy(address _user, uint256 _blockNumber) external view returns (uint256); + + /// @notice Return the balance of VECake at a given "_blockNumber" + /// @param _user The address to get a balance of VECake + /// @param _blockNumber The speicific block number that you want to check the balance of VECake + function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256); + + /// @notice Return the voting weight of a givne user's proxy + /// @param _user The address of a user + function balanceOfForProxy(address _user) external view returns (uint256); + + /// @notice Return the voting weight of a givne user + /// @param _user The address of a user + function balanceOf(address _user) external view returns (uint256); + + /// @notice Migrate from cake pool. + function migrateFromCakePool() external; + + /// @notice Delegate from cake pool. + /// @dev this function will call one function in delegator smart contract, like this: DelegatorSC.delegate(address user, uint256 amount, uint256 endTime). + /// @param _delegator delegator address + function delegateFromCakePool(address _delegator) external; + + /// @notice Create a new lock. + /// @dev This will crate a new lock and deposit Cake to VECake Vault + /// @param _amount the amount that user wishes to deposit + /// @param _unlockTime the timestamp when Cake get unlocked, it will be + /// floored down to whole weeks + function createLock(uint256 _amount, uint256 _unlockTime) external; + + function createLockForProxy(uint256 _amount, uint256 _unlockTime) external; + + /// @notice Increase lock amount without increase "end" + /// @param _amount The amount of Cake to be added to the lock + function increaseLockAmount(uint256 _amount) external; + + /// @notice Increase unlock time without changing locked amount + /// @param _newUnlockTime The new unlock time to be updated + function increaseUnlockTime(uint256 _newUnlockTime) external; + + /// @notice Withdraw all Cake when lock has expired + /// @param _to The address which will receive the cake + function withdrawAll(address _to) external; + + /// @notice Early withdraw Cake with penalty. + /// @param _to The address which will receive the cake + /// @param _amount Cake amount + function earlyWithdraw(address _to, uint256 _amount) external; + + /// @notice Emergency withdraw Cake. + /// @dev Under any circumstances, it is guaranteed that the user’s assets will not be locked + function emergencyWithdraw() external; +} diff --git a/projects/vecake/contracts/libraries/SafeCast.sol b/projects/vecake/contracts/libraries/SafeCast.sol new file mode 100644 index 00000000..bffc131f --- /dev/null +++ b/projects/vecake/contracts/libraries/SafeCast.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow + * checks. + * + * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can + * easily result in undesired exploitation or bugs, since developers usually + * assume that overflows raise errors. `SafeCast` restores this intuition by + * reverting the transaction when such 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. + * + * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing + * all math on `uint256` and `int256` and then downcasting. + */ +library SafeCast { + /** + * @dev Converts a signed int256 into an unsigned uint256. + * + * Requirements: + * + * - input must be greater than or equal to 0. + */ + function toUint256(int256 value) internal pure returns (uint256) { + require(value >= 0, "SafeCast: value must be positive"); + return uint256(value); + } + + /** + * @dev Returns the downcasted int128 from int256, reverting on + * overflow (when the input is less than smallest int128 or + * greater than largest int128). + * + * Counterpart to Solidity's `int128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + * + * _Available since v3.1._ + */ + function toInt128(int256 value) internal pure returns (int128) { + require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits"); + return int128(value); + } +} diff --git a/projects/vecake/contracts/test/Delegator.sol b/projects/vecake/contracts/test/Delegator.sol new file mode 100644 index 00000000..78a4a063 --- /dev/null +++ b/projects/vecake/contracts/test/Delegator.sol @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "../interfaces/IVECake.sol"; + +contract Delegator is ERC20 { + using SafeERC20 for IERC20; + + IERC20 public immutable token; + IVECake public immutable VECake; + + /** + * @notice Constructor + * @param _VECake: VECake contract + * @param _token: Cake Token contract + */ + constructor(IVECake _VECake, IERC20 _token) ERC20("VECake Delegator Token", "VDT") { + VECake = _VECake; + token = _token; + token.safeApprove(address(_VECake), type(uint256).max); + } + + function createLock(uint256 _amount, uint256 _unlockTime) external { + token.safeTransferFrom(msg.sender, address(this), _amount); + VECake.createLock(_amount, _unlockTime); + } + + function withdrawAll(address _to) external { + VECake.withdrawAll(_to); + } + + function earlyWithdraw(address _to, uint256 _amount) external { + VECake.earlyWithdraw(_to, _amount); + } + + function increaseLockAmount(uint256 _amount) external { + token.safeTransferFrom(msg.sender, address(this), _amount); + VECake.increaseLockAmount(_amount); + } + + function increaseUnlockTime(uint256 _newUnlockTime) external { + VECake.increaseUnlockTime(_newUnlockTime); + } + + function emergencyWithdraw() external { + VECake.emergencyWithdraw(); + } + + /// @notice Delegate in delegator smart contract. + /// @param user The user address + /// @param amount The delegated cake amount + /// @param lockEndTime The lock end time in cake pool. + function delegate( + address user, + uint256 amount, + uint256 lockEndTime + ) external { + _mint(user, amount); + } +} diff --git a/projects/vecake/contracts/test/VECakeTest.sol b/projects/vecake/contracts/test/VECakeTest.sol new file mode 100644 index 00000000..1f9ab94a --- /dev/null +++ b/projects/vecake/contracts/test/VECakeTest.sol @@ -0,0 +1,1216 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.10; + +import "@openzeppelin-4.5.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin-4.5.0/contracts/access/Ownable.sol"; +import "@openzeppelin-4.5.0/contracts/security/ReentrancyGuard.sol"; +import "../libraries/SafeCast.sol"; +import "../interfaces/ICakePool.sol"; +import "../interfaces/IProxyForCakePoolFactory.sol"; +import "../interfaces/IProxyForCakePool.sol"; +import "../interfaces/IDelegator.sol"; +import "../interfaces/IFarmBooster.sol"; + +contract VECakeTest is Ownable, ReentrancyGuard { + using SafeERC20 for IERC20; + + // --- Events --- + event Deposit(address indexed locker, uint256 value, uint256 indexed lockTime, uint256 lockType, uint256 timestamp); + event WithdrawAll(address indexed locker, address indexed to, uint256 value, uint256 timestamp); + event EarlyWithdraw(address indexed locker, address indexed to, uint256 value, uint256 penalty, uint256 timestamp); + event SetBreaker(uint256 previousBreaker, uint256 breaker); + event Supply(uint256 previousSupply, uint256 supply); + event SetEarlyWithdrawConfig( + address indexed caller, + uint64 oldEarlyWithdrawFeeBps, + uint64 newEarlyWithdrawFeeBps, + uint64 oldRedistributeBps, + uint64 newRedistribiteBps, + address oldTreasuryAddr, + address newTreasuryAddr, + address oldRedistributeAddr, + address newRedistributeAddr + ); + event Redistribute(address indexed caller, address destination, uint256 amount); + event SetWhitelistedCaller(address indexed caller, address indexed addr, bool ok); + event SetWhitelistedRedistributors(address indexed caller, address indexed addr, bool ok); + event MigrateFromCakePool(address indexed user, address indexed proxy, uint256 amount, uint256 endTime); + event DelegateFromCakePool(address indexed user, address indexed delegator, uint256 amount, uint256 endTime); + event MigrationConvertToDelegation( + address indexed user, + address indexed delegator, + uint256 amount, + uint256 endTime + ); + event UpdateDelegator(address indexed delegator, bool isDelegator, uint40 limitTimestampForEarlyWithdraw); + event InjectToDelegator(address indexed user, address indexed delegator, uint256 amount); + event SetLimitTimeOfConvert(address indexed user, uint256 newValue); + event SetEarlyWithdrawSwitch(address indexed user, bool newValue); + event SetNoPenaltyForEarlyWithdraw(address indexed owner, address indexed user, bool indexed newValue); + event SetEmergencyWithdrawSwitch(address indexed user, bool newValue); + event EmergencyWithdraw(address indexed user, uint256 amount); + event NewFarmBooster(address indexed farmBooster); + + struct Point { + int128 bias; // Voting weight + int128 slope; // Multiplier factor to get voting weight at a given time + uint256 timestamp; + uint256 blockNumber; + } + + struct LockedBalance { + int128 amount; + uint256 end; + } + + struct UserInfo { + address cakePoolProxy; // Proxy Smart Contract for users who had locked in cake pool. + uint128 cakeAmount; // Cake amount locked in cake pool. + uint48 lockEndTime; // Record the lockEndTime in cake pool. + uint48 migrationTime; // Record the migration time. + uint16 cakePoolType; // 1: Migration, 2: Delegation. + uint16 withdrawFlag; // 0: Not withdraw, 1 : withdrew. + } + + // When user delegated their locked cake to delegator from cake pool, the locked cake will permanently locked in the cake pool, which is equivalent to burn it. + // And pancake team will inject cake to the delegator from the burning part which was originally intended to be burned in the future. + struct Delegator { + uint104 delegatedCakeAmount; // The total cake amount delegated from cake pool. + uint104 notInjectedCakeAmount; // The cake amount which pancake have not injected to the delegator. + uint40 limitTimestampForEarlyWithdraw; // Delegator can not call earlyWithdraw before limit timestamp. + uint8 isDelegator; // 0: Not delegator , 1: Delegator + } + + // --- Constants --- + uint16 public constant MIGRATION_FROM_CAKE_POOL_FLAG = 1; + uint16 public constant DELEGATION_FROM_CAKE_POOL_FLAG = 2; + uint16 public constant NOT_WITHDRAW_FLAG = 0; + uint16 public constant WITHDREW_FLAG = 1; + uint8 public constant NOT_DELEGATOR_FLAG = 0; + uint8 public constant DELEGATOR_FLAG = 1; + + uint256 public constant ACTION_DEPOSIT_FOR = 0; + uint256 public constant ACTION_CREATE_LOCK = 1; + uint256 public constant ACTION_INCREASE_LOCK_AMOUNT = 2; + uint256 public constant ACTION_INCREASE_UNLOCK_TIME = 3; + + uint256 public constant WEEK = 7 days; + // MAX_LOCK 209 weeks - 1 seconds + uint256 public constant MAX_LOCK = (209 * WEEK) - 1; + uint256 public constant MULTIPLIER = 10**18; + + // Token to be locked (Cake) + IERC20 public immutable token; + // Total supply of Cake that get locked + uint256 public supply; + + ICakePool public immutable CakePool; + + IProxyForCakePoolFactory public immutable ProxyForCakePoolFactory; + + IFarmBooster public FarmBooster; + + // Cake pool migation initialization flag + bool public initialization; + + // The limit time for migration convert to delegation, default is 2 weeks + uint256 public limitTimeOfConvert = 2 weeks; + + // Allow to emergency withdraw or not + bool public emergencyWithdrawSwitch; + + // Record whether user had used emergencyWithdraw + mapping(address => bool) public everEmergencyWithdraw; + + // Mapping (user => LockedBalance) to keep locking information for each user + mapping(address => LockedBalance) public locks; + + // Mapping (user => UserInfo) to keep cake pool related information for each user + mapping(address => UserInfo) public userInfo; + + // Mapping (address => Delegator) to keep delegator related information + mapping(address => Delegator) public delegator; + + // Mapping (user => Bool) to check whether this user is cake pool proxy smart contract + mapping(address => bool) public isCakePoolProxy; + + // Mapping (user => Bool) to check whether this user will have penalty for ealy withdraw + mapping(address => bool) public noPenaltyForEarlyWithdraw; + + // A global point of time. + uint256 public epoch; + // An array of points (global). + Point[] public pointHistory; + // Mapping (user => Point) to keep track of user point of a given epoch (index of Point is epoch) + mapping(address => Point[]) public userPointHistory; + // Mapping (user => epoch) to keep track which epoch user at + mapping(address => uint256) public userPointEpoch; + // Mapping (round off timestamp to week => slopeDelta) to keep track slope changes over epoch + mapping(uint256 => int128) public slopeChanges; + + // Circuit breaker + uint256 public breaker; + + string public name; + string public symbol; + uint8 public decimals; + + // --- Early Withdrawal Configs --- + uint64 public earlyWithdrawBpsPerWeek; + uint64 public redistributeBps; + uint256 public accumRedistribute; + address public treasuryAddr; + address public redistributeAddr; + + // Allow to early withdraw or not + bool public earlyWithdrawSwitch; + + // --- whitelist address --- + mapping(address => bool) public whitelistedCallers; + mapping(address => bool) public whitelistedRedistributors; + + modifier onlyRedistributors() { + require(whitelistedRedistributors[msg.sender], "! wl redistributors"); + _; + } + + modifier onlyEOAorWhitelisted() { + if (!whitelistedCallers[msg.sender]) { + require(msg.sender == tx.origin, "! eoa or wl"); + } + _; + } + + modifier onlyCakePool() { + require(msg.sender == address(CakePool), "! cake pool"); + _; + } + + /** + * @notice Constructor + * @param _cakePool: Cake Pool contract + * @param _token: Cake Token contract + * @param _ProxyForCakePoolFactory The cake pool proxy factory + */ + constructor( + ICakePool _cakePool, + IERC20 _token, + IProxyForCakePoolFactory _ProxyForCakePoolFactory + ) { + CakePool = _cakePool; + token = _token; + ProxyForCakePoolFactory = _ProxyForCakePoolFactory; + + pointHistory.push(Point({bias: 0, slope: 0, timestamp: block.timestamp, blockNumber: block.number})); + + decimals = 18; + + name = "Vote-escrowed Cake"; + symbol = "veCake"; + } + + /// @notice Initialize for cake pool migration + /// @dev Need to check whether cake pool conditions are met + function initializeCakePoolMigration() external onlyOwner { + require(!initialization, "Already initialized"); + address VCakeInCakePool = CakePool.VCake(); + require(VCakeInCakePool == address(this), "Bad VCake"); + initialization = true; + } + + /// @notice Return user information include LockedBalance and UserInfo + /// @param _user The user address + /// @return amount The user lock amount + /// @return end The user lock end time + /// @return cakePoolProxy Proxy Smart Contract for users who had locked in cake pool + /// @return cakeAmount Cake amount locked in cake pool + /// @return lockEndTime Record the lockEndTime in cake pool + /// @return migrationTime Record the migration time + /// @return cakePoolType 1: Migration, 2: Delegation + /// @return withdrawFlag 0: Not withdraw, 1 : withdrew + function getUserInfo(address _user) + external + view + returns ( + int128 amount, + uint256 end, + address cakePoolProxy, + uint128 cakeAmount, + uint48 lockEndTime, + uint48 migrationTime, + uint16 cakePoolType, + uint16 withdrawFlag + ) + { + LockedBalance memory lock = locks[_user]; + UserInfo memory user = userInfo[_user]; + amount = lock.amount; + end = lock.end; + cakePoolProxy = user.cakePoolProxy; + cakeAmount = user.cakeAmount; + lockEndTime = user.lockEndTime; + migrationTime = user.migrationTime; + cakePoolType = user.cakePoolType; + withdrawFlag = user.withdrawFlag; + } + + /// @notice Return the proxy balance of VECake at a given "_blockNumber" + /// @param _user The proxy owner address to get a balance of VECake + /// @param _blockNumber The speicific block number that you want to check the balance of VECake + function balanceOfAtForProxy(address _user, uint256 _blockNumber) external view returns (uint256) { + require(_blockNumber <= block.number, "bad _blockNumber"); + UserInfo memory user = userInfo[_user]; + if (user.cakePoolProxy != address(0)) { + return _balanceOfAt(user.cakePoolProxy, _blockNumber); + } + } + + /// @notice Return the balance of VECake at a given "_blockNumber" + /// @param _user The address to get a balance of VECake + /// @param _blockNumber The speicific block number that you want to check the balance of VECake + function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256) { + require(_blockNumber <= block.number, "bad _blockNumber"); + UserInfo memory user = userInfo[_user]; + if (user.cakePoolProxy != address(0)) { + return _balanceOfAt(_user, _blockNumber) + _balanceOfAt(user.cakePoolProxy, _blockNumber); + } else { + return _balanceOfAt(_user, _blockNumber); + } + } + + function balanceOfAtUser(address _user, uint256 _blockNumber) external view returns (uint256) { + return _balanceOfAt(_user, _blockNumber); + } + + function _balanceOfAt(address _user, uint256 _blockNumber) internal view returns (uint256) { + // Get most recent user Point to block + uint256 _userEpoch = _findUserBlockEpoch(_user, _blockNumber); + if (_userEpoch == 0) { + return 0; + } + Point memory _userPoint = userPointHistory[_user][_userEpoch]; + + // Get most recent global point to block + uint256 _maxEpoch = epoch; + uint256 _epoch = _findBlockEpoch(_blockNumber, _maxEpoch); + Point memory _point0 = pointHistory[_epoch]; + + uint256 _blockDelta = 0; + uint256 _timeDelta = 0; + if (_epoch < _maxEpoch) { + Point memory _point1 = pointHistory[_epoch + 1]; + _blockDelta = _point1.blockNumber - _point0.blockNumber; + _timeDelta = _point1.timestamp - _point0.timestamp; + } else { + _blockDelta = block.number - _point0.blockNumber; + _timeDelta = block.timestamp - _point0.timestamp; + } + uint256 _blockTime = _point0.timestamp; + if (_blockDelta != 0) { + _blockTime += (_timeDelta * (_blockNumber - _point0.blockNumber)) / _blockDelta; + } + + _userPoint.bias -= (_userPoint.slope * SafeCast.toInt128(int256(_blockTime - _userPoint.timestamp))); + + if (_userPoint.bias < 0) { + return 0; + } + + return SafeCast.toUint256(_userPoint.bias); + } + + /// @notice Return the voting weight of a givne user's proxy + /// @param _user The address of a user + function balanceOfForProxy(address _user) external view returns (uint256) { + UserInfo memory user = userInfo[_user]; + if (user.cakePoolProxy != address(0)) { + return _balanceOf(user.cakePoolProxy, block.timestamp); + } + } + + /// @notice Return the voting weight of a givne user + /// @param _user The address of a user + function balanceOf(address _user) external view returns (uint256) { + UserInfo memory user = userInfo[_user]; + if (user.cakePoolProxy != address(0)) { + return _balanceOf(_user, block.timestamp) + _balanceOf(user.cakePoolProxy, block.timestamp); + } else { + return _balanceOf(_user, block.timestamp); + } + } + + function balanceOfUser(address _user) external view returns (uint256) { + return _balanceOf(_user, block.timestamp); + } + + function balanceOfAtTime(address _user, uint256 _timestamp) external view returns (uint256) { + return _balanceOf(_user, _timestamp); + } + + function _balanceOf(address _user, uint256 _timestamp) internal view returns (uint256) { + uint256 _epoch = userPointEpoch[_user]; + if (_epoch == 0) { + return 0; + } + Point memory _lastPoint = userPointHistory[_user][_epoch]; + _lastPoint.bias = + _lastPoint.bias - + (_lastPoint.slope * SafeCast.toInt128(int256(_timestamp - _lastPoint.timestamp))); + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + return SafeCast.toUint256(_lastPoint.bias); + } + + /// @notice Record global and per-user slope to checkpoint + /// @param _address User's wallet address. Only global if 0x0 + /// @param _prevLocked User's previous locked balance and end lock time + /// @param _newLocked User's new locked balance and end lock time + function _checkpoint( + address _address, + LockedBalance memory _prevLocked, + LockedBalance memory _newLocked + ) internal { + Point memory _userPrevPoint = Point({slope: 0, bias: 0, timestamp: 0, blockNumber: 0}); + Point memory _userNewPoint = Point({slope: 0, bias: 0, timestamp: 0, blockNumber: 0}); + + int128 _prevSlopeDelta = 0; + int128 _newSlopeDelta = 0; + uint256 _epoch = epoch; + + // if not 0x0, then update user's point + if (_address != address(0)) { + // Calculate slopes and biases according to linear decay graph + // slope = lockedAmount / MAX_LOCK => Get the slope of a linear decay graph + // bias = slope * (lockedEnd - currentTimestamp) => Get the voting weight at a given time + // Kept at zero when they have to + if (_prevLocked.end > block.timestamp && _prevLocked.amount > 0) { + // Calculate slope and bias for the prev point + _userPrevPoint.slope = _prevLocked.amount / SafeCast.toInt128(int256(MAX_LOCK)); + _userPrevPoint.bias = + _userPrevPoint.slope * + SafeCast.toInt128(int256(_prevLocked.end - block.timestamp)); + } + if (_newLocked.end > block.timestamp && _newLocked.amount > 0) { + // Calculate slope and bias for the new point + _userNewPoint.slope = _newLocked.amount / SafeCast.toInt128(int256(MAX_LOCK)); + _userNewPoint.bias = _userNewPoint.slope * SafeCast.toInt128(int256(_newLocked.end - block.timestamp)); + } + + // Handle user history here + // Do it here to prevent stack overflow + uint256 _userEpoch = userPointEpoch[_address]; + // If user never ever has any point history, push it here for him. + if (_userEpoch == 0) { + userPointHistory[_address].push(_userPrevPoint); + } + + // Shift user's epoch by 1 as we are writing a new point for a user + userPointEpoch[_address] = _userEpoch + 1; + + // Update timestamp & block number then push new point to user's history + _userNewPoint.timestamp = block.timestamp; + _userNewPoint.blockNumber = block.number; + userPointHistory[_address].push(_userNewPoint); + + // Read values of scheduled changes in the slope + // _prevLocked.end can be in the past and in the future + // _newLocked.end can ONLY be in the FUTURE unless everything expired (anything more than zeros) + _prevSlopeDelta = slopeChanges[_prevLocked.end]; + if (_newLocked.end != 0) { + // Handle when _newLocked.end != 0 + if (_newLocked.end == _prevLocked.end) { + // This will happen when user adjust lock but end remains the same + // Possibly when user deposited more Cake to his locker + _newSlopeDelta = _prevSlopeDelta; + } else { + // This will happen when user increase lock + _newSlopeDelta = slopeChanges[_newLocked.end]; + } + } + } + + // Handle global states here + Point memory _lastPoint = Point({bias: 0, slope: 0, timestamp: block.timestamp, blockNumber: block.number}); + if (_epoch > 0) { + // If _epoch > 0, then there is some history written + // Hence, _lastPoint should be pointHistory[_epoch] + // else _lastPoint should an empty point + _lastPoint = pointHistory[_epoch]; + } + // _lastCheckpoint => timestamp of the latest point + // if no history, _lastCheckpoint should be block.timestamp + // else _lastCheckpoint should be the timestamp of latest pointHistory + uint256 _lastCheckpoint = _lastPoint.timestamp; + + // initialLastPoint is used for extrapolation to calculate block number + // (approximately, for xxxAt methods) and save them + // as we cannot figure that out exactly from inside contract + Point memory _initialLastPoint = Point({ + bias: 0, + slope: 0, + timestamp: _lastPoint.timestamp, + blockNumber: _lastPoint.blockNumber + }); + + // If last point is already recorded in this block, _blockSlope=0 + // That is ok because we know the block in such case + uint256 _blockSlope = 0; + if (block.timestamp > _lastPoint.timestamp) { + // Recalculate _blockSlope if _lastPoint.timestamp < block.timestamp + // Possiblity when epoch = 0 or _blockSlope hasn't get updated in this block + _blockSlope = + (MULTIPLIER * (block.number - _lastPoint.blockNumber)) / + (block.timestamp - _lastPoint.timestamp); + } + + // Go over weeks to fill history and calculate what the current point is + uint256 _weekCursor = _timestampToFloorWeek(_lastCheckpoint); + for (uint256 i = 0; i < 255; i++) { + // This logic will works for 5 years, if more than that vote power will be broken 😟 + // Bump _weekCursor a week + _weekCursor = _weekCursor + WEEK; + int128 _slopeDelta = 0; + if (_weekCursor > block.timestamp) { + // If the given _weekCursor go beyond block.timestamp, + // We take block.timestamp as the cursor + _weekCursor = block.timestamp; + } else { + // If the given _weekCursor is behind block.timestamp + // We take _slopeDelta from the recorded slopeChanges + // We can use _weekCursor directly because key of slopeChanges is timestamp round off to week + _slopeDelta = slopeChanges[_weekCursor]; + } + // Calculate _biasDelta = _lastPoint.slope * (_weekCursor - _lastCheckpoint) + int128 _biasDelta = _lastPoint.slope * SafeCast.toInt128(int256((_weekCursor - _lastCheckpoint))); + _lastPoint.bias = _lastPoint.bias - _biasDelta; + _lastPoint.slope = _lastPoint.slope + _slopeDelta; + if (_lastPoint.bias < 0) { + // This can happen + _lastPoint.bias = 0; + } + if (_lastPoint.slope < 0) { + // This cannot happen, just make sure + _lastPoint.slope = 0; + } + // Update _lastPoint to the new one + _lastCheckpoint = _weekCursor; + _lastPoint.timestamp = _weekCursor; + // As we cannot figure that out block timestamp -> block number exactly + // when query states from xxxAt methods, we need to calculate block number + // based on _initalLastPoint + _lastPoint.blockNumber = + _initialLastPoint.blockNumber + + ((_blockSlope * ((_weekCursor - _initialLastPoint.timestamp))) / MULTIPLIER); + _epoch = _epoch + 1; + if (_weekCursor == block.timestamp) { + // Hard to be happened, but better handling this case too + _lastPoint.blockNumber = block.number; + break; + } else { + pointHistory.push(_lastPoint); + } + } + // Now, each week pointHistory has been filled until current timestamp (round off by week) + // Update epoch to be the latest state + epoch = _epoch; + + if (_address != address(0)) { + // If the last point was in the block, the slope change should have been applied already + // But in such case slope shall be 0 + _lastPoint.slope = _lastPoint.slope + _userNewPoint.slope - _userPrevPoint.slope; + _lastPoint.bias = _lastPoint.bias + _userNewPoint.bias - _userPrevPoint.bias; + if (_lastPoint.slope < 0) { + _lastPoint.slope = 0; + } + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + } + + // Record the new point to pointHistory + // This would be the latest point for global epoch + pointHistory.push(_lastPoint); + + if (_address != address(0)) { + // Schedule the slope changes (slope is going downward) + // We substract _newSlopeDelta from `_newLocked.end` + // and add _prevSlopeDelta to `_prevLocked.end` + if (_prevLocked.end > block.timestamp) { + // _prevSlopeDelta was - _userPrevPoint.slope, so we offset that first + _prevSlopeDelta = _prevSlopeDelta + _userPrevPoint.slope; + if (_newLocked.end == _prevLocked.end) { + // Handle the new deposit. Not increasing lock. + _prevSlopeDelta = _prevSlopeDelta - _userNewPoint.slope; + } + slopeChanges[_prevLocked.end] = _prevSlopeDelta; + } + if (_newLocked.end > block.timestamp) { + if (_newLocked.end > _prevLocked.end) { + // At this line, the old slope should gone + _newSlopeDelta = _newSlopeDelta - _userNewPoint.slope; + slopeChanges[_newLocked.end] = _newSlopeDelta; + } + } + } + } + + /// @notice Trigger global checkpoint + function checkpoint() external { + LockedBalance memory empty = LockedBalance({amount: 0, end: 0}); + _checkpoint(address(0), empty, empty); + } + + /// @notice Deposit in cake pool + /// @param _user user address + /// @param _amount: number of tokens to deposit (in CAKE) + /// @param _lockDuration: Token lock duration + function deposit( + address _user, + uint256 _amount, + uint256 _lockDuration + ) external onlyCakePool { + // Do not allow any user to deposit cake in cake pool now after migration initialized. + // will forbid any deposit operatioin + // revert(); + + // This is only for test , so users can lock in cake pool , then can migrate or delegate + UserInfo memory user = userInfo[_user]; + if (user.cakePoolType > 0) { + revert(); + } + } + + /// @notice Withdraw in cake pool + /// @param _user user address + function withdraw(address _user) external onlyCakePool { + UserInfo memory user = userInfo[_user]; + + // Users who had already delegated can not withdraw cake from cake pool + if (user.cakePoolType == DELEGATION_FROM_CAKE_POOL_FLAG) { + revert(); + } else if ( + user.cakePoolProxy != address(0) && + user.cakePoolType == MIGRATION_FROM_CAKE_POOL_FLAG && + user.withdrawFlag == NOT_WITHDRAW_FLAG + ) { + IProxyForCakePool(user.cakePoolProxy).withdrawAll(); + userInfo[_user].withdrawFlag = WITHDREW_FLAG; + } + } + + /// @notice Migrate from cake pool. + function migrateFromCakePool() external nonReentrant { + require(initialization, "! initialized"); + + (uint256 shares, , , , , uint256 lockEndTime, uint256 userBoostedShare, , ) = CakePool.userInfo(msg.sender); + + require(lockEndTime > block.timestamp, "Lock expired"); + + UserInfo storage user = userInfo[msg.sender]; + require(user.cakePoolType == 0, "Already migrated"); + + user.cakePoolType = MIGRATION_FROM_CAKE_POOL_FLAG; + uint256 totalShares = CakePool.totalShares(); + uint256 balanceOfCakePool = CakePool.balanceOf(); + // Subtract 1 is for precision round loss + uint256 lockedCakeAmount = (shares * balanceOfCakePool) / totalShares - userBoostedShare - 1; + // will lock by proxy smart contract + address proxy = ProxyForCakePoolFactory.deploy(msg.sender); + isCakePoolProxy[proxy] = true; + user.cakePoolProxy = proxy; + user.migrationTime = uint48(block.timestamp); + user.cakeAmount = uint128(lockedCakeAmount); + user.lockEndTime = uint48(lockEndTime); + + IProxyForCakePool(proxy).createLockForProxy(lockedCakeAmount, lockEndTime); + + emit MigrateFromCakePool(msg.sender, proxy, lockedCakeAmount, lockEndTime); + } + + /// @notice Delegate from cake pool. + /// @dev this function will call one function in delegator smart contract, DelegatorSC.delegate(address user, uint256 amount, uint256 endTime). + /// @param _delegator delegation address + function delegateFromCakePool(address _delegator) external nonReentrant { + require(initialization, "! initialized"); + + Delegator storage delegatorInfo = delegator[_delegator]; + require(delegatorInfo.isDelegator == DELEGATOR_FLAG, "! delegator"); + + (uint256 shares, , , , , uint256 lockEndTime, uint256 userBoostedShare, , ) = CakePool.userInfo(msg.sender); + + require(lockEndTime > block.timestamp, "Lock expired"); + + UserInfo storage user = userInfo[msg.sender]; + require(user.cakePoolType == 0, "Already migrated"); + + user.cakePoolType = DELEGATION_FROM_CAKE_POOL_FLAG; + + uint256 totalShares = CakePool.totalShares(); + uint256 balanceOfCakePool = CakePool.balanceOf(); + // Subtract 1 is for precision round loss + uint256 lockedCakeAmount = (shares * balanceOfCakePool) / totalShares - userBoostedShare - 1; + + user.lockEndTime = uint48(lockEndTime); + user.cakeAmount = uint128(lockedCakeAmount); + + // Increase amount for delegator + LockedBalance memory _lock = LockedBalance({amount: locks[_delegator].amount, end: locks[_delegator].end}); + require(lockedCakeAmount > 0, "Bad _amount"); + require(_lock.amount > 0, "No lock on delegator"); + require(_lock.end > block.timestamp, "Delegator lock expired"); + + _depositFor(_delegator, lockedCakeAmount, 0, _lock, ACTION_DEPOSIT_FOR, true); + + delegatorInfo.delegatedCakeAmount += uint104(lockedCakeAmount); + delegatorInfo.notInjectedCakeAmount += uint104(lockedCakeAmount); + + // Call delegate in delegator smart contract + IDelegator(_delegator).delegate(msg.sender, lockedCakeAmount, lockEndTime); + emit DelegateFromCakePool(msg.sender, _delegator, lockedCakeAmount, lockEndTime); + } + + /// @notice Migration convert to delegation. + /// @dev Migration users can delegate within a certain period after migrated. + /// @param _delegator delegation address + function migrationConvertToDelegation(address _delegator) external nonReentrant { + Delegator storage delegatorInfo = delegator[_delegator]; + require(delegatorInfo.isDelegator == DELEGATOR_FLAG, "! delegator"); + + UserInfo storage user = userInfo[msg.sender]; + uint256 _unlockTime = _timestampToFloorWeek(user.lockEndTime); + require(_unlockTime > block.timestamp, "User lock expired"); + require(user.migrationTime > block.timestamp - limitTimeOfConvert, "Too late"); + require(user.cakePoolType == MIGRATION_FROM_CAKE_POOL_FLAG, "! migrated"); + require(user.withdrawFlag == NOT_WITHDRAW_FLAG, "Already withdraw"); + + user.cakePoolType = DELEGATION_FROM_CAKE_POOL_FLAG; + + // Early withdraw all for proxy + LockedBalance memory lockOfProxy = locks[user.cakePoolProxy]; + uint256 _amount = SafeCast.toUint256(lockOfProxy.amount); + _unlock(user.cakePoolProxy, lockOfProxy, _amount); + + // Increase amount for delegator + LockedBalance memory _lock = LockedBalance({amount: locks[_delegator].amount, end: locks[_delegator].end}); + + require(_lock.amount > 0, "No lock on delegator"); + require(_lock.end > block.timestamp, "Delegator lock expired"); + + _depositFor(_delegator, user.cakeAmount, 0, _lock, ACTION_DEPOSIT_FOR, true); + + delegatorInfo.delegatedCakeAmount += uint104(user.cakeAmount); + delegatorInfo.notInjectedCakeAmount += uint104(user.cakeAmount); + + // Call delegate in delegator smart contract + IDelegator(_delegator).delegate(msg.sender, user.cakeAmount, user.lockEndTime); + emit DelegateFromCakePool(msg.sender, _delegator, user.cakeAmount, user.lockEndTime); + emit MigrationConvertToDelegation(msg.sender, _delegator, user.cakeAmount, user.lockEndTime); + } + + /// @notice Create a new lock. + /// @dev This will crate a new lock and deposit Cake to VECake Vault + /// @param _amount the amount that user wishes to deposit + /// @param _unlockTime the timestamp when Cake get unlocked, it will be + /// floored down to whole weeks + function createLock(uint256 _amount, uint256 _unlockTime) external onlyEOAorWhitelisted nonReentrant { + _createLock(_amount, _unlockTime); + } + + function createLockForProxy(uint256 _amount, uint256 _unlockTime) external { + require(isCakePoolProxy[msg.sender], "! proxy"); + _createLock(_amount, _unlockTime); + } + + function _createLock(uint256 _amount, uint256 _unlockTime) internal { + require(!everEmergencyWithdraw[msg.sender], "Already emergencyWithdraw"); + _unlockTime = _timestampToFloorWeek(_unlockTime); + LockedBalance memory _locked = locks[msg.sender]; + + require(_amount > 0, "Bad _amount"); + require(_locked.amount == 0, "Already locked"); + require(_unlockTime > block.timestamp, "_unlockTime too old"); + require(_unlockTime <= block.timestamp + MAX_LOCK, "_unlockTime too long"); + + _depositFor(msg.sender, _amount, _unlockTime, _locked, ACTION_CREATE_LOCK, isCakePoolProxy[msg.sender]); + } + + /// @notice Deposit `_amount` tokens for `_for` and add to `locks[_for]` + /// @dev This function is used for deposit to created lock. Not for extend locktime. + /// @param _for The address to do the deposit + /// @param _amount The amount that user wishes to deposit + function depositFor(address _for, uint256 _amount) external nonReentrant { + require(!isCakePoolProxy[_for], "Incorrect proxy"); + LockedBalance memory _lock = LockedBalance({amount: locks[_for].amount, end: locks[_for].end}); + + require(_amount > 0, "Bad _amount"); + require(_lock.amount > 0, "No lock found"); + require(_lock.end > block.timestamp, "Lock expired"); + + _depositFor(_for, _amount, 0, _lock, ACTION_DEPOSIT_FOR, false); + } + + /// @notice Internal function to perform deposit and lock Cake for a user + /// @param _for The address to be locked and received VECake + /// @param _amount The amount to deposit + /// @param _unlockTime New time to unlock Cake. Pass 0 if no change. + /// @param _prevLocked Existed locks[_for] + /// @param _actionType The action that user did as this internal function shared among + /// @param _isCakePoolUser This user is cake pool user or not + /// several external functions + function _depositFor( + address _for, + uint256 _amount, + uint256 _unlockTime, + LockedBalance memory _prevLocked, + uint256 _actionType, + bool _isCakePoolUser + ) internal { + // Initiate _supplyBefore & update supply + uint256 _supplyBefore = supply; + supply = _supplyBefore + _amount; + + // Store _prevLocked + LockedBalance memory _newLocked = LockedBalance({amount: _prevLocked.amount, end: _prevLocked.end}); + + // Adding new lock to existing lock, or if lock is expired + // - creating a new one + _newLocked.amount = _newLocked.amount + SafeCast.toInt128(int256(_amount)); + if (_unlockTime != 0) { + _newLocked.end = _unlockTime; + } + locks[_for] = _newLocked; + + // Handling checkpoint here + _checkpoint(_for, _prevLocked, _newLocked); + + // Cake pool user do not need to transfer cake + if (_amount != 0 && !_isCakePoolUser) { + token.safeTransferFrom(msg.sender, address(this), _amount); + } + + if (address(FarmBooster) != address(0)) { + FarmBooster.depositFor( + _for, + _amount, + _unlockTime, + _prevLocked.amount, + _prevLocked.end, + _actionType, + _isCakePoolUser + ); + } + + emit Deposit(_for, _amount, _newLocked.end, _actionType, block.timestamp); + emit Supply(_supplyBefore, supply); + } + + /// @notice Do Binary Search to find out block timestamp for block number + /// @param _blockNumber The block number to find timestamp + /// @param _maxEpoch No beyond this timestamp + function _findBlockEpoch(uint256 _blockNumber, uint256 _maxEpoch) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = _maxEpoch; + // Loop for 128 times -> enough for 128-bit numbers + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + if (pointHistory[_mid].blockNumber <= _blockNumber) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + /// @notice Do Binary Search to find the most recent user point history preceeding block + /// @param _user The address of user to find + /// @param _blockNumber Find the most recent point history before this block number + function _findUserBlockEpoch(address _user, uint256 _blockNumber) internal view returns (uint256) { + uint256 _min = 0; + uint256 _max = userPointEpoch[_user]; + for (uint256 i = 0; i < 128; i++) { + if (_min >= _max) { + break; + } + uint256 _mid = (_min + _max + 1) / 2; + if (userPointHistory[_user][_mid].blockNumber <= _blockNumber) { + _min = _mid; + } else { + _max = _mid - 1; + } + } + return _min; + } + + /// @notice Increase lock amount without increase "end" + /// @param _amount The amount of Cake to be added to the lock + function increaseLockAmount(uint256 _amount) external onlyEOAorWhitelisted nonReentrant { + LockedBalance memory _lock = LockedBalance({amount: locks[msg.sender].amount, end: locks[msg.sender].end}); + + require(_amount > 0, "Bad _amount"); + require(_lock.amount > 0, "No lock found"); + require(_lock.end > block.timestamp, "Lock expired"); + + _depositFor(msg.sender, _amount, 0, _lock, ACTION_INCREASE_LOCK_AMOUNT, false); + } + + /// @notice Increase unlock time without changing locked amount + /// @param _newUnlockTime The new unlock time to be updated + function increaseUnlockTime(uint256 _newUnlockTime) external onlyEOAorWhitelisted nonReentrant { + LockedBalance memory _lock = LockedBalance({amount: locks[msg.sender].amount, end: locks[msg.sender].end}); + _newUnlockTime = _timestampToFloorWeek(_newUnlockTime); + + require(_lock.amount > 0, "No lock found"); + require(_lock.end > block.timestamp, "Lock expired"); + require(_newUnlockTime > _lock.end, "_newUnlockTime too old"); + require(_newUnlockTime <= block.timestamp + MAX_LOCK, "_newUnlockTime too long"); + + _depositFor(msg.sender, 0, _newUnlockTime, _lock, ACTION_INCREASE_UNLOCK_TIME, false); + } + + /// @notice Round off random timestamp to week + /// @param _timestamp The timestamp to be rounded off + function _timestampToFloorWeek(uint256 _timestamp) internal pure returns (uint256) { + return (_timestamp / WEEK) * WEEK; + } + + /// @notice Calculate total supply of VECake (voting power) + function totalSupply() external view returns (uint256) { + return _totalSupplyAt(pointHistory[epoch], block.timestamp); + } + + /// @notice Calculate total supply of VECake (voting power) at at specific timestamp + /// @param _timestamp The specific timestamp to calculate totalSupply + function totalSupplyAtTime(uint256 _timestamp) external view returns (uint256) { + return _totalSupplyAt(pointHistory[epoch], _timestamp); + } + + /// @notice Calculate total supply of VECake at specific block + /// @param _blockNumber The specific block number to calculate totalSupply + function totalSupplyAt(uint256 _blockNumber) external view returns (uint256) { + require(_blockNumber <= block.number, "Bad _blockNumber"); + uint256 _epoch = epoch; + uint256 _targetEpoch = _findBlockEpoch(_blockNumber, _epoch); + + Point memory _point = pointHistory[_targetEpoch]; + uint256 _timeDelta = 0; + if (_targetEpoch < _epoch) { + Point memory _nextPoint = pointHistory[_targetEpoch + 1]; + if (_point.blockNumber != _nextPoint.blockNumber) { + _timeDelta = + ((_blockNumber - _point.blockNumber) * (_nextPoint.timestamp - _point.timestamp)) / + (_nextPoint.blockNumber - _point.blockNumber); + } + } else { + if (_point.blockNumber != block.number) { + _timeDelta = + ((_blockNumber - _point.blockNumber) * (block.timestamp - _point.timestamp)) / + (block.number - _point.blockNumber); + } + } + + return _totalSupplyAt(_point, _point.timestamp + _timeDelta); + } + + /// @notice Calculate total supply of VECake (voting power) at some point in the past + /// @param _point The point to start to search from + /// @param _timestamp The timestamp to calculate the total voting power at + function _totalSupplyAt(Point memory _point, uint256 _timestamp) internal view returns (uint256) { + Point memory _lastPoint = _point; + uint256 _weekCursor = _timestampToFloorWeek(_point.timestamp); + // Iterate through weeks to take slopChanges into the account + for (uint256 i = 0; i < 255; i++) { + _weekCursor = _weekCursor + WEEK; + int128 _slopeDelta = 0; + if (_weekCursor > _timestamp) { + // If _weekCursor goes beyond _timestamp -> leave _slopeDelta + // to be 0 as there is no more slopeChanges + _weekCursor = _timestamp; + } else { + // If _weekCursor still behind _timestamp, then _slopeDelta + // should be taken into the account. + _slopeDelta = slopeChanges[_weekCursor]; + } + // Update bias at _weekCursor + _lastPoint.bias = + _lastPoint.bias - + (_lastPoint.slope * SafeCast.toInt128(int256(_weekCursor - _lastPoint.timestamp))); + if (_weekCursor == _timestamp) { + break; + } + // Update slope and timestamp + _lastPoint.slope = _lastPoint.slope + _slopeDelta; + _lastPoint.timestamp = _weekCursor; + } + + if (_lastPoint.bias < 0) { + _lastPoint.bias = 0; + } + + return SafeCast.toUint256(_lastPoint.bias); + } + + /// @notice Set breaker + /// @param _breaker The new value of breaker 0 if off, 1 if on + function setBreaker(uint256 _breaker) external onlyOwner { + require(_breaker == 0 || _breaker == 1, "Only 0 or 1"); + uint256 _previousBreaker = breaker; + breaker = _breaker; + emit SetBreaker(_previousBreaker, breaker); + } + + /// @notice Withdraw all Cake when lock has expired. + /// @param _to The address which will receive the cake + function withdrawAll(address _to) external nonReentrant { + Delegator memory delegatorInfo = delegator[msg.sender]; + require(delegatorInfo.notInjectedCakeAmount == 0, "Insufficient injection for delegator"); + + LockedBalance memory _lock = locks[msg.sender]; + if (breaker == 0) require(block.timestamp >= _lock.end, "Lock not expired"); + + if (_to == address(0)) { + _to = msg.sender; + } + + uint256 _amount = SafeCast.toUint256(_lock.amount); + + _unlock(msg.sender, _lock, _amount); + + // Cake pool proxy do not need to transfer cake. + if (!isCakePoolProxy[msg.sender]) token.safeTransfer(_to, _amount); + + emit WithdrawAll(msg.sender, _to, _amount, block.timestamp); + } + + /// @notice Early withdraw Cake with penalty. + /// @param _to The address which will receive the cake + /// @param _amount Cake amount + function earlyWithdraw(address _to, uint256 _amount) external nonReentrant { + require(earlyWithdrawSwitch, "Forbid"); + + if (_to == address(0)) { + _to = msg.sender; + } + + LockedBalance memory _lock = locks[msg.sender]; + + require(_amount > 0, "Bad _amount"); + require(block.timestamp < _lock.end, "Too late"); + require(breaker == 0, "Forbid"); + + Delegator memory delegatorInfo = delegator[msg.sender]; + if (delegatorInfo.isDelegator == DELEGATOR_FLAG) { + require(delegatorInfo.limitTimestampForEarlyWithdraw < block.timestamp, "Forbid earlyWithdraw"); + uint256 lockedAmount = SafeCast.toUint256(_lock.amount); + require(lockedAmount - _amount >= delegatorInfo.notInjectedCakeAmount, "Delegator balance exceeded"); + } + + // prevent mutated memory in _unlock() function as it will be used in fee calculation afterward + uint256 _prevLockEnd = _lock.end; + _unlock(msg.sender, _lock, _amount); + + uint256 _penalty; + + if (!noPenaltyForEarlyWithdraw[msg.sender] && earlyWithdrawBpsPerWeek > 0) { + // ceil the week by adding 1 week first + uint256 remainingWeeks = (_prevLockEnd + WEEK - block.timestamp) / WEEK; + + // calculate penalty + _penalty = (earlyWithdrawBpsPerWeek * remainingWeeks * _amount) / 10000; + + // split penalty into two parts + uint256 _redistribute = (_penalty * redistributeBps) / 10000; + // accumulate cake for redistribution + accumRedistribute += _redistribute; + + // transfer one part of the penalty to treasury + token.safeTransfer(treasuryAddr, _penalty - _redistribute); + } + + // transfer remaining back to owner + token.safeTransfer(_to, _amount - _penalty); + + emit EarlyWithdraw(msg.sender, _to, _amount, _penalty, block.timestamp); + } + + /// @notice Emergency withdraw Cake. + /// @dev Under any circumstances, it is guaranteed that the user’s assets will not be locked + function emergencyWithdraw() external nonReentrant { + require(emergencyWithdrawSwitch, "Forbid emergency withdraw"); + require(!everEmergencyWithdraw[msg.sender], "Already emergencyWithdraw"); + everEmergencyWithdraw[msg.sender] = true; + + LockedBalance memory _lock = locks[msg.sender]; + + require(_lock.amount > 0, "No locked amount"); + + uint256 amount = SafeCast.toUint256(_lock.amount); + // clear user data + delete locks[msg.sender]; + delete userPointHistory[msg.sender]; + delete userPointEpoch[msg.sender]; + + // transfer remaining back to owner + token.safeTransfer(msg.sender, amount); + + emit EmergencyWithdraw(msg.sender, amount); + } + + function redistribute() external onlyRedistributors nonReentrant { + uint256 _amount = accumRedistribute; + + accumRedistribute = 0; + + token.safeTransfer(redistributeAddr, _amount); + + emit Redistribute(msg.sender, redistributeAddr, _amount); + } + + function _unlock( + address _user, + LockedBalance memory _lock, + uint256 _withdrawAmount + ) internal { + // Cast here for readability + uint256 _lockedAmount = SafeCast.toUint256(_lock.amount); + require(_withdrawAmount <= _lockedAmount, "Amount too large"); + + LockedBalance memory _prevLock = LockedBalance({end: _lock.end, amount: _lock.amount}); + //_lock.end should remain the same if we do partially withdraw + _lock.end = _lockedAmount == _withdrawAmount ? 0 : _lock.end; + _lock.amount = SafeCast.toInt128(int256(_lockedAmount - _withdrawAmount)); + locks[_user] = _lock; + + uint256 _supplyBefore = supply; + supply = _supplyBefore - _withdrawAmount; + + // _prevLock can have either block.timstamp >= _lock.end or zero end + // _lock has only 0 end + // Both can have >= 0 amount + _checkpoint(_user, _prevLock, _lock); + + if (address(FarmBooster) != address(0)) { + FarmBooster.unlock(_user, _prevLock.amount, _prevLock.end, _withdrawAmount); + } + emit Supply(_supplyBefore, supply); + } + + function setEarlyWithdrawConfig( + uint64 _newEarlyWithdrawBpsPerWeek, + uint64 _newRedistributeBps, + address _newTreasuryAddr, + address _newRedistributeAddr + ) external onlyOwner { + // Maximum early withdraw fee per week bps = 100% / 52 week = 1.923%) + require(_newEarlyWithdrawBpsPerWeek <= 192, "Fee too high"); + // Maximum redistributeBps = 10000 (100%) + require(_newRedistributeBps <= 10000, "bps too high"); + + uint64 _oldEarlyWithdrawBpsPerWeek = earlyWithdrawBpsPerWeek; + earlyWithdrawBpsPerWeek = _newEarlyWithdrawBpsPerWeek; + + uint64 _oldRedistributeBps = redistributeBps; + redistributeBps = _newRedistributeBps; + + address _oldTreasuryAddr = treasuryAddr; + treasuryAddr = _newTreasuryAddr; + address _oldRedistributeAddr = redistributeAddr; + redistributeAddr = _newRedistributeAddr; + + emit SetEarlyWithdrawConfig( + msg.sender, + _oldEarlyWithdrawBpsPerWeek, + _newEarlyWithdrawBpsPerWeek, + _oldRedistributeBps, + _newRedistributeBps, + _oldTreasuryAddr, + _newTreasuryAddr, + _oldRedistributeAddr, + _newRedistributeAddr + ); + } + + function setWhitelistedCallers(address[] calldata callers, bool ok) external onlyOwner { + for (uint256 idx = 0; idx < callers.length; idx++) { + whitelistedCallers[callers[idx]] = ok; + emit SetWhitelistedCaller(_msgSender(), callers[idx], ok); + } + } + + function setWhitelistedRedistributors(address[] calldata callers, bool ok) external onlyOwner { + for (uint256 idx = 0; idx < callers.length; idx++) { + whitelistedRedistributors[callers[idx]] = ok; + emit SetWhitelistedRedistributors(_msgSender(), callers[idx], ok); + } + } + + /// @notice Update delegator + /// @param _delegator The delegator address + /// @param _isDelegator Is delegator or not + /// @param _limitTimestampForEarlyWithdraw Delegator can not call earlyWithdraw before limit time. + function updateDelegator( + address _delegator, + bool _isDelegator, + uint40 _limitTimestampForEarlyWithdraw + ) external onlyOwner { + Delegator storage delegatorInfo = delegator[_delegator]; + delegatorInfo.isDelegator = _isDelegator ? DELEGATOR_FLAG : NOT_DELEGATOR_FLAG; + delegatorInfo.limitTimestampForEarlyWithdraw = _limitTimestampForEarlyWithdraw; + emit UpdateDelegator(_delegator, _isDelegator, _limitTimestampForEarlyWithdraw); + } + + /// @notice Set limitTimeOfConvert + /// @param _limitTime The limit time + function setLimitTimeOfConvert(uint256 _limitTime) external onlyOwner { + limitTimeOfConvert = _limitTime; + emit SetLimitTimeOfConvert(msg.sender, _limitTime); + } + + /// @notice Set ealy withdraw switch + /// @param _earlyWithdrawSwitch early withdraw switch + function setEarlyWithdrawSwitch(bool _earlyWithdrawSwitch) external onlyOwner { + earlyWithdrawSwitch = _earlyWithdrawSwitch; + emit SetEarlyWithdrawSwitch(msg.sender, _earlyWithdrawSwitch); + } + + /// @notice Set emergency withdraw switch + /// @param _emergencyWithdrawSwitch early withdraw switch + function setEmergencyWithdrawSwitch(bool _emergencyWithdrawSwitch) external onlyOwner { + emergencyWithdrawSwitch = _emergencyWithdrawSwitch; + emit SetEmergencyWithdrawSwitch(msg.sender, _emergencyWithdrawSwitch); + } + + /// @notice Set no penalty early withdraw user + /// @param _user no penalty early withdraw user + /// @param _status no penalty or not + function setNoPenaltyForEarlyWithdraw(address _user, bool _status) external onlyOwner { + noPenaltyForEarlyWithdraw[_user] = _status; + emit SetNoPenaltyForEarlyWithdraw(msg.sender, _user, _status); + } + + /// @notice Inject cake for delegator + /// @param _delegator The delegator address + /// @param _amount Cake amount + function injectToDelegator(address _delegator, uint256 _amount) external onlyOwner { + Delegator storage delegatorInfo = delegator[_delegator]; + require(delegatorInfo.isDelegator == DELEGATOR_FLAG, "! delegator"); + if (_amount > delegatorInfo.notInjectedCakeAmount) { + _amount = delegatorInfo.notInjectedCakeAmount; + } + delegatorInfo.notInjectedCakeAmount -= uint104(_amount); + token.safeTransferFrom(msg.sender, address(this), _amount); + emit InjectToDelegator(msg.sender, _delegator, _amount); + } + + /// @notice Set farm booster Contract address + /// @param _farmBooster The farm booster Contract address + function setFarmBooster(address _farmBooster) external onlyOwner { + require(_farmBooster != address(0), "Cannot be zero address"); + FarmBooster = IFarmBooster(_farmBooster); + emit NewFarmBooster(_farmBooster); + } +} diff --git a/projects/vecake/docs/ProxyForCakePool.md b/projects/vecake/docs/ProxyForCakePool.md new file mode 100644 index 00000000..e2253086 --- /dev/null +++ b/projects/vecake/docs/ProxyForCakePool.md @@ -0,0 +1,42 @@ +# Solidity API + +## ProxyForCakePool + +### VECake + +```solidity +contract IVECake VECake +``` + +### cakePoolUser + +```solidity +address cakePoolUser +``` + +### onlyVECake + +```solidity +modifier onlyVECake() +``` + +### constructor + +```solidity +constructor() public +``` + +Constructor + +### createLockForProxy + +```solidity +function createLockForProxy(uint256 _amount, uint256 _unlockTime) external +``` + +### withdrawAll + +```solidity +function withdrawAll() external +``` + diff --git a/projects/vecake/docs/ProxyForCakePoolFactory.md b/projects/vecake/docs/ProxyForCakePoolFactory.md new file mode 100644 index 00000000..558e71dc --- /dev/null +++ b/projects/vecake/docs/ProxyForCakePoolFactory.md @@ -0,0 +1,85 @@ +# Solidity API + +## ProxyForCakePoolFactory + +### Parameters + +```solidity +struct Parameters { + address VECake; + address user; +} +``` + +### parameters + +```solidity +struct ProxyForCakePoolFactory.Parameters parameters +``` + +### VECake + +```solidity +address VECake +``` + +### initialization + +```solidity +bool initialization +``` + +### NewProxy + +```solidity +event NewProxy(address proxy, address user) +``` + +### onlyVECake + +```solidity +modifier onlyVECake() +``` + +### constructor + +```solidity +constructor() public +``` + +Constructor + +### initialize + +```solidity +function initialize(address _VECake) external +``` + +Initialize + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _VECake | address | | + +### deploy + +```solidity +function deploy(address _user) external returns (address proxy) +``` + +Deploy proxy for cake pool + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| proxy | address | The proxy address | + diff --git a/projects/vecake/docs/VECake.md b/projects/vecake/docs/VECake.md new file mode 100644 index 00000000..29acc232 --- /dev/null +++ b/projects/vecake/docs/VECake.md @@ -0,0 +1,1058 @@ +# Solidity API + +## VECake + +### Deposit + +```solidity +event Deposit(address locker, uint256 value, uint256 lockTime, uint256 lockType, uint256 timestamp) +``` + +### WithdrawAll + +```solidity +event WithdrawAll(address locker, address to, uint256 value, uint256 timestamp) +``` + +### EarlyWithdraw + +```solidity +event EarlyWithdraw(address locker, address to, uint256 value, uint256 penalty, uint256 timestamp) +``` + +### SetBreaker + +```solidity +event SetBreaker(uint256 previousBreaker, uint256 breaker) +``` + +### Supply + +```solidity +event Supply(uint256 previousSupply, uint256 supply) +``` + +### SetEarlyWithdrawConfig + +```solidity +event SetEarlyWithdrawConfig(address caller, uint64 oldEarlyWithdrawFeeBps, uint64 newEarlyWithdrawFeeBps, uint64 oldRedistributeBps, uint64 newRedistribiteBps, address oldTreasuryAddr, address newTreasuryAddr, address oldRedistributeAddr, address newRedistributeAddr) +``` + +### Redistribute + +```solidity +event Redistribute(address caller, address destination, uint256 amount) +``` + +### SetWhitelistedCaller + +```solidity +event SetWhitelistedCaller(address caller, address addr, bool ok) +``` + +### SetWhitelistedRedistributors + +```solidity +event SetWhitelistedRedistributors(address caller, address addr, bool ok) +``` + +### MigrateFromCakePool + +```solidity +event MigrateFromCakePool(address user, address proxy, uint256 amount, uint256 endTime) +``` + +### DelegateFromCakePool + +```solidity +event DelegateFromCakePool(address user, address delegator, uint256 amount, uint256 endTime) +``` + +### MigrationConvertToDelegation + +```solidity +event MigrationConvertToDelegation(address user, address delegator, uint256 amount, uint256 endTime) +``` + +### UpdateDelegator + +```solidity +event UpdateDelegator(address delegator, bool isDelegator, uint40 limitTimestampForEarlyWithdraw) +``` + +### InjectToDelegator + +```solidity +event InjectToDelegator(address user, address delegator, uint256 amount) +``` + +### SetLimitTimeOfConvert + +```solidity +event SetLimitTimeOfConvert(address user, uint256 newValue) +``` + +### SetEarlyWithdrawSwitch + +```solidity +event SetEarlyWithdrawSwitch(address user, bool newValue) +``` + +### SetNoPenaltyForEarlyWithdraw + +```solidity +event SetNoPenaltyForEarlyWithdraw(address owner, address user, bool newValue) +``` + +### SetEmergencyWithdrawSwitch + +```solidity +event SetEmergencyWithdrawSwitch(address user, bool newValue) +``` + +### EmergencyWithdraw + +```solidity +event EmergencyWithdraw(address user, uint256 amount) +``` + +### NewFarmBooster + +```solidity +event NewFarmBooster(address farmBooster) +``` + +### Point + +```solidity +struct Point { + int128 bias; + int128 slope; + uint256 timestamp; + uint256 blockNumber; +} +``` + +### LockedBalance + +```solidity +struct LockedBalance { + int128 amount; + uint256 end; +} +``` + +### UserInfo + +```solidity +struct UserInfo { + address cakePoolProxy; + uint128 cakeAmount; + uint48 lockEndTime; + uint48 migrationTime; + uint16 cakePoolType; + uint16 withdrawFlag; +} +``` + +### Delegator + +```solidity +struct Delegator { + uint104 delegatedCakeAmount; + uint104 notInjectedCakeAmount; + uint40 limitTimestampForEarlyWithdraw; + uint8 isDelegator; +} +``` + +### MIGRATION_FROM_CAKE_POOL_FLAG + +```solidity +uint16 MIGRATION_FROM_CAKE_POOL_FLAG +``` + +### DELEGATION_FROM_CAKE_POOL_FLAG + +```solidity +uint16 DELEGATION_FROM_CAKE_POOL_FLAG +``` + +### NOT_WITHDRAW_FLAG + +```solidity +uint16 NOT_WITHDRAW_FLAG +``` + +### WITHDREW_FLAG + +```solidity +uint16 WITHDREW_FLAG +``` + +### NOT_DELEGATOR_FLAG + +```solidity +uint8 NOT_DELEGATOR_FLAG +``` + +### DELEGATOR_FLAG + +```solidity +uint8 DELEGATOR_FLAG +``` + +### ACTION_DEPOSIT_FOR + +```solidity +uint256 ACTION_DEPOSIT_FOR +``` + +### ACTION_CREATE_LOCK + +```solidity +uint256 ACTION_CREATE_LOCK +``` + +### ACTION_INCREASE_LOCK_AMOUNT + +```solidity +uint256 ACTION_INCREASE_LOCK_AMOUNT +``` + +### ACTION_INCREASE_UNLOCK_TIME + +```solidity +uint256 ACTION_INCREASE_UNLOCK_TIME +``` + +### WEEK + +```solidity +uint256 WEEK +``` + +### MAX_LOCK + +```solidity +uint256 MAX_LOCK +``` + +### MULTIPLIER + +```solidity +uint256 MULTIPLIER +``` + +### token + +```solidity +contract IERC20 token +``` + +### supply + +```solidity +uint256 supply +``` + +### CakePool + +```solidity +contract ICakePool CakePool +``` + +### ProxyForCakePoolFactory + +```solidity +contract IProxyForCakePoolFactory ProxyForCakePoolFactory +``` + +### FarmBooster + +```solidity +contract IFarmBooster FarmBooster +``` + +### initialization + +```solidity +bool initialization +``` + +### limitTimeOfConvert + +```solidity +uint256 limitTimeOfConvert +``` + +### emergencyWithdrawSwitch + +```solidity +bool emergencyWithdrawSwitch +``` + +### everEmergencyWithdraw + +```solidity +mapping(address => bool) everEmergencyWithdraw +``` + +### locks + +```solidity +mapping(address => struct VECake.LockedBalance) locks +``` + +### userInfo + +```solidity +mapping(address => struct VECake.UserInfo) userInfo +``` + +### delegator + +```solidity +mapping(address => struct VECake.Delegator) delegator +``` + +### isCakePoolProxy + +```solidity +mapping(address => bool) isCakePoolProxy +``` + +### noPenaltyForEarlyWithdraw + +```solidity +mapping(address => bool) noPenaltyForEarlyWithdraw +``` + +### epoch + +```solidity +uint256 epoch +``` + +### pointHistory + +```solidity +struct VECake.Point[] pointHistory +``` + +### userPointHistory + +```solidity +mapping(address => struct VECake.Point[]) userPointHistory +``` + +### userPointEpoch + +```solidity +mapping(address => uint256) userPointEpoch +``` + +### slopeChanges + +```solidity +mapping(uint256 => int128) slopeChanges +``` + +### breaker + +```solidity +uint256 breaker +``` + +### name + +```solidity +string name +``` + +### symbol + +```solidity +string symbol +``` + +### decimals + +```solidity +uint8 decimals +``` + +### earlyWithdrawBpsPerWeek + +```solidity +uint64 earlyWithdrawBpsPerWeek +``` + +### redistributeBps + +```solidity +uint64 redistributeBps +``` + +### accumRedistribute + +```solidity +uint256 accumRedistribute +``` + +### treasuryAddr + +```solidity +address treasuryAddr +``` + +### redistributeAddr + +```solidity +address redistributeAddr +``` + +### earlyWithdrawSwitch + +```solidity +bool earlyWithdrawSwitch +``` + +### whitelistedCallers + +```solidity +mapping(address => bool) whitelistedCallers +``` + +### whitelistedRedistributors + +```solidity +mapping(address => bool) whitelistedRedistributors +``` + +### onlyRedistributors + +```solidity +modifier onlyRedistributors() +``` + +### onlyEOAorWhitelisted + +```solidity +modifier onlyEOAorWhitelisted() +``` + +### onlyCakePool + +```solidity +modifier onlyCakePool() +``` + +### constructor + +```solidity +constructor(contract ICakePool _cakePool, contract IERC20 _token, contract IProxyForCakePoolFactory _ProxyForCakePoolFactory) public +``` + +Constructor + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _cakePool | contract ICakePool | | +| _token | contract IERC20 | | +| _ProxyForCakePoolFactory | contract IProxyForCakePoolFactory | The cake pool proxy factory | + +### initializeCakePoolMigration + +```solidity +function initializeCakePoolMigration() external +``` + +Initialize for cake pool migration + +_Need to check whether cake pool conditions are met_ + +### getUserInfo + +```solidity +function getUserInfo(address _user) external view returns (int128 amount, uint256 end, address cakePoolProxy, uint128 cakeAmount, uint48 lockEndTime, uint48 migrationTime, uint16 cakePoolType, uint16 withdrawFlag) +``` + +Return user information include LockedBalance and UserInfo + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The user address | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| amount | int128 | The user lock amount | +| end | uint256 | The user lock end time | +| cakePoolProxy | address | Proxy Smart Contract for users who had locked in cake pool | +| cakeAmount | uint128 | Cake amount locked in cake pool | +| lockEndTime | uint48 | Record the lockEndTime in cake pool | +| migrationTime | uint48 | Record the migration time | +| cakePoolType | uint16 | 1: Migration, 2: Delegation | +| withdrawFlag | uint16 | 0: Not withdraw, 1 : withdrew | + +### balanceOfAtForProxy + +```solidity +function balanceOfAtForProxy(address _user, uint256 _blockNumber) external view returns (uint256) +``` + +Return the proxy balance of VECake at a given "_blockNumber" + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The proxy owner address to get a balance of VECake | +| _blockNumber | uint256 | The speicific block number that you want to check the balance of VECake | + +### balanceOfAt + +```solidity +function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256) +``` + +Return the balance of VECake at a given "_blockNumber" + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address to get a balance of VECake | +| _blockNumber | uint256 | The speicific block number that you want to check the balance of VECake | + +### balanceOfAtUser + +```solidity +function balanceOfAtUser(address _user, uint256 _blockNumber) external view returns (uint256) +``` + +### _balanceOfAt + +```solidity +function _balanceOfAt(address _user, uint256 _blockNumber) internal view returns (uint256) +``` + +### balanceOfForProxy + +```solidity +function balanceOfForProxy(address _user) external view returns (uint256) +``` + +Return the voting weight of a givne user's proxy + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address of a user | + +### balanceOf + +```solidity +function balanceOf(address _user) external view returns (uint256) +``` + +Return the voting weight of a givne user + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address of a user | + +### balanceOfUser + +```solidity +function balanceOfUser(address _user) external view returns (uint256) +``` + +### balanceOfAtTime + +```solidity +function balanceOfAtTime(address _user, uint256 _timestamp) external view returns (uint256) +``` + +### _balanceOf + +```solidity +function _balanceOf(address _user, uint256 _timestamp) internal view returns (uint256) +``` + +### _checkpoint + +```solidity +function _checkpoint(address _address, struct VECake.LockedBalance _prevLocked, struct VECake.LockedBalance _newLocked) internal +``` + +Record global and per-user slope to checkpoint + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _address | address | User's wallet address. Only global if 0x0 | +| _prevLocked | struct VECake.LockedBalance | User's previous locked balance and end lock time | +| _newLocked | struct VECake.LockedBalance | User's new locked balance and end lock time | + +### checkpoint + +```solidity +function checkpoint() external +``` + +Trigger global checkpoint + +### deposit + +```solidity +function deposit(address _user, uint256 _amount, uint256 _lockDuration) external +``` + +Deposit in cake pool + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | user address | +| _amount | uint256 | | +| _lockDuration | uint256 | | + +### withdraw + +```solidity +function withdraw(address _user) external +``` + +Withdraw in cake pool + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | user address | + +### migrateFromCakePool + +```solidity +function migrateFromCakePool() external +``` + +Migrate from cake pool. + +### delegateFromCakePool + +```solidity +function delegateFromCakePool(address _delegator) external +``` + +Delegate from cake pool. + +_this function will call one function in delegator smart contract, DelegatorSC.delegate(address user, uint256 amount, uint256 endTime)._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _delegator | address | delegation address | + +### migrationConvertToDelegation + +```solidity +function migrationConvertToDelegation(address _delegator) external +``` + +Migration convert to delegation. + +_Migration users can delegate within a certain period after migrated._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _delegator | address | delegation address | + +### createLock + +```solidity +function createLock(uint256 _amount, uint256 _unlockTime) external +``` + +Create a new lock. + +_This will crate a new lock and deposit Cake to VECake Vault_ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _amount | uint256 | the amount that user wishes to deposit | +| _unlockTime | uint256 | the timestamp when Cake get unlocked, it will be floored down to whole weeks | + +### createLockForProxy + +```solidity +function createLockForProxy(uint256 _amount, uint256 _unlockTime) external +``` + +### _createLock + +```solidity +function _createLock(uint256 _amount, uint256 _unlockTime) internal +``` + +### depositFor + +```solidity +function depositFor(address _for, uint256 _amount) external +``` + +Deposit `_amount` tokens for `_for` and add to `locks[_for]` + +_This function is used for deposit to created lock. Not for extend locktime._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _for | address | The address to do the deposit | +| _amount | uint256 | The amount that user wishes to deposit | + +### _depositFor + +```solidity +function _depositFor(address _for, uint256 _amount, uint256 _unlockTime, struct VECake.LockedBalance _prevLocked, uint256 _actionType, bool _isCakePoolUser) internal +``` + +Internal function to perform deposit and lock Cake for a user + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _for | address | The address to be locked and received VECake | +| _amount | uint256 | The amount to deposit | +| _unlockTime | uint256 | New time to unlock Cake. Pass 0 if no change. | +| _prevLocked | struct VECake.LockedBalance | Existed locks[_for] | +| _actionType | uint256 | The action that user did as this internal function shared among | +| _isCakePoolUser | bool | This user is cake pool user or not several external functions | + +### _findBlockEpoch + +```solidity +function _findBlockEpoch(uint256 _blockNumber, uint256 _maxEpoch) internal view returns (uint256) +``` + +Do Binary Search to find out block timestamp for block number + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _blockNumber | uint256 | The block number to find timestamp | +| _maxEpoch | uint256 | No beyond this timestamp | + +### _findUserBlockEpoch + +```solidity +function _findUserBlockEpoch(address _user, uint256 _blockNumber) internal view returns (uint256) +``` + +Do Binary Search to find the most recent user point history preceeding block + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address of user to find | +| _blockNumber | uint256 | Find the most recent point history before this block number | + +### increaseLockAmount + +```solidity +function increaseLockAmount(uint256 _amount) external +``` + +Increase lock amount without increase "end" + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _amount | uint256 | The amount of Cake to be added to the lock | + +### increaseUnlockTime + +```solidity +function increaseUnlockTime(uint256 _newUnlockTime) external +``` + +Increase unlock time without changing locked amount + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _newUnlockTime | uint256 | The new unlock time to be updated | + +### _timestampToFloorWeek + +```solidity +function _timestampToFloorWeek(uint256 _timestamp) internal pure returns (uint256) +``` + +Round off random timestamp to week + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _timestamp | uint256 | The timestamp to be rounded off | + +### totalSupply + +```solidity +function totalSupply() external view returns (uint256) +``` + +Calculate total supply of VECake (voting power) + +### totalSupplyAtTime + +```solidity +function totalSupplyAtTime(uint256 _timestamp) external view returns (uint256) +``` + +Calculate total supply of VECake (voting power) at at specific timestamp + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _timestamp | uint256 | The specific timestamp to calculate totalSupply | + +### totalSupplyAt + +```solidity +function totalSupplyAt(uint256 _blockNumber) external view returns (uint256) +``` + +Calculate total supply of VECake at specific block + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _blockNumber | uint256 | The specific block number to calculate totalSupply | + +### _totalSupplyAt + +```solidity +function _totalSupplyAt(struct VECake.Point _point, uint256 _timestamp) internal view returns (uint256) +``` + +Calculate total supply of VECake (voting power) at some point in the past + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _point | struct VECake.Point | The point to start to search from | +| _timestamp | uint256 | The timestamp to calculate the total voting power at | + +### setBreaker + +```solidity +function setBreaker(uint256 _breaker) external +``` + +Set breaker + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _breaker | uint256 | The new value of breaker 0 if off, 1 if on | + +### withdrawAll + +```solidity +function withdrawAll(address _to) external +``` + +Withdraw all Cake when lock has expired. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _to | address | The address which will receive the cake | + +### earlyWithdraw + +```solidity +function earlyWithdraw(address _to, uint256 _amount) external +``` + +Early withdraw Cake with penalty. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _to | address | The address which will receive the cake | +| _amount | uint256 | Cake amount | + +### emergencyWithdraw + +```solidity +function emergencyWithdraw() external +``` + +Emergency withdraw Cake. + +_Under any circumstances, it is guaranteed that the user’s assets will not be locked_ + +### redistribute + +```solidity +function redistribute() external +``` + +### _unlock + +```solidity +function _unlock(address _user, struct VECake.LockedBalance _lock, uint256 _withdrawAmount) internal +``` + +### setEarlyWithdrawConfig + +```solidity +function setEarlyWithdrawConfig(uint64 _newEarlyWithdrawBpsPerWeek, uint64 _newRedistributeBps, address _newTreasuryAddr, address _newRedistributeAddr) external +``` + +### setWhitelistedCallers + +```solidity +function setWhitelistedCallers(address[] callers, bool ok) external +``` + +### setWhitelistedRedistributors + +```solidity +function setWhitelistedRedistributors(address[] callers, bool ok) external +``` + +### updateDelegator + +```solidity +function updateDelegator(address _delegator, bool _isDelegator, uint40 _limitTimestampForEarlyWithdraw) external +``` + +Update delegator + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _delegator | address | The delegator address | +| _isDelegator | bool | Is delegator or not | +| _limitTimestampForEarlyWithdraw | uint40 | Delegator can not call earlyWithdraw before limit time. | + +### setLimitTimeOfConvert + +```solidity +function setLimitTimeOfConvert(uint256 _limitTime) external +``` + +Set limitTimeOfConvert + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _limitTime | uint256 | The limit time | + +### setEarlyWithdrawSwitch + +```solidity +function setEarlyWithdrawSwitch(bool _earlyWithdrawSwitch) external +``` + +Set ealy withdraw switch + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _earlyWithdrawSwitch | bool | early withdraw switch | + +### setEmergencyWithdrawSwitch + +```solidity +function setEmergencyWithdrawSwitch(bool _emergencyWithdrawSwitch) external +``` + +Set emergency withdraw switch + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _emergencyWithdrawSwitch | bool | early withdraw switch | + +### setNoPenaltyForEarlyWithdraw + +```solidity +function setNoPenaltyForEarlyWithdraw(address _user, bool _status) external +``` + +Set no penalty early withdraw user + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | no penalty early withdraw user | +| _status | bool | no penalty or not | + +### injectToDelegator + +```solidity +function injectToDelegator(address _delegator, uint256 _amount) external +``` + +Inject cake for delegator + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _delegator | address | The delegator address | +| _amount | uint256 | Cake amount | + +### setFarmBooster + +```solidity +function setFarmBooster(address _farmBooster) external +``` + +Set farm booster Contract address + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _farmBooster | address | The farm booster Contract address | + diff --git a/projects/vecake/docs/interfaces/ICakePool.md b/projects/vecake/docs/interfaces/ICakePool.md new file mode 100644 index 00000000..90dfd98d --- /dev/null +++ b/projects/vecake/docs/interfaces/ICakePool.md @@ -0,0 +1,40 @@ +# Solidity API + +## ICakePool + +### userInfo + +```solidity +function userInfo(address user) external view returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool, uint256) +``` + +### totalShares + +```solidity +function totalShares() external view returns (uint256) +``` + +### totalBoostDebt + +```solidity +function totalBoostDebt() external view returns (uint256) +``` + +### balanceOf + +```solidity +function balanceOf() external view returns (uint256) +``` + +### available + +```solidity +function available() external view returns (uint256) +``` + +### VCake + +```solidity +function VCake() external view returns (address) +``` + diff --git a/projects/vecake/docs/interfaces/IDelegator.md b/projects/vecake/docs/interfaces/IDelegator.md new file mode 100644 index 00000000..cfaa0e40 --- /dev/null +++ b/projects/vecake/docs/interfaces/IDelegator.md @@ -0,0 +1,20 @@ +# Solidity API + +## IDelegator + +### delegate + +```solidity +function delegate(address user, uint256 amount, uint256 lockEndTime) external +``` + +Delegate in delegator smart contract. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| user | address | The user address | +| amount | uint256 | The delegated cake amount | +| lockEndTime | uint256 | The lock end time in cake pool. | + diff --git a/projects/vecake/docs/interfaces/IFarmBooster.md b/projects/vecake/docs/interfaces/IFarmBooster.md new file mode 100644 index 00000000..75fe6ec8 --- /dev/null +++ b/projects/vecake/docs/interfaces/IFarmBooster.md @@ -0,0 +1,41 @@ +# Solidity API + +## IFarmBooster + +### depositFor + +```solidity +function depositFor(address _for, uint256 _amount, uint256 _unlockTime, int128 _prevLockedAmount, uint256 _prevLockedEnd, uint256 _actionType, bool _isCakePoolUser) external +``` + +function to perform deposit and lock Cake for a user + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _for | address | The address to be locked and received VECake | +| _amount | uint256 | The amount to deposit | +| _unlockTime | uint256 | New time to unlock Cake. Pass 0 if no change. | +| _prevLockedAmount | int128 | Existed locks[_for].amount | +| _prevLockedEnd | uint256 | Existed locks[_for].end | +| _actionType | uint256 | The action that user did as this internal function shared among | +| _isCakePoolUser | bool | This user is cake pool user or not several external functions | + +### unlock + +```solidity +function unlock(address _user, int128 _prevLockedAmount, uint256 _prevLockedEnd, uint256 _withdrawAmount) external +``` + +function to perform withdraw and unlock Cake for a user + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address to be unlocked | +| _prevLockedAmount | int128 | Existed locks[_user].amount | +| _prevLockedEnd | uint256 | Existed locks[_user].end | +| _withdrawAmount | uint256 | Cake amount | + diff --git a/projects/vecake/docs/interfaces/IMasterChefV2.md b/projects/vecake/docs/interfaces/IMasterChefV2.md new file mode 100644 index 00000000..ed3b5273 --- /dev/null +++ b/projects/vecake/docs/interfaces/IMasterChefV2.md @@ -0,0 +1,10 @@ +# Solidity API + +## IMasterChefV2 + +### pendingCake + +```solidity +function pendingCake(uint256 _pid, address _user) external view returns (uint256) +``` + diff --git a/projects/vecake/docs/interfaces/IProxyForCakePool.md b/projects/vecake/docs/interfaces/IProxyForCakePool.md new file mode 100644 index 00000000..19dbfbf0 --- /dev/null +++ b/projects/vecake/docs/interfaces/IProxyForCakePool.md @@ -0,0 +1,16 @@ +# Solidity API + +## IProxyForCakePool + +### createLockForProxy + +```solidity +function createLockForProxy(uint256 _amount, uint256 _unlockTime) external +``` + +### withdrawAll + +```solidity +function withdrawAll() external +``` + diff --git a/projects/vecake/docs/interfaces/IProxyForCakePoolFactory.md b/projects/vecake/docs/interfaces/IProxyForCakePoolFactory.md new file mode 100644 index 00000000..3bd252dc --- /dev/null +++ b/projects/vecake/docs/interfaces/IProxyForCakePoolFactory.md @@ -0,0 +1,30 @@ +# Solidity API + +## IProxyForCakePoolFactory + +### parameters + +```solidity +function parameters() external view returns (address VECake, address user) +``` + +### deploy + +```solidity +function deploy(address _user) external returns (address proxy) +``` + +Deploy proxy for cake pool + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| proxy | address | The proxy address | + diff --git a/projects/vecake/docs/interfaces/IVECake.md b/projects/vecake/docs/interfaces/IVECake.md new file mode 100644 index 00000000..b3f22c20 --- /dev/null +++ b/projects/vecake/docs/interfaces/IVECake.md @@ -0,0 +1,243 @@ +# Solidity API + +## Point + +```solidity +struct Point { + int128 bias; + int128 slope; + uint256 timestamp; + uint256 blockNumber; +} +``` + +## IVECake + +### deposit + +```solidity +function deposit(address _user, uint256 _amount, uint256 _lockDuration) external +``` + +_Cake pool deposit will trigger this_ + +### withdraw + +```solidity +function withdraw(address _user) external +``` + +_Cake pool withdraw will trigger this_ + +### userPointEpoch + +```solidity +function userPointEpoch(address _user) external view returns (uint256) +``` + +_Return the max epoch of the given "_user"_ + +### epoch + +```solidity +function epoch() external view returns (uint256) +``` + +_Return the max global epoch_ + +### userPointHistory + +```solidity +function userPointHistory(address _user, uint256 _epoch) external view returns (struct Point) +``` + +_Return the recorded point for _user at specific _epoch_ + +### pointHistory + +```solidity +function pointHistory(uint256 _epoch) external view returns (struct Point) +``` + +_Return the recorded global point at specific _epoch_ + +### checkpoint + +```solidity +function checkpoint() external +``` + +_Trigger global check point_ + +### balanceOfAtForProxy + +```solidity +function balanceOfAtForProxy(address _user, uint256 _blockNumber) external view returns (uint256) +``` + +Return the proxy balance of VECake at a given "_blockNumber" + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The proxy owner address to get a balance of VECake | +| _blockNumber | uint256 | The speicific block number that you want to check the balance of VECake | + +### balanceOfAt + +```solidity +function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256) +``` + +Return the balance of VECake at a given "_blockNumber" + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address to get a balance of VECake | +| _blockNumber | uint256 | The speicific block number that you want to check the balance of VECake | + +### balanceOfForProxy + +```solidity +function balanceOfForProxy(address _user) external view returns (uint256) +``` + +Return the voting weight of a givne user's proxy + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address of a user | + +### balanceOf + +```solidity +function balanceOf(address _user) external view returns (uint256) +``` + +Return the voting weight of a givne user + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address of a user | + +### migrateFromCakePool + +```solidity +function migrateFromCakePool() external +``` + +Migrate from cake pool. + +### delegateFromCakePool + +```solidity +function delegateFromCakePool(address _delegator) external +``` + +Delegate from cake pool. + +_this function will call one function in delegator smart contract, like this: DelegatorSC.delegate(address user, uint256 amount, uint256 endTime)._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _delegator | address | delegator address | + +### createLock + +```solidity +function createLock(uint256 _amount, uint256 _unlockTime) external +``` + +Create a new lock. + +_This will crate a new lock and deposit Cake to VECake Vault_ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _amount | uint256 | the amount that user wishes to deposit | +| _unlockTime | uint256 | the timestamp when Cake get unlocked, it will be floored down to whole weeks | + +### createLockForProxy + +```solidity +function createLockForProxy(uint256 _amount, uint256 _unlockTime) external +``` + +### increaseLockAmount + +```solidity +function increaseLockAmount(uint256 _amount) external +``` + +Increase lock amount without increase "end" + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _amount | uint256 | The amount of Cake to be added to the lock | + +### increaseUnlockTime + +```solidity +function increaseUnlockTime(uint256 _newUnlockTime) external +``` + +Increase unlock time without changing locked amount + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _newUnlockTime | uint256 | The new unlock time to be updated | + +### withdrawAll + +```solidity +function withdrawAll(address _to) external +``` + +Withdraw all Cake when lock has expired + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _to | address | The address which will receive the cake | + +### earlyWithdraw + +```solidity +function earlyWithdraw(address _to, uint256 _amount) external +``` + +Early withdraw Cake with penalty. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _to | address | The address which will receive the cake | +| _amount | uint256 | Cake amount | + +### emergencyWithdraw + +```solidity +function emergencyWithdraw() external +``` + +Emergency withdraw Cake. + +_Under any circumstances, it is guaranteed that the user’s assets will not be locked_ + diff --git a/projects/vecake/docs/libraries/SafeCast.md b/projects/vecake/docs/libraries/SafeCast.md new file mode 100644 index 00000000..2078cb17 --- /dev/null +++ b/projects/vecake/docs/libraries/SafeCast.md @@ -0,0 +1,48 @@ +# Solidity API + +## SafeCast + +_Wrappers over Solidity's uintXX/intXX casting operators with added overflow +checks. + +Downcasting from uint256/int256 in Solidity does not revert on overflow. This can +easily result in undesired exploitation or bugs, since developers usually +assume that overflows raise errors. `SafeCast` restores this intuition by +reverting the transaction when such 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. + +Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing +all math on `uint256` and `int256` and then downcasting._ + +### toUint256 + +```solidity +function toUint256(int256 value) internal pure returns (uint256) +``` + +_Converts a signed int256 into an unsigned uint256. + +Requirements: + +- input must be greater than or equal to 0._ + +### toInt128 + +```solidity +function toInt128(int256 value) internal pure returns (int128) +``` + +_Returns the downcasted int128 from int256, reverting on +overflow (when the input is less than smallest int128 or +greater than largest int128). + +Counterpart to Solidity's `int128` operator. + +Requirements: + +- input must fit into 128 bits + +_Available since v3.1.__ + diff --git a/projects/vecake/docs/test/Delegator.md b/projects/vecake/docs/test/Delegator.md new file mode 100644 index 00000000..4137a38b --- /dev/null +++ b/projects/vecake/docs/test/Delegator.md @@ -0,0 +1,83 @@ +# Solidity API + +## Delegator + +### token + +```solidity +contract IERC20 token +``` + +### VECake + +```solidity +contract IVECake VECake +``` + +### constructor + +```solidity +constructor(contract IVECake _VECake, contract IERC20 _token) public +``` + +Constructor + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _VECake | contract IVECake | | +| _token | contract IERC20 | | + +### createLock + +```solidity +function createLock(uint256 _amount, uint256 _unlockTime) external +``` + +### withdrawAll + +```solidity +function withdrawAll(address _to) external +``` + +### earlyWithdraw + +```solidity +function earlyWithdraw(address _to, uint256 _amount) external +``` + +### increaseLockAmount + +```solidity +function increaseLockAmount(uint256 _amount) external +``` + +### increaseUnlockTime + +```solidity +function increaseUnlockTime(uint256 _newUnlockTime) external +``` + +### emergencyWithdraw + +```solidity +function emergencyWithdraw() external +``` + +### delegate + +```solidity +function delegate(address user, uint256 amount, uint256 lockEndTime) external +``` + +Delegate in delegator smart contract. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| user | address | The user address | +| amount | uint256 | The delegated cake amount | +| lockEndTime | uint256 | The lock end time in cake pool. | + diff --git a/projects/vecake/docs/test/VECakeTest.md b/projects/vecake/docs/test/VECakeTest.md new file mode 100644 index 00000000..587901a3 --- /dev/null +++ b/projects/vecake/docs/test/VECakeTest.md @@ -0,0 +1,1058 @@ +# Solidity API + +## VECakeTest + +### Deposit + +```solidity +event Deposit(address locker, uint256 value, uint256 lockTime, uint256 lockType, uint256 timestamp) +``` + +### WithdrawAll + +```solidity +event WithdrawAll(address locker, address to, uint256 value, uint256 timestamp) +``` + +### EarlyWithdraw + +```solidity +event EarlyWithdraw(address locker, address to, uint256 value, uint256 penalty, uint256 timestamp) +``` + +### SetBreaker + +```solidity +event SetBreaker(uint256 previousBreaker, uint256 breaker) +``` + +### Supply + +```solidity +event Supply(uint256 previousSupply, uint256 supply) +``` + +### SetEarlyWithdrawConfig + +```solidity +event SetEarlyWithdrawConfig(address caller, uint64 oldEarlyWithdrawFeeBps, uint64 newEarlyWithdrawFeeBps, uint64 oldRedistributeBps, uint64 newRedistribiteBps, address oldTreasuryAddr, address newTreasuryAddr, address oldRedistributeAddr, address newRedistributeAddr) +``` + +### Redistribute + +```solidity +event Redistribute(address caller, address destination, uint256 amount) +``` + +### SetWhitelistedCaller + +```solidity +event SetWhitelistedCaller(address caller, address addr, bool ok) +``` + +### SetWhitelistedRedistributors + +```solidity +event SetWhitelistedRedistributors(address caller, address addr, bool ok) +``` + +### MigrateFromCakePool + +```solidity +event MigrateFromCakePool(address user, address proxy, uint256 amount, uint256 endTime) +``` + +### DelegateFromCakePool + +```solidity +event DelegateFromCakePool(address user, address delegator, uint256 amount, uint256 endTime) +``` + +### MigrationConvertToDelegation + +```solidity +event MigrationConvertToDelegation(address user, address delegator, uint256 amount, uint256 endTime) +``` + +### UpdateDelegator + +```solidity +event UpdateDelegator(address delegator, bool isDelegator, uint40 limitTimestampForEarlyWithdraw) +``` + +### InjectToDelegator + +```solidity +event InjectToDelegator(address user, address delegator, uint256 amount) +``` + +### SetLimitTimeOfConvert + +```solidity +event SetLimitTimeOfConvert(address user, uint256 newValue) +``` + +### SetEarlyWithdrawSwitch + +```solidity +event SetEarlyWithdrawSwitch(address user, bool newValue) +``` + +### SetNoPenaltyForEarlyWithdraw + +```solidity +event SetNoPenaltyForEarlyWithdraw(address owner, address user, bool newValue) +``` + +### SetEmergencyWithdrawSwitch + +```solidity +event SetEmergencyWithdrawSwitch(address user, bool newValue) +``` + +### EmergencyWithdraw + +```solidity +event EmergencyWithdraw(address user, uint256 amount) +``` + +### NewFarmBooster + +```solidity +event NewFarmBooster(address farmBooster) +``` + +### Point + +```solidity +struct Point { + int128 bias; + int128 slope; + uint256 timestamp; + uint256 blockNumber; +} +``` + +### LockedBalance + +```solidity +struct LockedBalance { + int128 amount; + uint256 end; +} +``` + +### UserInfo + +```solidity +struct UserInfo { + address cakePoolProxy; + uint128 cakeAmount; + uint48 lockEndTime; + uint48 migrationTime; + uint16 cakePoolType; + uint16 withdrawFlag; +} +``` + +### Delegator + +```solidity +struct Delegator { + uint104 delegatedCakeAmount; + uint104 notInjectedCakeAmount; + uint40 limitTimestampForEarlyWithdraw; + uint8 isDelegator; +} +``` + +### MIGRATION_FROM_CAKE_POOL_FLAG + +```solidity +uint16 MIGRATION_FROM_CAKE_POOL_FLAG +``` + +### DELEGATION_FROM_CAKE_POOL_FLAG + +```solidity +uint16 DELEGATION_FROM_CAKE_POOL_FLAG +``` + +### NOT_WITHDRAW_FLAG + +```solidity +uint16 NOT_WITHDRAW_FLAG +``` + +### WITHDREW_FLAG + +```solidity +uint16 WITHDREW_FLAG +``` + +### NOT_DELEGATOR_FLAG + +```solidity +uint8 NOT_DELEGATOR_FLAG +``` + +### DELEGATOR_FLAG + +```solidity +uint8 DELEGATOR_FLAG +``` + +### ACTION_DEPOSIT_FOR + +```solidity +uint256 ACTION_DEPOSIT_FOR +``` + +### ACTION_CREATE_LOCK + +```solidity +uint256 ACTION_CREATE_LOCK +``` + +### ACTION_INCREASE_LOCK_AMOUNT + +```solidity +uint256 ACTION_INCREASE_LOCK_AMOUNT +``` + +### ACTION_INCREASE_UNLOCK_TIME + +```solidity +uint256 ACTION_INCREASE_UNLOCK_TIME +``` + +### WEEK + +```solidity +uint256 WEEK +``` + +### MAX_LOCK + +```solidity +uint256 MAX_LOCK +``` + +### MULTIPLIER + +```solidity +uint256 MULTIPLIER +``` + +### token + +```solidity +contract IERC20 token +``` + +### supply + +```solidity +uint256 supply +``` + +### CakePool + +```solidity +contract ICakePool CakePool +``` + +### ProxyForCakePoolFactory + +```solidity +contract IProxyForCakePoolFactory ProxyForCakePoolFactory +``` + +### FarmBooster + +```solidity +contract IFarmBooster FarmBooster +``` + +### initialization + +```solidity +bool initialization +``` + +### limitTimeOfConvert + +```solidity +uint256 limitTimeOfConvert +``` + +### emergencyWithdrawSwitch + +```solidity +bool emergencyWithdrawSwitch +``` + +### everEmergencyWithdraw + +```solidity +mapping(address => bool) everEmergencyWithdraw +``` + +### locks + +```solidity +mapping(address => struct VECakeTest.LockedBalance) locks +``` + +### userInfo + +```solidity +mapping(address => struct VECakeTest.UserInfo) userInfo +``` + +### delegator + +```solidity +mapping(address => struct VECakeTest.Delegator) delegator +``` + +### isCakePoolProxy + +```solidity +mapping(address => bool) isCakePoolProxy +``` + +### noPenaltyForEarlyWithdraw + +```solidity +mapping(address => bool) noPenaltyForEarlyWithdraw +``` + +### epoch + +```solidity +uint256 epoch +``` + +### pointHistory + +```solidity +struct VECakeTest.Point[] pointHistory +``` + +### userPointHistory + +```solidity +mapping(address => struct VECakeTest.Point[]) userPointHistory +``` + +### userPointEpoch + +```solidity +mapping(address => uint256) userPointEpoch +``` + +### slopeChanges + +```solidity +mapping(uint256 => int128) slopeChanges +``` + +### breaker + +```solidity +uint256 breaker +``` + +### name + +```solidity +string name +``` + +### symbol + +```solidity +string symbol +``` + +### decimals + +```solidity +uint8 decimals +``` + +### earlyWithdrawBpsPerWeek + +```solidity +uint64 earlyWithdrawBpsPerWeek +``` + +### redistributeBps + +```solidity +uint64 redistributeBps +``` + +### accumRedistribute + +```solidity +uint256 accumRedistribute +``` + +### treasuryAddr + +```solidity +address treasuryAddr +``` + +### redistributeAddr + +```solidity +address redistributeAddr +``` + +### earlyWithdrawSwitch + +```solidity +bool earlyWithdrawSwitch +``` + +### whitelistedCallers + +```solidity +mapping(address => bool) whitelistedCallers +``` + +### whitelistedRedistributors + +```solidity +mapping(address => bool) whitelistedRedistributors +``` + +### onlyRedistributors + +```solidity +modifier onlyRedistributors() +``` + +### onlyEOAorWhitelisted + +```solidity +modifier onlyEOAorWhitelisted() +``` + +### onlyCakePool + +```solidity +modifier onlyCakePool() +``` + +### constructor + +```solidity +constructor(contract ICakePool _cakePool, contract IERC20 _token, contract IProxyForCakePoolFactory _ProxyForCakePoolFactory) public +``` + +Constructor + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _cakePool | contract ICakePool | | +| _token | contract IERC20 | | +| _ProxyForCakePoolFactory | contract IProxyForCakePoolFactory | The cake pool proxy factory | + +### initializeCakePoolMigration + +```solidity +function initializeCakePoolMigration() external +``` + +Initialize for cake pool migration + +_Need to check whether cake pool conditions are met_ + +### getUserInfo + +```solidity +function getUserInfo(address _user) external view returns (int128 amount, uint256 end, address cakePoolProxy, uint128 cakeAmount, uint48 lockEndTime, uint48 migrationTime, uint16 cakePoolType, uint16 withdrawFlag) +``` + +Return user information include LockedBalance and UserInfo + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The user address | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| amount | int128 | The user lock amount | +| end | uint256 | The user lock end time | +| cakePoolProxy | address | Proxy Smart Contract for users who had locked in cake pool | +| cakeAmount | uint128 | Cake amount locked in cake pool | +| lockEndTime | uint48 | Record the lockEndTime in cake pool | +| migrationTime | uint48 | Record the migration time | +| cakePoolType | uint16 | 1: Migration, 2: Delegation | +| withdrawFlag | uint16 | 0: Not withdraw, 1 : withdrew | + +### balanceOfAtForProxy + +```solidity +function balanceOfAtForProxy(address _user, uint256 _blockNumber) external view returns (uint256) +``` + +Return the proxy balance of VECake at a given "_blockNumber" + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The proxy owner address to get a balance of VECake | +| _blockNumber | uint256 | The speicific block number that you want to check the balance of VECake | + +### balanceOfAt + +```solidity +function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256) +``` + +Return the balance of VECake at a given "_blockNumber" + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address to get a balance of VECake | +| _blockNumber | uint256 | The speicific block number that you want to check the balance of VECake | + +### balanceOfAtUser + +```solidity +function balanceOfAtUser(address _user, uint256 _blockNumber) external view returns (uint256) +``` + +### _balanceOfAt + +```solidity +function _balanceOfAt(address _user, uint256 _blockNumber) internal view returns (uint256) +``` + +### balanceOfForProxy + +```solidity +function balanceOfForProxy(address _user) external view returns (uint256) +``` + +Return the voting weight of a givne user's proxy + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address of a user | + +### balanceOf + +```solidity +function balanceOf(address _user) external view returns (uint256) +``` + +Return the voting weight of a givne user + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address of a user | + +### balanceOfUser + +```solidity +function balanceOfUser(address _user) external view returns (uint256) +``` + +### balanceOfAtTime + +```solidity +function balanceOfAtTime(address _user, uint256 _timestamp) external view returns (uint256) +``` + +### _balanceOf + +```solidity +function _balanceOf(address _user, uint256 _timestamp) internal view returns (uint256) +``` + +### _checkpoint + +```solidity +function _checkpoint(address _address, struct VECakeTest.LockedBalance _prevLocked, struct VECakeTest.LockedBalance _newLocked) internal +``` + +Record global and per-user slope to checkpoint + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _address | address | User's wallet address. Only global if 0x0 | +| _prevLocked | struct VECakeTest.LockedBalance | User's previous locked balance and end lock time | +| _newLocked | struct VECakeTest.LockedBalance | User's new locked balance and end lock time | + +### checkpoint + +```solidity +function checkpoint() external +``` + +Trigger global checkpoint + +### deposit + +```solidity +function deposit(address _user, uint256 _amount, uint256 _lockDuration) external +``` + +Deposit in cake pool + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | user address | +| _amount | uint256 | | +| _lockDuration | uint256 | | + +### withdraw + +```solidity +function withdraw(address _user) external +``` + +Withdraw in cake pool + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | user address | + +### migrateFromCakePool + +```solidity +function migrateFromCakePool() external +``` + +Migrate from cake pool. + +### delegateFromCakePool + +```solidity +function delegateFromCakePool(address _delegator) external +``` + +Delegate from cake pool. + +_this function will call one function in delegator smart contract, DelegatorSC.delegate(address user, uint256 amount, uint256 endTime)._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _delegator | address | delegation address | + +### migrationConvertToDelegation + +```solidity +function migrationConvertToDelegation(address _delegator) external +``` + +Migration convert to delegation. + +_Migration users can delegate within a certain period after migrated._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _delegator | address | delegation address | + +### createLock + +```solidity +function createLock(uint256 _amount, uint256 _unlockTime) external +``` + +Create a new lock. + +_This will crate a new lock and deposit Cake to VECake Vault_ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _amount | uint256 | the amount that user wishes to deposit | +| _unlockTime | uint256 | the timestamp when Cake get unlocked, it will be floored down to whole weeks | + +### createLockForProxy + +```solidity +function createLockForProxy(uint256 _amount, uint256 _unlockTime) external +``` + +### _createLock + +```solidity +function _createLock(uint256 _amount, uint256 _unlockTime) internal +``` + +### depositFor + +```solidity +function depositFor(address _for, uint256 _amount) external +``` + +Deposit `_amount` tokens for `_for` and add to `locks[_for]` + +_This function is used for deposit to created lock. Not for extend locktime._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _for | address | The address to do the deposit | +| _amount | uint256 | The amount that user wishes to deposit | + +### _depositFor + +```solidity +function _depositFor(address _for, uint256 _amount, uint256 _unlockTime, struct VECakeTest.LockedBalance _prevLocked, uint256 _actionType, bool _isCakePoolUser) internal +``` + +Internal function to perform deposit and lock Cake for a user + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _for | address | The address to be locked and received VECake | +| _amount | uint256 | The amount to deposit | +| _unlockTime | uint256 | New time to unlock Cake. Pass 0 if no change. | +| _prevLocked | struct VECakeTest.LockedBalance | Existed locks[_for] | +| _actionType | uint256 | The action that user did as this internal function shared among | +| _isCakePoolUser | bool | This user is cake pool user or not several external functions | + +### _findBlockEpoch + +```solidity +function _findBlockEpoch(uint256 _blockNumber, uint256 _maxEpoch) internal view returns (uint256) +``` + +Do Binary Search to find out block timestamp for block number + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _blockNumber | uint256 | The block number to find timestamp | +| _maxEpoch | uint256 | No beyond this timestamp | + +### _findUserBlockEpoch + +```solidity +function _findUserBlockEpoch(address _user, uint256 _blockNumber) internal view returns (uint256) +``` + +Do Binary Search to find the most recent user point history preceeding block + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | The address of user to find | +| _blockNumber | uint256 | Find the most recent point history before this block number | + +### increaseLockAmount + +```solidity +function increaseLockAmount(uint256 _amount) external +``` + +Increase lock amount without increase "end" + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _amount | uint256 | The amount of Cake to be added to the lock | + +### increaseUnlockTime + +```solidity +function increaseUnlockTime(uint256 _newUnlockTime) external +``` + +Increase unlock time without changing locked amount + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _newUnlockTime | uint256 | The new unlock time to be updated | + +### _timestampToFloorWeek + +```solidity +function _timestampToFloorWeek(uint256 _timestamp) internal pure returns (uint256) +``` + +Round off random timestamp to week + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _timestamp | uint256 | The timestamp to be rounded off | + +### totalSupply + +```solidity +function totalSupply() external view returns (uint256) +``` + +Calculate total supply of VECake (voting power) + +### totalSupplyAtTime + +```solidity +function totalSupplyAtTime(uint256 _timestamp) external view returns (uint256) +``` + +Calculate total supply of VECake (voting power) at at specific timestamp + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _timestamp | uint256 | The specific timestamp to calculate totalSupply | + +### totalSupplyAt + +```solidity +function totalSupplyAt(uint256 _blockNumber) external view returns (uint256) +``` + +Calculate total supply of VECake at specific block + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _blockNumber | uint256 | The specific block number to calculate totalSupply | + +### _totalSupplyAt + +```solidity +function _totalSupplyAt(struct VECakeTest.Point _point, uint256 _timestamp) internal view returns (uint256) +``` + +Calculate total supply of VECake (voting power) at some point in the past + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _point | struct VECakeTest.Point | The point to start to search from | +| _timestamp | uint256 | The timestamp to calculate the total voting power at | + +### setBreaker + +```solidity +function setBreaker(uint256 _breaker) external +``` + +Set breaker + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _breaker | uint256 | The new value of breaker 0 if off, 1 if on | + +### withdrawAll + +```solidity +function withdrawAll(address _to) external +``` + +Withdraw all Cake when lock has expired. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _to | address | The address which will receive the cake | + +### earlyWithdraw + +```solidity +function earlyWithdraw(address _to, uint256 _amount) external +``` + +Early withdraw Cake with penalty. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _to | address | The address which will receive the cake | +| _amount | uint256 | Cake amount | + +### emergencyWithdraw + +```solidity +function emergencyWithdraw() external +``` + +Emergency withdraw Cake. + +_Under any circumstances, it is guaranteed that the user’s assets will not be locked_ + +### redistribute + +```solidity +function redistribute() external +``` + +### _unlock + +```solidity +function _unlock(address _user, struct VECakeTest.LockedBalance _lock, uint256 _withdrawAmount) internal +``` + +### setEarlyWithdrawConfig + +```solidity +function setEarlyWithdrawConfig(uint64 _newEarlyWithdrawBpsPerWeek, uint64 _newRedistributeBps, address _newTreasuryAddr, address _newRedistributeAddr) external +``` + +### setWhitelistedCallers + +```solidity +function setWhitelistedCallers(address[] callers, bool ok) external +``` + +### setWhitelistedRedistributors + +```solidity +function setWhitelistedRedistributors(address[] callers, bool ok) external +``` + +### updateDelegator + +```solidity +function updateDelegator(address _delegator, bool _isDelegator, uint40 _limitTimestampForEarlyWithdraw) external +``` + +Update delegator + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _delegator | address | The delegator address | +| _isDelegator | bool | Is delegator or not | +| _limitTimestampForEarlyWithdraw | uint40 | Delegator can not call earlyWithdraw before limit time. | + +### setLimitTimeOfConvert + +```solidity +function setLimitTimeOfConvert(uint256 _limitTime) external +``` + +Set limitTimeOfConvert + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _limitTime | uint256 | The limit time | + +### setEarlyWithdrawSwitch + +```solidity +function setEarlyWithdrawSwitch(bool _earlyWithdrawSwitch) external +``` + +Set ealy withdraw switch + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _earlyWithdrawSwitch | bool | early withdraw switch | + +### setEmergencyWithdrawSwitch + +```solidity +function setEmergencyWithdrawSwitch(bool _emergencyWithdrawSwitch) external +``` + +Set emergency withdraw switch + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _emergencyWithdrawSwitch | bool | early withdraw switch | + +### setNoPenaltyForEarlyWithdraw + +```solidity +function setNoPenaltyForEarlyWithdraw(address _user, bool _status) external +``` + +Set no penalty early withdraw user + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _user | address | no penalty early withdraw user | +| _status | bool | no penalty or not | + +### injectToDelegator + +```solidity +function injectToDelegator(address _delegator, uint256 _amount) external +``` + +Inject cake for delegator + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _delegator | address | The delegator address | +| _amount | uint256 | Cake amount | + +### setFarmBooster + +```solidity +function setFarmBooster(address _farmBooster) external +``` + +Set farm booster Contract address + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _farmBooster | address | The farm booster Contract address | + diff --git a/projects/vecake/hardhat.config.ts b/projects/vecake/hardhat.config.ts new file mode 100644 index 00000000..db4b4f2b --- /dev/null +++ b/projects/vecake/hardhat.config.ts @@ -0,0 +1,88 @@ +import type { HardhatUserConfig, NetworkUserConfig } from "hardhat/types"; +import "@nomiclabs-2.2.2/hardhat-ethers"; +import "@nomiclabs/hardhat-web3"; +import "@nomiclabs/hardhat-truffle5"; +import "hardhat-abi-exporter"; +import "hardhat-contract-sizer"; +import "solidity-coverage"; +import "dotenv/config"; + +const bscTestnet: NetworkUserConfig = { + url: "https://data-seed-prebsc-1-s1.binance.org:8545/", + chainId: 97, + accounts: [process.env.KEY_TESTNET!], +}; + +const bscMainnet: NetworkUserConfig = { + url: "https://bsc-dataseed.binance.org/", + chainId: 56, + accounts: [process.env.KEY_MAINNET!], +}; + +const config = { + defaultNetwork: "hardhat", + networks: { + hardhat: {}, + // testnet: bscTestnet, + // mainnet: bscMainnet, + }, + solidity: { + compilers: [ + { + version: "0.8.10", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + { + version: "0.8.0", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + { + version: "0.6.12", + settings: { + optimizer: { + enabled: true, + runs: 99999, + }, + }, + }, + ], + overrides: { + "contracts/VECake.sol": { + version: "0.8.10", + settings: { + optimizer: { + enabled: true, + runs: 9, + }, + }, + }, + "contracts/test/VECakeTest.sol": { + version: "0.8.10", + settings: { + optimizer: { + enabled: true, + runs: 9, + }, + }, + }, + }, + }, + paths: { + sources: "./contracts/", + tests: "./test", + cache: "./cache", + artifacts: "./artifacts", + }, +}; + +export default config; diff --git a/projects/vecake/package.json b/projects/vecake/package.json new file mode 100644 index 00000000..55193b11 --- /dev/null +++ b/projects/vecake/package.json @@ -0,0 +1,16 @@ +{ + "name": "vecake", + "description": "Pancake vecake", + "main": "index.js", + "version": "1.0.0", + "license": "MIT", + "private": true, + "scripts": { + "compile": "npx hardhat compile", + "test": "npx hardhat test" + }, + "dependencies": { + "@openzeppelin-4.5.0/contracts": "npm:@openzeppelin/contracts@4.5.0", + "@nomiclabs-2.2.2/hardhat-ethers": "npm:@nomiclabs/hardhat-ethers@^2.2.2" + } +} \ No newline at end of file diff --git a/projects/vecake/scripts/deploy.ts b/projects/vecake/scripts/deploy.ts new file mode 100644 index 00000000..9e36de8c --- /dev/null +++ b/projects/vecake/scripts/deploy.ts @@ -0,0 +1,47 @@ +import { parseEther } from "ethers/lib/utils"; +import { ethers, network, run } from "hardhat"; +import config from "../config"; + +const main = async () => { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Check if the addresses in the config are set. + if ( + config.CakePool[networkName] === ethers.constants.AddressZero || + config.CakeToken[networkName] === ethers.constants.AddressZero || + config.ProxyForCakePoolFactory[networkName] === ethers.constants.AddressZero + ) { + throw new Error("Missing addresses"); + } + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + // Deploy contracts. + const VECakeContract = await ethers.getContractFactory("VECake"); + const contract = await VECakeContract.deploy( + config.CakePool[networkName], + config.CakeToken[networkName], + config.ProxyForCakePoolFactory[networkName] + ); + + // Wait for the contract to be deployed before exiting the script. + await contract.deployed(); + console.log(`Deployed to ${contract.address}`); + } else { + console.log(`Deploying to ${networkName} network is not supported...`); + } +}; + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/vecake/scripts/deployProxyForCakePoolFactory.ts b/projects/vecake/scripts/deployProxyForCakePoolFactory.ts new file mode 100644 index 00000000..67d9d40e --- /dev/null +++ b/projects/vecake/scripts/deployProxyForCakePoolFactory.ts @@ -0,0 +1,34 @@ +import { parseEther } from "ethers/lib/utils"; +import { ethers, network, run } from "hardhat"; +import config from "../config"; + +const main = async () => { + // Get network data from Hardhat config (see hardhat.config.ts). + const networkName = network.name; + + // Check if the network is supported. + if (networkName === "testnet" || networkName === "mainnet") { + console.log(`Deploying to ${networkName} network...`); + + // Compile contracts. + await run("compile"); + console.log("Compiled contracts..."); + + // Deploy contracts. + const ProxyForCakePoolFactoryContract = await ethers.getContractFactory("ProxyForCakePoolFactory"); + const contract = await ProxyForCakePoolFactoryContract.deploy(); + + // Wait for the contract to be deployed before exiting the script. + await contract.deployed(); + console.log(`Deployed to ${contract.address}`); + } else { + console.log(`Deploying to ${networkName} network is not supported...`); + } +}; + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/projects/vecake/test/VECake.test.ts b/projects/vecake/test/VECake.test.ts new file mode 100644 index 00000000..0c6aa58e --- /dev/null +++ b/projects/vecake/test/VECake.test.ts @@ -0,0 +1,1223 @@ +import { artifacts, contract, ethers, network } from "hardhat"; +import { time, BN, expectEvent, expectRevert } from "@openzeppelin/test-helpers"; +import { parseEther, formatEther } from "ethers/lib/utils"; +import { expect } from "chai"; +import { beforeEach } from "mocha"; +import { BigNumber } from "ethers"; + +import ERC20MockArtifact from "./artifactsFile/ERC20Mock.json"; +import CakeTokenArtifact from "./artifactsFile/CakeToken.json"; +import SyrupBarArtifact from "./artifactsFile/SyrupBar.json"; +import MasterChefArtifact from "./artifactsFile/MasterChef.json"; +import MasterChefV2Artifact from "./artifactsFile/MasterChefV2.json"; +import CakePoolArtifact from "./artifactsFile/CakePool.json"; +import VECakeArtifact from "./artifactsFile/VECakeTest.json"; +import ProxyForCakePoolArtifact from "./artifactsFile/ProxyForCakePool.json"; +import ProxyForCakePoolFactoryArtifact from "./artifactsFile/ProxyForCakePoolFactory.json"; +import DelegatorArtifact from "./artifactsFile/Delegator.json"; + +const ZERO = BigNumber.from(0); +const DAY = BigNumber.from(86400); +const WEEK = DAY.mul(7); +const YEAR = DAY.mul(365); +const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; + +describe("VCake", () => { + let ProxyForCakePoolFactorySC, masterChefV2, CakePoolSC, VECakeSC, CakeTokenSC; + let admin; + let user1; + let user2; + let user3; + let user4; + let treasury; + let redistributor; + before(async function () { + [admin, user1, user2, user3, user4, treasury, redistributor] = await ethers.getSigners(); + }); + + beforeEach(async () => { + const ERC20Mock = await ethers.getContractFactoryFromArtifact(ERC20MockArtifact); + + // deploy cake token + const CakeToken = await ethers.getContractFactoryFromArtifact(CakeTokenArtifact); + CakeTokenSC = await CakeToken.deploy(); + // mint cake for users + await CakeTokenSC["mint(address,uint256)"](admin.address, ethers.utils.parseUnits("100000000000000")); + await CakeTokenSC["mint(address,uint256)"](user1.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user2.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user3.address, ethers.utils.parseUnits("100000000")); + await CakeTokenSC["mint(address,uint256)"](user4.address, ethers.utils.parseUnits("100000000")); + + // deploy SyrupBar + const SyrupBar = await ethers.getContractFactoryFromArtifact(SyrupBarArtifact); + const syrupBar = await SyrupBar.deploy(CakeTokenSC.address); + + // deploy MasterChef + const MasterChef = await ethers.getContractFactoryFromArtifact(MasterChefArtifact); + const masterChef = await MasterChef.deploy( + CakeTokenSC.address, + syrupBar.address, + admin.address, + ethers.utils.parseUnits("40"), + ethers.constants.Zero + ); + + // transfer ownership to MasterChef + await CakeTokenSC.transferOwnership(masterChef.address); + await syrupBar.transferOwnership(masterChef.address); + + const lpTokenV1 = await ERC20Mock.deploy("LP Token V1", "LPV1"); + const dummyTokenV2 = await ERC20Mock.deploy("Dummy Token V2", "DTV2"); + + // add pools in MasterChef + await masterChef.add(0, lpTokenV1.address, true); // farm with pid 1 and 0 allocPoint + await masterChef.add(1, dummyTokenV2.address, true); // farm with pid 2 and 1 allocPoint + + // deploy MasterChefV2 + const MasterChefV2 = await ethers.getContractFactoryFromArtifact(MasterChefV2Artifact); + masterChefV2 = await MasterChefV2.deploy(masterChef.address, CakeTokenSC.address, 2, admin.address); + + await dummyTokenV2.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenV2.approve(masterChefV2.address, ethers.constants.MaxUint256); + await masterChefV2.init(dummyTokenV2.address); + + const lpTokenV2 = await ERC20Mock.deploy("LP Token V2", "LPV2"); + const dummyTokenV3 = await ERC20Mock.deploy("Dummy Token V3", "DTV3"); + const dummyTokenForCakePool = await ERC20Mock.deploy("Dummy Token Cake Pool", "DTCP"); + const dummyTokenForSpecialPool2 = await ERC20Mock.deploy("Dummy Token Special pool 2", "DT"); + + await masterChefV2.add(0, lpTokenV2.address, true, true); // regular farm with pid 0 and 1 allocPoint + await masterChefV2.add(1, dummyTokenV3.address, true, true); // regular farm with pid 1 and 1 allocPoint + await masterChefV2.add(1, dummyTokenForCakePool.address, false, true); // special farm with pid 2 and 1 allocPoint + await masterChefV2.add(0, dummyTokenForSpecialPool2.address, false, true); // special farm with pid 3 and 0 allocPoint + + // deploy cake pool + const CakePool = await ethers.getContractFactoryFromArtifact(CakePoolArtifact); + CakePoolSC = await CakePool.deploy( + CakeTokenSC.address, + masterChefV2.address, + admin.address, + admin.address, + admin.address, + 2 + ); + await masterChefV2.updateWhiteList(CakePoolSC.address, true); + await dummyTokenForCakePool.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenForCakePool.approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakePoolSC.init(dummyTokenForCakePool.address); + + // approve cake for CakePoolSC + await CakeTokenSC.connect(admin).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user1).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user2).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user3).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user4).approve(CakePoolSC.address, ethers.constants.MaxUint256); + + // deploy ProxyForCakePoolFactory + const ProxyForCakePoolFactory = await ethers.getContractFactoryFromArtifact(ProxyForCakePoolFactoryArtifact); + ProxyForCakePoolFactorySC = await ProxyForCakePoolFactory.deploy(); + + // deploy VECake + const VECake = await ethers.getContractFactoryFromArtifact(VECakeArtifact); + VECakeSC = await VECake.deploy(CakePoolSC.address, CakeTokenSC.address, ProxyForCakePoolFactorySC.address); + + await CakeTokenSC.connect(admin).approve(VECakeSC.address, ethers.constants.MaxUint256); + + await ProxyForCakePoolFactorySC.initialize(VECakeSC.address); + + await CakePoolSC.setVCakeContract(VECakeSC.address); + + await VECakeSC.initializeCakePoolMigration(); + + // lock cake in cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1000"), 3600 * 24 * 365); + await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("1000"), 3600 * 24 * 365); + await CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("1000"), 3600 * 24 * 365); + }); + + afterEach(async () => { + await network.provider.send("hardhat_reset"); + }); + + describe("users migrate from cake pool", () => { + beforeEach(async function () { + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1"), 0); + }); + + it("Migrated successfully", async function () { + let userInfoOfUser2InCakePool = await CakePoolSC.userInfo(user2.address); + + let totalShares = await CakePoolSC.totalShares(); + let balanceOf = await CakePoolSC.balanceOf(); + // uint256 currentAmount = (balanceOf() * (user.shares)) / totalShares - user.userBoostedShare; + let currentLockedBalanceOfUser2 = userInfoOfUser2InCakePool.shares + .mul(balanceOf) + .div(totalShares) + .sub(userInfoOfUser2InCakePool.userBoostedShare) + .sub(1); + + // migrate from cake pool + await VECakeSC.connect(user2).migrateFromCakePool(); + + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + + let ProxyForCakePool = await ethers.getContractFactoryFromArtifact(ProxyForCakePoolArtifact); + let ProxyForCakePoolSC = await ProxyForCakePool.attach(userInfoOfUser2InVECake.cakePoolProxy); + + let cakePoolUser = await ProxyForCakePoolSC.cakePoolUser(); + + expect(cakePoolUser).to.deep.eq(user2.address); + expect(userInfoOfUser2InVECake.amount).to.deep.eq(ZERO); + expect(userInfoOfUser2InVECake.end).to.deep.eq(ZERO); + expect(userInfoOfUser2InVECake.cakePoolType).to.deep.eq(1); + expect(userInfoOfUser2InVECake.withdrawFlag).to.deep.eq(0); + expect(userInfoOfUser2InCakePool.lockEndTime.toString()).to.deep.eq( + userInfoOfUser2InVECake.lockEndTime.toString() + ); + expect(currentLockedBalanceOfUser2).to.deep.eq(userInfoOfUser2InVECake.cakeAmount); + + let proxyLockedBalanceOfUser2 = await VECakeSC.locks(userInfoOfUser2InVECake.cakePoolProxy); + + expect(proxyLockedBalanceOfUser2.amount).to.deep.eq(userInfoOfUser2InVECake.cakeAmount); + expect(proxyLockedBalanceOfUser2.end).to.deep.eq( + BigNumber.from(userInfoOfUser2InVECake.lockEndTime).div(WEEK).mul(WEEK) + ); + + // can not deposit again in cake pool + + // await CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("10"),0); + + await expectRevert.unspecified(CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("10"), 0)); + + await time.increaseTo(userInfoOfUser2InCakePool.lockEndTime.add(1).toNumber()); + + await CakePoolSC.connect(user2).withdraw(userInfoOfUser2InCakePool.shares); + + userInfoOfUser2InCakePool = await CakePoolSC.userInfo(user2.address); + // console.log(userInfoOfUser2InCakePool); + + let allUserInfo = await VECakeSC.getUserInfo(user2.address); + // console.log(allUserInfo); + }); + + it("Can not deposit in cake pool after Migrated", async function () { + // migrate from cake pool + await VECakeSC.connect(user2).migrateFromCakePool(); + + // can not deposit again in cake pool + await expectRevert.unspecified(CakePoolSC.connect(user2).deposit(ethers.utils.parseUnits("10"), 0)); + }); + + it("Can withdraw in cake pool after Migration lock expired", async function () { + // migrate from cake pool + await VECakeSC.connect(user2).migrateFromCakePool(); + + let userInfoOfUser2InCakePool = await CakePoolSC.userInfo(user2.address); + + await time.increaseTo(userInfoOfUser2InCakePool.lockEndTime.add(1).toNumber()); + + await CakePoolSC.connect(user2).withdraw(userInfoOfUser2InCakePool.shares); + + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + expect(userInfoOfUser2InVECake.withdrawFlag).to.deep.eq(1); + + let proxyLockedBalanceOfUser2 = await VECakeSC.locks(userInfoOfUser2InVECake.cakePoolProxy); + + expect(proxyLockedBalanceOfUser2.amount).to.deep.eq(ZERO); + expect(proxyLockedBalanceOfUser2.end).to.deep.eq(ZERO); + }); + + it("Check whether the cake amount is calculated correctly", async function () { + // migrate from cake pool + await VECakeSC.connect(user2).migrateFromCakePool(); + + let userInfoOfUser2InCakePool = await CakePoolSC.userInfo(user2.address); + + await time.increaseTo(userInfoOfUser2InCakePool.lockEndTime.add(1).toNumber()); + + let cakeBalanceBeforeOfUser2 = await CakeTokenSC.balanceOf(user2.address); + + await CakePoolSC.connect(user2).withdraw(userInfoOfUser2InCakePool.shares); + + let cakeBalanceAfterOfUser2 = await CakeTokenSC.balanceOf(user2.address); + + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + + expect(userInfoOfUser2InVECake.withdrawFlag).to.deep.eq(1); + + let proxyLockedBalanceOfUser2 = await VECakeSC.locks(userInfoOfUser2InVECake.cakePoolProxy); + + expect(proxyLockedBalanceOfUser2.amount).to.deep.eq(ZERO); + expect(proxyLockedBalanceOfUser2.end).to.deep.eq(ZERO); + expect(cakeBalanceAfterOfUser2.sub(cakeBalanceBeforeOfUser2)).to.deep.eq(userInfoOfUser2InVECake.cakeAmount); + }); + }); + + describe("users delegate from cake pool", () => { + let delegatorSC; + + beforeEach(async function () { + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1"), 0); + + // deploy mock delegator smart contract + const Delegator = await ethers.getContractFactoryFromArtifact(DelegatorArtifact); + delegatorSC = await Delegator.deploy(VECakeSC.address, CakeTokenSC.address); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + // add whitelist for delegator in VECakeSC + await VECakeSC.setWhitelistedCallers([delegatorSC.address], true); + // add delegator in VECakeSC + await VECakeSC.updateDelegator(delegatorSC.address, true, OneYear); + + // create lock for delegator + await CakeTokenSC.approve(delegatorSC.address, ethers.utils.parseUnits("1")); + await delegatorSC.createLock(ethers.utils.parseUnits("1"), OneYear); + }); + + it("Delegated successfully", async function () { + let userInfoOfUser3InCakePool = await CakePoolSC.userInfo(user3.address); + + let totalShares = await CakePoolSC.totalShares(); + let balanceOf = await CakePoolSC.balanceOf(); + // uint256 currentAmount = (balanceOf() * (user.shares)) / totalShares - user.userBoostedShare; + let currentLockedBalanceOfUser3 = userInfoOfUser3InCakePool.shares + .mul(balanceOf) + .div(totalShares) + .sub(userInfoOfUser3InCakePool.userBoostedShare) + .sub(1); + + // delegate from cake pool + await VECakeSC.connect(user3).delegateFromCakePool(delegatorSC.address); + + let delegatorTokenBalanceOfUser3 = await delegatorSC.balanceOf(user3.address); + + let userInfoOfUser3InVECake = await VECakeSC.userInfo(user3.address); + let delegatorInfo = await VECakeSC.delegator(delegatorSC.address); + + expect(delegatorTokenBalanceOfUser3).to.deep.eq(userInfoOfUser3InVECake.cakeAmount); + + expect(userInfoOfUser3InVECake.cakePoolProxy).to.deep.eq(ZERO_ADDRESS); + expect(userInfoOfUser3InVECake.cakeAmount).to.deep.eq(currentLockedBalanceOfUser3); + expect(BigNumber.from(userInfoOfUser3InVECake.lockEndTime)).to.deep.eq( + BigNumber.from(userInfoOfUser3InCakePool.lockEndTime) + ); + expect(userInfoOfUser3InVECake.cakePoolType).to.deep.eq(2); + + expect(delegatorInfo.delegatedCakeAmount).to.deep.eq(currentLockedBalanceOfUser3); + expect(delegatorInfo.delegatedCakeAmount).to.deep.eq(userInfoOfUser3InVECake.cakeAmount); + expect(delegatorInfo.delegatedCakeAmount).to.deep.eq(delegatorInfo.notInjectedCakeAmount); + }); + + it("Can not deposit in cake pool after delegated", async function () { + // delegate from cake pool + await VECakeSC.connect(user3).delegateFromCakePool(delegatorSC.address); + + // can not deposit again in cake pool + await expectRevert.unspecified(CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("10"), 0)); + }); + + it("Can not withdraw in cake pool after delegation lock expired", async function () { + // delegate from cake pool + await VECakeSC.connect(user3).delegateFromCakePool(delegatorSC.address); + + // can not deposit again in cake pool + await expectRevert.unspecified(CakePoolSC.connect(user3).deposit(ethers.utils.parseUnits("10"), 0)); + + let userInfoOfUser3InCakePool = await CakePoolSC.userInfo(user3.address); + + await time.increaseTo(userInfoOfUser3InCakePool.lockEndTime.add(1).toNumber()); + + await expectRevert.unspecified(CakePoolSC.connect(user3).withdraw(userInfoOfUser3InCakePool.shares)); + }); + + it("Can inject cake for delegator", async function () { + // delegate from cake pool + await VECakeSC.connect(user3).delegateFromCakePool(delegatorSC.address); + + let delegatorInfo = await VECakeSC.delegator(delegatorSC.address); + await VECakeSC.injectToDelegator(delegatorSC.address, delegatorInfo.notInjectedCakeAmount); + + delegatorInfo = await VECakeSC.delegator(delegatorSC.address); + expect(delegatorInfo.notInjectedCakeAmount).to.deep.eq(ZERO); + }); + }); + + describe("Migration can be converted to delegation", () => { + let delegatorSC; + beforeEach(async function () { + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1"), 0); + + // deploy mock delegator smart contract + const Delegator = await ethers.getContractFactoryFromArtifact(DelegatorArtifact); + delegatorSC = await Delegator.deploy(VECakeSC.address, CakeTokenSC.address); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + // add whitelist for delegator in VECakeSC + await VECakeSC.setWhitelistedCallers([delegatorSC.address], true); + // add delegator in VECakeSC + await VECakeSC.updateDelegator(delegatorSC.address, true, OneYear); + + // create lock for delegator + await CakeTokenSC.approve(delegatorSC.address, ethers.utils.parseUnits("1")); + await delegatorSC.createLock(ethers.utils.parseUnits("1"), OneYear); + }); + + it("Delegated from migration successfully", async function () { + let userInfoOfUser2InCakePool = await CakePoolSC.userInfo(user2.address); + + let totalShares = await CakePoolSC.totalShares(); + let balanceOf = await CakePoolSC.balanceOf(); + // uint256 currentAmount = (balanceOf() * (user.shares)) / totalShares - user.userBoostedShare; + let currentLockedBalanceOfUser2 = userInfoOfUser2InCakePool.shares + .mul(balanceOf) + .div(totalShares) + .sub(userInfoOfUser2InCakePool.userBoostedShare) + .sub(1); + + await VECakeSC.connect(user2).migrateFromCakePool(); + + let userInfoOfUser2InVECake = await VECakeSC.userInfo(user2.address); + + // console.log(userInfoOfUser2InVECake); + + expect(userInfoOfUser2InCakePool.lockEndTime.toString()).to.deep.eq( + userInfoOfUser2InVECake.lockEndTime.toString() + ); + expect(currentLockedBalanceOfUser2).to.deep.eq(userInfoOfUser2InVECake.cakeAmount); + + await VECakeSC.connect(user2).migrationConvertToDelegation(delegatorSC.address); + + let delegatorInfo = await VECakeSC.delegator(delegatorSC.address); + + expect(delegatorInfo.delegatedCakeAmount).to.deep.eq(currentLockedBalanceOfUser2); + expect(delegatorInfo.delegatedCakeAmount).to.deep.eq(userInfoOfUser2InVECake.cakeAmount); + expect(delegatorInfo.delegatedCakeAmount).to.deep.eq(delegatorInfo.notInjectedCakeAmount); + }); + + it("Can not withdraw in cake pool after delegation lock expired", async function () { + await VECakeSC.connect(user2).migrateFromCakePool(); + await VECakeSC.connect(user2).migrationConvertToDelegation(delegatorSC.address); + + let userInfoOfUser2InCakePool = await CakePoolSC.userInfo(user2.address); + + await time.increaseTo(userInfoOfUser2InCakePool.lockEndTime.add(1).toNumber()); + + await expectRevert.unspecified(CakePoolSC.connect(user3).withdraw(userInfoOfUser2InCakePool.shares)); + }); + + it("Can not delegate after migration limit time", async function () { + await VECakeSC.connect(user2).migrateFromCakePool(); + + let now = (await time.latest()).toString(); + let limitTimeOfConvert = await VECakeSC.limitTimeOfConvert(); + let targetTimestamp = BigNumber.from(now).add(limitTimeOfConvert); + await time.increaseTo(targetTimestamp.toNumber()); + + await expectRevert(VECakeSC.connect(user2).migrationConvertToDelegation(delegatorSC.address), "Too late"); + }); + + it("Can not delegate after lock expired in cake pool", async function () { + await VECakeSC.connect(user2).migrateFromCakePool(); + + let now = (await time.latest()).toString(); + let userInfoOfUser2InVECake = await VECakeSC.userInfo(user2.address); + let lockEndTime = BigNumber.from(userInfoOfUser2InVECake.lockEndTime); + await time.increaseTo(lockEndTime.add(1).toNumber()); + + await expectRevert( + VECakeSC.connect(user2).migrationConvertToDelegation(delegatorSC.address), + "User lock expired" + ); + }); + }); + + describe("Delegator withdraw", () => { + let delegatorSC; + beforeEach(async function () { + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1"), 0); + + // deploy mock delegator smart contract + const Delegator = await ethers.getContractFactoryFromArtifact(DelegatorArtifact); + delegatorSC = await Delegator.deploy(VECakeSC.address, CakeTokenSC.address); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + let halfYear = BigNumber.from(now).add(YEAR.div(2)); + + // add whitelist for delegator in VECakeSC + await VECakeSC.setWhitelistedCallers([delegatorSC.address], true); + // add delegator in VECakeSC + await VECakeSC.updateDelegator(delegatorSC.address, true, halfYear); + + // create lock for delegator + await CakeTokenSC.approve(delegatorSC.address, ethers.utils.parseUnits("1")); + await delegatorSC.createLock(ethers.utils.parseUnits("1"), OneYear); + + // delegate from cake pool + await VECakeSC.connect(user3).delegateFromCakePool(delegatorSC.address); + }); + + it("Delegator can not withdraw before injected all", async function () { + let delegatorLockedBalance = await VECakeSC.locks(delegatorSC.address); + + await time.increaseTo(delegatorLockedBalance.end.add(1).toNumber()); + await expectRevert(delegatorSC.withdrawAll(delegatorSC.address), "Insufficient injection for delegator"); + }); + + it("Delegator can withdraw after injected all", async function () { + let delegatorLockedBalance = await VECakeSC.locks(delegatorSC.address); + + await time.increaseTo(delegatorLockedBalance.end.add(1).toNumber()); + + let delegatorInfo = await VECakeSC.delegator(delegatorSC.address); + await VECakeSC.injectToDelegator(delegatorSC.address, delegatorInfo.notInjectedCakeAmount); + + let cakeBalanceBeforeOfDelegator = await CakeTokenSC.balanceOf(delegatorSC.address); + await delegatorSC.withdrawAll(delegatorSC.address); + + let cakeBalanceAfterOfDelegator = await CakeTokenSC.balanceOf(delegatorSC.address); + + expect(cakeBalanceAfterOfDelegator.sub(cakeBalanceBeforeOfDelegator)).to.deep.eq( + delegatorInfo.delegatedCakeAmount.add(ethers.utils.parseUnits("1")) + ); + }); + + it("Delegator can not early withdraw before limit Timestamp For Early Withdraw", async function () { + await VECakeSC.setEarlyWithdrawSwitch(true); + await expectRevert( + delegatorSC.earlyWithdraw(delegatorSC.address, ethers.utils.parseUnits("1")), + "Forbid earlyWithdraw" + ); + }); + + it("Delegator can not early withdraw when amount exceed injected amount", async function () { + await VECakeSC.setEarlyWithdrawSwitch(true); + let delegatorInfo = await VECakeSC.delegator(delegatorSC.address); + await time.increaseTo(BigNumber.from(delegatorInfo.limitTimestampForEarlyWithdraw).add(1).toNumber()); + await expectRevert( + delegatorSC.earlyWithdraw(delegatorSC.address, ethers.utils.parseUnits("2")), + "Delegator balance exceeded" + ); + }); + + it("Delegator can early withdraw after limit Timestamp For Early Withdraw", async function () { + await VECakeSC.setEarlyWithdrawSwitch(true); + let delegatorInfo = await VECakeSC.delegator(delegatorSC.address); + await time.increaseTo(BigNumber.from(delegatorInfo.limitTimestampForEarlyWithdraw).add(1).toNumber()); + + let cakeBalanceBeforeOfDelegator = await CakeTokenSC.balanceOf(delegatorSC.address); + await delegatorSC.earlyWithdraw(delegatorSC.address, ethers.utils.parseUnits("1")); + + let cakeBalanceAfterOfDelegator = await CakeTokenSC.balanceOf(delegatorSC.address); + + expect(cakeBalanceAfterOfDelegator.sub(cakeBalanceBeforeOfDelegator)).to.deep.eq(ethers.utils.parseUnits("1")); + }); + }); + + describe("Normal user lock cake in VECake", () => { + beforeEach(async function () { + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1"), 0); + }); + + it("Create lock", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + let userInfoOfUser4InVECake = await VECakeSC.getUserInfo(user4.address); + + expect(userInfoOfUser4InVECake.amount).to.deep.eq(ethers.utils.parseUnits("1000")); + + expect(userInfoOfUser4InVECake.end).to.deep.eq(OneYear.div(WEEK).mul(WEEK)); + }); + + it("Create lock, can only lock until future", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = BigNumber.from((await time.latest()).toString()); + + await expectRevert( + VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), now), + "_unlockTime too old" + ); + }); + + it("Create lock, can only lock 4 year max", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let FourYear = BigNumber.from(now).add(YEAR.mul(4)).add(WEEK.mul(3)); + + await expectRevert( + VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), FourYear), + "_unlockTime too long" + ); + }); + + it("Create lock, amount should be greater than zero", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await expectRevert(VECakeSC.connect(user4).createLock(0, OneYear), "Bad _amount"); + }); + + it("Create lock, can not lock when already lock", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + await expectRevert( + VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear), + "Already locked" + ); + }); + + it("Increase Lock Amount", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + let userInfoOfUser4InVECakeBefore = await VECakeSC.getUserInfo(user4.address); + + await VECakeSC.connect(user4).increaseLockAmount(ethers.utils.parseUnits("66.66")); + + let userInfoOfUser4InVECakeAfter = await VECakeSC.getUserInfo(user4.address); + + expect(userInfoOfUser4InVECakeAfter.amount.sub(userInfoOfUser4InVECakeBefore.amount)).to.deep.eq( + ethers.utils.parseUnits("66.66") + ); + }); + + it("Increase Unlock Time", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + await time.increase(YEAR.div(2).toNumber()); + + let newUnlockTime = OneYear.add(YEAR.div(2)); + + await VECakeSC.connect(user4).increaseUnlockTime(newUnlockTime); + + let userInfoOfUser4InVECake = await VECakeSC.getUserInfo(user4.address); + + expect(userInfoOfUser4InVECake.end).to.deep.eq(newUnlockTime.div(WEEK).mul(WEEK)); + }); + + it("Can not Withdraw before lock expired", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + await expectRevert(VECakeSC.connect(user4).withdrawAll(user4.address), "Lock not expired"); + }); + + it("Withdraw after lock expired", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + await time.increaseTo(OneYear.add(WEEK).toNumber()); + + let cakeBalanceBeforeOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + await VECakeSC.connect(user4).withdrawAll(user4.address); + + let cakeBalanceAfterOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + let userInfoOfUser4InVECake = await VECakeSC.getUserInfo(user4.address); + + expect(cakeBalanceAfterOfUser4.sub(cakeBalanceBeforeOfUser4)).to.deep.eq(ethers.utils.parseUnits("1000")); + expect(userInfoOfUser4InVECake.amount).to.deep.eq(ZERO); + expect(userInfoOfUser4InVECake.end).to.deep.eq(ZERO); + }); + + it("Early Withdraw before lock expired", async function () { + await VECakeSC.setEarlyWithdrawSwitch(true); + + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + let cakeBalanceBeforeOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + await VECakeSC.connect(user4).earlyWithdraw(user4.address, ethers.utils.parseUnits("88.88")); + + let cakeBalanceAfterOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + let userInfoOfUser4InVECake = await VECakeSC.getUserInfo(user4.address); + + expect(cakeBalanceAfterOfUser4.sub(cakeBalanceBeforeOfUser4)).to.deep.eq(ethers.utils.parseUnits("88.88")); + expect(userInfoOfUser4InVECake.amount).to.deep.eq( + ethers.utils.parseUnits("1000").sub(ethers.utils.parseUnits("88.88")) + ); + }); + + it("Can not Early Withdraw after lock expired", async function () { + await VECakeSC.setEarlyWithdrawSwitch(true); + + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + await time.increaseTo(OneYear.add(WEEK).toNumber()); + + await expectRevert( + VECakeSC.connect(user4).earlyWithdraw(user4.address, ethers.utils.parseUnits("10")), + "Too late" + ); + }); + }); + + describe("Comparison between migrated users and normal users", () => { + beforeEach(async function () { + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1"), 0); + }); + + it("Same LockedBalance", async function () { + // migrate from cake pool + await VECakeSC.connect(user2).migrateFromCakePool(); + + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + + // lock with same cake amount and end time + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + await VECakeSC.connect(user4).createLock(userInfoOfUser2InVECake.cakeAmount, userInfoOfUser2InVECake.lockEndTime); + + let LockedBalanceOfUser2InVECake = await VECakeSC.locks(userInfoOfUser2InVECake.cakePoolProxy); + let LockedBalanceOfUser4InVECake = await VECakeSC.locks(user4.address); + + expect(LockedBalanceOfUser2InVECake.amount).to.deep.eq(LockedBalanceOfUser4InVECake.amount); + expect(LockedBalanceOfUser2InVECake.end).to.deep.eq(LockedBalanceOfUser4InVECake.end); + }); + + it("Same balanceOf", async function () { + // migrate from cake pool + await VECakeSC.connect(user2).migrateFromCakePool(); + + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + + // lock with same cake amount and end time + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + await VECakeSC.connect(user4).createLock(userInfoOfUser2InVECake.cakeAmount, userInfoOfUser2InVECake.lockEndTime); + + let balanceOfUser2 = await VECakeSC.balanceOf(user2.address); + let balanceOfUser4 = await VECakeSC.balanceOf(user4.address); + expect(balanceOfUser2).to.deep.eq(balanceOfUser4); + }); + + it("Same balanceOfAt , and balanceOfAt gradually decreases to zero", async function () { + // migrate from cake pool + await VECakeSC.connect(user2).migrateFromCakePool(); + + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + + // lock with same cake amount and end time + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + await VECakeSC.connect(user4).createLock(userInfoOfUser2InVECake.cakeAmount, userInfoOfUser2InVECake.lockEndTime); + let now = BigNumber.from((await time.latest()).toString()); + let nextWeek = now.add(WEEK); + // first week + let currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + let balanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + let balanceOfAtUser4 = await VECakeSC.balanceOfAt(user4.address, currentBlockNumber); + console.log("First week", balanceOfAtUser2.toString()); + expect(balanceOfAtUser2).to.deep.eq(balanceOfAtUser4); + + let beforeBalance = balanceOfAtUser2; + + // second week + await time.increaseTo(nextWeek.toNumber()); + nextWeek = now.add(WEEK.mul(2)); + currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + let secondWeekBlockNumber = currentBlockNumber; + balanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + balanceOfAtUser4 = await VECakeSC.balanceOfAt(user4.address, currentBlockNumber); + console.log("Second week", balanceOfAtUser2.toString()); + expect(balanceOfAtUser2).to.deep.eq(balanceOfAtUser4); + expect(Number(beforeBalance)).to.gt(Number(balanceOfAtUser2)); + beforeBalance = balanceOfAtUser2; + + // third week + await time.increaseTo(nextWeek.toNumber()); + currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + balanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + balanceOfAtUser4 = await VECakeSC.balanceOfAt(user4.address, currentBlockNumber); + console.log("third week", balanceOfAtUser2.toString()); + expect(balanceOfAtUser2).to.deep.eq(balanceOfAtUser4); + expect(Number(beforeBalance)).to.gt(Number(balanceOfAtUser2)); + beforeBalance = balanceOfAtUser2; + + // tenth week + nextWeek = now.add(WEEK.mul(10)); + await time.increaseTo(nextWeek.toNumber()); + currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + balanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + balanceOfAtUser4 = await VECakeSC.balanceOfAt(user4.address, currentBlockNumber); + console.log("tenth week", balanceOfAtUser2.toString()); + expect(balanceOfAtUser2).to.deep.eq(balanceOfAtUser4); + expect(Number(beforeBalance)).to.gt(Number(balanceOfAtUser2)); + beforeBalance = balanceOfAtUser2; + + // twentieth week + nextWeek = now.add(WEEK.mul(20)); + await time.increaseTo(nextWeek.toNumber()); + currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + balanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + balanceOfAtUser4 = await VECakeSC.balanceOfAt(user4.address, currentBlockNumber); + console.log("twentieth week", balanceOfAtUser2.toString()); + expect(balanceOfAtUser2).to.deep.eq(balanceOfAtUser4); + expect(Number(beforeBalance)).to.gt(Number(balanceOfAtUser2)); + beforeBalance = balanceOfAtUser2; + + // forty week + nextWeek = now.add(WEEK.mul(40)); + await time.increaseTo(nextWeek.toNumber()); + currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + balanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + balanceOfAtUser4 = await VECakeSC.balanceOfAt(user4.address, currentBlockNumber); + console.log("forty week", balanceOfAtUser2.toString()); + expect(balanceOfAtUser2).to.deep.eq(balanceOfAtUser4); + expect(Number(beforeBalance)).to.gt(Number(balanceOfAtUser2)); + beforeBalance = balanceOfAtUser2; + + // lock expired + nextWeek = now.add(WEEK.mul(60)); + await time.increaseTo(nextWeek.toNumber()); + currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + balanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + balanceOfAtUser4 = await VECakeSC.balanceOfAt(user4.address, currentBlockNumber); + console.log("lock expired", balanceOfAtUser2.toString()); + expect(balanceOfAtUser2).to.deep.eq(ZERO); + expect(balanceOfAtUser2).to.deep.eq(balanceOfAtUser4); + expect(Number(beforeBalance)).to.gt(Number(balanceOfAtUser2)); + }); + }); + + describe("Migrated users can lock as normal users", () => { + beforeEach(async function () { + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1"), 0); + // migrate from cake pool + await VECakeSC.connect(user2).migrateFromCakePool(); + + await CakeTokenSC.connect(user2).approve(VECakeSC.address, ethers.constants.MaxUint256); + }); + it("Create lock", async function () { + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + let lockAmount = ethers.utils.parseUnits("666"); + await VECakeSC.connect(user2).createLock(lockAmount, OneYear); + + userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + + expect(userInfoOfUser2InVECake.amount).to.deep.eq(lockAmount); + expect(userInfoOfUser2InVECake.end).to.deep.eq(OneYear.div(WEEK).mul(WEEK)); + }); + + it("Increase Lock Amount", async function () { + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + let lockAmount = ethers.utils.parseUnits("666"); + await VECakeSC.connect(user2).createLock(lockAmount, OneYear); + + let userInfoOfUser2InVECakeBefore = await VECakeSC.getUserInfo(user2.address); + + let increaseAmount = ethers.utils.parseUnits("66.66"); + await VECakeSC.connect(user2).increaseLockAmount(increaseAmount); + + let userInfoOfUser2InVECakeAfter = await VECakeSC.getUserInfo(user2.address); + + expect(userInfoOfUser2InVECakeAfter.amount.sub(userInfoOfUser2InVECakeBefore.amount)).to.deep.eq(increaseAmount); + }); + + it("Increase Unlock Time", async function () { + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + let lockAmount = ethers.utils.parseUnits("666"); + await VECakeSC.connect(user2).createLock(lockAmount, OneYear); + + await time.increase(YEAR.div(2).toNumber()); + + let newUnlockTime = OneYear.add(YEAR.div(2)); + + await VECakeSC.connect(user2).increaseUnlockTime(newUnlockTime); + + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + + expect(userInfoOfUser2InVECake.end).to.deep.eq(newUnlockTime.div(WEEK).mul(WEEK)); + }); + + it("Withdraw after lock expired", async function () { + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + let lockAmount = ethers.utils.parseUnits("666"); + await VECakeSC.connect(user2).createLock(lockAmount, OneYear); + + await time.increaseTo(OneYear.add(WEEK).toNumber()); + + let cakeBalanceBeforeOfUser2 = await CakeTokenSC.balanceOf(user2.address); + + await VECakeSC.connect(user2).withdrawAll(user2.address); + + let cakeBalanceAfterOfUser2 = await CakeTokenSC.balanceOf(user2.address); + + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + + expect(cakeBalanceAfterOfUser2.sub(cakeBalanceBeforeOfUser2)).to.deep.eq(lockAmount); + expect(userInfoOfUser2InVECake.amount).to.deep.eq(ZERO); + expect(userInfoOfUser2InVECake.end).to.deep.eq(ZERO); + }); + + it("User balanceOf should be equal to the sum of user address and proxy address ", async function () { + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + let lockAmount = ethers.utils.parseUnits("666"); + await VECakeSC.connect(user2).createLock(lockAmount, OneYear); + + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + let balanceOfUser2 = await VECakeSC.balanceOfUser(user2.address); + let balanceOfUser2Proxy = await VECakeSC.balanceOfUser(userInfoOfUser2InVECake.cakePoolProxy); + let totalBalanceOfUser2 = await VECakeSC.balanceOf(user2.address); + + expect(balanceOfUser2.add(balanceOfUser2Proxy)).to.deep.eq(totalBalanceOfUser2); + }); + + it("User balanceOfAt should be equal to the sum of user address and proxy address ", async function () { + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + let lockAmount = ethers.utils.parseUnits("666"); + await VECakeSC.connect(user2).createLock(lockAmount, OneYear); + + let userInfoOfUser2InVECake = await VECakeSC.getUserInfo(user2.address); + + now = BigNumber.from((await time.latest()).toString()); + let nextWeek = now.add(WEEK); + + // first week + let currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + let balanceOfAtUser2 = await VECakeSC.balanceOfAtUser(user2.address, currentBlockNumber); + let balanceOfAtUser2Proxy = await VECakeSC.balanceOfAtUser( + userInfoOfUser2InVECake.cakePoolProxy, + currentBlockNumber + ); + let totalBalanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + + expect(balanceOfAtUser2.add(balanceOfAtUser2Proxy)).to.deep.eq(totalBalanceOfAtUser2); + + // second week + await time.increaseTo(nextWeek.toNumber()); + nextWeek = now.add(WEEK.mul(2)); + currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + balanceOfAtUser2 = await VECakeSC.balanceOfAtUser(user2.address, currentBlockNumber); + balanceOfAtUser2Proxy = await VECakeSC.balanceOfAtUser(userInfoOfUser2InVECake.cakePoolProxy, currentBlockNumber); + totalBalanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + expect(balanceOfAtUser2.add(balanceOfAtUser2Proxy)).to.deep.eq(totalBalanceOfAtUser2); + + // tenth week + nextWeek = now.add(WEEK.mul(10)); + await time.increaseTo(nextWeek.toNumber()); + currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + balanceOfAtUser2 = await VECakeSC.balanceOfAtUser(user2.address, currentBlockNumber); + balanceOfAtUser2Proxy = await VECakeSC.balanceOfAtUser(userInfoOfUser2InVECake.cakePoolProxy, currentBlockNumber); + totalBalanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + expect(balanceOfAtUser2.add(balanceOfAtUser2Proxy)).to.deep.eq(totalBalanceOfAtUser2); + + // forty week + nextWeek = now.add(WEEK.mul(40)); + await time.increaseTo(nextWeek.toNumber()); + currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + balanceOfAtUser2 = await VECakeSC.balanceOfAtUser(user2.address, currentBlockNumber); + balanceOfAtUser2Proxy = await VECakeSC.balanceOfAtUser(userInfoOfUser2InVECake.cakePoolProxy, currentBlockNumber); + totalBalanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + expect(balanceOfAtUser2.add(balanceOfAtUser2Proxy)).to.deep.eq(totalBalanceOfAtUser2); + + // lock expired + nextWeek = now.add(WEEK.mul(60)); + await time.increaseTo(nextWeek.toNumber()); + currentBlockNumber = BigNumber.from((await time.latestBlock()).toString()); + + balanceOfAtUser2 = await VECakeSC.balanceOfAtUser(user2.address, currentBlockNumber); + balanceOfAtUser2Proxy = await VECakeSC.balanceOfAtUser(userInfoOfUser2InVECake.cakePoolProxy, currentBlockNumber); + totalBalanceOfAtUser2 = await VECakeSC.balanceOfAt(user2.address, currentBlockNumber); + expect(balanceOfAtUser2.add(balanceOfAtUser2Proxy)).to.deep.eq(totalBalanceOfAtUser2); + expect(balanceOfAtUser2).to.deep.eq(ZERO); + expect(balanceOfAtUser2Proxy).to.deep.eq(ZERO); + expect(totalBalanceOfAtUser2).to.deep.eq(ZERO); + }); + }); + + describe("Owner operations", () => { + beforeEach(async function () { + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1"), 0); + }); + + it("Set Early Withdraw", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + let cakeBalanceBeforeOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + await expectRevert( + VECakeSC.connect(user4).earlyWithdraw(user4.address, ethers.utils.parseUnits("88.88")), + "Forbid" + ); + + await VECakeSC.setEarlyWithdrawSwitch(true); + + await VECakeSC.connect(user4).earlyWithdraw(user4.address, ethers.utils.parseUnits("88.88")); + + let cakeBalanceAfterOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + let userInfoOfUser4InVECake = await VECakeSC.getUserInfo(user4.address); + + expect(cakeBalanceAfterOfUser4.sub(cakeBalanceBeforeOfUser4)).to.deep.eq(ethers.utils.parseUnits("88.88")); + expect(userInfoOfUser4InVECake.amount).to.deep.eq( + ethers.utils.parseUnits("1000").sub(ethers.utils.parseUnits("88.88")) + ); + }); + + it("Set Limit Time Of Convert", async function () { + let limitTimeOfConvert = await VECakeSC.limitTimeOfConvert(); + expect(limitTimeOfConvert).to.deep.eq(WEEK.mul(2)); + + await VECakeSC.setLimitTimeOfConvert(WEEK.mul(6)); + limitTimeOfConvert = await VECakeSC.limitTimeOfConvert(); + expect(limitTimeOfConvert).to.deep.eq(WEEK.mul(6)); + }); + + it("Set Early Withdraw Config", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + let cakeBalanceBeforeOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + await VECakeSC.setEarlyWithdrawSwitch(true); + const newEarlyWithdrawBpsPerWeek = 100; // 1% + const newRedistributeBps = 4000; // 40% + const newTreasuryAddr = treasury.address; + const newRedistributeAddr = redistributor.address; + await VECakeSC.setEarlyWithdrawConfig( + newEarlyWithdrawBpsPerWeek, + newRedistributeBps, + newTreasuryAddr, + newRedistributeAddr + ); + + // ceil the week by adding 1 week first + // uint256 remainingWeeks = (_prevLockEnd + WEEK - block.timestamp) / WEEK; + // // calculate penalty + // _penalty = (earlyWithdrawBpsPerWeek * remainingWeeks * _amount) / 10000; + // // split penalty into two parts + // uint256 _redistribute = (_penalty * redistributeBps) / 10000; + const earlyWithdrawAmount = ethers.utils.parseUnits("100"); + let LockedBalanceOfUser4InVECake = await VECakeSC.locks(user4.address); + let currentTimestamp = BigNumber.from((await time.latest()).toString()); + let remainingWeeks = BigNumber.from(LockedBalanceOfUser4InVECake.end).add(WEEK).sub(currentTimestamp).div(WEEK); + const penalty = BigNumber.from(newEarlyWithdrawBpsPerWeek) + .mul(remainingWeeks) + .mul(earlyWithdrawAmount) + .div(10000); + + // split penalty into two parts + // uint256 _redistribute = (_penalty * redistributeBps) / 10000; + const redistributeCakeAmount = penalty.mul(BigNumber.from(newRedistributeBps)).div(10000); + + await VECakeSC.connect(user4).earlyWithdraw(user4.address, earlyWithdrawAmount); + + const cakeBalanceOfTreasury = await CakeTokenSC.balanceOf(treasury.address); + const accumRedistribute = await VECakeSC.accumRedistribute(); + + let cakeBalanceAfterOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + let userInfoOfUser4InVECake = await VECakeSC.getUserInfo(user4.address); + + expect(accumRedistribute).to.deep.eq(redistributeCakeAmount); + expect(cakeBalanceOfTreasury).to.deep.eq(penalty.sub(redistributeCakeAmount)); + expect(cakeBalanceAfterOfUser4.sub(cakeBalanceBeforeOfUser4)).to.deep.eq(earlyWithdrawAmount.sub(penalty)); + expect(userInfoOfUser4InVECake.amount).to.deep.eq(ethers.utils.parseUnits("1000").sub(earlyWithdrawAmount)); + }); + + it("redistribute, and Set Whitelisted Redistributors", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + let cakeBalanceBeforeOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + await VECakeSC.setEarlyWithdrawSwitch(true); + const newEarlyWithdrawBpsPerWeek = 100; // 1% + const newRedistributeBps = 4000; // 40% + const newTreasuryAddr = treasury.address; + const newRedistributeAddr = redistributor.address; + await VECakeSC.setEarlyWithdrawConfig( + newEarlyWithdrawBpsPerWeek, + newRedistributeBps, + newTreasuryAddr, + newRedistributeAddr + ); + + const earlyWithdrawAmount = ethers.utils.parseUnits("100"); + let LockedBalanceOfUser4InVECake = await VECakeSC.locks(user4.address); + let currentTimestamp = BigNumber.from((await time.latest()).toString()); + let remainingWeeks = BigNumber.from(LockedBalanceOfUser4InVECake.end).add(WEEK).sub(currentTimestamp).div(WEEK); + const penalty = BigNumber.from(newEarlyWithdrawBpsPerWeek) + .mul(remainingWeeks) + .mul(earlyWithdrawAmount) + .div(10000); + + const redistributeCakeAmount = penalty.mul(BigNumber.from(newRedistributeBps)).div(10000); + + await VECakeSC.connect(user4).earlyWithdraw(user4.address, earlyWithdrawAmount); + + const cakeBalanceOfTreasury = await CakeTokenSC.balanceOf(treasury.address); + let accumRedistribute = await VECakeSC.accumRedistribute(); + + await expectRevert(VECakeSC.connect(redistributor).redistribute(), "! wl redistributors"); + + await VECakeSC.setWhitelistedRedistributors([redistributor.address], true); + await VECakeSC.connect(redistributor).redistribute(); + const cakeBalanceOfRedistributor = await CakeTokenSC.balanceOf(redistributor.address); + + expect(cakeBalanceOfRedistributor).to.deep.eq(redistributeCakeAmount); + expect(cakeBalanceOfRedistributor).to.deep.eq(accumRedistribute); + accumRedistribute = await VECakeSC.accumRedistribute(); + expect(accumRedistribute).to.deep.eq(ZERO); + }); + + it("Set No Penalty For Early Withdraw", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("1000"), OneYear); + + let cakeBalanceBeforeOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + await VECakeSC.setEarlyWithdrawSwitch(true); + const newEarlyWithdrawBpsPerWeek = 100; // 1% + const newRedistributeBps = 4000; // 40% + const newTreasuryAddr = treasury.address; + const newRedistributeAddr = redistributor.address; + await VECakeSC.setEarlyWithdrawConfig( + newEarlyWithdrawBpsPerWeek, + newRedistributeBps, + newTreasuryAddr, + newRedistributeAddr + ); + // setNoPenaltyForEarlyWithdraw for user4 + await VECakeSC.setNoPenaltyForEarlyWithdraw(user4.address, true); + + const earlyWithdrawAmount = ethers.utils.parseUnits("100"); + await VECakeSC.connect(user4).earlyWithdraw(user4.address, earlyWithdrawAmount); + + let cakeBalanceAfterOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + const cakeBalanceOfTreasury = await CakeTokenSC.balanceOf(treasury.address); + let accumRedistribute = await VECakeSC.accumRedistribute(); + + expect(cakeBalanceOfTreasury).to.deep.eq(ZERO); + expect(accumRedistribute).to.deep.eq(ZERO); + expect(cakeBalanceAfterOfUser4.sub(cakeBalanceBeforeOfUser4)).to.deep.eq(earlyWithdrawAmount); + }); + + it("Set Emergency Withdraw Switch", async function () { + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + + let now = (await time.latest()).toString(); + let OneYear = BigNumber.from(now).add(YEAR); + const lockAmount = ethers.utils.parseUnits("1000"); + await VECakeSC.connect(user4).createLock(lockAmount, OneYear); + + let cakeBalanceBeforeOfUser4 = await CakeTokenSC.balanceOf(user4.address); + + await expectRevert(VECakeSC.connect(user4).emergencyWithdraw(), "Forbid emergency withdraw"); + + await VECakeSC.setEmergencyWithdrawSwitch(true); + await VECakeSC.connect(user4).emergencyWithdraw(); + + let cakeBalanceAfterOfUser4 = await CakeTokenSC.balanceOf(user4.address); + expect(cakeBalanceAfterOfUser4.sub(cakeBalanceBeforeOfUser4)).to.deep.eq(lockAmount); + + let LockedBalanceOfUser4InVECake = await VECakeSC.locks(user4.address); + + expect(LockedBalanceOfUser4InVECake.amount).to.deep.eq(ZERO); + expect(LockedBalanceOfUser4InVECake.end).to.deep.eq(ZERO); + }); + }); +}); diff --git a/projects/vecake/test/VECake_totalSupply.test.ts b/projects/vecake/test/VECake_totalSupply.test.ts new file mode 100644 index 00000000..e11f75fa --- /dev/null +++ b/projects/vecake/test/VECake_totalSupply.test.ts @@ -0,0 +1,220 @@ +import { artifacts, contract, ethers, network } from "hardhat"; +import { time, BN, expectEvent, expectRevert } from "@openzeppelin/test-helpers"; +import { parseEther, formatEther } from "ethers/lib/utils"; +import { expect } from "chai"; +import { beforeEach } from "mocha"; +import { BigNumber } from "ethers"; + +import ERC20MockArtifact from "./artifactsFile/ERC20Mock.json"; +import CakeTokenArtifact from "./artifactsFile/CakeToken.json"; +import SyrupBarArtifact from "./artifactsFile/SyrupBar.json"; +import MasterChefArtifact from "./artifactsFile/MasterChef.json"; +import MasterChefV2Artifact from "./artifactsFile/MasterChefV2.json"; +import CakePoolArtifact from "./artifactsFile/CakePool.json"; +import VECakeArtifact from "./artifactsFile/VECakeTest.json"; +import ProxyForCakePoolArtifact from "./artifactsFile/ProxyForCakePool.json"; +import ProxyForCakePoolFactoryArtifact from "./artifactsFile/ProxyForCakePoolFactory.json"; +import DelegatorArtifact from "./artifactsFile/Delegator.json"; + +const ZERO = BigNumber.from(0); +const DAY = BigNumber.from(86400); +const WEEK = DAY.mul(7); +const YEAR = DAY.mul(365); +const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; + +describe("VCake", () => { + let ProxyForCakePoolFactorySC, masterChefV2, CakePoolSC, VECakeSC, CakeTokenSC; + let admin; + let user1; + let user2; + let user3; + let user4; + let user5; + + before(async function () { + [admin, user1, user2, user3, user4, user5] = await ethers.getSigners(); + }); + + beforeEach(async () => { + const ERC20Mock = await ethers.getContractFactoryFromArtifact(ERC20MockArtifact); + + // deploy cake token + const CakeToken = await ethers.getContractFactoryFromArtifact(CakeTokenArtifact); + CakeTokenSC = await CakeToken.deploy(); + // mint cake for users + await CakeTokenSC["mint(address,uint256)"](admin.address, ethers.utils.parseUnits("100000000000000")); + await CakeTokenSC["mint(address,uint256)"](user1.address, ethers.utils.parseUnits("100000000000000")); + await CakeTokenSC["mint(address,uint256)"](user2.address, ethers.utils.parseUnits("100000000000000")); + await CakeTokenSC["mint(address,uint256)"](user3.address, ethers.utils.parseUnits("100000000000000")); + await CakeTokenSC["mint(address,uint256)"](user4.address, ethers.utils.parseUnits("100000000000000")); + await CakeTokenSC["mint(address,uint256)"](user5.address, ethers.utils.parseUnits("100000000000000")); + + // deploy SyrupBar + const SyrupBar = await ethers.getContractFactoryFromArtifact(SyrupBarArtifact); + const syrupBar = await SyrupBar.deploy(CakeTokenSC.address); + + // deploy MasterChef + const MasterChef = await ethers.getContractFactoryFromArtifact(MasterChefArtifact); + const masterChef = await MasterChef.deploy( + CakeTokenSC.address, + syrupBar.address, + admin.address, + ethers.utils.parseUnits("40"), + ethers.constants.Zero + ); + + // transfer ownership to MasterChef + await CakeTokenSC.transferOwnership(masterChef.address); + await syrupBar.transferOwnership(masterChef.address); + + const lpTokenV1 = await ERC20Mock.deploy("LP Token V1", "LPV1"); + const dummyTokenV2 = await ERC20Mock.deploy("Dummy Token V2", "DTV2"); + + // add pools in MasterChef + await masterChef.add(0, lpTokenV1.address, true); // farm with pid 1 and 0 allocPoint + await masterChef.add(1, dummyTokenV2.address, true); // farm with pid 2 and 1 allocPoint + + // deploy MasterChefV2 + const MasterChefV2 = await ethers.getContractFactoryFromArtifact(MasterChefV2Artifact); + masterChefV2 = await MasterChefV2.deploy(masterChef.address, CakeTokenSC.address, 2, admin.address); + + await dummyTokenV2.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenV2.approve(masterChefV2.address, ethers.constants.MaxUint256); + await masterChefV2.init(dummyTokenV2.address); + + const lpTokenV2 = await ERC20Mock.deploy("LP Token V2", "LPV2"); + const dummyTokenV3 = await ERC20Mock.deploy("Dummy Token V3", "DTV3"); + const dummyTokenForCakePool = await ERC20Mock.deploy("Dummy Token Cake Pool", "DTCP"); + const dummyTokenForSpecialPool2 = await ERC20Mock.deploy("Dummy Token Special pool 2", "DT"); + + await masterChefV2.add(0, lpTokenV2.address, true, true); // regular farm with pid 0 and 1 allocPoint + await masterChefV2.add(1, dummyTokenV3.address, true, true); // regular farm with pid 1 and 1 allocPoint + await masterChefV2.add(1, dummyTokenForCakePool.address, false, true); // special farm with pid 2 and 1 allocPoint + await masterChefV2.add(0, dummyTokenForSpecialPool2.address, false, true); // special farm with pid 3 and 0 allocPoint + + // deploy cake pool + const CakePool = await ethers.getContractFactoryFromArtifact(CakePoolArtifact); + CakePoolSC = await CakePool.deploy( + CakeTokenSC.address, + masterChefV2.address, + admin.address, + admin.address, + admin.address, + 2 + ); + await masterChefV2.updateWhiteList(CakePoolSC.address, true); + await dummyTokenForCakePool.mint(admin.address, ethers.utils.parseUnits("1000")); + await dummyTokenForCakePool.approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakePoolSC.init(dummyTokenForCakePool.address); + + // approve cake for CakePoolSC + await CakeTokenSC.connect(admin).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user1).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user2).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user3).approve(CakePoolSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user4).approve(CakePoolSC.address, ethers.constants.MaxUint256); + + // deploy ProxyForCakePoolFactory + const ProxyForCakePoolFactory = await ethers.getContractFactoryFromArtifact(ProxyForCakePoolFactoryArtifact); + ProxyForCakePoolFactorySC = await ProxyForCakePoolFactory.deploy(); + + // deploy VECake + const VECake = await ethers.getContractFactoryFromArtifact(VECakeArtifact); + VECakeSC = await VECake.deploy(CakePoolSC.address, CakeTokenSC.address, ProxyForCakePoolFactorySC.address); + + await CakeTokenSC.connect(admin).approve(VECakeSC.address, ethers.constants.MaxUint256); + + await ProxyForCakePoolFactorySC.initialize(VECakeSC.address); + + await CakePoolSC.setVCakeContract(VECakeSC.address); + + await VECakeSC.initializeCakePoolMigration(); + + // approve cake for VECake + await CakeTokenSC.connect(admin).approve(VECakeSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user1).approve(VECakeSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user2).approve(VECakeSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user3).approve(VECakeSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user4).approve(VECakeSC.address, ethers.constants.MaxUint256); + await CakeTokenSC.connect(user5).approve(VECakeSC.address, ethers.constants.MaxUint256); + + await network.provider.send("evm_setAutomine", [false]); + }); + + afterEach(async () => { + // await network.provider.send("hardhat_reset"); + await network.provider.send("evm_setAutomine", [true]); + }); + + describe("Check totalSupply", () => { + beforeEach(async function () { + // stop emission in cake pool + await masterChefV2.set(2, 0, true); + await masterChefV2.set(3, 1, true); + // update cake pool + await CakePoolSC.connect(user1).deposit(ethers.utils.parseUnits("1"), 0); + }); + + it("Total supply", async function () { + let now = Number((await time.latest()).toString()); + + let currectTimestamp = 1704326399; + if (now >= currectTimestamp) { + console.log("Test cases expired !!!"); + } else { + await time.increaseTo(currectTimestamp); + + let user1UnlockTime = 1706745600; // + await VECakeSC.connect(user1).createLock(ethers.utils.parseUnits("1000"), user1UnlockTime); + + let user2UnlockTime = 1761782400; + await VECakeSC.connect(user2).createLock(ethers.utils.parseUnits("1000"), user2UnlockTime); + + let user3UnlockTime = 1706745600; + await VECakeSC.connect(user3).createLock(ethers.utils.parseUnits("5000"), user3UnlockTime); + + await time.increase(1); + + let user4UnlockTime = 1730332800; + await VECakeSC.connect(user4).createLock(ethers.utils.parseUnits("100000"), user4UnlockTime); + + let user5UnlockTime = 1730332800; + await VECakeSC.connect(user5).createLock(ethers.utils.parseUnits("2500"), user5UnlockTime); + + await time.increase(1); + + let user1PointEpoch = await VECakeSC.userPointEpoch(user1.address); + let user1PointHistory = await VECakeSC.userPointHistory(user1.address, user1PointEpoch); + let balanceOfUser1 = await VECakeSC.balanceOf(user1.address); + console.log("User1 bias:", balanceOfUser1, "slope: ", user1PointHistory.slope); + + let user2PointEpoch = await VECakeSC.userPointEpoch(user2.address); + let user2PointHistory = await VECakeSC.userPointHistory(user2.address, user2PointEpoch); + let balanceOfUser2 = await VECakeSC.balanceOf(user2.address); + console.log("User2 bias:", balanceOfUser2, "slope: ", user2PointHistory.slope); + + let user3PointEpoch = await VECakeSC.userPointEpoch(user3.address); + let user3PointHistory = await VECakeSC.userPointHistory(user3.address, user3PointEpoch); + let balanceOfUser3 = await VECakeSC.balanceOf(user3.address); + console.log("User3 bias:", balanceOfUser3, "slope: ", user3PointHistory.slope); + + let user4PointEpoch = await VECakeSC.userPointEpoch(user4.address); + let user4PointHistory = await VECakeSC.userPointHistory(user4.address, user4PointEpoch); + let balanceOfUser4 = await VECakeSC.balanceOf(user4.address); + console.log("User4 bias:", balanceOfUser4, "slope: ", user4PointHistory.slope); + + let user5PointEpoch = await VECakeSC.userPointEpoch(user5.address); + let user5PointHistory = await VECakeSC.userPointHistory(user5.address, user5PointEpoch); + let balanceOfUser5 = await VECakeSC.balanceOf(user5.address); + console.log("User5 bias:", balanceOfUser5, "slope: ", user5PointHistory.slope); + + let totalSupply = await VECakeSC.totalSupply(); + console.log("totalSupply:", totalSupply); + + let sum = balanceOfUser1.add(balanceOfUser2).add(balanceOfUser3).add(balanceOfUser4).add(balanceOfUser5); + console.log("Sum :", sum); + expect(totalSupply).to.deep.eq(sum); + } + }); + }); +}); diff --git a/projects/vecake/test/artifactsFile/CakePool.json b/projects/vecake/test/artifactsFile/CakePool.json new file mode 100644 index 00000000..50a59266 --- /dev/null +++ b/projects/vecake/test/artifactsFile/CakePool.json @@ -0,0 +1,1551 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CakePool", + "sourceName": "contracts/CakePool.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IMasterChefV2", + "name": "_masterchefV2", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "duration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastDepositedTime", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "free", + "type": "bool" + } + ], + "name": "FreeFeeUser", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Harvest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Init", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedDuration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockTimestamp", + "type": "uint256" + } + ], + "name": "Lock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "boostContract", + "type": "address" + } + ], + "name": "NewBoostContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "boostWeight", + "type": "uint256" + } + ], + "name": "NewBoostWeight", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "durationFactor", + "type": "uint256" + } + ], + "name": "NewDurationFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "durationFactorOverdue", + "type": "uint256" + } + ], + "name": "NewDurationFactorOverdue", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxLockDuration", + "type": "uint256" + } + ], + "name": "NewMaxLockDuration", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "NewOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "overdueFee", + "type": "uint256" + } + ], + "name": "NewOverdueFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "performanceFee", + "type": "uint256" + } + ], + "name": "NewPerformanceFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "performanceFeeContract", + "type": "uint256" + } + ], + "name": "NewPerformanceFeeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "treasury", + "type": "address" + } + ], + "name": "NewTreasury", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unlockFreeDuration", + "type": "uint256" + } + ], + "name": "NewUnlockFreeDuration", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "VCake", + "type": "address" + } + ], + "name": "NewVCakeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFee", + "type": "uint256" + } + ], + "name": "NewWithdrawFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFeeContract", + "type": "uint256" + } + ], + "name": "NewWithdrawFeeContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawFeePeriod", + "type": "uint256" + } + ], + "name": "NewWithdrawFeePeriod", + "type": "event" + }, + { + "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": [], + "name": "Pause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockTimestamp", + "type": "uint256" + } + ], + "name": "Unlock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Unpause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BOOST_WEIGHT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BOOST_WEIGHT_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION_FACTOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION_FACTOR_OVERDUE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK_DURATION_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_OVERDUE_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_PERFORMANCE_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_WITHDRAW_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_WITHDRAW_FEE_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_DEPOSIT_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_LOCK_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_WITHDRAW_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION_FACTOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION_FACTOR_SHARE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNLOCK_FREE_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VCake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "available", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "boostContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePoolPID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "calculateOverdueFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "calculatePerformanceFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "calculateTotalPendingCakeRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "calculateWithdrawFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockDuration", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freeOverdueFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freePerformanceFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "freeWithdrawFeeUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPricePerFullShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "inCaseTokensGetStuck", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "dummyToken", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "masterchefV2", + "outputs": [ + { + "internalType": "contract IMasterChefV2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "overdueFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "performanceFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "performanceFeeContract", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_boostContract", + "type": "address" + } + ], + "name": "setBoostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_boostWeight", + "type": "uint256" + } + ], + "name": "setBoostWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_durationFactor", + "type": "uint256" + } + ], + "name": "setDurationFactor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_durationFactorOverdue", + "type": "uint256" + } + ], + "name": "setDurationFactorOverdue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setFreePerformanceFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxLockDuration", + "type": "uint256" + } + ], + "name": "setMaxLockDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_overdueFee", + "type": "uint256" + } + ], + "name": "setOverdueFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setOverdueFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_performanceFee", + "type": "uint256" + } + ], + "name": "setPerformanceFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_performanceFeeContract", + "type": "uint256" + } + ], + "name": "setPerformanceFeeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasury", + "type": "address" + } + ], + "name": "setTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_unlockFreeDuration", + "type": "uint256" + } + ], + "name": "setUnlockFreeDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_VCake", + "type": "address" + } + ], + "name": "setVCakeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFee", + "type": "uint256" + } + ], + "name": "setWithdrawFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFeeContract", + "type": "uint256" + } + ], + "name": "setWithdrawFeeContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawFeePeriod", + "type": "uint256" + } + ], + "name": "setWithdrawFeePeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_free", + "type": "bool" + } + ], + "name": "setWithdrawFeeUser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalBoostDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalLockedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "unlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastDepositedTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cakeAtLastUserAction", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUserActionTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockStartTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockEndTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "locked", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "lockedAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawByAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFeeContract", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawFeePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60c060405262093a80600e556301e13380600f556301e1338060105562ed4e0060115564e8d4a5100060125560c860135560c8601455600a601555600a60165564e8d4a510006017556203f4806018553480156200005c57600080fd5b5060405162003e5838038062003e588339810160408190526200007f9162000152565b6200008a33620000e9565b6000805460ff60a01b191690556001600160a01b0395861660805293851660a052600880549386166001600160a01b03199485161790556009805492861692841692909217909155600a805491909416911617909155600b55620001da565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200014f57600080fd5b50565b60008060008060008060c087890312156200016c57600080fd5b8651620001798162000139565b60208801519096506200018c8162000139565b60408801519095506200019f8162000139565b6060880151909450620001b28162000139565b6080880151909350620001c58162000139565b8092505060a087015190509295509295509295565b60805160a051613bf6620002626000396000818161082e01528181610bd301528181610c710152818161146c0152818161304801526130f10152600081816109360152818161128c0152818161164b01528181611f46015281816126ae015281816126f3015281816129fd01528181612aad0152818161331501526134fe0152613bf66000f3fe608060405234801561001057600080fd5b50600436106104145760003560e01c80638778878211610221578063cb528b521161012b578063e464c623116100c3578063f2fde38b11610087578063f2fde38b146108f8578063f786b9581461090b578063f851a4401461091e578063fc0c546a14610931578063fd253b641461095857600080fd5b8063e464c623146108c1578063e4b37ef5146108ca578063e73008bc146108d3578063e941fa78146108dc578063f0f44260146108e557600080fd5b8063cb528b5214610829578063ccd34cd514610758578063d4b0de2f14610850578063d826ed0614610859578063def68a9c1461086c578063def7869d1461087f578063df10b4e614610892578063dfcedeee1461089b578063e2bbb158146108ae57600080fd5b8063acaf88cd116101b9578063bc75f4b81161017d578063bc75f4b8146107de578063bdca9165146107e7578063beba0fa0146107f0578063c54d349c14610803578063c6ed51be1461081657600080fd5b8063acaf88cd1461079c578063b3ab15fb146107a5578063b685784414610521578063b6ac642a146107b8578063bb9f408d146107cb57600080fd5b8063877887821461071157806387d4bda91461071a5780638da5cb5b1461073d57806393c99e6a14610745578063948a03f21461075857806395dc14e114610764578063a3639b3914610777578063a5834e061461078a578063aaada5da1461079357600080fd5b806348a0d754116103225780636d4710b9116102ba578063731ff24a1161027e578063731ff24a146106e657806377c7b8fc146106f957806378b4330f146105545780638456cb5914610701578063853828b61461070957600080fd5b80636d4710b9146106a7578063704b6c02146106b057806370897b23146106c3578063715018a6146106d6578063722713f7146106de57600080fd5b806348a0d754146106175780634e4de1e91461061f5780634f1bfc9e146106325780635521e9bf1461063b578063570ca7351461064e57806358ebceb6146106615780635c975abb1461066957806361d027b314610671578063668679ba1461068457600080fd5b80632cfc5f01116103b05780633a98ef39116103745780633a98ef39146105b75780633eb78874146105c05780633f4ba83a146105c95780633fec4e32146105d1578063423b93ed1461060457600080fd5b80632cfc5f01146105545780632d19b9821461055e5780632e1a7d4d1461057e5780632f6c493c1461059157806335981921146105a457600080fd5b806301e813261461041957806305a9f274146104375780630c59696b1461044057806314ff3039146104555780631959a0021461046857806319ab453c1461050e5780631ea30fef146105215780631efac1b81461052e57806329a5cfd614610541575b600080fd5b6104246305265c0081565b6040519081526020015b60405180910390f35b610424600d5481565b61045361044e3660046137ed565b610965565b005b6104536104633660046137ed565b610a40565b6104c861047636600461381b565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460068601546007870154600890970154959794969495939492939192909160ff9091169089565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200161042e565b61045361051c36600461381b565b610ac1565b6104246509184e72a00081565b61045361053c3660046137ed565b610d02565b61042461054f366004613838565b610dda565b61042462093a8081565b600254610571906001600160a01b031681565b60405161042e9190613864565b61045361058c3660046137ed565b610f15565b61045361059f36600461381b565b610f8e565b6104536105b23660046137ed565b6110a1565b61042460075481565b61042460145481565b61045361115f565b6105f46105df36600461381b565b60046020526000908152604090205460ff1681565b604051901515815260200161042e565b610453610612366004613886565b6111e0565b610424611272565b61045361062d366004613886565b611307565b610424600f5481565b6104536106493660046137ed565b611399565b600a54610571906001600160a01b031681565b61042461143f565b6105f46114d7565b600954610571906001600160a01b031681565b6105f461069236600461381b565b60066020526000908152604090205460ff1681565b610424600b5481565b6104536106be36600461381b565b6114e7565b6104536106d13660046137ed565b611588565b610453611609565b610424611644565b6104246b204fce5e3e2502611000000081565b6104246116e0565b610453611732565b6104536117b4565b61042460135481565b6105f461072836600461381b565b60056020526000908152604090205460ff1681565b6105716117cd565b6104536107533660046137ed565b6117dc565b61042464e8d4a5100081565b61042461077236600461381b565b6118ad565b6104536107853660046137ed565b611a00565b61042460175481565b610424600e5481565b61042460115481565b6104536107b336600461381b565b611aaf565b6104536107c63660046137ed565b611b50565b6104536107d93660046137ed565b611bd1565b61042460125481565b6104246107d081565b6104536107fe366004613886565b611c52565b6104536108113660046137ed565b611ce4565b61042461082436600461381b565b611d9f565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b6104246101f481565b61045361086736600461381b565b611e7e565b61045361087a36600461381b565b611f1a565b61045361088d36600461381b565b61205e565b61042460185481565b600154610571906001600160a01b031681565b6104536108bc3660046138bf565b6120fa565b61042460105481565b61042460165481565b610424600c5481565b61042460155481565b6104536108f336600461381b565b61217a565b61045361090636600461381b565b61221b565b6104536109193660046137ed565b6122b8565b600854610571906001600160a01b031681565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b610424652d79883d200081565b6008546001600160a01b031633146109985760405162461bcd60e51b815260040161098f906138e1565b60405180910390fd5b64e8d4a51000811115610a045760405162461bcd60e51b815260206004820152602e60248201527f6f7665726475654665652063616e6e6f74206265206d6f7265207468616e204d60448201526d41585f4f5645524455455f46454560901b606482015260840161098f565b60178190556040518181527ff4bd1c5978320077e792afbb3911e8cab1325ce28a6b3e67f9067a1d80692961906020015b60405180910390a150565b6008546001600160a01b03163314610a6a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115610a8c5760405162461bcd60e51b815260040161098f90613906565b60168190556040518181527fcab352e118188b8a2f20a2e8c4ce1241ce2c1740aac4f17c5b0831e65824d8ef90602001610a35565b33610aca6117cd565b6001600160a01b031614610af05760405162461bcd60e51b815260040161098f90613956565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610b1f903390600401613864565b602060405180830381865afa158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b60919061398b565b905080610ba75760405162461bcd60e51b8152602060048201526015602482015274042616c616e6365206d75737420657863656564203605c1b604482015260640161098f565b610bbc6001600160a01b038316333084612391565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820183905283169063095ea7b3906044016020604051808303816000875af1158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f91906139a4565b50600b54604051631c57762b60e31b81526004810191909152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b50506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc14925060009150a15050565b6008546001600160a01b03163314610d2c5760405162461bcd60e51b815260040161098f906138e1565b62093a80811115610da55760405162461bcd60e51b815260206004820152603d60248201527f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560448201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000606482015260840161098f565b60188190556040518181527fb89ddaddb7435be26824cb48d2d0186c9525a2e1ec057abcb502704cdc0686cc90602001610a35565b6001600160a01b03821660009081526003602052604081208054831115610e0057805492505b3360009081526005602052604090205460ff16158015610e3057506018548160010154610e2d91906139d7565b42105b15610f09576000610e3f61143f565b610e47611644565b610e5191906139d7565b8254909150600090610e6864e8d4a51000876139ef565b610e729190613a0e565b90506000610e7f87612402565b60068501546007548654610e9390876139ef565b610e9d9190613a0e565b610ea79190613a30565b610eb19190613a30565b9050600064e8d4a51000610ec584846139ef565b610ecf9190613a0e565b601554909150333b15610ee157506016545b6000612710610ef083856139ef565b610efa9190613a0e565b9750610f0f9650505050505050565b60009150505b92915050565b610f1d6114d7565b15610f3a5760405162461bcd60e51b815260040161098f90613a47565b60008111610f805760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161098f565b610f8b816000612420565b50565b80336001600160a01b0382161480610fb05750600a546001600160a01b031633145b610ffc5760405162461bcd60e51b815260206004820152601a60248201527f4e6f74206f70657261746f72206f722063616b65206f776e6572000000000000604482015260640161098f565b6110046114d7565b156110215760405162461bcd60e51b815260040161098f90613a47565b6001600160a01b0382166000908152600360205260409020600781015460ff1680156110505750428160050154105b6110905760405162461bcd60e51b815260206004820152601160248201527010d85b9b9bdd081d5b9b1bd8dac81e595d607a1b604482015260640161098f565b61109c600080856127a6565b505050565b6008546001600160a01b031633146110cb5760405162461bcd60e51b815260040161098f906138e1565b6000811161112a5760405162461bcd60e51b815260206004820152602660248201527f4455524154494f4e5f464143544f525f4f5645524455452063616e6e6f74206260448201526565207a65726f60d01b606482015260840161098f565b60118190556040518181527f18b6d179114082d7eda9837e15a39eb30032d5f3df00487a67541398f48fabfe90602001610a35565b6008546001600160a01b031633146111895760405162461bcd60e51b815260040161098f906138e1565b6111916114d7565b6111ad5760405162461bcd60e51b815260040161098f90613a71565b6111b5612e08565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6008546001600160a01b0316331461120a5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166112305760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260046020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906112c1903090600401613864565b602060405180830381865afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611302919061398b565b905090565b6008546001600160a01b031633146113315760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166113575760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260066020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6113a16114d7565b156113be5760405162461bcd60e51b815260040161098f90613a47565b6509184e72a00081116114345760405162461bcd60e51b815260206004820152603860248201527f576974686472617720616d6f756e74206d7573742062652067726561746572206044820152771d1a185b8813525397d5d2551211149055d7d05353d5539560421b606482015260840161098f565b610f8b600082612420565b600b54604051631175a1dd60e01b8152600481019190915230602482015260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631175a1dd90604401602060405180830381865afa1580156114b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f919061398b565b600054600160a01b900460ff1690565b336114f06117cd565b6001600160a01b0316146115165760405162461bcd60e51b815260040161098f90613956565b6001600160a01b03811661153c5760405162461bcd60e51b815260040161098f90613a9f565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91610a3591613864565b6008546001600160a01b031633146115b25760405162461bcd60e51b815260040161098f906138e1565b6107d08111156115d45760405162461bcd60e51b815260040161098f90613acf565b60138190556040518181527fefeafcf03e479a9566d7ef321b4816de0ba19cfa3cd0fae2f8c5f4a0afb342c490602001610a35565b336116126117cd565b6001600160a01b0316146116385760405162461bcd60e51b815260040161098f90613956565b6116426000612e73565b565b6000600c547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016116959190613864565b602060405180830381865afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d6919061398b565b61130291906139d7565b6000600754600014611725576007546116f761143f565b6116ff611644565b61170991906139d7565b61171b90670de0b6b3a76400006139ef565b6113029190613a0e565b50670de0b6b3a764000090565b6008546001600160a01b0316331461175c5760405162461bcd60e51b815260040161098f906138e1565b6117646114d7565b156117815760405162461bcd60e51b815260040161098f90613a47565b611789612ec3565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b3360009081526003602052604090205461164290610f15565b6000546001600160a01b031690565b6008546001600160a01b031633146118065760405162461bcd60e51b815260040161098f906138e1565b652d79883d20008111156118785760405162461bcd60e51b815260206004820152603360248201527f424f4f53545f5745494748542063616e6e6f74206265206d6f7265207468616e604482015272081093d3d4d517d5d15251d21517d312535255606a1b606482015260840161098f565b60128190556040518181527f7666dfff8c3377938e522b4eed3aff079973a976f95969db60a406d49f40da4e90602001610a35565b6001600160a01b03811660009081526003602052604081208054158015906118d95750600781015460ff165b80156118fe57506001600160a01b03831660009081526006602052604090205460ff16155b801561191a575042600e54826005015461191891906139d7565b105b156119f757600061192961143f565b611931611644565b61193b91906139d7565b6006830154600754845492935060009261195590856139ef565b61195f9190613a0e565b6119699190613a30565b9050600083600801548261197d9190613a30565b90506000600e548560050154426119949190613a30565b61199e9190613a30565b90506011548111156119af57506011545b6000601154601754836119c291906139ef565b6119cc9190613a0e565b9050600064e8d4a510006119e083866139ef565b6119ea9190613a0e565b9998505050505050505050565b50600092915050565b6008546001600160a01b03163314611a2a5760405162461bcd60e51b815260040161098f906138e1565b60008111611a7a5760405162461bcd60e51b815260206004820152601e60248201527f4455524154494f4e5f464143544f522063616e6e6f74206265207a65726f0000604482015260640161098f565b60108190556040518181527f9478eb023aac0a7d58a4e935377056bf27cf5b72a2300725f831817a8f62fbde90602001610a35565b33611ab86117cd565b6001600160a01b031614611ade5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b038116611b045760405162461bcd60e51b815260040161098f90613a9f565b600a80546001600160a01b0319166001600160a01b0383169081179091556040517fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a91610a3591613864565b6008546001600160a01b03163314611b7a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115611b9c5760405162461bcd60e51b815260040161098f90613906565b60158190556040518181527fd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d90602001610a35565b6008546001600160a01b03163314611bfb5760405162461bcd60e51b815260040161098f906138e1565b6107d0811115611c1d5760405162461bcd60e51b815260040161098f90613acf565b60148190556040518181527fc5d25457b67b87678c987375af13f6e50beb3ad7bfd009da26766ae986eaa20d90602001610a35565b6008546001600160a01b03163314611c7c5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038216611ca25760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260056020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6008546001600160a01b03163314611d0e5760405162461bcd60e51b815260040161098f906138e1565b60008111611d6a5760405162461bcd60e51b815260206004820152602360248201527f554e4c4f434b5f465245455f4455524154494f4e2063616e6e6f74206265207a60448201526265726f60e81b606482015260840161098f565b600e8190556040518181527ff84bf2b901cfc02956d4e69556d7448cef4ea13587e7714dba7c6d697091e7ad90602001610a35565b6001600160a01b0381166000908152600360205260408120805415801590611dcc5750600781015460ff16155b8015611df157506001600160a01b03831660009081526004602052604090205460ff16155b156119f7576000611e0061143f565b611e08611644565b611e1291906139d7565b90506000600754828460000154611e2991906139ef565b611e339190613a0e565b90506000836002015482611e479190613a30565b601354909150863b15611e5957506014545b6000612710611e6883856139ef565b611e729190613a0e565b98975050505050505050565b6008546001600160a01b03163314611ea85760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038116611ece5760405162461bcd60e51b815260040161098f90613a9f565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5352e27b0414343d9438a1c6e9d04c65c7cb4d91f44920afee588f91717893f191610a3591613864565b6008546001600160a01b03163314611f445760405162461bcd60e51b815260040161098f906138e1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611fd45760405162461bcd60e51b815260206004820152602560248201527f546f6b656e2063616e6e6f742062652073616d65206173206465706f736974206044820152643a37b5b2b760d91b606482015260840161098f565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190612003903090600401613864565b602060405180830381865afa158015612020573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612044919061398b565b905061205a6001600160a01b0383163383612f23565b5050565b6008546001600160a01b031633146120885760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0381166120ae5760405162461bcd60e51b815260040161098f90613a9f565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f8f49a182922022d9119a1a6aeeca151b4a5665e86bd61c1ff32e152d459558b291610a3591613864565b6121026114d7565b1561211f5760405162461bcd60e51b815260040161098f90613a47565b600082118061212e5750600081115b61216f5760405162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015260640161098f565b61205a8282336127a6565b336121836117cd565b6001600160a01b0316146121a95760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166121cf5760405162461bcd60e51b815260040161098f90613a9f565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea08691610a3591613864565b336122246117cd565b6001600160a01b03161461224a5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166122af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161098f565b610f8b81612e73565b6008546001600160a01b031633146122e25760405162461bcd60e51b815260040161098f906138e1565b6305265c0081111561235c5760405162461bcd60e51b815260206004820152603d60248201527f4d41585f4c4f434b5f4455524154494f4e2063616e6e6f74206265206d6f726560448201527f207468616e204d41585f4c4f434b5f4455524154494f4e5f4c494d4954000000606482015260840161098f565b600f8190556040518181527fcab2f3455b51b6ca5377e84fccd0f890b6f6ca36c02e18b6d36cb34f469fe4fe90602001610a35565b6040516001600160a01b03808516602483015283166044820152606481018290526123fc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f53565b50505050565b600061240d826118ad565b61241683611d9f565b610f0f91906139d7565b33600090815260036020526040902080548311156124805760405162461bcd60e51b815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015260640161098f565b428160050154106124c35760405162461bcd60e51b815260206004820152600d60248201526c5374696c6c20696e206c6f636b60981b604482015260640161098f565b6002546001600160a01b031615612537576002546040516351cff8d960e01b81526001600160a01b03909116906351cff8d990612504903390600401613864565b600060405180830381600087803b15801561251e57600080fd5b505af1158015612532573d6000803e3d6000fd5b505050505b805483906000906125546b204fce5e3e25026110000000846139ef565b61255e9190613a0e565b9050612568613025565b612571336131a3565b8415801561257f5750600084115b156125c057600061258e611644565b9050806007548661259f91906139ef565b6125a99190613a0e565b84549093508311156125ba57835492505b506125e7565b82546b204fce5e3e25026110000000906125da90836139ef565b6125e49190613a0e565b91505b6000600754836125f5611644565b6125ff91906139ef565b6126099190613a0e565b90508284600001600082825461261f9190613a30565b9250508190555082600760008282546126389190613a30565b90915550503360009081526005602052604090205460ff1615801561266d5750601854846001015461266a91906139d7565b42105b156126e657601554333b1561268157506016545b600061271061269083856139ef565b61269a9190613a0e565b6009549091506126d7906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6126e18184613a30565b925050505b61271a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612f23565b83541561274c5760075461272c611644565b855461273891906139ef565b6127429190613a0e565b6002850155612754565b600060028501555b4260038501556127633361359e565b604080518281526020810185905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a2505050505050565b6001600160a01b0381166000908152600360205260409020805415806127cc5750600084115b15612845576509184e72a00084116128455760405162461bcd60e51b815260206004820152603660248201527f4465706f73697420616d6f756e74206d757374206265206772656174657220746044820152751a185b8813525397d1115413d4d25517d05353d5539560521b606482015260840161098f565b6005810154839042116128a3578415612882574260048301556008820154600d8054600090612875908490613a30565b9091555050600060088301555b816004015482600501546128969190613a30565b6128a090826139d7565b90505b8315806128b3575062093a808110155b6128ff5760405162461bcd60e51b815260206004820152601f60248201527f4d696e696d756d206c6f636b20706572696f64206973206f6e65207765656b00604482015260640161098f565b600f548111156129515760405162461bcd60e51b815260206004820152601c60248201527f4d6178696d756d206c6f636b20706572696f6420657863656564656400000000604482015260640161098f565b6002546001600160a01b0316156129d057600254604051630efe6a8b60e01b81526001600160a01b038581166004830152602482018890526044820187905290911690630efe6a8b90606401600060405180830381600087803b1580156129b757600080fd5b505af11580156129cb573d6000803e3d6000fd5b505050505b6129d8613025565b600754612a285760006129e9611272565b600954909150612a26906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b505b612a31836131a3565b8315612a8a574282600501541015612a60574260048301819055612a569085906139d7565b6005830155612a7a565b83826005016000828254612a7491906139d7565b90915550505b60078201805460ff191660011790555b600080600080612a98611644565b90508815612ad957612ad56001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001688308c612391565b8892505b855415801590612aed5750600786015460ff165b15612b66576007548654612b0190836139ef565b612b0b9190613a0e565b9150612b1782846139d7565b9250856000015460076000828254612b2f9190613a30565b9091555050600086556004860154421415612b665760088601829055600d8054839190600090612b609084906139d7565b90915550505b60075415612b9657612b788282613a30565b600754612b8590856139ef565b612b8f9190613a0e565b9350612b9a565b8293505b856004015486600501541115612d1b57600060105460125488600401548960050154612bc69190613a30565b612bd091906139ef565b612bda9190613a0e565b9050600064e8d4a51000612bee87846139ef565b612bf89190613a0e565b9050612c0481876139d7565b955085886000016000828254612c1a91906139d7565b909155506000905064e8d4a51000612c3287856139ef565b612c3c9190613a0e565b905080896006016000828254612c5291906139d7565b9250508190555080600c6000828254612c6b91906139d7565b925050819055508b896008016000828254612c8691906139d7565b925050819055508b600d6000828254612c9f91906139d7565b92505081905550896001600160a01b03167f2b943276e5d747f6f7dd46d3b880d8874cb8d6b9b88ca1903990a2738e7dc7a18a600801548b600001548c600401548d60050154612cef9190613a30565b6040805193845260208401929092529082015242606082015260800160405180910390a2505050612d35565b83866000016000828254612d2f91906139d7565b90915550505b6000891180612d445750600088115b15612d50574260018701555b8360076000828254612d6291906139d7565b90915550506006860154600754612d77611644565b8854612d8391906139ef565b612d8d9190613a0e565b612d979190613a30565b6002870155426003870155612dab8761359e565b604080518a8152602081018690529081018990524260608201526001600160a01b038816907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060800160405180910390a2505050505050505050565b612e106114d7565b612e2c5760405162461bcd60e51b815260040161098f90613a71565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051612e699190613864565b60405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612ecb6114d7565b15612ee85760405162461bcd60e51b815260040161098f90613a47565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e5c3390565b6040516001600160a01b03831660248201526044810182905261109c90849063a9059cbb60e01b906064016123c5565b6000612fa8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661366a9092919063ffffffff16565b80519091501561109c5780806020019051810190612fc691906139a4565b61109c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161098f565b600b54604051631175a1dd60e01b815260048101919091523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631175a1dd90604401602060405180830381865afa158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb919061398b565b90508015610f8b5760006130cd611272565b600b54604051630441a3e760e41b81526004810191909152600060248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b15801561313d57600080fd5b505af1158015613151573d6000803e3d6000fd5b50505050600061315f611272565b9050337fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba61318d8484613a30565b60405190815260200160405180910390a2505050565b6001600160a01b038116600090815260036020526040902080541561205a57600781015460ff1615613446576000816006015460075483600001546131e6611644565b6131f091906139ef565b6131fa9190613a0e565b6132049190613a30565b90508160060154600c600082825461321c9190613a30565b90915550506000600683018190558254600780549192909161323f908490613a30565b90915550506001600160a01b03831660009081526006602052604090205460ff1615801561327d575042600e54836005015461327b91906139d7565b105b1561334f5760008260080154826132949190613a30565b90506000600e548460050154426132ab9190613a30565b6132b59190613a30565b90506011548111156132c657506011545b6000601154601754836132d991906139ef565b6132e39190613a0e565b9050600064e8d4a510006132f783866139ef565b6133019190613a0e565b60095490915061333e906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6133488186613a30565b9450505050505b6000613359611644565b9050600060075460001461338f576133718383613a30565b60075461337e90856139ef565b6133889190613a0e565b9050613392565b50815b808455600780548291906000906133aa9084906139d7565b9091555050600584015442111561343f5760078401805460ff19169055600060048501819055600585018190556008850154600d8054919290916133ef908490613a30565b909155505060006008850155604080518481524260208201526001600160a01b038716917ff7870c5b224cbc19873599e46ccfc7103934650509b1af0c3ce90138377c2004910160405180910390a25b5050505050565b6001600160a01b03821660009081526004602052604090205460ff1661205a576000600754613473611644565b835461347f91906139ef565b6134899190613a0e565b90508160000154600760008282546134a19190613a30565b9091555050600080835560028301546134ba9083613a30565b601354909150843b156134cc57506014545b60006127106134db83856139ef565b6134e59190613a0e565b9050801561353457600954613527906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6135318185613a30565b93505b600061353e611644565b90506000600754600014613574576135568683613a30565b60075461356390886139ef565b61356d9190613a0e565b9050613577565b50845b8087556007805482919060009061358f9084906139d7565b90915550505050505050505050565b6001546001600160a01b031615610f8b576001600160a01b0381166000908152600360205260408120600481015460058201549192916135de9190613a30565b6001546008840154600d5460105460405163e874fdaf60e01b81526001600160a01b03898116600483015260248201949094526044810186905260648101929092526084820152929350169063e874fdaf9060a401600060405180830381600087803b15801561364d57600080fd5b505af1158015613661573d6000803e3d6000fd5b50505050505050565b60606136798484600085613683565b90505b9392505050565b6060824710156136e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161098f565b6001600160a01b0385163b61373b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161098f565b600080866001600160a01b031685876040516137579190613b51565b60006040518083038185875af1925050503d8060008114613794576040519150601f19603f3d011682016040523d82523d6000602084013e613799565b606091505b50915091506137a98282866137b4565b979650505050505050565b606083156137c357508161367c565b8251156137d35782518084602001fd5b8160405162461bcd60e51b815260040161098f9190613b6d565b6000602082840312156137ff57600080fd5b5035919050565b6001600160a01b0381168114610f8b57600080fd5b60006020828403121561382d57600080fd5b813561367c81613806565b6000806040838503121561384b57600080fd5b823561385681613806565b946020939093013593505050565b6001600160a01b0391909116815260200190565b8015158114610f8b57600080fd5b6000806040838503121561389957600080fd5b82356138a481613806565b915060208301356138b481613878565b809150509250929050565b600080604083850312156138d257600080fd5b50508035926020909101359150565b6020808252600b908201526a61646d696e3a207775743f60a81b604082015260600190565b60208082526030908201527f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060408201526f4d41585f57495448445241575f46454560801b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561399d57600080fd5b5051919050565b6000602082840312156139b657600080fd5b815161367c81613878565b634e487b7160e01b600052601160045260246000fd5b600082198211156139ea576139ea6139c1565b500190565b6000816000190483118215151615613a0957613a096139c1565b500290565b600082613a2b57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613a4257613a426139c1565b500390565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526016908201527543616e6e6f74206265207a65726f206164647265737360501b604082015260600190565b60208082526036908201527f706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468604082015275616e204d41585f504552464f524d414e43455f46454560501b606082015260800190565b60005b83811015613b40578181015183820152602001613b28565b838111156123fc5750506000910152565b60008251613b63818460208701613b25565b9190910192915050565b6020815260008251806020840152613b8c816040850160208701613b25565b601f01601f1916919091016040019291505056fe3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d44a26469706673582212208fac60e48eb35e29f7a743c638638371e8b2fc9dffb4ce7b25ae133d7651c44a64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106104145760003560e01c80638778878211610221578063cb528b521161012b578063e464c623116100c3578063f2fde38b11610087578063f2fde38b146108f8578063f786b9581461090b578063f851a4401461091e578063fc0c546a14610931578063fd253b641461095857600080fd5b8063e464c623146108c1578063e4b37ef5146108ca578063e73008bc146108d3578063e941fa78146108dc578063f0f44260146108e557600080fd5b8063cb528b5214610829578063ccd34cd514610758578063d4b0de2f14610850578063d826ed0614610859578063def68a9c1461086c578063def7869d1461087f578063df10b4e614610892578063dfcedeee1461089b578063e2bbb158146108ae57600080fd5b8063acaf88cd116101b9578063bc75f4b81161017d578063bc75f4b8146107de578063bdca9165146107e7578063beba0fa0146107f0578063c54d349c14610803578063c6ed51be1461081657600080fd5b8063acaf88cd1461079c578063b3ab15fb146107a5578063b685784414610521578063b6ac642a146107b8578063bb9f408d146107cb57600080fd5b8063877887821461071157806387d4bda91461071a5780638da5cb5b1461073d57806393c99e6a14610745578063948a03f21461075857806395dc14e114610764578063a3639b3914610777578063a5834e061461078a578063aaada5da1461079357600080fd5b806348a0d754116103225780636d4710b9116102ba578063731ff24a1161027e578063731ff24a146106e657806377c7b8fc146106f957806378b4330f146105545780638456cb5914610701578063853828b61461070957600080fd5b80636d4710b9146106a7578063704b6c02146106b057806370897b23146106c3578063715018a6146106d6578063722713f7146106de57600080fd5b806348a0d754146106175780634e4de1e91461061f5780634f1bfc9e146106325780635521e9bf1461063b578063570ca7351461064e57806358ebceb6146106615780635c975abb1461066957806361d027b314610671578063668679ba1461068457600080fd5b80632cfc5f01116103b05780633a98ef39116103745780633a98ef39146105b75780633eb78874146105c05780633f4ba83a146105c95780633fec4e32146105d1578063423b93ed1461060457600080fd5b80632cfc5f01146105545780632d19b9821461055e5780632e1a7d4d1461057e5780632f6c493c1461059157806335981921146105a457600080fd5b806301e813261461041957806305a9f274146104375780630c59696b1461044057806314ff3039146104555780631959a0021461046857806319ab453c1461050e5780631ea30fef146105215780631efac1b81461052e57806329a5cfd614610541575b600080fd5b6104246305265c0081565b6040519081526020015b60405180910390f35b610424600d5481565b61045361044e3660046137ed565b610965565b005b6104536104633660046137ed565b610a40565b6104c861047636600461381b565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460068601546007870154600890970154959794969495939492939192909160ff9091169089565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c0840152151560e08301526101008201526101200161042e565b61045361051c36600461381b565b610ac1565b6104246509184e72a00081565b61045361053c3660046137ed565b610d02565b61042461054f366004613838565b610dda565b61042462093a8081565b600254610571906001600160a01b031681565b60405161042e9190613864565b61045361058c3660046137ed565b610f15565b61045361059f36600461381b565b610f8e565b6104536105b23660046137ed565b6110a1565b61042460075481565b61042460145481565b61045361115f565b6105f46105df36600461381b565b60046020526000908152604090205460ff1681565b604051901515815260200161042e565b610453610612366004613886565b6111e0565b610424611272565b61045361062d366004613886565b611307565b610424600f5481565b6104536106493660046137ed565b611399565b600a54610571906001600160a01b031681565b61042461143f565b6105f46114d7565b600954610571906001600160a01b031681565b6105f461069236600461381b565b60066020526000908152604090205460ff1681565b610424600b5481565b6104536106be36600461381b565b6114e7565b6104536106d13660046137ed565b611588565b610453611609565b610424611644565b6104246b204fce5e3e2502611000000081565b6104246116e0565b610453611732565b6104536117b4565b61042460135481565b6105f461072836600461381b565b60056020526000908152604090205460ff1681565b6105716117cd565b6104536107533660046137ed565b6117dc565b61042464e8d4a5100081565b61042461077236600461381b565b6118ad565b6104536107853660046137ed565b611a00565b61042460175481565b610424600e5481565b61042460115481565b6104536107b336600461381b565b611aaf565b6104536107c63660046137ed565b611b50565b6104536107d93660046137ed565b611bd1565b61042460125481565b6104246107d081565b6104536107fe366004613886565b611c52565b6104536108113660046137ed565b611ce4565b61042461082436600461381b565b611d9f565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b6104246101f481565b61045361086736600461381b565b611e7e565b61045361087a36600461381b565b611f1a565b61045361088d36600461381b565b61205e565b61042460185481565b600154610571906001600160a01b031681565b6104536108bc3660046138bf565b6120fa565b61042460105481565b61042460165481565b610424600c5481565b61042460155481565b6104536108f336600461381b565b61217a565b61045361090636600461381b565b61221b565b6104536109193660046137ed565b6122b8565b600854610571906001600160a01b031681565b6105717f000000000000000000000000000000000000000000000000000000000000000081565b610424652d79883d200081565b6008546001600160a01b031633146109985760405162461bcd60e51b815260040161098f906138e1565b60405180910390fd5b64e8d4a51000811115610a045760405162461bcd60e51b815260206004820152602e60248201527f6f7665726475654665652063616e6e6f74206265206d6f7265207468616e204d60448201526d41585f4f5645524455455f46454560901b606482015260840161098f565b60178190556040518181527ff4bd1c5978320077e792afbb3911e8cab1325ce28a6b3e67f9067a1d80692961906020015b60405180910390a150565b6008546001600160a01b03163314610a6a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115610a8c5760405162461bcd60e51b815260040161098f90613906565b60168190556040518181527fcab352e118188b8a2f20a2e8c4ce1241ce2c1740aac4f17c5b0831e65824d8ef90602001610a35565b33610aca6117cd565b6001600160a01b031614610af05760405162461bcd60e51b815260040161098f90613956565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610b1f903390600401613864565b602060405180830381865afa158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b60919061398b565b905080610ba75760405162461bcd60e51b8152602060048201526015602482015274042616c616e6365206d75737420657863656564203605c1b604482015260640161098f565b610bbc6001600160a01b038316333084612391565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820183905283169063095ea7b3906044016020604051808303816000875af1158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f91906139a4565b50600b54604051631c57762b60e31b81526004810191909152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b158015610cbd57600080fd5b505af1158015610cd1573d6000803e3d6000fd5b50506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc14925060009150a15050565b6008546001600160a01b03163314610d2c5760405162461bcd60e51b815260040161098f906138e1565b62093a80811115610da55760405162461bcd60e51b815260206004820152603d60248201527f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560448201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000606482015260840161098f565b60188190556040518181527fb89ddaddb7435be26824cb48d2d0186c9525a2e1ec057abcb502704cdc0686cc90602001610a35565b6001600160a01b03821660009081526003602052604081208054831115610e0057805492505b3360009081526005602052604090205460ff16158015610e3057506018548160010154610e2d91906139d7565b42105b15610f09576000610e3f61143f565b610e47611644565b610e5191906139d7565b8254909150600090610e6864e8d4a51000876139ef565b610e729190613a0e565b90506000610e7f87612402565b60068501546007548654610e9390876139ef565b610e9d9190613a0e565b610ea79190613a30565b610eb19190613a30565b9050600064e8d4a51000610ec584846139ef565b610ecf9190613a0e565b601554909150333b15610ee157506016545b6000612710610ef083856139ef565b610efa9190613a0e565b9750610f0f9650505050505050565b60009150505b92915050565b610f1d6114d7565b15610f3a5760405162461bcd60e51b815260040161098f90613a47565b60008111610f805760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161098f565b610f8b816000612420565b50565b80336001600160a01b0382161480610fb05750600a546001600160a01b031633145b610ffc5760405162461bcd60e51b815260206004820152601a60248201527f4e6f74206f70657261746f72206f722063616b65206f776e6572000000000000604482015260640161098f565b6110046114d7565b156110215760405162461bcd60e51b815260040161098f90613a47565b6001600160a01b0382166000908152600360205260409020600781015460ff1680156110505750428160050154105b6110905760405162461bcd60e51b815260206004820152601160248201527010d85b9b9bdd081d5b9b1bd8dac81e595d607a1b604482015260640161098f565b61109c600080856127a6565b505050565b6008546001600160a01b031633146110cb5760405162461bcd60e51b815260040161098f906138e1565b6000811161112a5760405162461bcd60e51b815260206004820152602660248201527f4455524154494f4e5f464143544f525f4f5645524455452063616e6e6f74206260448201526565207a65726f60d01b606482015260840161098f565b60118190556040518181527f18b6d179114082d7eda9837e15a39eb30032d5f3df00487a67541398f48fabfe90602001610a35565b6008546001600160a01b031633146111895760405162461bcd60e51b815260040161098f906138e1565b6111916114d7565b6111ad5760405162461bcd60e51b815260040161098f90613a71565b6111b5612e08565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6008546001600160a01b0316331461120a5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166112305760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260046020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906112c1903090600401613864565b602060405180830381865afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611302919061398b565b905090565b6008546001600160a01b031633146113315760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0382166113575760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260066020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6113a16114d7565b156113be5760405162461bcd60e51b815260040161098f90613a47565b6509184e72a00081116114345760405162461bcd60e51b815260206004820152603860248201527f576974686472617720616d6f756e74206d7573742062652067726561746572206044820152771d1a185b8813525397d5d2551211149055d7d05353d5539560421b606482015260840161098f565b610f8b600082612420565b600b54604051631175a1dd60e01b8152600481019190915230602482015260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631175a1dd90604401602060405180830381865afa1580156114b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f919061398b565b600054600160a01b900460ff1690565b336114f06117cd565b6001600160a01b0316146115165760405162461bcd60e51b815260040161098f90613956565b6001600160a01b03811661153c5760405162461bcd60e51b815260040161098f90613a9f565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91610a3591613864565b6008546001600160a01b031633146115b25760405162461bcd60e51b815260040161098f906138e1565b6107d08111156115d45760405162461bcd60e51b815260040161098f90613acf565b60138190556040518181527fefeafcf03e479a9566d7ef321b4816de0ba19cfa3cd0fae2f8c5f4a0afb342c490602001610a35565b336116126117cd565b6001600160a01b0316146116385760405162461bcd60e51b815260040161098f90613956565b6116426000612e73565b565b6000600c547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016116959190613864565b602060405180830381865afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d6919061398b565b61130291906139d7565b6000600754600014611725576007546116f761143f565b6116ff611644565b61170991906139d7565b61171b90670de0b6b3a76400006139ef565b6113029190613a0e565b50670de0b6b3a764000090565b6008546001600160a01b0316331461175c5760405162461bcd60e51b815260040161098f906138e1565b6117646114d7565b156117815760405162461bcd60e51b815260040161098f90613a47565b611789612ec3565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b3360009081526003602052604090205461164290610f15565b6000546001600160a01b031690565b6008546001600160a01b031633146118065760405162461bcd60e51b815260040161098f906138e1565b652d79883d20008111156118785760405162461bcd60e51b815260206004820152603360248201527f424f4f53545f5745494748542063616e6e6f74206265206d6f7265207468616e604482015272081093d3d4d517d5d15251d21517d312535255606a1b606482015260840161098f565b60128190556040518181527f7666dfff8c3377938e522b4eed3aff079973a976f95969db60a406d49f40da4e90602001610a35565b6001600160a01b03811660009081526003602052604081208054158015906118d95750600781015460ff165b80156118fe57506001600160a01b03831660009081526006602052604090205460ff16155b801561191a575042600e54826005015461191891906139d7565b105b156119f757600061192961143f565b611931611644565b61193b91906139d7565b6006830154600754845492935060009261195590856139ef565b61195f9190613a0e565b6119699190613a30565b9050600083600801548261197d9190613a30565b90506000600e548560050154426119949190613a30565b61199e9190613a30565b90506011548111156119af57506011545b6000601154601754836119c291906139ef565b6119cc9190613a0e565b9050600064e8d4a510006119e083866139ef565b6119ea9190613a0e565b9998505050505050505050565b50600092915050565b6008546001600160a01b03163314611a2a5760405162461bcd60e51b815260040161098f906138e1565b60008111611a7a5760405162461bcd60e51b815260206004820152601e60248201527f4455524154494f4e5f464143544f522063616e6e6f74206265207a65726f0000604482015260640161098f565b60108190556040518181527f9478eb023aac0a7d58a4e935377056bf27cf5b72a2300725f831817a8f62fbde90602001610a35565b33611ab86117cd565b6001600160a01b031614611ade5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b038116611b045760405162461bcd60e51b815260040161098f90613a9f565b600a80546001600160a01b0319166001600160a01b0383169081179091556040517fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a91610a3591613864565b6008546001600160a01b03163314611b7a5760405162461bcd60e51b815260040161098f906138e1565b6101f4811115611b9c5760405162461bcd60e51b815260040161098f90613906565b60158190556040518181527fd5fe46099fa396290a7f57e36c3c3c8774e2562c18ed5d1dcc0fa75071e03f1d90602001610a35565b6008546001600160a01b03163314611bfb5760405162461bcd60e51b815260040161098f906138e1565b6107d0811115611c1d5760405162461bcd60e51b815260040161098f90613acf565b60148190556040518181527fc5d25457b67b87678c987375af13f6e50beb3ad7bfd009da26766ae986eaa20d90602001610a35565b6008546001600160a01b03163314611c7c5760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038216611ca25760405162461bcd60e51b815260040161098f90613a9f565b6001600160a01b038216600081815260056020526040808220805460ff19168515159081179091559051909291600080516020613ba183398151915291a35050565b6008546001600160a01b03163314611d0e5760405162461bcd60e51b815260040161098f906138e1565b60008111611d6a5760405162461bcd60e51b815260206004820152602360248201527f554e4c4f434b5f465245455f4455524154494f4e2063616e6e6f74206265207a60448201526265726f60e81b606482015260840161098f565b600e8190556040518181527ff84bf2b901cfc02956d4e69556d7448cef4ea13587e7714dba7c6d697091e7ad90602001610a35565b6001600160a01b0381166000908152600360205260408120805415801590611dcc5750600781015460ff16155b8015611df157506001600160a01b03831660009081526004602052604090205460ff16155b156119f7576000611e0061143f565b611e08611644565b611e1291906139d7565b90506000600754828460000154611e2991906139ef565b611e339190613a0e565b90506000836002015482611e479190613a30565b601354909150863b15611e5957506014545b6000612710611e6883856139ef565b611e729190613a0e565b98975050505050505050565b6008546001600160a01b03163314611ea85760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b038116611ece5760405162461bcd60e51b815260040161098f90613a9f565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5352e27b0414343d9438a1c6e9d04c65c7cb4d91f44920afee588f91717893f191610a3591613864565b6008546001600160a01b03163314611f445760405162461bcd60e51b815260040161098f906138e1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611fd45760405162461bcd60e51b815260206004820152602560248201527f546f6b656e2063616e6e6f742062652073616d65206173206465706f736974206044820152643a37b5b2b760d91b606482015260840161098f565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190612003903090600401613864565b602060405180830381865afa158015612020573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612044919061398b565b905061205a6001600160a01b0383163383612f23565b5050565b6008546001600160a01b031633146120885760405162461bcd60e51b815260040161098f906138e1565b6001600160a01b0381166120ae5760405162461bcd60e51b815260040161098f90613a9f565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f8f49a182922022d9119a1a6aeeca151b4a5665e86bd61c1ff32e152d459558b291610a3591613864565b6121026114d7565b1561211f5760405162461bcd60e51b815260040161098f90613a47565b600082118061212e5750600081115b61216f5760405162461bcd60e51b8152602060048201526012602482015271139bdd1a1a5b99c81d1bc819195c1bdcda5d60721b604482015260640161098f565b61205a8282336127a6565b336121836117cd565b6001600160a01b0316146121a95760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166121cf5760405162461bcd60e51b815260040161098f90613a9f565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea08691610a3591613864565b336122246117cd565b6001600160a01b03161461224a5760405162461bcd60e51b815260040161098f90613956565b6001600160a01b0381166122af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161098f565b610f8b81612e73565b6008546001600160a01b031633146122e25760405162461bcd60e51b815260040161098f906138e1565b6305265c0081111561235c5760405162461bcd60e51b815260206004820152603d60248201527f4d41585f4c4f434b5f4455524154494f4e2063616e6e6f74206265206d6f726560448201527f207468616e204d41585f4c4f434b5f4455524154494f4e5f4c494d4954000000606482015260840161098f565b600f8190556040518181527fcab2f3455b51b6ca5377e84fccd0f890b6f6ca36c02e18b6d36cb34f469fe4fe90602001610a35565b6040516001600160a01b03808516602483015283166044820152606481018290526123fc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f53565b50505050565b600061240d826118ad565b61241683611d9f565b610f0f91906139d7565b33600090815260036020526040902080548311156124805760405162461bcd60e51b815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015260640161098f565b428160050154106124c35760405162461bcd60e51b815260206004820152600d60248201526c5374696c6c20696e206c6f636b60981b604482015260640161098f565b6002546001600160a01b031615612537576002546040516351cff8d960e01b81526001600160a01b03909116906351cff8d990612504903390600401613864565b600060405180830381600087803b15801561251e57600080fd5b505af1158015612532573d6000803e3d6000fd5b505050505b805483906000906125546b204fce5e3e25026110000000846139ef565b61255e9190613a0e565b9050612568613025565b612571336131a3565b8415801561257f5750600084115b156125c057600061258e611644565b9050806007548661259f91906139ef565b6125a99190613a0e565b84549093508311156125ba57835492505b506125e7565b82546b204fce5e3e25026110000000906125da90836139ef565b6125e49190613a0e565b91505b6000600754836125f5611644565b6125ff91906139ef565b6126099190613a0e565b90508284600001600082825461261f9190613a30565b9250508190555082600760008282546126389190613a30565b90915550503360009081526005602052604090205460ff1615801561266d5750601854846001015461266a91906139d7565b42105b156126e657601554333b1561268157506016545b600061271061269083856139ef565b61269a9190613a0e565b6009549091506126d7906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6126e18184613a30565b925050505b61271a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612f23565b83541561274c5760075461272c611644565b855461273891906139ef565b6127429190613a0e565b6002850155612754565b600060028501555b4260038501556127633361359e565b604080518281526020810185905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a2505050505050565b6001600160a01b0381166000908152600360205260409020805415806127cc5750600084115b15612845576509184e72a00084116128455760405162461bcd60e51b815260206004820152603660248201527f4465706f73697420616d6f756e74206d757374206265206772656174657220746044820152751a185b8813525397d1115413d4d25517d05353d5539560521b606482015260840161098f565b6005810154839042116128a3578415612882574260048301556008820154600d8054600090612875908490613a30565b9091555050600060088301555b816004015482600501546128969190613a30565b6128a090826139d7565b90505b8315806128b3575062093a808110155b6128ff5760405162461bcd60e51b815260206004820152601f60248201527f4d696e696d756d206c6f636b20706572696f64206973206f6e65207765656b00604482015260640161098f565b600f548111156129515760405162461bcd60e51b815260206004820152601c60248201527f4d6178696d756d206c6f636b20706572696f6420657863656564656400000000604482015260640161098f565b6002546001600160a01b0316156129d057600254604051630efe6a8b60e01b81526001600160a01b038581166004830152602482018890526044820187905290911690630efe6a8b90606401600060405180830381600087803b1580156129b757600080fd5b505af11580156129cb573d6000803e3d6000fd5b505050505b6129d8613025565b600754612a285760006129e9611272565b600954909150612a26906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b505b612a31836131a3565b8315612a8a574282600501541015612a60574260048301819055612a569085906139d7565b6005830155612a7a565b83826005016000828254612a7491906139d7565b90915550505b60078201805460ff191660011790555b600080600080612a98611644565b90508815612ad957612ad56001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001688308c612391565b8892505b855415801590612aed5750600786015460ff165b15612b66576007548654612b0190836139ef565b612b0b9190613a0e565b9150612b1782846139d7565b9250856000015460076000828254612b2f9190613a30565b9091555050600086556004860154421415612b665760088601829055600d8054839190600090612b609084906139d7565b90915550505b60075415612b9657612b788282613a30565b600754612b8590856139ef565b612b8f9190613a0e565b9350612b9a565b8293505b856004015486600501541115612d1b57600060105460125488600401548960050154612bc69190613a30565b612bd091906139ef565b612bda9190613a0e565b9050600064e8d4a51000612bee87846139ef565b612bf89190613a0e565b9050612c0481876139d7565b955085886000016000828254612c1a91906139d7565b909155506000905064e8d4a51000612c3287856139ef565b612c3c9190613a0e565b905080896006016000828254612c5291906139d7565b9250508190555080600c6000828254612c6b91906139d7565b925050819055508b896008016000828254612c8691906139d7565b925050819055508b600d6000828254612c9f91906139d7565b92505081905550896001600160a01b03167f2b943276e5d747f6f7dd46d3b880d8874cb8d6b9b88ca1903990a2738e7dc7a18a600801548b600001548c600401548d60050154612cef9190613a30565b6040805193845260208401929092529082015242606082015260800160405180910390a2505050612d35565b83866000016000828254612d2f91906139d7565b90915550505b6000891180612d445750600088115b15612d50574260018701555b8360076000828254612d6291906139d7565b90915550506006860154600754612d77611644565b8854612d8391906139ef565b612d8d9190613a0e565b612d979190613a30565b6002870155426003870155612dab8761359e565b604080518a8152602081018690529081018990524260608201526001600160a01b038816907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060800160405180910390a2505050505050505050565b612e106114d7565b612e2c5760405162461bcd60e51b815260040161098f90613a71565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051612e699190613864565b60405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612ecb6114d7565b15612ee85760405162461bcd60e51b815260040161098f90613a47565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e5c3390565b6040516001600160a01b03831660248201526044810182905261109c90849063a9059cbb60e01b906064016123c5565b6000612fa8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661366a9092919063ffffffff16565b80519091501561109c5780806020019051810190612fc691906139a4565b61109c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161098f565b600b54604051631175a1dd60e01b815260048101919091523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690631175a1dd90604401602060405180830381865afa158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb919061398b565b90508015610f8b5760006130cd611272565b600b54604051630441a3e760e41b81526004810191909152600060248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b15801561313d57600080fd5b505af1158015613151573d6000803e3d6000fd5b50505050600061315f611272565b9050337fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba61318d8484613a30565b60405190815260200160405180910390a2505050565b6001600160a01b038116600090815260036020526040902080541561205a57600781015460ff1615613446576000816006015460075483600001546131e6611644565b6131f091906139ef565b6131fa9190613a0e565b6132049190613a30565b90508160060154600c600082825461321c9190613a30565b90915550506000600683018190558254600780549192909161323f908490613a30565b90915550506001600160a01b03831660009081526006602052604090205460ff1615801561327d575042600e54836005015461327b91906139d7565b105b1561334f5760008260080154826132949190613a30565b90506000600e548460050154426132ab9190613a30565b6132b59190613a30565b90506011548111156132c657506011545b6000601154601754836132d991906139ef565b6132e39190613a0e565b9050600064e8d4a510006132f783866139ef565b6133019190613a0e565b60095490915061333e906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6133488186613a30565b9450505050505b6000613359611644565b9050600060075460001461338f576133718383613a30565b60075461337e90856139ef565b6133889190613a0e565b9050613392565b50815b808455600780548291906000906133aa9084906139d7565b9091555050600584015442111561343f5760078401805460ff19169055600060048501819055600585018190556008850154600d8054919290916133ef908490613a30565b909155505060006008850155604080518481524260208201526001600160a01b038716917ff7870c5b224cbc19873599e46ccfc7103934650509b1af0c3ce90138377c2004910160405180910390a25b5050505050565b6001600160a01b03821660009081526004602052604090205460ff1661205a576000600754613473611644565b835461347f91906139ef565b6134899190613a0e565b90508160000154600760008282546134a19190613a30565b9091555050600080835560028301546134ba9083613a30565b601354909150843b156134cc57506014545b60006127106134db83856139ef565b6134e59190613a0e565b9050801561353457600954613527906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f23565b6135318185613a30565b93505b600061353e611644565b90506000600754600014613574576135568683613a30565b60075461356390886139ef565b61356d9190613a0e565b9050613577565b50845b8087556007805482919060009061358f9084906139d7565b90915550505050505050505050565b6001546001600160a01b031615610f8b576001600160a01b0381166000908152600360205260408120600481015460058201549192916135de9190613a30565b6001546008840154600d5460105460405163e874fdaf60e01b81526001600160a01b03898116600483015260248201949094526044810186905260648101929092526084820152929350169063e874fdaf9060a401600060405180830381600087803b15801561364d57600080fd5b505af1158015613661573d6000803e3d6000fd5b50505050505050565b60606136798484600085613683565b90505b9392505050565b6060824710156136e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161098f565b6001600160a01b0385163b61373b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161098f565b600080866001600160a01b031685876040516137579190613b51565b60006040518083038185875af1925050503d8060008114613794576040519150601f19603f3d011682016040523d82523d6000602084013e613799565b606091505b50915091506137a98282866137b4565b979650505050505050565b606083156137c357508161367c565b8251156137d35782518084602001fd5b8160405162461bcd60e51b815260040161098f9190613b6d565b6000602082840312156137ff57600080fd5b5035919050565b6001600160a01b0381168114610f8b57600080fd5b60006020828403121561382d57600080fd5b813561367c81613806565b6000806040838503121561384b57600080fd5b823561385681613806565b946020939093013593505050565b6001600160a01b0391909116815260200190565b8015158114610f8b57600080fd5b6000806040838503121561389957600080fd5b82356138a481613806565b915060208301356138b481613878565b809150509250929050565b600080604083850312156138d257600080fd5b50508035926020909101359150565b6020808252600b908201526a61646d696e3a207775743f60a81b604082015260600190565b60208082526030908201527f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060408201526f4d41585f57495448445241575f46454560801b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561399d57600080fd5b5051919050565b6000602082840312156139b657600080fd5b815161367c81613878565b634e487b7160e01b600052601160045260246000fd5b600082198211156139ea576139ea6139c1565b500190565b6000816000190483118215151615613a0957613a096139c1565b500290565b600082613a2b57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613a4257613a426139c1565b500390565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526016908201527543616e6e6f74206265207a65726f206164647265737360501b604082015260600190565b60208082526036908201527f706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468604082015275616e204d41585f504552464f524d414e43455f46454560501b606082015260800190565b60005b83811015613b40578181015183820152602001613b28565b838111156123fc5750506000910152565b60008251613b63818460208701613b25565b9190910192915050565b6020815260008251806020840152613b8c816040850160208701613b25565b601f01601f1916919091016040019291505056fe3d7902bc9a6665bd7caf4240b834bb805d3cd68256889e9f8d2e40a10be41d44a26469706673582212208fac60e48eb35e29f7a743c638638371e8b2fc9dffb4ce7b25ae133d7651c44a64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/test/artifactsFile/CakeToken.json b/projects/vecake/test/artifactsFile/CakeToken.json new file mode 100644 index 00000000..4e56ee43 --- /dev/null +++ b/projects/vecake/test/artifactsFile/CakeToken.json @@ -0,0 +1,639 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CakeToken", + "sourceName": "contracts/test/CakeToken.sol", + "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": "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": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "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" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b50604051806040016040528060118152602001702830b731b0b5b2a9bbb0b8102a37b5b2b760791b8152506040518060400160405280600481526020016343616b6560e01b81525060006200006b620000f660201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000ca906004906020850190620000fa565b508051620000e0906005906020840190620000fa565b50506006805460ff191660121790555062000196565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200013d57805160ff19168380011785556200016d565b828001600101855582156200016d579182015b828111156200016d57825182559160200191906001019062000150565b506200017b9291506200017f565b5090565b5b808211156200017b576000815560010162000180565b61237e80620001a66000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c8063782d6fe1116100f9578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e1461062f578063e7a324dc1461066a578063f1127ed814610672578063f2fde38b146106d1576101b9565b8063a9059cbb1461056f578063b4b5ea57146105a8578063c3cda520146105db576101b9565b80638da5cb5b116100d35780638da5cb5b1461050957806395d89b4114610511578063a0712d6814610519578063a457c2d714610536576101b9565b8063782d6fe1146104955780637ecebe00146104ce578063893d20e814610501576101b9565b806339509351116101665780635c19a95c116101405780635c19a95c146103db5780636fcfff451461040e57806370a082311461045a578063715018a61461048d576101b9565b8063395093511461030b57806340c10f1914610344578063587cde1e1461037f576101b9565b806320606b701161019757806320606b70146102a257806323b872dd146102aa578063313ce567146102ed576101b9565b806306fdde03146101be578063095ea7b31461023b57806318160ddd14610288575b600080fd5b6101c6610704565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356107b8565b604080519115158252519081900360200190f35b6102906107d6565b60408051918252519081900360200190f35b6102906107dc565b610274600480360360608110156102c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610800565b6102f56108a1565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108aa565b61037d6004803603604081101561035a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610905565b005b6103b26004803603602081101561039557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109ed565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61037d600480360360208110156103f157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a18565b6104416004803603602081101561042457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a25565b6040805163ffffffff9092168252519081900360200190f35b6102906004803603602081101561047057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a3d565b61037d610a65565b610290600480360360408110156104ab57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610b7c565b610290600480360360208110156104e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e46565b6103b2610e58565b6103b2610e67565b6101c6610e83565b6102746004803603602081101561052f57600080fd5b5035610f02565b6102746004803603604081101561054c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fc5565b6102746004803603604081101561058557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561103a565b610290600480360360208110156105be57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661104e565b61037d600480360360c08110156105f157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356110ea565b6102906004803603604081101561064557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611429565b610290611461565b6106b16004803603604081101561068857600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611485565b6040805163ffffffff909316835260208301919091528051918290030190f35b61037d600480360360208110156106e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114b2565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b820191906000526020600020905b81548152906001019060200180831161079157829003601f168201915b5050505050905090565b60006107cc6107c5611653565b8484611657565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b600061080d84848461179e565b61089784610819611653565b610892856040518060600160405280602881526020016121ee6028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610864611653565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611965565b611657565b5060019392505050565b60065460ff1690565b60006107cc6108b7611653565b8461089285600260006108c8611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611a16565b61090d611653565b73ffffffffffffffffffffffffffffffffffffffff1661092b610e67565b73ffffffffffffffffffffffffffffffffffffffff16146109ad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6109b78282611a8a565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600760205260408120546109e9921683611bb1565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610a223382611d97565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610a6d611653565b73ffffffffffffffffffffffffffffffffffffffff16610a8b610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610b0d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610bd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806122706027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610c115760009150506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610cd65773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff168352929052206001015490506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610d1e5760009150506107d0565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e0257600282820363ffffffff16048103610d6e612141565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610ddd576020015194506107d09350505050565b805163ffffffff16871115610df457819350610dfb565b6001820392505b5050610d44565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610e62610e67565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b6000610f0c611653565b73ffffffffffffffffffffffffffffffffffffffff16610f2a610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610fac57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610fbd610fb7611653565b83611a8a565b506001919050565b60006107cc610fd2611653565b84610892856040518060600160405280602581526020016123026025913960026000610ffc611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611965565b60006107cc611047611653565b848461179e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff16806110865760006110e3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611115610704565b80519060200120611124611e5e565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa15801561129d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806122166026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146113b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806122bd6022913960400191505060405180910390fd5b87421115611412576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121c86026913960400191505060405180910390fd5b61141c818b611d97565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6114ba611653565b73ffffffffffffffffffffffffffffffffffffffff166114d8610e67565b73ffffffffffffffffffffffffffffffffffffffff161461155a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166115c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121a26026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff83166116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061217e6024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821661172f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806123276022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661180a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806121596025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611876576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806122df6023913960400191505060405180910390fd5b6118c0816040518060600160405280602681526020016122976026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611965565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602052604080822093909355908416815220546118fc9082611a16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611a0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119d35781810151838201526020016119bb565b50505050905090810190601f168015611a005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156110e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b0c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611b199082611a16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611b4c9082611a16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bed5750600081115b15611d925773ffffffffffffffffffffffffffffffffffffffff831615611cc45773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff169081611c47576000611ca4565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611cb28285611e62565b9050611cc086848484611ed9565b5050505b73ffffffffffffffffffffffffffffffffffffffff821615611d925773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff169081611d19576000611d76565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611d848285611a16565b905061142185848484611ed9565b505050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526007602052604081205490911690611dcb84610a3d565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611e58828483611bb1565b50505050565b4690565b600082821115611ed357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611efd4360405180606001604052806034815260200161223c603491396120c9565b905060008463ffffffff16118015611f71575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15611fd95773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612072565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156119d35781810151838201526020016119bb565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a20617070726f766520746f20746865207a65726f2061646472657373a2646970667358221220878bcaf3d45de55293e9d5d1b586861a43290aaa00bc428b8c26b2b0c77d4ef164736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101b95760003560e01c8063782d6fe1116100f9578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e1461062f578063e7a324dc1461066a578063f1127ed814610672578063f2fde38b146106d1576101b9565b8063a9059cbb1461056f578063b4b5ea57146105a8578063c3cda520146105db576101b9565b80638da5cb5b116100d35780638da5cb5b1461050957806395d89b4114610511578063a0712d6814610519578063a457c2d714610536576101b9565b8063782d6fe1146104955780637ecebe00146104ce578063893d20e814610501576101b9565b806339509351116101665780635c19a95c116101405780635c19a95c146103db5780636fcfff451461040e57806370a082311461045a578063715018a61461048d576101b9565b8063395093511461030b57806340c10f1914610344578063587cde1e1461037f576101b9565b806320606b701161019757806320606b70146102a257806323b872dd146102aa578063313ce567146102ed576101b9565b806306fdde03146101be578063095ea7b31461023b57806318160ddd14610288575b600080fd5b6101c6610704565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356107b8565b604080519115158252519081900360200190f35b6102906107d6565b60408051918252519081900360200190f35b6102906107dc565b610274600480360360608110156102c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610800565b6102f56108a1565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108aa565b61037d6004803603604081101561035a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610905565b005b6103b26004803603602081101561039557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166109ed565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61037d600480360360208110156103f157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a18565b6104416004803603602081101561042457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a25565b6040805163ffffffff9092168252519081900360200190f35b6102906004803603602081101561047057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a3d565b61037d610a65565b610290600480360360408110156104ab57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610b7c565b610290600480360360208110156104e457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e46565b6103b2610e58565b6103b2610e67565b6101c6610e83565b6102746004803603602081101561052f57600080fd5b5035610f02565b6102746004803603604081101561054c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fc5565b6102746004803603604081101561058557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561103a565b610290600480360360208110156105be57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661104e565b61037d600480360360c08110156105f157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356110ea565b6102906004803603604081101561064557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611429565b610290611461565b6106b16004803603604081101561068857600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff16611485565b6040805163ffffffff909316835260208301919091528051918290030190f35b61037d600480360360208110156106e757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114b2565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b820191906000526020600020905b81548152906001019060200180831161079157829003601f168201915b5050505050905090565b60006107cc6107c5611653565b8484611657565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b600061080d84848461179e565b61089784610819611653565b610892856040518060600160405280602881526020016121ee6028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610864611653565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611965565b611657565b5060019392505050565b60065460ff1690565b60006107cc6108b7611653565b8461089285600260006108c8611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611a16565b61090d611653565b73ffffffffffffffffffffffffffffffffffffffff1661092b610e67565b73ffffffffffffffffffffffffffffffffffffffff16146109ad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6109b78282611a8a565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600760205260408120546109e9921683611bb1565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610a223382611d97565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610a6d611653565b73ffffffffffffffffffffffffffffffffffffffff16610a8b610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610b0d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610bd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806122706027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610c115760009150506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610cd65773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff168352929052206001015490506107d0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610d1e5760009150506107d0565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e0257600282820363ffffffff16048103610d6e612141565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610ddd576020015194506107d09350505050565b805163ffffffff16871115610df457819350610dfb565b6001820392505b5050610d44565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610e62610e67565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ae5780601f10610783576101008083540402835291602001916107ae565b6000610f0c611653565b73ffffffffffffffffffffffffffffffffffffffff16610f2a610e67565b73ffffffffffffffffffffffffffffffffffffffff1614610fac57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610fbd610fb7611653565b83611a8a565b506001919050565b60006107cc610fd2611653565b84610892856040518060600160405280602581526020016123026025913960026000610ffc611653565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611965565b60006107cc611047611653565b848461179e565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff16806110865760006110e3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611115610704565b80519060200120611124611e5e565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa15801561129d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806122166026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146113b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806122bd6022913960400191505060405180910390fd5b87421115611412576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121c86026913960400191505060405180910390fd5b61141c818b611d97565b505050505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6114ba611653565b73ffffffffffffffffffffffffffffffffffffffff166114d8610e67565b73ffffffffffffffffffffffffffffffffffffffff161461155a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166115c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121a26026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff83166116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061217e6024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821661172f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806123276022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff831661180a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806121596025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611876576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806122df6023913960400191505060405180910390fd5b6118c0816040518060600160405280602681526020016122976026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611965565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602052604080822093909355908416815220546118fc9082611a16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611a0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119d35781810151838201526020016119bb565b50505050905090810190601f168015611a005780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156110e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b0c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611b199082611a16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611b4c9082611a16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bed5750600081115b15611d925773ffffffffffffffffffffffffffffffffffffffff831615611cc45773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff169081611c47576000611ca4565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611cb28285611e62565b9050611cc086848484611ed9565b5050505b73ffffffffffffffffffffffffffffffffffffffff821615611d925773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff169081611d19576000611d76565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b90506000611d848285611a16565b905061142185848484611ed9565b505050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526007602052604081205490911690611dcb84610a3d565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611e58828483611bb1565b50505050565b4690565b600082821115611ed357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000611efd4360405180606001604052806034815260200161223c603491396120c9565b905060008463ffffffff16118015611f71575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b15611fd95773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89011684529091529020600101829055612072565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000816401000000008410612139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156119d35781810151838201526020016119bb565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a20617070726f766520746f20746865207a65726f2061646472657373a2646970667358221220878bcaf3d45de55293e9d5d1b586861a43290aaa00bc428b8c26b2b0c77d4ef164736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/test/artifactsFile/Delegator.json b/projects/vecake/test/artifactsFile/Delegator.json new file mode 100644 index 00000000..75e5e1e7 --- /dev/null +++ b/projects/vecake/test/artifactsFile/Delegator.json @@ -0,0 +1,421 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Delegator", + "sourceName": "contracts/test/Delegator.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IVECake", + "name": "_VECake", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "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": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "contract IVECake", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockEndTime", + "type": "uint256" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "earlyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "increaseLockAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newUnlockTime", + "type": "uint256" + } + ], + "name": "increaseUnlockTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60c06040523480156200001157600080fd5b5060405162001e8838038062001e88833981016040819052620000349162000574565b6040518060400160405280601681526020017f564543616b652044656c656761746f7220546f6b656e000000000000000000008152506040518060400160405280600381526020016215911560ea1b81525081600390805190602001906200009e929190620004b5565b508051620000b4906004906020840190620004b5565b5050506001600160a01b0382811660a05281166080819052620000e79083600019620000ef602090811b620008ce17901c565b5050620006b4565b8015806200016d5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801562000145573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016b9190620005b3565b155b620001e55760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091526200023d9185916200024216565b505050565b60006200029e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200032060201b62000ace179092919060201c565b8051909150156200023d5780806020019051810190620002bf9190620005cd565b6200023d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401620001dc565b60606200033184846000856200033b565b90505b9392505050565b6060824710156200039e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401620001dc565b6001600160a01b0385163b620003f75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001dc565b600080866001600160a01b0316858760405162000415919062000624565b60006040518083038185875af1925050503d806000811462000454576040519150601f19603f3d011682016040523d82523d6000602084013e62000459565b606091505b5090925090506200046c82828662000477565b979650505050505050565b606083156200048857508162000334565b825115620004995782518084602001fd5b8160405162461bcd60e51b8152600401620001dc919062000642565b828054620004c39062000677565b90600052602060002090601f016020900481019282620004e7576000855562000532565b82601f106200050257805160ff191683800117855562000532565b8280016001018555821562000532579182015b828111156200053257825182559160200191906001019062000515565b506200054092915062000544565b5090565b5b8082111562000540576000815560010162000545565b6001600160a01b03811681146200057157600080fd5b50565b600080604083850312156200058857600080fd5b825162000595816200055b565b6020840151909250620005a8816200055b565b809150509250929050565b600060208284031215620005c657600080fd5b5051919050565b600060208284031215620005e057600080fd5b815180151581146200033457600080fd5b60005b838110156200060e578181015183820152602001620005f4565b838111156200061e576000848401525b50505050565b6000825162000638818460208701620005f1565b9190910192915050565b602081526000825180602084015262000663816040850160208701620005f1565b601f01601f19169190910160400192915050565b600181811c908216806200068c57607f821691505b60208210811415620006ae57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05161177d6200070b6000396000818161020b0152818161050b015281816105cc0152818161065c01528181610816015261089f01526000818161034d015281816104b401526107b8015261177d6000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c80636574deb7116100cd578063a9059cbb11610081578063dd62ed3e11610066578063dd62ed3e146102ef578063fa09e63014610335578063fc0c546a1461034857600080fd5b8063a9059cbb146102c9578063b52c05fe146102dc57600080fd5b80637c616fe6116100b25780637c616fe61461029b57806395d89b41146102ae578063a457c2d7146102b657600080fd5b80636574deb71461025257806370a082311461026557600080fd5b806323b872dd11610124578063395093511161010957806339509351146101e0578063403f4447146101f357806362534e791461020657600080fd5b806323b872dd146101be578063313ce567146101d157600080fd5b80630185921e1461015657806306fdde031461016b578063095ea7b31461018957806318160ddd146101ac575b600080fd5b6101696101643660046114be565b61036f565b005b61017361037e565b604051610180919061151d565b60405180910390f35b61019c61019736600461156e565b610410565b6040519015158152602001610180565b6002545b604051908152602001610180565b61019c6101cc366004611598565b610428565b60405160128152602001610180565b61019c6101ee36600461156e565b61044e565b6101696102013660046115d4565b61049a565b61022d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610180565b61016961026036600461156e565b610580565b6101b06102733660046115ed565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101696102a93660046115d4565b61062d565b6101736106a0565b61019c6102c436600461156e565b6106af565b61019c6102d736600461156e565b610790565b6101696102ea366004611608565b61079e565b6101b06102fd36600461162a565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101696103433660046115ed565b61085a565b61022d7f000000000000000000000000000000000000000000000000000000000000000081565b6103798383610ae5565b505050565b60606003805461038d9061165d565b80601f01602080910402602001604051908101604052809291908181526020018280546103b99061165d565b80156104065780601f106103db57610100808354040283529160200191610406565b820191906000526020600020905b8154815290600101906020018083116103e957829003601f168201915b5050505050905090565b60003361041e818585610c05565b5060019392505050565b600033610436858285610db8565b610441858585610e8f565b60019150505b9392505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061041e90829086906104959087906116b1565b610c05565b6104dc73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084611142565b6040517f403f4447000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063403f4447906024015b600060405180830381600087803b15801561056557600080fd5b505af1158015610579573d6000803e3d6000fd5b5050505050565b6040517f6574deb700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690636574deb7906044015b600060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b505050505050565b6040517f7c616fe6000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690637c616fe69060240161054b565b60606004805461038d9061165d565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610778576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6107858286868403610c05565b506001949350505050565b60003361041e818585610e8f565b6107e073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333085611142565b6040517fb52c05fe00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063b52c05fe906044016105f7565b6040517ffa09e63000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fa09e6309060240161054b565b80158061096e57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c91906116f0565b155b6109fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840161076f565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526103799084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111a0565b6060610add84846000856112ac565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff8216610b62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161076f565b8060026000828254610b7491906116b1565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610bae9084906116b1565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff8316610ca7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff8216610d4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610e895781811015610e7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161076f565b610e898484848403610c05565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610f32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff8216610fd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260409020548181101561108b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152602081905260408082208585039055918516815290812080548492906110cf9084906116b1565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161113591815260200190565b60405180910390a3610e89565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610e899085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610a4c565b6000611202826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610ace9092919063ffffffff16565b80519091501561037957808060200190518101906112209190611709565b610379576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161076f565b60608247101561133e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff85163b6113bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161076f565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516113e5919061172b565b60006040518083038185875af1925050503d8060008114611422576040519150601f19603f3d011682016040523d82523d6000602084013e611427565b606091505b5091509150611437828286611442565b979650505050505050565b60608315611451575081610447565b8251156114615782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076f919061151d565b803573ffffffffffffffffffffffffffffffffffffffff811681146114b957600080fd5b919050565b6000806000606084860312156114d357600080fd5b6114dc84611495565b95602085013595506040909401359392505050565b60005b8381101561150c5781810151838201526020016114f4565b83811115610e895750506000910152565b602081526000825180602084015261153c8160408501602087016114f1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000806040838503121561158157600080fd5b61158a83611495565b946020939093013593505050565b6000806000606084860312156115ad57600080fd5b6115b684611495565b92506115c460208501611495565b9150604084013590509250925092565b6000602082840312156115e657600080fd5b5035919050565b6000602082840312156115ff57600080fd5b61044782611495565b6000806040838503121561161b57600080fd5b50508035926020909101359150565b6000806040838503121561163d57600080fd5b61164683611495565b915061165460208401611495565b90509250929050565b600181811c9082168061167157607f821691505b602082108114156116ab577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082198211156116eb577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b60006020828403121561170257600080fd5b5051919050565b60006020828403121561171b57600080fd5b8151801515811461044757600080fd5b6000825161173d8184602087016114f1565b919091019291505056fea264697066735822122087a61186292c35309c4a3d203ffea1e36c68ad38b3620849ae2eba766506c7fb64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101515760003560e01c80636574deb7116100cd578063a9059cbb11610081578063dd62ed3e11610066578063dd62ed3e146102ef578063fa09e63014610335578063fc0c546a1461034857600080fd5b8063a9059cbb146102c9578063b52c05fe146102dc57600080fd5b80637c616fe6116100b25780637c616fe61461029b57806395d89b41146102ae578063a457c2d7146102b657600080fd5b80636574deb71461025257806370a082311461026557600080fd5b806323b872dd11610124578063395093511161010957806339509351146101e0578063403f4447146101f357806362534e791461020657600080fd5b806323b872dd146101be578063313ce567146101d157600080fd5b80630185921e1461015657806306fdde031461016b578063095ea7b31461018957806318160ddd146101ac575b600080fd5b6101696101643660046114be565b61036f565b005b61017361037e565b604051610180919061151d565b60405180910390f35b61019c61019736600461156e565b610410565b6040519015158152602001610180565b6002545b604051908152602001610180565b61019c6101cc366004611598565b610428565b60405160128152602001610180565b61019c6101ee36600461156e565b61044e565b6101696102013660046115d4565b61049a565b61022d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610180565b61016961026036600461156e565b610580565b6101b06102733660046115ed565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101696102a93660046115d4565b61062d565b6101736106a0565b61019c6102c436600461156e565b6106af565b61019c6102d736600461156e565b610790565b6101696102ea366004611608565b61079e565b6101b06102fd36600461162a565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101696103433660046115ed565b61085a565b61022d7f000000000000000000000000000000000000000000000000000000000000000081565b6103798383610ae5565b505050565b60606003805461038d9061165d565b80601f01602080910402602001604051908101604052809291908181526020018280546103b99061165d565b80156104065780601f106103db57610100808354040283529160200191610406565b820191906000526020600020905b8154815290600101906020018083116103e957829003601f168201915b5050505050905090565b60003361041e818585610c05565b5060019392505050565b600033610436858285610db8565b610441858585610e8f565b60019150505b9392505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061041e90829086906104959087906116b1565b610c05565b6104dc73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084611142565b6040517f403f4447000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063403f4447906024015b600060405180830381600087803b15801561056557600080fd5b505af1158015610579573d6000803e3d6000fd5b5050505050565b6040517f6574deb700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690636574deb7906044015b600060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b505050505050565b6040517f7c616fe6000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690637c616fe69060240161054b565b60606004805461038d9061165d565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610778576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6107858286868403610c05565b506001949350505050565b60003361041e818585610e8f565b6107e073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333085611142565b6040517fb52c05fe00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063b52c05fe906044016105f7565b6040517ffa09e63000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063fa09e6309060240161054b565b80158061096e57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c91906116f0565b155b6109fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840161076f565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526103799084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111a0565b6060610add84846000856112ac565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff8216610b62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161076f565b8060026000828254610b7491906116b1565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054839290610bae9084906116b1565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff8316610ca7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff8216610d4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610e895781811015610e7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161076f565b610e898484848403610c05565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610f32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff8216610fd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260409020548181101561108b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152602081905260408082208585039055918516815290812080548492906110cf9084906116b1565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161113591815260200190565b60405180910390a3610e89565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610e899085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610a4c565b6000611202826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610ace9092919063ffffffff16565b80519091501561037957808060200190518101906112209190611709565b610379576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161076f565b60608247101561133e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161076f565b73ffffffffffffffffffffffffffffffffffffffff85163b6113bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161076f565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516113e5919061172b565b60006040518083038185875af1925050503d8060008114611422576040519150601f19603f3d011682016040523d82523d6000602084013e611427565b606091505b5091509150611437828286611442565b979650505050505050565b60608315611451575081610447565b8251156114615782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076f919061151d565b803573ffffffffffffffffffffffffffffffffffffffff811681146114b957600080fd5b919050565b6000806000606084860312156114d357600080fd5b6114dc84611495565b95602085013595506040909401359392505050565b60005b8381101561150c5781810151838201526020016114f4565b83811115610e895750506000910152565b602081526000825180602084015261153c8160408501602087016114f1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000806040838503121561158157600080fd5b61158a83611495565b946020939093013593505050565b6000806000606084860312156115ad57600080fd5b6115b684611495565b92506115c460208501611495565b9150604084013590509250925092565b6000602082840312156115e657600080fd5b5035919050565b6000602082840312156115ff57600080fd5b61044782611495565b6000806040838503121561161b57600080fd5b50508035926020909101359150565b6000806040838503121561163d57600080fd5b61164683611495565b915061165460208401611495565b90509250929050565b600181811c9082168061167157607f821691505b602082108114156116ab577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082198211156116eb577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b60006020828403121561170257600080fd5b5051919050565b60006020828403121561171b57600080fd5b8151801515811461044757600080fd5b6000825161173d8184602087016114f1565b919091019291505056fea264697066735822122087a61186292c35309c4a3d203ffea1e36c68ad38b3620849ae2eba766506c7fb64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/test/artifactsFile/ERC20Mock.json b/projects/vecake/test/artifactsFile/ERC20Mock.json new file mode 100644 index 00000000..506a3546 --- /dev/null +++ b/projects/vecake/test/artifactsFile/ERC20Mock.json @@ -0,0 +1,315 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Mock", + "sourceName": "contracts/mocks/ERC20Mock.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "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": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000c2c38038062000c2c8339810160408190526200003491620001e1565b8151829082906200004d9060039060208501906200006e565b508051620000639060049060208401906200006e565b505050505062000288565b8280546200007c906200024b565b90600052602060002090601f016020900481019282620000a05760008555620000eb565b82601f10620000bb57805160ff1916838001178555620000eb565b82800160010185558215620000eb579182015b82811115620000eb578251825591602001919060010190620000ce565b50620000f9929150620000fd565b5090565b5b80821115620000f95760008155600101620000fe565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013c57600080fd5b81516001600160401b038082111562000159576200015962000114565b604051601f8301601f19908116603f0116810190828211818310171562000184576200018462000114565b81604052838152602092508683858801011115620001a157600080fd5b600091505b83821015620001c55785820183015181830184015290820190620001a6565b83821115620001d75760008385830101525b9695505050505050565b60008060408385031215620001f557600080fd5b82516001600160401b03808211156200020d57600080fd5b6200021b868387016200012a565b935060208501519150808211156200023257600080fd5b5062000241858286016200012a565b9150509250929050565b600181811c908216806200026057607f821691505b602082108114156200028257634e487b7160e01b600052602260045260246000fd5b50919050565b61099480620002986000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d1565b60405180910390f35b6100ea6100e5366004610842565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461086c565b61026a565b604051601281526020016100ce565b6100ea61013c366004610842565b61028e565b61015461014f366004610842565b6102b0565b005b6100fe6101643660046108a8565b6001600160a01b031660009081526020819052604090205490565b6100c16102be565b6100ea610195366004610842565b6102cd565b6100ea6101a8366004610842565b61034d565b6100fe6101bb3660046108ca565b61035b565b6060600380546101cf906108fd565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108fd565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610386565b5060019392505050565b6000336102788582856104aa565b610283858585610524565b506001949350505050565b6000336102608185856102a1838361035b565b6102ab9190610938565b610386565b6102ba82826106f2565b5050565b6060600480546101cf906108fd565b600033816102db828661035b565b9050838110156103405760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102838286868403610386565b600033610260818585610524565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103e85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610337565b6001600160a01b0382166104495760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610337565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b6848461035b565b9050600019811461051e57818110156105115760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610337565b61051e8484848403610386565b50505050565b6001600160a01b0383166105885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610337565b6001600160a01b0382166105ea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610337565b6001600160a01b038316600090815260208190526040902054818110156106625760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610337565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610699908490610938565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e591815260200190565b60405180910390a361051e565b6001600160a01b0382166107485760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610337565b806002600082825461075a9190610938565b90915550506001600160a01b03821660009081526020819052604081208054839290610787908490610938565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b818110156107fe578581018301518582016040015282016107e2565b81811115610810576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461083d57600080fd5b919050565b6000806040838503121561085557600080fd5b61085e83610826565b946020939093013593505050565b60008060006060848603121561088157600080fd5b61088a84610826565b925061089860208501610826565b9150604084013590509250925092565b6000602082840312156108ba57600080fd5b6108c382610826565b9392505050565b600080604083850312156108dd57600080fd5b6108e683610826565b91506108f460208401610826565b90509250929050565b600181811c9082168061091157607f821691505b6020821081141561093257634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561095957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220c9116e967a89bacdcb5d5cacab54540303b3650686f16fea49473cd777d6624764736f6c634300080c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f191461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101c0565b6040516100ce91906107d1565b60405180910390f35b6100ea6100e5366004610842565b610252565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461086c565b61026a565b604051601281526020016100ce565b6100ea61013c366004610842565b61028e565b61015461014f366004610842565b6102b0565b005b6100fe6101643660046108a8565b6001600160a01b031660009081526020819052604090205490565b6100c16102be565b6100ea610195366004610842565b6102cd565b6100ea6101a8366004610842565b61034d565b6100fe6101bb3660046108ca565b61035b565b6060600380546101cf906108fd565b80601f01602080910402602001604051908101604052809291908181526020018280546101fb906108fd565b80156102485780601f1061021d57610100808354040283529160200191610248565b820191906000526020600020905b81548152906001019060200180831161022b57829003601f168201915b5050505050905090565b600033610260818585610386565b5060019392505050565b6000336102788582856104aa565b610283858585610524565b506001949350505050565b6000336102608185856102a1838361035b565b6102ab9190610938565b610386565b6102ba82826106f2565b5050565b6060600480546101cf906108fd565b600033816102db828661035b565b9050838110156103405760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102838286868403610386565b600033610260818585610524565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103e85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610337565b6001600160a01b0382166104495760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610337565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104b6848461035b565b9050600019811461051e57818110156105115760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610337565b61051e8484848403610386565b50505050565b6001600160a01b0383166105885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610337565b6001600160a01b0382166105ea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610337565b6001600160a01b038316600090815260208190526040902054818110156106625760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610337565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610699908490610938565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106e591815260200190565b60405180910390a361051e565b6001600160a01b0382166107485760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610337565b806002600082825461075a9190610938565b90915550506001600160a01b03821660009081526020819052604081208054839290610787908490610938565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600060208083528351808285015260005b818110156107fe578581018301518582016040015282016107e2565b81811115610810576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461083d57600080fd5b919050565b6000806040838503121561085557600080fd5b61085e83610826565b946020939093013593505050565b60008060006060848603121561088157600080fd5b61088a84610826565b925061089860208501610826565b9150604084013590509250925092565b6000602082840312156108ba57600080fd5b6108c382610826565b9392505050565b600080604083850312156108dd57600080fd5b6108e683610826565b91506108f460208401610826565b90509250929050565b600181811c9082168061091157607f821691505b6020821081141561093257634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561095957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220c9116e967a89bacdcb5d5cacab54540303b3650686f16fea49473cd777d6624764736f6c634300080c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/test/artifactsFile/MasterChef.json b/projects/vecake/test/artifactsFile/MasterChef.json new file mode 100644 index 00000000..3824474e --- /dev/null +++ b/projects/vecake/test/artifactsFile/MasterChef.json @@ -0,0 +1,590 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MasterChef", + "sourceName": "contracts/test/MasterChef.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract CakeToken", + "name": "_cake", + "type": "address" + }, + { + "internalType": "contract SyrupBar", + "name": "_syrup", + "type": "address" + }, + { + "internalType": "address", + "name": "_devaddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_cakePerBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_startBlock", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BONUS_MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_lpToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "add", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cake", + "outputs": [ + { + "internalType": "contract CakeToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_devaddr", + "type": "address" + } + ], + "name": "dev", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "devaddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "enterStaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_to", + "type": "uint256" + } + ], + "name": "getMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "leaveStaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "migrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrator", + "outputs": [ + { + "internalType": "contract IMigratorChef", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingCake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "lpToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IMigratorChef", + "name": "_migrator", + "type": "address" + } + ], + "name": "setMigrator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "syrup", + "outputs": [ + { + "internalType": "contract SyrupBar", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "multiplierNumber", + "type": "uint256" + } + ], + "name": "updateMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040526001600555600060095534801561001a57600080fd5b5060405162002b0a38038062002b0a833981810160405260a081101561003f57600080fd5b5080516020820151604083015160608401516080909401519293919290919060006100686101e2565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b03199081166001600160a01b03978816908117835560028054831697891697909717909655600380548216958816959095179094556004928355600a829055604080516080810182529586526103e86020870181815291870193845260006060880181815260078054958601815590915296517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688939095029283018054909616949097169390931790935590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a82015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b909101556009556101e6565b3390565b61291480620001f66000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635ffe6146116101045780638d88a90e116100a2578063d49e77cd11610071578063d49e77cd1461050c578063dce1748414610514578063e2bbb1581461051c578063f2fde38b1461053f576101cf565b80638d88a90e1461045c5780638da5cb5b1461048f5780638dbb1e3a1461049757806393f1a40b146104ba576101cf565b8063715018a6116100de578063715018a6146104135780637cd07e471461041b57806386a952c41461044c5780638aa2855014610454576101cf565b80635ffe6146146103c3578063630b5ba1146103e057806364482f79146103e8576101cf565b806323cf311811610171578063454b06081161014b578063454b06081461036457806348cd4cb11461038157806351eb05a6146103895780635312ea8e146103a6576101cf565b806323cf3118146102f157806341441d3b14610324578063441a3e7014610341576101cf565b80631175a1dd116101ad5780631175a1dd146102155780631526fe271461024e57806317caf6f1146102a85780631eaaa045146102b0576101cf565b80630755e0b6146101d4578063081e3eda146101ee5780631058d281146101f6575b600080fd5b6101dc610572565b60408051918252519081900360200190f35b6101dc610578565b6102136004803603602081101561020c57600080fd5b503561057e565b005b6101dc6004803603604081101561022b57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166107ba565b61026b6004803603602081101561026457600080fd5b503561094a565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526020850193909352838301919091526060830152519081900360800190f35b6101dc610998565b610213600480360360608110156102c657600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135151561099e565b6102136004803603602081101561030757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b99565b6102136004803603602081101561033a57600080fd5b5035610c88565b6102136004803603604081101561035757600080fd5b5080359060200135610e4f565b6102136004803603602081101561037a57600080fd5b5035611040565b6101dc61139b565b6102136004803603602081101561039f57600080fd5b50356113a1565b610213600480360360208110156103bc57600080fd5b503561162d565b610213600480360360208110156103d957600080fd5b50356116d5565b610213611782565b610213600480360360608110156103fe57600080fd5b508035906020810135906040013515156117a5565b6102136118d2565b6104236119e9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610423611a05565b6101dc611a21565b6102136004803603602081101561047257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a27565b610423611af4565b6101dc600480360360408110156104ad57600080fd5b5080359060200135611b10565b6104f3600480360360408110156104d057600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16611b2b565b6040805192835260208301919091528051918290030190f35b610423611b4f565b610423611b6b565b6102136004803603604081101561053257600080fd5b5080359060200135611b87565b6102136004803603602081101561055557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d12565b60045481565b60075490565b6000600760008154811061058e57fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7909152604090922080546004909202909201925083111561063e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b61064860006113a1565b6000610682826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90611f26565b90611fa7565b9050801561069457610694338261201e565b83156106cb5781546106a69085611fa7565b825582546106cb9073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b600383015482546106e69164e8d4a510009161067691611eb3565b6001830155600254604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101879052905173ffffffffffffffffffffffffffffffffffffffff90921691639dc29fac9160448082019260009290919082900301818387803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b5050604080518781529051600093503392507ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350505050565b600080600784815481106107ca57fe5b6000918252602080832087845260088252604080852073ffffffffffffffffffffffffffffffffffffffff898116875290845281862060049586029093016003810154815484517f70a082310000000000000000000000000000000000000000000000000000000081523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b50516002850154909150431180156108af57508015155b156109155760006108c4856002015443611b10565b905060006108f160095461067688600101546108eb60045487611eb390919063ffffffff16565b90611eb3565b9050610910610909846106768464e8d4a51000611eb3565b8590612147565b935050505b61093d836001015461067c64e8d4a51000610676868860000154611eb390919063ffffffff16565b9450505050505b92915050565b6007818154811061095757fe5b6000918252602090912060049091020180546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff9092169350919084565b60095481565b6109a66121bb565b73ffffffffffffffffffffffffffffffffffffffff166109c4611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610a4657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8015610a5457610a54611782565b6000600a544311610a6757600a54610a69565b435b600954909150610a799085612147565b6009556040805160808101825273ffffffffffffffffffffffffffffffffffffffff85811682526020820187815292820184815260006060840181815260078054600181018255925293517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490920291820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919094161790925592517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b90910155610b936121bf565b50505050565b610ba16121bb565b73ffffffffffffffffffffffffffffffffffffffff16610bbf611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610c4157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006007600081548110610c9857fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c790915260408320600490920201925090610cdf906113a1565b805415610d28576000610d14826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610d2657610d26338261201e565b505b8215610d61578154610d529073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054610d5e9084612147565b81555b60038201548154610d7c9164e8d4a510009161067691611eb3565b6001820155600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff909216916340c10f199160448082019260009290919082900301818387803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b5050604080518681529051600093503392507f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505050565b81610ebb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77697468647261772043414b4520627920756e7374616b696e67000000000000604482015290519081900360640190fd5b600060078381548110610eca57fe5b600091825260208083208684526008825260408085203386529092529220805460049092029092019250831115610f6257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b610f6b846113a1565b6000610f99826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610fab57610fab338261201e565b8315610fe2578154610fbd9085611fa7565b82558254610fe29073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b60038301548254610ffd9164e8d4a510009161067691611eb3565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60065473ffffffffffffffffffffffffffffffffffffffff166110c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6d6967726174653a206e6f206d69677261746f72000000000000000000000000604482015290519081900360640190fd5b6000600782815481106110d357fe5b600091825260208083206004928302018054604080517f70a0823100000000000000000000000000000000000000000000000000000000815230958101959095525191955073ffffffffffffffffffffffffffffffffffffffff16939284926370a0823192602480840193829003018186803b15801561115257600080fd5b505afa158015611166573d6000803e3d6000fd5b505050506040513d602081101561117c57600080fd5b50516006549091506111a89073ffffffffffffffffffffffffffffffffffffffff848116911683612319565b600654604080517fce5494bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b1580156112bc57600080fd5b505afa1580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b5051821461135557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d6967726174653a206261640000000000000000000000000000000000000000604482015290519081900360640190fd5b83547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9190911617909255505050565b600a5481565b6000600782815481106113b057fe5b90600052602060002090600402019050806002015443116113d1575061162a565b8054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561144157600080fd5b505afa158015611455573d6000803e3d6000fd5b505050506040513d602081101561146b57600080fd5b505190508061148157504360029091015561162a565b6000611491836002015443611b10565b905060006114b860095461067686600101546108eb60045487611eb390919063ffffffff16565b60015460035491925073ffffffffffffffffffffffffffffffffffffffff908116916340c10f1991166114ec84600a611f26565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561153f57600080fd5b505af1158015611553573d6000803e3d6000fd5b5050600154600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201526024810187905290519190921693506340c10f199250604480830192600092919082900301818387803b1580156115d557600080fd5b505af11580156115e9573d6000803e3d6000fd5b5050505061161761160c8461067664e8d4a5100085611eb390919063ffffffff16565b600386015490612147565b6003850155505043600290920191909155505b50565b60006007828154811061163c57fe5b6000918252602080832085845260088252604080852033808752935290932080546004909302909301805490945061168e9273ffffffffffffffffffffffffffffffffffffffff9190911691906120b5565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b6116dd6121bb565b73ffffffffffffffffffffffffffffffffffffffff166116fb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461177d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600555565b60075460005b818110156117a157611799816113a1565b600101611788565b5050565b6117ad6121bb565b73ffffffffffffffffffffffffffffffffffffffff166117cb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461184d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b801561185b5761185b611782565b60006007848154811061186a57fe5b9060005260206000209060040201600101549050826007858154811061188c57fe5b906000526020600020906004020160010181905550828114610b93576118c7836118c183600954611fa790919063ffffffff16565b90612147565b600955610b936121bf565b6118da6121bb565b73ffffffffffffffffffffffffffffffffffffffff166118f8611af4565b73ffffffffffffffffffffffffffffffffffffffff161461197a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff163314611aad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6465763a207775743f0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600554600090611b24906108eb8486611fa7565b9392505050565b60086020908152600092835260408084209091529082529020805460019091015482565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b81611bf357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6465706f7369742043414b45206279207374616b696e67000000000000000000604482015290519081900360640190fd5b600060078381548110611c0257fe5b60009182526020808320868452600882526040808520338652909252922060049091029091019150611c33846113a1565b805415611c7c576000611c68826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015611c7a57611c7a338261201e565b505b8215611cb5578154611ca69073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054611cb29084612147565b81555b60038201548154611cd09164e8d4a510009161067691611eb3565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b611d1a6121bb565b73ffffffffffffffffffffffffffffffffffffffff16611d38611af4565b73ffffffffffffffffffffffffffffffffffffffff1614611dba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116611e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061283c6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600082611ec257506000610944565b82820282848281611ecf57fe5b0414611b24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128886021913960400191505060405180910390fd5b6000808211611f9657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f9f57fe5b049392505050565b60008282111561201857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600254604080517fa2e6ddcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529151919092169163a2e6ddcc91604480830192600092919082900301818387803b15801561209957600080fd5b505af11580156120ad573d6000803e3d6000fd5b505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526121429084906124a3565b505050565b600082820183811015611b2457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600754600060015b8281101561220a57612200600782815481106121df57fe5b9060005260206000209060040201600101548361214790919063ffffffff16565b91506001016121c7565b5080156117a15761221c816003611f26565b9050612256816118c1600760008154811061223357fe5b906000526020600020906004020160010154600954611fa790919063ffffffff16565b60098190555080600760008154811061226b57fe5b9060005260206000209060040201600101819055505050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b939085906124a3565b8015806123c55750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561239757600080fd5b505afa1580156123ab573d6000803e3d6000fd5b505050506040513d60208110156123c157600080fd5b5051155b61241a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806128a96036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526121429084905b6060612505826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661257b9092919063ffffffff16565b8051909150156121425780806020019051602081101561252457600080fd5b5051612142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612812602a913960400191505060405180910390fd5b606061258a8484600085612592565b949350505050565b6060824710156125ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806128626026913960400191505060405180910390fd5b6125f68561274d565b61266157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106126cb57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161268e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461272d576040519150601f19603f3d011682016040523d82523d6000602084013e612732565b606091505b5091509150612742828286612753565b979650505050505050565b3b151590565b60608315612762575081611b24565b8251156127725782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156127d65781810151838201526020016127be565b50505050905090810190601f1680156128035780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666542455032303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212204a998361f0f5665374d8aaeb4227a26c5a52a806a0be4997372508cb9e5e1e7c64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635ffe6146116101045780638d88a90e116100a2578063d49e77cd11610071578063d49e77cd1461050c578063dce1748414610514578063e2bbb1581461051c578063f2fde38b1461053f576101cf565b80638d88a90e1461045c5780638da5cb5b1461048f5780638dbb1e3a1461049757806393f1a40b146104ba576101cf565b8063715018a6116100de578063715018a6146104135780637cd07e471461041b57806386a952c41461044c5780638aa2855014610454576101cf565b80635ffe6146146103c3578063630b5ba1146103e057806364482f79146103e8576101cf565b806323cf311811610171578063454b06081161014b578063454b06081461036457806348cd4cb11461038157806351eb05a6146103895780635312ea8e146103a6576101cf565b806323cf3118146102f157806341441d3b14610324578063441a3e7014610341576101cf565b80631175a1dd116101ad5780631175a1dd146102155780631526fe271461024e57806317caf6f1146102a85780631eaaa045146102b0576101cf565b80630755e0b6146101d4578063081e3eda146101ee5780631058d281146101f6575b600080fd5b6101dc610572565b60408051918252519081900360200190f35b6101dc610578565b6102136004803603602081101561020c57600080fd5b503561057e565b005b6101dc6004803603604081101561022b57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166107ba565b61026b6004803603602081101561026457600080fd5b503561094a565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526020850193909352838301919091526060830152519081900360800190f35b6101dc610998565b610213600480360360608110156102c657600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff6020820135169060400135151561099e565b6102136004803603602081101561030757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b99565b6102136004803603602081101561033a57600080fd5b5035610c88565b6102136004803603604081101561035757600080fd5b5080359060200135610e4f565b6102136004803603602081101561037a57600080fd5b5035611040565b6101dc61139b565b6102136004803603602081101561039f57600080fd5b50356113a1565b610213600480360360208110156103bc57600080fd5b503561162d565b610213600480360360208110156103d957600080fd5b50356116d5565b610213611782565b610213600480360360608110156103fe57600080fd5b508035906020810135906040013515156117a5565b6102136118d2565b6104236119e9565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610423611a05565b6101dc611a21565b6102136004803603602081101561047257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a27565b610423611af4565b6101dc600480360360408110156104ad57600080fd5b5080359060200135611b10565b6104f3600480360360408110156104d057600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16611b2b565b6040805192835260208301919091528051918290030190f35b610423611b4f565b610423611b6b565b6102136004803603604081101561053257600080fd5b5080359060200135611b87565b6102136004803603602081101561055557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611d12565b60045481565b60075490565b6000600760008154811061058e57fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7909152604090922080546004909202909201925083111561063e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b61064860006113a1565b6000610682826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90611f26565b90611fa7565b9050801561069457610694338261201e565b83156106cb5781546106a69085611fa7565b825582546106cb9073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b600383015482546106e69164e8d4a510009161067691611eb3565b6001830155600254604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101879052905173ffffffffffffffffffffffffffffffffffffffff90921691639dc29fac9160448082019260009290919082900301818387803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b5050604080518781529051600093503392507ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350505050565b600080600784815481106107ca57fe5b6000918252602080832087845260088252604080852073ffffffffffffffffffffffffffffffffffffffff898116875290845281862060049586029093016003810154815484517f70a082310000000000000000000000000000000000000000000000000000000081523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b50516002850154909150431180156108af57508015155b156109155760006108c4856002015443611b10565b905060006108f160095461067688600101546108eb60045487611eb390919063ffffffff16565b90611eb3565b9050610910610909846106768464e8d4a51000611eb3565b8590612147565b935050505b61093d836001015461067c64e8d4a51000610676868860000154611eb390919063ffffffff16565b9450505050505b92915050565b6007818154811061095757fe5b6000918252602090912060049091020180546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff9092169350919084565b60095481565b6109a66121bb565b73ffffffffffffffffffffffffffffffffffffffff166109c4611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610a4657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8015610a5457610a54611782565b6000600a544311610a6757600a54610a69565b435b600954909150610a799085612147565b6009556040805160808101825273ffffffffffffffffffffffffffffffffffffffff85811682526020820187815292820184815260006060840181815260078054600181018255925293517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490920291820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016919094161790925592517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68982015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a830155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b90910155610b936121bf565b50505050565b610ba16121bb565b73ffffffffffffffffffffffffffffffffffffffff16610bbf611af4565b73ffffffffffffffffffffffffffffffffffffffff1614610c4157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006007600081548110610c9857fe5b600091825260208083203384527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c790915260408320600490920201925090610cdf906113a1565b805415610d28576000610d14826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610d2657610d26338261201e565b505b8215610d61578154610d529073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054610d5e9084612147565b81555b60038201548154610d7c9164e8d4a510009161067691611eb3565b6001820155600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff909216916340c10f199160448082019260009290919082900301818387803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b5050604080518681529051600093503392507f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a3505050565b81610ebb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77697468647261772043414b4520627920756e7374616b696e67000000000000604482015290519081900360640190fd5b600060078381548110610eca57fe5b600091825260208083208684526008825260408085203386529092529220805460049092029092019250831115610f6257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b610f6b846113a1565b6000610f99826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015610fab57610fab338261201e565b8315610fe2578154610fbd9085611fa7565b82558254610fe29073ffffffffffffffffffffffffffffffffffffffff1633866120b5565b60038301548254610ffd9164e8d4a510009161067691611eb3565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60065473ffffffffffffffffffffffffffffffffffffffff166110c457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6d6967726174653a206e6f206d69677261746f72000000000000000000000000604482015290519081900360640190fd5b6000600782815481106110d357fe5b600091825260208083206004928302018054604080517f70a0823100000000000000000000000000000000000000000000000000000000815230958101959095525191955073ffffffffffffffffffffffffffffffffffffffff16939284926370a0823192602480840193829003018186803b15801561115257600080fd5b505afa158015611166573d6000803e3d6000fd5b505050506040513d602081101561117c57600080fd5b50516006549091506111a89073ffffffffffffffffffffffffffffffffffffffff848116911683612319565b600654604080517fce5494bb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301529151600093929092169163ce5494bb9160248082019260209290919082900301818787803b15801561122057600080fd5b505af1158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925073ffffffffffffffffffffffffffffffffffffffff8316916370a0823191602480820192602092909190829003018186803b1580156112bc57600080fd5b505afa1580156112d0573d6000803e3d6000fd5b505050506040513d60208110156112e657600080fd5b5051821461135557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d6967726174653a206261640000000000000000000000000000000000000000604482015290519081900360640190fd5b83547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9190911617909255505050565b600a5481565b6000600782815481106113b057fe5b90600052602060002090600402019050806002015443116113d1575061162a565b8054604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561144157600080fd5b505afa158015611455573d6000803e3d6000fd5b505050506040513d602081101561146b57600080fd5b505190508061148157504360029091015561162a565b6000611491836002015443611b10565b905060006114b860095461067686600101546108eb60045487611eb390919063ffffffff16565b60015460035491925073ffffffffffffffffffffffffffffffffffffffff908116916340c10f1991166114ec84600a611f26565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561153f57600080fd5b505af1158015611553573d6000803e3d6000fd5b5050600154600254604080517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201526024810187905290519190921693506340c10f199250604480830192600092919082900301818387803b1580156115d557600080fd5b505af11580156115e9573d6000803e3d6000fd5b5050505061161761160c8461067664e8d4a5100085611eb390919063ffffffff16565b600386015490612147565b6003850155505043600290920191909155505b50565b60006007828154811061163c57fe5b6000918252602080832085845260088252604080852033808752935290932080546004909302909301805490945061168e9273ffffffffffffffffffffffffffffffffffffffff9190911691906120b5565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b6116dd6121bb565b73ffffffffffffffffffffffffffffffffffffffff166116fb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461177d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600555565b60075460005b818110156117a157611799816113a1565b600101611788565b5050565b6117ad6121bb565b73ffffffffffffffffffffffffffffffffffffffff166117cb611af4565b73ffffffffffffffffffffffffffffffffffffffff161461184d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b801561185b5761185b611782565b60006007848154811061186a57fe5b9060005260206000209060040201600101549050826007858154811061188c57fe5b906000526020600020906004020160010181905550828114610b93576118c7836118c183600954611fa790919063ffffffff16565b90612147565b600955610b936121bf565b6118da6121bb565b73ffffffffffffffffffffffffffffffffffffffff166118f8611af4565b73ffffffffffffffffffffffffffffffffffffffff161461197a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60035473ffffffffffffffffffffffffffffffffffffffff163314611aad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6465763a207775743f0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600554600090611b24906108eb8486611fa7565b9392505050565b60086020908152600092835260408084209091529082529020805460019091015482565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b81611bf357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6465706f7369742043414b45206279207374616b696e67000000000000000000604482015290519081900360640190fd5b600060078381548110611c0257fe5b60009182526020808320868452600882526040808520338652909252922060049091029091019150611c33846113a1565b805415611c7c576000611c68826001015461067c64e8d4a5100061067687600301548760000154611eb390919063ffffffff16565b90508015611c7a57611c7a338261201e565b505b8215611cb5578154611ca69073ffffffffffffffffffffffffffffffffffffffff16333086612284565b8054611cb29084612147565b81555b60038201548154611cd09164e8d4a510009161067691611eb3565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b611d1a6121bb565b73ffffffffffffffffffffffffffffffffffffffff16611d38611af4565b73ffffffffffffffffffffffffffffffffffffffff1614611dba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116611e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061283c6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600082611ec257506000610944565b82820282848281611ecf57fe5b0414611b24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128886021913960400191505060405180910390fd5b6000808211611f9657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f9f57fe5b049392505050565b60008282111561201857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600254604080517fa2e6ddcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529151919092169163a2e6ddcc91604480830192600092919082900301818387803b15801561209957600080fd5b505af11580156120ad573d6000803e3d6000fd5b505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526121429084906124a3565b505050565b600082820183811015611b2457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600754600060015b8281101561220a57612200600782815481106121df57fe5b9060005260206000209060040201600101548361214790919063ffffffff16565b91506001016121c7565b5080156117a15761221c816003611f26565b9050612256816118c1600760008154811061223357fe5b906000526020600020906004020160010154600954611fa790919063ffffffff16565b60098190555080600760008154811061226b57fe5b9060005260206000209060040201600101819055505050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b939085906124a3565b8015806123c55750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561239757600080fd5b505afa1580156123ab573d6000803e3d6000fd5b505050506040513d60208110156123c157600080fd5b5051155b61241a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806128a96036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526121429084905b6060612505826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661257b9092919063ffffffff16565b8051909150156121425780806020019051602081101561252457600080fd5b5051612142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612812602a913960400191505060405180910390fd5b606061258a8484600085612592565b949350505050565b6060824710156125ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806128626026913960400191505060405180910390fd5b6125f68561274d565b61266157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106126cb57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161268e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461272d576040519150601f19603f3d011682016040523d82523d6000602084013e612732565b606091505b5091509150612742828286612753565b979650505050505050565b3b151590565b60608315612762575081611b24565b8251156127725782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156127d65781810151838201526020016127be565b50505050905090810190601f1680156128035780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666542455032303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212204a998361f0f5665374d8aaeb4227a26c5a52a806a0be4997372508cb9e5e1e7c64736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/test/artifactsFile/MasterChefV2.json b/projects/vecake/test/artifactsFile/MasterChefV2.json new file mode 100644 index 00000000..8e63e6b4 --- /dev/null +++ b/projects/vecake/test/artifactsFile/MasterChefV2.json @@ -0,0 +1,1051 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MasterChefV2", + "sourceName": "contracts/MasterChefV2.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IMasterChef", + "name": "_MASTER_CHEF", + "type": "address" + }, + { + "internalType": "contract IBEP20", + "name": "_CAKE", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_MASTER_PID", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_burnAdmin", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IBEP20", + "name": "lpToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "name": "AddPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Init", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + } + ], + "name": "SetPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "boostContract", + "type": "address" + } + ], + "name": "UpdateBoostContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMultiplier", + "type": "uint256" + } + ], + "name": "UpdateBoostMultiplier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "UpdateBurnAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "burnRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "regularFarmRate", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "specialFarmRate", + "type": "uint256" + } + ], + "name": "UpdateCakeRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lpSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + } + ], + "name": "UpdatePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isValid", + "type": "bool" + } + ], + "name": "UpdateWhiteList", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "ACC_CAKE_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CAKE", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CAKE_RATE_TOTAL_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTERCHEF_CAKE_PER_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER_CHEF", + "outputs": [ + { + "internalType": "contract IMasterChef", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER_PID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_BOOST_PRECISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_lpToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isRegular", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "add", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "boostContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "burnAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "burnCake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_isRegular", + "type": "bool" + } + ], + "name": "cakePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePerBlockToBurn", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToBurn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToRegularFarm", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakeRateToSpecialFarm", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "getBoostMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvestFromMasterChef", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBEP20", + "name": "dummyToken", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastBurnedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "lpToken", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingCake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "pools", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalRegularAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSpecialAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newBoostContract", + "type": "address" + } + ], + "name": "updateBoostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newMultiplier", + "type": "uint256" + } + ], + "name": "updateBoostMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newAdmin", + "type": "address" + } + ], + "name": "updateBurnAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_burnRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_regularFarmRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_specialFarmRate", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "updateCakeRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "accCakePerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBoostedShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isRegular", + "type": "bool" + } + ], + "internalType": "struct MasterChefV2.PoolInfo", + "name": "pool", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isValid", + "type": "bool" + } + ], + "name": "updateWhiteList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "boostMultiplier", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whiteList", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60e060405264ae9f7bcc00600a5564174876e800600b556422ecb25c00600c553480156200002c57600080fd5b5060405162003e6538038062003e658339810160408190526200004f91620000f3565b60006200005b620000ef565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055606093841b6001600160601b03199081166080529290931b90911660a05260c052600280546001600160a01b0319166001600160a01b0390921691909117905562000167565b3390565b6000806000806080858703121562000109578384fd5b845162000116816200014e565b602086015190945062000129816200014e565b60408601516060870151919450925062000143816200014e565b939692955090935050565b6001600160a01b03811681146200016457600080fd5b50565b60805160601c60a05160601c60c051613c9e620001c760003980610f7c528061133552806116925250806112a95280611f7e5280612c0a5280612cdd5280612d8a525080610e955280610f4f5280611308528061278d5250613c9e6000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c80637398b7ea11610191578063ac1d0609116100e3578063dfcedeee11610097578063e39e132311610071578063e39e13231461052b578063edd8b17014610569578063f2fde38b14610571576102e9565b8063dfcedeee14610546578063e0f91f6c1461054e578063e2bbb15814610556576102e9565b8063c507aeaa116100c8578063c507aeaa14610518578063cc6db2da1461052b578063dc6363df14610533576102e9565b8063ac1d0609146104fd578063c40d337b14610510576102e9565b80638da5cb5b116101455780639dcc1b5f1161011f5780639dcc1b5f146104da5780639dd2fcc3146104e2578063aa47bc8e146104f5576102e9565b80638da5cb5b146104a857806393f1a40b146104b057806399d7e84a146104d2576102e9565b806378db4c341161017657806378db4c341461048557806378ed5d1f1461048d57806381bdf98c146104a0576102e9565b80637398b7ea1461046a578063777a97f814610472576102e9565b806339aae5ba1161024a5780635312ea8e116101fe57806364482f79116101d857806364482f791461044757806369b021281461045a578063715018a614610462576102e9565b80635312ea8e1461042457806361621aaa14610437578063630b5ba11461043f576102e9565b80634ca6ef281161022f5780634ca6ef28146103e75780634f70b15a146103fc57806351eb05a614610404576102e9565b806339aae5ba146103cc578063441a3e70146103d4576102e9565b80631526fe27116102a15780631ce06d57116102865780631ce06d57146103915780631e9b828b14610399578063372c12b1146103ac576102e9565b80631526fe271461035a57806319ab453c1461037e576102e9565b8063081e3eda116102d2578063081e3eda1461032c5780630bb844bc146103345780631175a1dd14610347576102e9565b8063033186e8146102ee578063041a84c914610317575b600080fd5b6103016102fc366004613081565b610584565b60405161030e9190613ba7565b60405180910390f35b61032a6103253660046130ac565b6105da565b005b610301610952565b61032a61034236600461302d565b610958565b610301610355366004613148565b610ae4565b61036d610368366004613118565b610c97565b60405161030e959493929190613be4565b61032a61038c36600461302d565b610cd8565b610301611009565b6103016103a73660046130e0565b61100f565b6103bf6103ba36600461302d565b611074565b60405161030e91906132e0565b610301611089565b61032a6103e23660046131be565b611096565b6103ef6112a7565b60405161030e9190613268565b61032a6112cb565b610417610412366004613118565b611394565b60405161030e9190613b6b565b61032a610432366004613118565b611562565b610301611690565b61032a6116b4565b61032a6104553660046131df565b611748565b6103016118d6565b61032a6118e0565b6103016119c2565b61032a6104803660046130e0565b6119ce565b610301611aab565b6103ef61049b366004613118565b611ab1565b6103ef611ae5565b6103ef611b01565b6104c36104be366004613148565b611b1d565b60405161030e93929190613bce565b610301611b49565b610301611b4f565b61032a6104f036600461302d565b611b7d565b610301611cd5565b61032a61050b366004613049565b611cdb565b610301611e26565b61032a61052636600461316c565b611e2c565b61030161221c565b61032a610541366004613217565b612225565b6103ef61239e565b6103016123ba565b61032a6105643660046131be565b6123c0565b6103ef61278b565b61032a61057f36600461302d565b6127af565b600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281206002015464e8d4a5100081116105ce5764e8d4a510006105d0565b805b9150505b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff163314610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061384c565b60405180910390fd5b60026001541415610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015573ffffffffffffffffffffffffffffffffffffffff83166106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906135b2565b600482815481106106d057fe5b600091825260209091206004600590920201015460ff1661071d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613906565b64e8d4a51000811015801561073857506501d1a94a20008111155b61076e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613399565b610776612fdb565b61077f83611394565b600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8916845290915281209192506107bb8686610584565b90506107c88686836128fc565b610808670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8a89600001546129d990919063ffffffff16565b90612a2d565b906129d9565b60018301558154610854906108289064e8d4a51000906107fc90886129d9565b835461084e906108439064e8d4a51000906107fc90876129d9565b606087015190612a79565b90612abb565b6060840152600480548491908790811061086a57fe5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608601516003850155608090950151600490930180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016931515939093179092558883526006815281832073ffffffffffffffffffffffffffffffffffffffff8b1680855291529181902090920186905590517f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba9061093e90889085908990613bce565b60405180910390a250506001805550505050565b60045490565b610960612afa565b73ffffffffffffffffffffffffffffffffffffffff1661097e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8116610a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061360f565b60025473ffffffffffffffffffffffffffffffffffffffff82811691161415610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a8b565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b6000610aee612fdb565b60048481548110610afb57fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301939093526002830154908201526003820154606082015260049091015460ff16151560808201529050610b5561300c565b50600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845282529182902082516060808201855282548252600183015482850152600290920154938101939093528351908401519184015190919043118015610bc357508015155b15610c43576000610be1856020015143612a7990919063ffffffff16565b90506000610c1c8660800151610bf957600954610bfd565b6008545b6107fc8860400151610802610c158b6080015161100f565b87906129d9565b9050610c3e610c37846107fc84670de0b6b3a76400006129d9565b8590612abb565b935050505b6000610c6364e8d4a510006107fc610c5b8a8c610584565b8751906129d9565b6020850151909150610c8b90610c85670de0b6b3a76400006107fc85886129d9565b90612a79565b98975050505050505050565b60048181548110610ca457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610ce0612afa565b73ffffffffffffffffffffffffffffffffffffffff16610cfe611b01565b73ffffffffffffffffffffffffffffffffffffffff1614610d4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610da0903390600401613268565b60206040518083038186803b158015610db857600080fd5b505afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df09190613130565b905080610e29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061333c565b610e4b73ffffffffffffffffffffffffffffffffffffffff8316333084612afe565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610ebf907f00000000000000000000000000000000000000000000000000000000000000009085906004016132ba565b602060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1191906130fc565b506040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890610fa6907f0000000000000000000000000000000000000000000000000000000000000000908590600401613bc0565b600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b505043600d5550506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a15050565b600c5481565b600081156110455761103e64e8d4a510006107fc600b5468022b1c8c1227a000006129d990919063ffffffff16565b905061106f565b61106c64e8d4a510006107fc600c5468022b1c8c1227a000006129d990919063ffffffff16565b90505b919050565b60076020526000908152604090205460ff1681565b68022b1c8c1227a0000081565b600260015414156110d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001556110e0612fdb565b6110e983611394565b60008481526006602090815260408083203384529091529020805491925090831115611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137a9565b600061114d3386610584565b905061115a3386836128fc565b83156111af57815461116c9085612a79565b82600001819055506111af33856005888154811061118657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169190612ba1565b6111e3670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b600183015561122b6111fe64e8d4a510006107fc87856129d9565b6004878154811061120b57fe5b906000526020600020906005020160030154612a7990919063ffffffff16565b6004868154811061123857fe5b906000526020600020906005020160030181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516112949190613ba7565b60405180910390a3505060018055505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890611360907f000000000000000000000000000000000000000000000000000000000000000090600090600401613bc0565b600060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b50505050565b61139c612fdb565b600482815481106113a957fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561106f576060810151608082015160009061141b5760095461141f565b6008545b90506000821180156114315750600081115b1561149757600061144f846020015143612a7990919063ffffffff16565b9050600061146f836107fc8760400151610802610c158a6080015161100f565b905061149261148a856107fc84670de0b6b3a76400006129d9565b865190612abb565b855250505b43602084015260048054849190869081106114ae57fe5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608401516003830155608090930151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558401518451915186927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926115539290918791613bce565b60405180910390a25050919050565b6002600154141561159f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001819055506000600482815481106115b657fe5b60009182526020808320858452600682526040808520338087529352842080548582556001820186905560059094029091019450929061160c9064e8d4a51000906107fc906116059089610584565b85906129d9565b90508084600301541161162057600061162f565b600384015461162f9082612a79565b846003018190555061164933836005888154811061118657fe5b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595846040516112949190613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045460005b81811015611744576116ca612fdb565b600482815481106116d757fe5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff161515608082015291501561173b5761173982611394565b505b506001016116ba565b5050565b611750612afa565b73ffffffffffffffffffffffffffffffffffffffff1661176e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146117bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6117c483611394565b5080156117d3576117d36116b4565b600483815481106117e057fe5b600091825260209091206004600590920201015460ff161561183b576118338261084e6004868154811061181057fe5b906000526020600020906005020160020154600854612a7990919063ffffffff16565b600855611876565b6118728261084e6004868154811061184f57fe5b906000526020600020906005020160020154600954612a7990919063ffffffff16565b6009555b816004848154811061188457fe5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516118c99190613ba7565b60405180910390a2505050565b6501d1a94a200081565b6118e8612afa565b73ffffffffffffffffffffffffffffffffffffffff16611906611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b670de0b6b3a764000081565b6119d6612afa565b73ffffffffffffffffffffffffffffffffffffffff166119f4611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b8015611a4f57611a4f6116b4565b6000611a66600d5443612a7990919063ffffffff16565b90506000611a7c611a75611b4f565b83906129d9565b600254909150611aa29073ffffffffffffffffffffffffffffffffffffffff1682612bc5565b505043600d5550565b600d5481565b60058181548110611abe57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60095481565b6000611b7864e8d4a510006107fc600a5468022b1c8c1227a000006129d990919063ffffffff16565b905090565b611b85612afa565b73ffffffffffffffffffffffffffffffffffffffff16611ba3611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811615801590611c30575060035473ffffffffffffffffffffffffffffffffffffffff828116911614155b611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613b0e565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b600b5481565b611ce3612afa565b73ffffffffffffffffffffffffffffffffffffffff16611d01611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8216611d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613963565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600760205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055517fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d5190611e1a9084906132e0565b60405180910390a25050565b60085481565b611e34612afa565b73ffffffffffffffffffffffffffffffffffffffff16611e52611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611e9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190611ef4903090600401613268565b60206040518083038186803b158015611f0c57600080fd5b505afa158015611f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f449190613130565b1015611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906138a9565b8015612010576120106116b4565b811561202b576008546120239085612abb565b60085561203c565b6009546120389085612abb565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905591546121dd91612a79565b7f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa868560405161220e929190613bb0565b60405180910390a350505050565b64e8d4a5100081565b61222d612afa565b73ffffffffffffffffffffffffffffffffffffffff1661224b611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000841180156122a85750600083115b80156122b45750600082115b6122ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061366c565b64e8d4a510006122fe8361084e8787612abb565b14612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139f7565b8015612343576123436116b4565b61234d60006119ce565b600a849055600b839055600c8290556040517fae2d2e7d1ae84564fc72227253ce0f36a007209f7fd5ec414dea80e5af2fb5b09061239090869086908690613bce565b60405180910390a150505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600260015414156123fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015561240a612fdb565b61241383611394565b600084815260066020908152604080832033845290915290206080820151919250908061244f57503360009081526007602052604090205460ff165b612485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906136c9565b60006124913386610584565b8254909150156124a6576124a63386836128fc565b83156126a2576000600586815481106124bb57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a082319061251a903090600401613268565b60206040518083038186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256a9190613130565b90506125a933308760058a8154811061257f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16929190612afe565b61266981600588815481106125ba57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190612619903090600401613268565b60206040518083038186803b15801561263157600080fd5b505afa158015612645573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c859190613130565b83549095506126789086612abb565b835561269b61269064e8d4a510006107fc88866129d9565b606086015190612abb565b6060850152505b6126d6670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b826001018190555082600486815481106126ec57fe5b6000918252602091829020835160059290920201908155908201516001820155604080830151600283015560608301516003830155608090920151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905551859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611294908890613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b6127b7612afa565b73ffffffffffffffffffffffffffffffffffffffff166127d5611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811661286f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613453565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61290461300c565b50600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906129719064e8d4a51000906107fc90866129d9565b905060006129a9670de0b6b3a76400006107fc6004888154811061299157fe5b600091825260209091206005909102015485906129d9565b905060006129c4846020015183612a7990919063ffffffff16565b90506129d08782612bc5565b50505050505050565b6000826129e8575060006105d4565b828202828482816129f557fe5b04146105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061374c565b6000808211612a68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061357b565b818381612a7157fe5b049392505050565b600082821115612ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134e7565b50900390565b6000828201838110156105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134b0565b3390565b61138e846323b872dd60e01b858585604051602401612b1f93929190613289565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612db1565b612bc08363a9059cbb60e01b8484604051602401612b1f9291906132ba565b505050565b8015611744576040517f70a08231000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612c3f903090600401613268565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190613130565b1015612c9d57612c9d6112cb565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612d12903090600401613268565b60206040518083038186803b158015612d2a57600080fd5b505afa158015612d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d629190613130565b905081811015612d70578091505b612bc073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168484612ba1565b6060612e13826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e679092919063ffffffff16565b805190915015612bc05780806020019051810190612e3191906130fc565b612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906133f6565b6060612e768484600085612e80565b90505b9392505050565b606082471015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061351e565b612ec585612f82565b612efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139c0565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612f25919061324c565b60006040518083038185875af1925050503d8060008114612f62576040519150601f19603f3d011682016040523d82523d6000602084013e612f67565b606091505b5091509150612f77828286612f88565b979650505050505050565b3b151590565b60608315612f97575081612e79565b825115612fa75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b91906132eb565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60405180606001604052806000815260200160008152602001600081525090565b60006020828403121561303e578081fd5b81356105ce81613c35565b6000806040838503121561305b578081fd5b823561306681613c35565b9150602083013561307681613c5a565b809150509250929050565b60008060408385031215613093578182fd5b823561309e81613c35565b946020939093013593505050565b6000806000606084860312156130c0578081fd5b83356130cb81613c35565b95602085013595506040909401359392505050565b6000602082840312156130f1578081fd5b81356105ce81613c5a565b60006020828403121561310d578081fd5b81516105ce81613c5a565b600060208284031215613129578081fd5b5035919050565b600060208284031215613141578081fd5b5051919050565b6000806040838503121561315a578182fd5b82359150602083013561307681613c35565b60008060008060808587031215613181578081fd5b84359350602085013561319381613c35565b925060408501356131a381613c5a565b915060608501356131b381613c5a565b939692955090935050565b600080604083850312156131d0578182fd5b50508035926020909101359150565b6000806000606084860312156131f3578283fd5b8335925060208401359150604084013561320c81613c5a565b809150509250925092565b6000806000806080858703121561322c578384fd5b84359350602085013592506040850135915060608501356131b381613c5a565b6000825161325e818460208701613c09565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261330a816040850160208701613c09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526023908201527f4d61737465724368656656323a2042616c616e6365206d75737420657863656560408201527f6420300000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060408201527f6d756c7469706c69657200000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4d61737465724368656656323a2054686520757365722061646472657373206d60408201527f7573742062652076616c69640000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206d7573742062652076616c6964000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a2043616b652072617465206d7573742062652060408201527f67726561746572207468616e2030000000000000000000000000000000000000606082015260800190565b60208082526042908201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460408201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f60608201527f6f6c000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f77697468647261773a20496e73756666696369656e7400000000000000000000604082015260600190565b60208082526011908201527f4e6f6e6520424550323020746f6b656e73000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f737460408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f43414b4520746f6b656e2063616e277420626520616464656420746f2066617260408201527f6d20706f6f6c7300000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060408201527f636f756c6420626520626f6f7374656400000000000000000000000000000000606082015260800190565b60208082526032908201527f4d61737465724368656656323a20546865207768697465206c6973742061646460408201527f72657373206d7573742062652076616c69640000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526025908201527f4d61737465724368656656323a20546f74616c2072617465206d75737420626560408201527f2031653132000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526041908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206973207468652073616d6520776974682063757272656e742061646472657360608201527f7300000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f4d61737465724368656656323a204e657720626f6f737420636f6e747261637460408201527f2061646472657373206d7573742062652076616c696400000000000000000000606082015260800190565b600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b83811015613c24578181015183820152602001613c0c565b8381111561138e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114613c5757600080fd5b50565b8015158114613c5757600080fdfea2646970667358221220f3bdc87a312c1f6922cc6efd7e791ccbfcc6b4d3913517316c9bb61280affda264736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102e95760003560e01c80637398b7ea11610191578063ac1d0609116100e3578063dfcedeee11610097578063e39e132311610071578063e39e13231461052b578063edd8b17014610569578063f2fde38b14610571576102e9565b8063dfcedeee14610546578063e0f91f6c1461054e578063e2bbb15814610556576102e9565b8063c507aeaa116100c8578063c507aeaa14610518578063cc6db2da1461052b578063dc6363df14610533576102e9565b8063ac1d0609146104fd578063c40d337b14610510576102e9565b80638da5cb5b116101455780639dcc1b5f1161011f5780639dcc1b5f146104da5780639dd2fcc3146104e2578063aa47bc8e146104f5576102e9565b80638da5cb5b146104a857806393f1a40b146104b057806399d7e84a146104d2576102e9565b806378db4c341161017657806378db4c341461048557806378ed5d1f1461048d57806381bdf98c146104a0576102e9565b80637398b7ea1461046a578063777a97f814610472576102e9565b806339aae5ba1161024a5780635312ea8e116101fe57806364482f79116101d857806364482f791461044757806369b021281461045a578063715018a614610462576102e9565b80635312ea8e1461042457806361621aaa14610437578063630b5ba11461043f576102e9565b80634ca6ef281161022f5780634ca6ef28146103e75780634f70b15a146103fc57806351eb05a614610404576102e9565b806339aae5ba146103cc578063441a3e70146103d4576102e9565b80631526fe27116102a15780631ce06d57116102865780631ce06d57146103915780631e9b828b14610399578063372c12b1146103ac576102e9565b80631526fe271461035a57806319ab453c1461037e576102e9565b8063081e3eda116102d2578063081e3eda1461032c5780630bb844bc146103345780631175a1dd14610347576102e9565b8063033186e8146102ee578063041a84c914610317575b600080fd5b6103016102fc366004613081565b610584565b60405161030e9190613ba7565b60405180910390f35b61032a6103253660046130ac565b6105da565b005b610301610952565b61032a61034236600461302d565b610958565b610301610355366004613148565b610ae4565b61036d610368366004613118565b610c97565b60405161030e959493929190613be4565b61032a61038c36600461302d565b610cd8565b610301611009565b6103016103a73660046130e0565b61100f565b6103bf6103ba36600461302d565b611074565b60405161030e91906132e0565b610301611089565b61032a6103e23660046131be565b611096565b6103ef6112a7565b60405161030e9190613268565b61032a6112cb565b610417610412366004613118565b611394565b60405161030e9190613b6b565b61032a610432366004613118565b611562565b610301611690565b61032a6116b4565b61032a6104553660046131df565b611748565b6103016118d6565b61032a6118e0565b6103016119c2565b61032a6104803660046130e0565b6119ce565b610301611aab565b6103ef61049b366004613118565b611ab1565b6103ef611ae5565b6103ef611b01565b6104c36104be366004613148565b611b1d565b60405161030e93929190613bce565b610301611b49565b610301611b4f565b61032a6104f036600461302d565b611b7d565b610301611cd5565b61032a61050b366004613049565b611cdb565b610301611e26565b61032a61052636600461316c565b611e2c565b61030161221c565b61032a610541366004613217565b612225565b6103ef61239e565b6103016123ba565b61032a6105643660046131be565b6123c0565b6103ef61278b565b61032a61057f36600461302d565b6127af565b600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281206002015464e8d4a5100081116105ce5764e8d4a510006105d0565b805b9150505b92915050565b60035473ffffffffffffffffffffffffffffffffffffffff163314610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061384c565b60405180910390fd5b60026001541415610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015573ffffffffffffffffffffffffffffffffffffffff83166106c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906135b2565b600482815481106106d057fe5b600091825260209091206004600590920201015460ff1661071d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613906565b64e8d4a51000811015801561073857506501d1a94a20008111155b61076e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613399565b610776612fdb565b61077f83611394565b600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8916845290915281209192506107bb8686610584565b90506107c88686836128fc565b610808670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8a89600001546129d990919063ffffffff16565b90612a2d565b906129d9565b60018301558154610854906108289064e8d4a51000906107fc90886129d9565b835461084e906108439064e8d4a51000906107fc90876129d9565b606087015190612a79565b90612abb565b6060840152600480548491908790811061086a57fe5b6000918252602080832084516005939093020191825583810151600183015560408085015160028085019190915560608601516003850155608090950151600490930180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016931515939093179092558883526006815281832073ffffffffffffffffffffffffffffffffffffffff8b1680855291529181902090920186905590517f01abd62439b64f6c5dab6f94d56099495bd0c094f9c21f98f4d3562a21edb4ba9061093e90889085908990613bce565b60405180910390a250506001805550505050565b60045490565b610960612afa565b73ffffffffffffffffffffffffffffffffffffffff1661097e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146109cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8116610a18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061360f565b60025473ffffffffffffffffffffffffffffffffffffffff82811691161415610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a8b565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fd146fe330fdddf682413850a35b28edfccd4c4b53cfee802fd24950de5be1dbe90600090a35050565b6000610aee612fdb565b60048481548110610afb57fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301939093526002830154908201526003820154606082015260049091015460ff16151560808201529050610b5561300c565b50600084815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845282529182902082516060808201855282548252600183015482850152600290920154938101939093528351908401519184015190919043118015610bc357508015155b15610c43576000610be1856020015143612a7990919063ffffffff16565b90506000610c1c8660800151610bf957600954610bfd565b6008545b6107fc8860400151610802610c158b6080015161100f565b87906129d9565b9050610c3e610c37846107fc84670de0b6b3a76400006129d9565b8590612abb565b935050505b6000610c6364e8d4a510006107fc610c5b8a8c610584565b8751906129d9565b6020850151909150610c8b90610c85670de0b6b3a76400006107fc85886129d9565b90612a79565b98975050505050505050565b60048181548110610ca457fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294509092909160ff1685565b610ce0612afa565b73ffffffffffffffffffffffffffffffffffffffff16610cfe611b01565b73ffffffffffffffffffffffffffffffffffffffff1614610d4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190610da0903390600401613268565b60206040518083038186803b158015610db857600080fd5b505afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df09190613130565b905080610e29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061333c565b610e4b73ffffffffffffffffffffffffffffffffffffffff8316333084612afe565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063095ea7b390610ebf907f00000000000000000000000000000000000000000000000000000000000000009085906004016132ba565b602060405180830381600087803b158015610ed957600080fd5b505af1158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1191906130fc565b506040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890610fa6907f0000000000000000000000000000000000000000000000000000000000000000908590600401613bc0565b600060405180830381600087803b158015610fc057600080fd5b505af1158015610fd4573d6000803e3d6000fd5b505043600d5550506040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a15050565b600c5481565b600081156110455761103e64e8d4a510006107fc600b5468022b1c8c1227a000006129d990919063ffffffff16565b905061106f565b61106c64e8d4a510006107fc600c5468022b1c8c1227a000006129d990919063ffffffff16565b90505b919050565b60076020526000908152604090205460ff1681565b68022b1c8c1227a0000081565b600260015414156110d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001556110e0612fdb565b6110e983611394565b60008481526006602090815260408083203384529091529020805491925090831115611141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137a9565b600061114d3386610584565b905061115a3386836128fc565b83156111af57815461116c9085612a79565b82600001819055506111af33856005888154811061118657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169190612ba1565b6111e3670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b600183015561122b6111fe64e8d4a510006107fc87856129d9565b6004878154811061120b57fe5b906000526020600020906005020160030154612a7990919063ffffffff16565b6004868154811061123857fe5b906000526020600020906005020160030181905550843373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568866040516112949190613ba7565b60405180910390a3505060018055505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517fe2bbb15800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e2bbb15890611360907f000000000000000000000000000000000000000000000000000000000000000090600090600401613bc0565b600060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b50505050565b61139c612fdb565b600482815481106113a957fe5b60009182526020918290206040805160a0810182526005909302909101805483526001810154938301849052600281015491830191909152600381015460608301526004015460ff1615156080820152915043111561106f576060810151608082015160009061141b5760095461141f565b6008545b90506000821180156114315750600081115b1561149757600061144f846020015143612a7990919063ffffffff16565b9050600061146f836107fc8760400151610802610c158a6080015161100f565b905061149261148a856107fc84670de0b6b3a76400006129d9565b865190612abb565b855250505b43602084015260048054849190869081106114ae57fe5b6000918252602091829020835160059290920201908155828201516001820155604080840151600283015560608401516003830155608090930151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558401518451915186927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926115539290918791613bce565b60405180910390a25050919050565b6002600154141561159f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b60026001819055506000600482815481106115b657fe5b60009182526020808320858452600682526040808520338087529352842080548582556001820186905560059094029091019450929061160c9064e8d4a51000906107fc906116059089610584565b85906129d9565b90508084600301541161162057600061162f565b600384015461162f9082612a79565b846003018190555061164933836005888154811061118657fe5b843373ffffffffffffffffffffffffffffffffffffffff167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595846040516112949190613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b60045460005b81811015611744576116ca612fdb565b600482815481106116d757fe5b60009182526020918290206040805160a08101825260059093029091018054835260018101549383019390935260028301549082018190526003830154606083015260049092015460ff161515608082015291501561173b5761173982611394565b505b506001016116ba565b5050565b611750612afa565b73ffffffffffffffffffffffffffffffffffffffff1661176e611b01565b73ffffffffffffffffffffffffffffffffffffffff16146117bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6117c483611394565b5080156117d3576117d36116b4565b600483815481106117e057fe5b600091825260209091206004600590920201015460ff161561183b576118338261084e6004868154811061181057fe5b906000526020600020906005020160020154600854612a7990919063ffffffff16565b600855611876565b6118728261084e6004868154811061184f57fe5b906000526020600020906005020160020154600954612a7990919063ffffffff16565b6009555b816004848154811061188457fe5b906000526020600020906005020160020181905550827fc0cfd54d2de2b55f1e6e108d3ec53ff0a1abe6055401d32c61e9433b747ef9f8836040516118c99190613ba7565b60405180910390a2505050565b6501d1a94a200081565b6118e8612afa565b73ffffffffffffffffffffffffffffffffffffffff16611906611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b670de0b6b3a764000081565b6119d6612afa565b73ffffffffffffffffffffffffffffffffffffffff166119f4611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b8015611a4f57611a4f6116b4565b6000611a66600d5443612a7990919063ffffffff16565b90506000611a7c611a75611b4f565b83906129d9565b600254909150611aa29073ffffffffffffffffffffffffffffffffffffffff1682612bc5565b505043600d5550565b600d5481565b60058181548110611abe57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600660209081526000928352604080842090915290825290208054600182015460029092015490919083565b60095481565b6000611b7864e8d4a510006107fc600a5468022b1c8c1227a000006129d990919063ffffffff16565b905090565b611b85612afa565b73ffffffffffffffffffffffffffffffffffffffff16611ba3611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811615801590611c30575060035473ffffffffffffffffffffffffffffffffffffffff828116911614155b611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613b0e565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4c0c07d0b548b824a1b998eb4d11fccf1cfbc1e47edcdb309970ba88315eb30390600090a250565b600b5481565b611ce3612afa565b73ffffffffffffffffffffffffffffffffffffffff16611d01611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff8216611d9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613963565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600760205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055517fc551bbb22d0406dbfb8b6b7740cc521bcf44e1106029cf899c19b6a8e4c99d5190611e1a9084906132e0565b60405180910390a25050565b60085481565b611e34612afa565b73ffffffffffffffffffffffffffffffffffffffff16611e52611b01565b73ffffffffffffffffffffffffffffffffffffffff1614611e9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190611ef4903090600401613268565b60206040518083038186803b158015611f0c57600080fd5b505afa158015611f20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f449190613130565b1015611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906137e0565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906138a9565b8015612010576120106116b4565b811561202b576008546120239085612abb565b60085561203c565b6009546120389085612abb565b6009555b60058054600180820183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091556040805160a081018252600080825243602083019081529282018a8152606083018281528915156080850190815260048054808a018255945293517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9389029384015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905591546121dd91612a79565b7f18caa0724a26384928efe604ae6ddc99c242548876259770fc88fcb7e719d8fa868560405161220e929190613bb0565b60405180910390a350505050565b64e8d4a5100081565b61222d612afa565b73ffffffffffffffffffffffffffffffffffffffff1661224b611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b6000841180156122a85750600083115b80156122b45750600082115b6122ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061366c565b64e8d4a510006122fe8361084e8787612abb565b14612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139f7565b8015612343576123436116b4565b61234d60006119ce565b600a849055600b839055600c8290556040517fae2d2e7d1ae84564fc72227253ce0f36a007209f7fd5ec414dea80e5af2fb5b09061239090869086908690613bce565b60405180910390a150505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600260015414156123fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613a54565b600260015561240a612fdb565b61241383611394565b600084815260066020908152604080832033845290915290206080820151919250908061244f57503360009081526007602052604090205460ff165b612485576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906136c9565b60006124913386610584565b8254909150156124a6576124a63386836128fc565b83156126a2576000600586815481106124bb57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a082319061251a903090600401613268565b60206040518083038186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256a9190613130565b90506125a933308760058a8154811061257f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16929190612afe565b61266981600588815481106125ba57fe5b6000918252602090912001546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190612619903090600401613268565b60206040518083038186803b15801561263157600080fd5b505afa158015612645573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c859190613130565b83549095506126789086612abb565b835561269b61269064e8d4a510006107fc88866129d9565b606086015190612abb565b6060850152505b6126d6670de0b6b3a76400006107fc856000015161080264e8d4a510006107fc8789600001546129d990919063ffffffff16565b826001018190555082600486815481106126ec57fe5b6000918252602091829020835160059290920201908155908201516001820155604080830151600283015560608301516003830155608090920151600490910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905551859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611294908890613ba7565b7f000000000000000000000000000000000000000000000000000000000000000081565b6127b7612afa565b73ffffffffffffffffffffffffffffffffffffffff166127d5611b01565b73ffffffffffffffffffffffffffffffffffffffff1614612822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613817565b73ffffffffffffffffffffffffffffffffffffffff811661286f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b90613453565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61290461300c565b50600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684528252808320815160608101835281548082526001830154948201949094526002909101549181019190915291906129719064e8d4a51000906107fc90866129d9565b905060006129a9670de0b6b3a76400006107fc6004888154811061299157fe5b600091825260209091206005909102015485906129d9565b905060006129c4846020015183612a7990919063ffffffff16565b90506129d08782612bc5565b50505050505050565b6000826129e8575060006105d4565b828202828482816129f557fe5b04146105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061374c565b6000808211612a68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061357b565b818381612a7157fe5b049392505050565b600082821115612ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134e7565b50900390565b6000828201838110156105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906134b0565b3390565b61138e846323b872dd60e01b858585604051602401612b1f93929190613289565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612db1565b612bc08363a9059cbb60e01b8484604051602401612b1f9291906132ba565b505050565b8015611744576040517f70a08231000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612c3f903090600401613268565b60206040518083038186803b158015612c5757600080fd5b505afa158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190613130565b1015612c9d57612c9d6112cb565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612d12903090600401613268565b60206040518083038186803b158015612d2a57600080fd5b505afa158015612d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d629190613130565b905081811015612d70578091505b612bc073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168484612ba1565b6060612e13826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e679092919063ffffffff16565b805190915015612bc05780806020019051810190612e3191906130fc565b612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906133f6565b6060612e768484600085612e80565b90505b9392505050565b606082471015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061351e565b612ec585612f82565b612efb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906139c0565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051612f25919061324c565b60006040518083038185875af1925050503d8060008114612f62576040519150601f19603f3d011682016040523d82523d6000602084013e612f67565b606091505b5091509150612f77828286612f88565b979650505050505050565b3b151590565b60608315612f97575081612e79565b825115612fa75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b91906132eb565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016000151581525090565b60405180606001604052806000815260200160008152602001600081525090565b60006020828403121561303e578081fd5b81356105ce81613c35565b6000806040838503121561305b578081fd5b823561306681613c35565b9150602083013561307681613c5a565b809150509250929050565b60008060408385031215613093578182fd5b823561309e81613c35565b946020939093013593505050565b6000806000606084860312156130c0578081fd5b83356130cb81613c35565b95602085013595506040909401359392505050565b6000602082840312156130f1578081fd5b81356105ce81613c5a565b60006020828403121561310d578081fd5b81516105ce81613c5a565b600060208284031215613129578081fd5b5035919050565b600060208284031215613141578081fd5b5051919050565b6000806040838503121561315a578182fd5b82359150602083013561307681613c35565b60008060008060808587031215613181578081fd5b84359350602085013561319381613c35565b925060408501356131a381613c5a565b915060608501356131b381613c5a565b939692955090935050565b600080604083850312156131d0578182fd5b50508035926020909101359150565b6000806000606084860312156131f3578283fd5b8335925060208401359150604084013561320c81613c5a565b809150509250925092565b6000806000806080858703121561322c578384fd5b84359350602085013592506040850135915060608501356131b381613c5a565b6000825161325e818460208701613c09565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b600060208252825180602084015261330a816040850160208701613c09565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526023908201527f4d61737465724368656656323a2042616c616e6365206d75737420657863656560408201527f6420300000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4d61737465724368656656323a20496e76616c6964206e657720626f6f73742060408201527f6d756c7469706c69657200000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f5361666542455032303a204245503230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4d61737465724368656656323a2054686520757365722061646472657373206d60408201527f7573742062652076616c69640000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206d7573742062652076616c6964000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f4d61737465724368656656323a2043616b652072617465206d7573742062652060408201527f67726561746572207468616e2030000000000000000000000000000000000000606082015260800190565b60208082526042908201527f4d61737465724368656656323a205468652061646472657373206973206e6f7460408201527f20617661696c61626c6520746f206465706f73697420696e207468697320706f60608201527f6f6c000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f77697468647261773a20496e73756666696369656e7400000000000000000000604082015260600190565b60208082526011908201527f4e6f6e6520424550323020746f6b656e73000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f737460408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f43414b4520746f6b656e2063616e277420626520616464656420746f2066617260408201527f6d20706f6f6c7300000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4d61737465724368656656323a204f6e6c7920726567756c6172206661726d2060408201527f636f756c6420626520626f6f7374656400000000000000000000000000000000606082015260800190565b60208082526032908201527f4d61737465724368656656323a20546865207768697465206c6973742061646460408201527f72657373206d7573742062652076616c69640000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526025908201527f4d61737465724368656656323a20546f74616c2072617465206d75737420626560408201527f2031653132000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526041908201527f4d61737465724368656656323a204275726e2061646d696e206164647265737360408201527f206973207468652073616d6520776974682063757272656e742061646472657360608201527f7300000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f4d61737465724368656656323a204e657720626f6f737420636f6e747261637460408201527f2061646472657373206d7573742062652076616c696400000000000000000000606082015260800190565b600060a0820190508251825260208301516020830152604083015160408301526060830151606083015260808301511515608083015292915050565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b83811015613c24578181015183820152602001613c0c565b8381111561138e5750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114613c5757600080fd5b50565b8015158114613c5757600080fdfea2646970667358221220f3bdc87a312c1f6922cc6efd7e791ccbfcc6b4d3913517316c9bb61280affda264736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/test/artifactsFile/ProxyForCakePool.json b/projects/vecake/test/artifactsFile/ProxyForCakePool.json new file mode 100644 index 00000000..438c316c --- /dev/null +++ b/projects/vecake/test/artifactsFile/ProxyForCakePool.json @@ -0,0 +1,67 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ProxyForCakePool", + "sourceName": "contracts/ProxyForCakePool.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "contract IVECake", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cakePoolUser", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLockForProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60c060405234801561001057600080fd5b50600080336001600160a01b031663890357306040518163ffffffff1660e01b81526004016040805180830381865afa158015610051573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061007591906100ab565b6001600160a01b039182166080521660a052506100de9050565b80516001600160a01b03811681146100a657600080fd5b919050565b600080604083850312156100be57600080fd5b6100c78361008f565b91506100d56020840161008f565b90509250929050565b60805160a0516103cc61011c6000396000605601526000818160bb0152818160fd015281816101bf0152818161024c015261030101526103cc6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea2646970667358221220fbd5c3b66fa31e2dd892f2cfaab222d59b7eb7b2a072322c974dccec82bbddde64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea2646970667358221220fbd5c3b66fa31e2dd892f2cfaab222d59b7eb7b2a072322c974dccec82bbddde64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/test/artifactsFile/ProxyForCakePoolFactory.json b/projects/vecake/test/artifactsFile/ProxyForCakePoolFactory.json new file mode 100644 index 00000000..1bcf1b79 --- /dev/null +++ b/projects/vecake/test/artifactsFile/ProxyForCakePoolFactory.json @@ -0,0 +1,163 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ProxyForCakePoolFactory", + "sourceName": "contracts/ProxyForCakePoolFactory.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "NewProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "VECake", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "deploy", + "outputs": [ + { + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialization", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_VECake", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "parameters", + "outputs": [ + { + "internalType": "address", + "name": "VECake", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610c918061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b14610148578063c172085e14610166578063c4d66de81461019b578063f2fde38b146101ae57600080fd5b80634c96a3891461008d57806362534e79146100ca578063715018a6146100ea57806389035730146100f4575b600080fd5b6100a061009b366004610736565b6101c1565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6003546100a09073ffffffffffffffffffffffffffffffffffffffff1681565b6100f2610392565b005b60015460025461011b9173ffffffffffffffffffffffffffffffffffffffff908116911682565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152016100c1565b60005473ffffffffffffffffffffffffffffffffffffffff166100a0565b60035461018b9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016100c1565b6100f26101a9366004610736565b61041f565b6100f26101bc366004610736565b610584565b60035460009073ffffffffffffffffffffffffffffffffffffffff16331461024a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60408051808201825260035473ffffffffffffffffffffffffffffffffffffffff9081168083529085166020928301819052600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168417909155600280549091168217905583519283019190915291810191909152426060820152608001604051602081830303815290604052805190602001206040516102ef90610729565b8190604051809103906000f590508015801561030f573d6000803e3d6000fd5b50600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560028054909116905560405190915073ffffffffffffffffffffffffffffffffffffffff83811691908316907fa94ca626c15b5acbc6f820b88b794bce0d7a9198f2ed3e248aa0a362e2bdd60b90600090a3919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610413576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b61041d60006106b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b60035474010000000000000000000000000000000000000000900460ff1615610525576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610241565b6003805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffff0000000000000000000000000000000000000000009092169190911774010000000000000000000000000000000000000000179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610605576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b73ffffffffffffffffffffffffffffffffffffffff81166106a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610241565b6106b1816106b4565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104e88061077483390190565b60006020828403121561074857600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461076c57600080fd5b939250505056fe60c060405234801561001057600080fd5b50600080336001600160a01b031663890357306040518163ffffffff1660e01b81526004016040805180830381865afa158015610051573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061007591906100ab565b6001600160a01b039182166080521660a052506100de9050565b80516001600160a01b03811681146100a657600080fd5b919050565b600080604083850312156100be57600080fd5b6100c78361008f565b91506100d56020840161008f565b90509250929050565b60805160a0516103cc61011c6000396000605601526000818160bb0152818160fd015281816101bf0152818161024c015261030101526103cc6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea2646970667358221220fbd5c3b66fa31e2dd892f2cfaab222d59b7eb7b2a072322c974dccec82bbddde64736f6c634300080a0033a26469706673582212204bb2b63e616d5cf25756b9dc73124dd1be0fa629a893ea1e560ac09bb3d1e16d64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b14610148578063c172085e14610166578063c4d66de81461019b578063f2fde38b146101ae57600080fd5b80634c96a3891461008d57806362534e79146100ca578063715018a6146100ea57806389035730146100f4575b600080fd5b6100a061009b366004610736565b6101c1565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6003546100a09073ffffffffffffffffffffffffffffffffffffffff1681565b6100f2610392565b005b60015460025461011b9173ffffffffffffffffffffffffffffffffffffffff908116911682565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152929091166020830152016100c1565b60005473ffffffffffffffffffffffffffffffffffffffff166100a0565b60035461018b9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016100c1565b6100f26101a9366004610736565b61041f565b6100f26101bc366004610736565b610584565b60035460009073ffffffffffffffffffffffffffffffffffffffff16331461024a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b60408051808201825260035473ffffffffffffffffffffffffffffffffffffffff9081168083529085166020928301819052600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168417909155600280549091168217905583519283019190915291810191909152426060820152608001604051602081830303815290604052805190602001206040516102ef90610729565b8190604051809103906000f590508015801561030f573d6000803e3d6000fd5b50600180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560028054909116905560405190915073ffffffffffffffffffffffffffffffffffffffff83811691908316907fa94ca626c15b5acbc6f820b88b794bce0d7a9198f2ed3e248aa0a362e2bdd60b90600090a3919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610413576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b61041d60006106b4565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b60035474010000000000000000000000000000000000000000900460ff1615610525576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610241565b6003805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffff0000000000000000000000000000000000000000009092169190911774010000000000000000000000000000000000000000179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610605576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610241565b73ffffffffffffffffffffffffffffffffffffffff81166106a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610241565b6106b1816106b4565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104e88061077483390190565b60006020828403121561074857600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461076c57600080fd5b939250505056fe60c060405234801561001057600080fd5b50600080336001600160a01b031663890357306040518163ffffffff1660e01b81526004016040805180830381865afa158015610051573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061007591906100ab565b6001600160a01b039182166080521660a052506100de9050565b80516001600160a01b03811681146100a657600080fd5b919050565b600080604083850312156100be57600080fd5b6100c78361008f565b91506100d56020840161008f565b90509250929050565b60805160a0516103cc61011c6000396000605601526000818160bb0152818160fd015281816101bf0152818161024c015261030101526103cc6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806305a1192b14610051578063399f3a4f146100a157806362534e79146100b6578063853828b6146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b46100af366004610374565b6100e5565b005b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100b4610234565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b650000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6040517f399f3a4f00000000000000000000000000000000000000000000000000000000815260048101839052602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063399f3a4f90604401600060405180830381600087803b15801561021857600080fd5b505af115801561022c573d6000803e3d6000fd5b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146102d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f4e6f7420564543616b65000000000000000000000000000000000000000000006044820152606401610180565b6040517ffa09e6300000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063fa09e63090602401600060405180830381600087803b15801561035a57600080fd5b505af115801561036e573d6000803e3d6000fd5b50505050565b6000806040838503121561038757600080fd5b5050803592602090910135915056fea2646970667358221220fbd5c3b66fa31e2dd892f2cfaab222d59b7eb7b2a072322c974dccec82bbddde64736f6c634300080a0033a26469706673582212204bb2b63e616d5cf25756b9dc73124dd1be0fa629a893ea1e560ac09bb3d1e16d64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/test/artifactsFile/SyrupBar.json b/projects/vecake/test/artifactsFile/SyrupBar.json new file mode 100644 index 00000000..b0ed0f78 --- /dev/null +++ b/projects/vecake/test/artifactsFile/SyrupBar.json @@ -0,0 +1,699 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SyrupBar", + "sourceName": "contracts/test/SyrupBar.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract CakeToken", + "name": "_cake", + "type": "address" + } + ], + "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": "value", + "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": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cake", + "outputs": [ + { + "internalType": "contract CakeToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "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" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "safeCakeTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002b0a38038062002b0a833981810160405260208110156200003757600080fd5b5051604080518082018252600e81526d29bcb93ab82130b9102a37b5b2b760911b60208281019190915282518084019093526005835264053595255560dc1b908301529060006200008762000136565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000e69060049060208501906200013a565b508051620000fc9060059060208401906200013a565b5050600680546001600160a01b0390931661010002610100600160a81b031960ff19909416601217939093169290921790915550620001d6565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200017d57805160ff1916838001178555620001ad565b82800160010185558215620001ad579182015b82811115620001ad57825182559160200191906001019062000190565b50620001bb929150620001bf565b5090565b5b80821115620001bb5760008155600101620001c0565b61292480620001e66000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063893d20e811610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146106ca578063e7a324dc14610705578063f1127ed81461070d578063f2fde38b1461076c576101da565b8063a9059cbb14610602578063b4b5ea571461063b578063c3cda5201461066e578063dce17484146106c2576101da565b80639dc29fac116100de5780639dc29fac1461053a578063a0712d6814610573578063a2e6ddcc14610590578063a457c2d7146105c9576101da565b8063893d20e8146105225780638da5cb5b1461052a57806395d89b4114610532576101da565b806340c10f191161017c57806370a082311161014b57806370a082311461047b578063715018a6146104ae578063782d6fe1146104b65780637ecebe00146104ef576101da565b806340c10f1914610365578063587cde1e146103a05780635c19a95c146103fc5780636fcfff451461042f576101da565b806320606b70116101b857806320606b70146102c357806323b872dd146102cb578063313ce5671461030e578063395093511461032c576101da565b806306fdde03146101df578063095ea7b31461025c57806318160ddd146102a9575b600080fd5b6101e761079f565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610221578181015183820152602001610209565b50505050905090810190601f16801561024e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102956004803603604081101561027257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610853565b604080519115158252519081900360200190f35b6102b1610871565b60408051918252519081900360200190f35b6102b1610877565b610295600480360360608110156102e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561089b565b61031661093c565b6040805160ff9092168252519081900360200190f35b6102956004803603604081101561034257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610945565b61039e6004803603604081101561037b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109a0565b005b6103d3600480360360208110156103b657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a88565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039e6004803603602081101561041257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ab3565b6104626004803603602081101561044557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ac0565b6040805163ffffffff9092168252519081900360200190f35b6102b16004803603602081101561049157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ad8565b61039e610b00565b6102b1600480360360408110156104cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c17565b6102b16004803603602081101561050557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ee1565b6103d3610ef3565b6103d3610f02565b6101e7610f1e565b61039e6004803603604081101561055057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f9d565b6102956004803603602081101561058957600080fd5b503561104f565b61039e600480360360408110156105a657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611112565b610295600480360360408110156105df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113ce565b6102956004803603604081101561061857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611443565b6102b16004803603602081101561065157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611457565b61039e600480360360c081101561068457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356114f3565b6103d3611832565b6102b1600480360360408110156106e057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611853565b6102b161188b565b61074c6004803603604081101561072357600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff166118af565b6040805163ffffffff909316835260208301919091528051918290030190f35b61039e6004803603602081101561078257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118dc565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b820191906000526020600020905b81548152906001019060200180831161082c57829003601f168201915b5050505050905090565b6000610867610860611a7d565b8484611a81565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b60006108a8848484611bc8565b610932846108b4611a7d565b61092d856040518060600160405280602881526020016127516028913973ffffffffffffffffffffffffffffffffffffffff8a166000908152600260205260408120906108ff611a7d565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611d8f565b611a81565b5060019392505050565b60065460ff1690565b6000610867610952611a7d565b8461092d8560026000610963611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611e40565b6109a8611a7d565b73ffffffffffffffffffffffffffffffffffffffff166109c6610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610a4857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282611eb4565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054610a84921683611fdb565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610abd33826121bc565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610b08611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610b26610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610ba857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610c71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806127d36027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610cac57600091505061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610d715773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff1683529290522060010154905061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610db957600091505061086b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e9d57600282820363ffffffff16048103610e096126a4565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610e785760200151945061086b9350505050565b805163ffffffff16871115610e8f57819350610e96565b6001820392505b5050610ddf565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610efd610f02565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b610fa5611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610fc3610f02565b73ffffffffffffffffffffffffffffffffffffffff161461104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282612283565b6000611059611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611077610f02565b73ffffffffffffffffffffffffffffffffffffffff16146110f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61110a611104611a7d565b83611eb4565b506001919050565b61111a611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611138610f02565b73ffffffffffffffffffffffffffffffffffffffff16146111ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092610100900473ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561123057600080fd5b505afa158015611244573d6000803e3d6000fd5b505050506040513d602081101561125a57600080fd5b505190508082111561131a57600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b1580156112e857600080fd5b505af11580156112fc573d6000803e3d6000fd5b505050506040513d602081101561131257600080fd5b506113c99050565b600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820186905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b15801561139c57600080fd5b505af11580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b50505b505050565b60006108676113db611a7d565b8461092d856040518060600160405280602581526020016128656025913960026000611405611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611d8f565b6000610867611450611a7d565b8484611bc8565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff168061148f5760006114ec565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86661151e61079f565b8051906020012061152d6123c1565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa1580156116a6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661173d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127796026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146117c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128206022913960400191505060405180910390fd5b8742111561181b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061272b6026913960400191505060405180910390fd5b611825818b6121bc565b505050505b505050505050565b600654610100900473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6118e4611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611902610f02565b73ffffffffffffffffffffffffffffffffffffffff161461198457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166119f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127056026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611aed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806126e16024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128cd6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316611c34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806126bc6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611ca0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806128426023913960400191505060405180910390fd5b611cea816040518060600160405280602681526020016127fa6026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611d269082611e40565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611e38576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dfd578181015183820152602001611de5565b50505050905090810190601f168015611e2a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156114ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611f439082611e40565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611f769082611e40565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120175750600081115b156113c95773ffffffffffffffffffffffffffffffffffffffff8316156120ee5773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff1690816120715760006120ce565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006120dc82856123c5565b90506120ea8684848461243c565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156113c95773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff1690816121435760006121a0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006121ae8285611e40565b905061182a8584848461243c565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054909116906121f084610ad8565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461227d828483611fdb565b50505050565b73ffffffffffffffffffffffffffffffffffffffff82166122ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061288a6021913960400191505060405180910390fd5b612339816040518060600160405280602281526020016128ab6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205560035461236c90826123c5565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b4690565b60008282111561243657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006124604360405180606001604052806034815260200161279f6034913961262c565b905060008463ffffffff161180156124d4575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b1561253c5773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff890116845290915290206001018290556125d5565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b600081640100000000841061269c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611dfd578181015183820152602001611de5565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a206275726e2066726f6d20746865207a65726f206164647265737342455032303a206275726e20616d6f756e7420657863656564732062616c616e636542455032303a20617070726f766520746f20746865207a65726f2061646472657373a26469706673582212201422e88a0353871be13774eb48012ed80d303ace501a54c167b5111bd7069bd664736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063893d20e811610104578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146106ca578063e7a324dc14610705578063f1127ed81461070d578063f2fde38b1461076c576101da565b8063a9059cbb14610602578063b4b5ea571461063b578063c3cda5201461066e578063dce17484146106c2576101da565b80639dc29fac116100de5780639dc29fac1461053a578063a0712d6814610573578063a2e6ddcc14610590578063a457c2d7146105c9576101da565b8063893d20e8146105225780638da5cb5b1461052a57806395d89b4114610532576101da565b806340c10f191161017c57806370a082311161014b57806370a082311461047b578063715018a6146104ae578063782d6fe1146104b65780637ecebe00146104ef576101da565b806340c10f1914610365578063587cde1e146103a05780635c19a95c146103fc5780636fcfff451461042f576101da565b806320606b70116101b857806320606b70146102c357806323b872dd146102cb578063313ce5671461030e578063395093511461032c576101da565b806306fdde03146101df578063095ea7b31461025c57806318160ddd146102a9575b600080fd5b6101e761079f565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610221578181015183820152602001610209565b50505050905090810190601f16801561024e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102956004803603604081101561027257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610853565b604080519115158252519081900360200190f35b6102b1610871565b60408051918252519081900360200190f35b6102b1610877565b610295600480360360608110156102e157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561089b565b61031661093c565b6040805160ff9092168252519081900360200190f35b6102956004803603604081101561034257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610945565b61039e6004803603604081101561037b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109a0565b005b6103d3600480360360208110156103b657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a88565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039e6004803603602081101561041257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ab3565b6104626004803603602081101561044557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ac0565b6040805163ffffffff9092168252519081900360200190f35b6102b16004803603602081101561049157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ad8565b61039e610b00565b6102b1600480360360408110156104cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c17565b6102b16004803603602081101561050557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ee1565b6103d3610ef3565b6103d3610f02565b6101e7610f1e565b61039e6004803603604081101561055057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f9d565b6102956004803603602081101561058957600080fd5b503561104f565b61039e600480360360408110156105a657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611112565b610295600480360360408110156105df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356113ce565b6102956004803603604081101561061857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611443565b6102b16004803603602081101561065157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611457565b61039e600480360360c081101561068457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060ff6060820135169060808101359060a001356114f3565b6103d3611832565b6102b1600480360360408110156106e057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611853565b6102b161188b565b61074c6004803603604081101561072357600080fd5b50803573ffffffffffffffffffffffffffffffffffffffff16906020013563ffffffff166118af565b6040805163ffffffff909316835260208301919091528051918290030190f35b61039e6004803603602081101561078257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118dc565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b820191906000526020600020905b81548152906001019060200180831161082c57829003601f168201915b5050505050905090565b6000610867610860611a7d565b8484611a81565b5060015b92915050565b60035490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b60006108a8848484611bc8565b610932846108b4611a7d565b61092d856040518060600160405280602881526020016127516028913973ffffffffffffffffffffffffffffffffffffffff8a166000908152600260205260408120906108ff611a7d565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611d8f565b611a81565b5060019392505050565b60065460ff1690565b6000610867610952611a7d565b8461092d8560026000610963611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611e40565b6109a8611a7d565b73ffffffffffffffffffffffffffffffffffffffff166109c6610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610a4857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282611eb4565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054610a84921683611fdb565b5050565b73ffffffffffffffffffffffffffffffffffffffff9081166000908152600760205260409020541690565b610abd33826121bc565b50565b60096020526000908152604090205463ffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610b08611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610b26610f02565b73ffffffffffffffffffffffffffffffffffffffff1614610ba857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000438210610c71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806127d36027913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604090205463ffffffff1680610cac57600091505061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff860181168552925290912054168310610d715773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9490940163ffffffff1683529290522060010154905061086b565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832083805290915290205463ffffffff16831015610db957600091505061086b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82015b8163ffffffff168163ffffffff161115610e9d57600282820363ffffffff16048103610e096126a4565b5073ffffffffffffffffffffffffffffffffffffffff8716600090815260086020908152604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915290871415610e785760200151945061086b9350505050565b805163ffffffff16871115610e8f57819350610e96565b6001820392505b5050610ddf565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff9094168352929052206001015491505092915050565b600a6020526000908152604090205481565b6000610efd610f02565b905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108495780601f1061081e57610100808354040283529160200191610849565b610fa5611a7d565b73ffffffffffffffffffffffffffffffffffffffff16610fc3610f02565b73ffffffffffffffffffffffffffffffffffffffff161461104557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610a528282612283565b6000611059611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611077610f02565b73ffffffffffffffffffffffffffffffffffffffff16146110f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61110a611104611a7d565b83611eb4565b506001919050565b61111a611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611138610f02565b73ffffffffffffffffffffffffffffffffffffffff16146111ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092610100900473ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561123057600080fd5b505afa158015611244573d6000803e3d6000fd5b505050506040513d602081101561125a57600080fd5b505190508082111561131a57600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b1580156112e857600080fd5b505af11580156112fc573d6000803e3d6000fd5b505050506040513d602081101561131257600080fd5b506113c99050565b600654604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526024820186905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b15801561139c57600080fd5b505af11580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b50505b505050565b60006108676113db611a7d565b8461092d856040518060600160405280602581526020016128656025913960026000611405611a7d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611d8f565b6000610867611450611a7d565b8484611bc8565b73ffffffffffffffffffffffffffffffffffffffff811660009081526009602052604081205463ffffffff168061148f5760006114ec565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011684529091529020600101545b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86661151e61079f565b8051906020012061152d6123c1565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c084015273ffffffffffffffffffffffffffffffffffffffff8b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a905261022286018990529351929650909492939092600192610242808401937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301929081900390910190855afa1580156116a6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661173d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127796026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020526040902080546001810190915589146117c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128206022913960400191505060405180910390fd5b8742111561181b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061272b6026913960400191505060405180910390fd5b611825818b6121bc565b505050505b505050505050565b600654610100900473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b60086020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6118e4611a7d565b73ffffffffffffffffffffffffffffffffffffffff16611902610f02565b73ffffffffffffffffffffffffffffffffffffffff161461198457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166119f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127056026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611aed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806126e16024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128cd6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316611c34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806126bc6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611ca0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806128426023913960400191505060405180910390fd5b611cea816040518060600160405280602681526020016127fa6026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611d269082611e40565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611e38576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dfd578181015183820152602001611de5565b50505050905090810190601f168015611e2a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156114ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611f439082611e40565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054611f769082611e40565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156120175750600081115b156113c95773ffffffffffffffffffffffffffffffffffffffff8316156120ee5773ffffffffffffffffffffffffffffffffffffffff831660009081526009602052604081205463ffffffff1690816120715760006120ce565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006120dc82856123c5565b90506120ea8684848461243c565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156113c95773ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604081205463ffffffff1690816121435760006121a0565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87011684529091529020600101545b905060006121ae8285611e40565b905061182a8584848461243c565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260076020526040812054909116906121f084610ad8565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526007602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461227d828483611fdb565b50505050565b73ffffffffffffffffffffffffffffffffffffffff82166122ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061288a6021913960400191505060405180910390fd5b612339816040518060600160405280602281526020016128ab6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190611d8f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205560035461236c90826123c5565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b4690565b60008282111561243657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006124604360405180606001604052806034815260200161279f6034913961262c565b905060008463ffffffff161180156124d4575073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901811685529252909120548282169116145b1561253c5773ffffffffffffffffffffffffffffffffffffffff8516600090815260086020908152604080832063ffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff890116845290915290206001018290556125d5565b60408051808201825263ffffffff8084168252602080830186815273ffffffffffffffffffffffffffffffffffffffff8a166000818152600884528681208b861682528452868120955186549086167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000918216178755925160019687015590815260099092529390208054928801909116919092161790555b6040805184815260208101849052815173ffffffffffffffffffffffffffffffffffffffff8816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b600081640100000000841061269c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611dfd578181015183820152602001611de5565b509192915050565b60408051808201909152600080825260208201529056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343414b453a3a64656c656761746542795369673a207369676e6174757265206578706972656442455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636543414b453a3a64656c656761746542795369673a20696e76616c6964207369676e617475726543414b453a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747343414b453a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656442455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636543414b453a3a64656c656761746542795369673a20696e76616c6964206e6f6e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f42455032303a206275726e2066726f6d20746865207a65726f206164647265737342455032303a206275726e20616d6f756e7420657863656564732062616c616e636542455032303a20617070726f766520746f20746865207a65726f2061646472657373a26469706673582212201422e88a0353871be13774eb48012ed80d303ace501a54c167b5111bd7069bd664736f6c634300060c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/test/artifactsFile/VECake.json b/projects/vecake/test/artifactsFile/VECake.json new file mode 100644 index 00000000..593d4ba7 --- /dev/null +++ b/projects/vecake/test/artifactsFile/VECake.json @@ -0,0 +1,1998 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VECake", + "sourceName": "contracts/VECake.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICakePool", + "name": "_cakePool", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IProxyForCakePoolFactory", + "name": "_ProxyForCakePoolFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "DelegateFromCakePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lockTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "penalty", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "EarlyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InjectToDelegator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "MigrateFromCakePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "MigrationConvertToDelegation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "farmBooster", + "type": "address" + } + ], + "name": "NewFarmBooster", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Redistribute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "previousBreaker", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "breaker", + "type": "uint256" + } + ], + "name": "SetBreaker", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "oldEarlyWithdrawFeeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newEarlyWithdrawFeeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "oldRedistributeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newRedistribiteBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldTreasuryAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasuryAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldRedistributeAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newRedistributeAddr", + "type": "address" + } + ], + "name": "SetEarlyWithdrawConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetEarlyWithdrawSwitch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetEmergencyWithdrawSwitch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "SetLimitTimeOfConvert", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetNoPenaltyForEarlyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "SetWhitelistedCaller", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "SetWhitelistedRedistributors", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "previousSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supply", + "type": "uint256" + } + ], + "name": "Supply", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isDelegator", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint40", + "name": "limitTimestampForEarlyWithdraw", + "type": "uint40" + } + ], + "name": "UpdateDelegator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "WithdrawAll", + "type": "event" + }, + { + "inputs": [], + "name": "ACTION_CREATE_LOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_DEPOSIT_FOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_INCREASE_LOCK_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_INCREASE_UNLOCK_TIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CakePool", + "outputs": [ + { + "internalType": "contract ICakePool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DELEGATION_FROM_CAKE_POOL_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DELEGATOR_FLAG", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FarmBooster", + "outputs": [ + { + "internalType": "contract IFarmBooster", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIGRATION_FROM_CAKE_POOL_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NOT_DELEGATOR_FLAG", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NOT_WITHDRAW_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ProxyForCakePoolFactory", + "outputs": [ + { + "internalType": "contract IProxyForCakePoolFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WEEK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WITHDREW_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accumRedistribute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAtForProxy", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "balanceOfAtTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAtUser", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOfForProxy", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOfUser", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "breaker", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpoint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLockForProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + } + ], + "name": "delegateFromCakePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegator", + "outputs": [ + { + "internalType": "uint104", + "name": "delegatedCakeAmount", + "type": "uint104" + }, + { + "internalType": "uint104", + "name": "notInjectedCakeAmount", + "type": "uint104" + }, + { + "internalType": "uint40", + "name": "limitTimestampForEarlyWithdraw", + "type": "uint40" + }, + { + "internalType": "uint8", + "name": "isDelegator", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockDuration", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_for", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "depositFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "earlyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "earlyWithdrawBpsPerWeek", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "earlyWithdrawSwitch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdrawSwitch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "everEmergencyWithdraw", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getUserInfo", + "outputs": [ + { + "internalType": "int128", + "name": "amount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + }, + { + "internalType": "address", + "name": "cakePoolProxy", + "type": "address" + }, + { + "internalType": "uint128", + "name": "cakeAmount", + "type": "uint128" + }, + { + "internalType": "uint48", + "name": "lockEndTime", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "migrationTime", + "type": "uint48" + }, + { + "internalType": "uint16", + "name": "cakePoolType", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "withdrawFlag", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "increaseLockAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newUnlockTime", + "type": "uint256" + } + ], + "name": "increaseUnlockTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialization", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initializeCakePoolMigration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "injectToDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isCakePoolProxy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "limitTimeOfConvert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "locks", + "outputs": [ + { + "internalType": "int128", + "name": "amount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFromCakePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + } + ], + "name": "migrationConvertToDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "noPenaltyForEarlyWithdraw", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redistribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "redistributeAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redistributeBps", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_breaker", + "type": "uint256" + } + ], + "name": "setBreaker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "_newEarlyWithdrawBpsPerWeek", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "_newRedistributeBps", + "type": "uint64" + }, + { + "internalType": "address", + "name": "_newTreasuryAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_newRedistributeAddr", + "type": "address" + } + ], + "name": "setEarlyWithdrawConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_earlyWithdrawSwitch", + "type": "bool" + } + ], + "name": "setEarlyWithdrawSwitch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_emergencyWithdrawSwitch", + "type": "bool" + } + ], + "name": "setEmergencyWithdrawSwitch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_farmBooster", + "type": "address" + } + ], + "name": "setFarmBooster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_limitTime", + "type": "uint256" + } + ], + "name": "setLimitTimeOfConvert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_status", + "type": "bool" + } + ], + "name": "setNoPenaltyForEarlyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "callers", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "setWhitelistedCallers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "callers", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "setWhitelistedRedistributors", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "slopeChanges", + "outputs": [ + { + "internalType": "int128", + "name": "", + "type": "int128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "supply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "totalSupplyAtTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isDelegator", + "type": "bool" + }, + { + "internalType": "uint40", + "name": "_limitTimestampForEarlyWithdraw", + "type": "uint40" + } + ], + "name": "updateDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "address", + "name": "cakePoolProxy", + "type": "address" + }, + { + "internalType": "uint128", + "name": "cakeAmount", + "type": "uint128" + }, + { + "internalType": "uint48", + "name": "lockEndTime", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "migrationTime", + "type": "uint48" + }, + { + "internalType": "uint16", + "name": "cakePoolType", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "withdrawFlag", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userPointEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "userPointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedCallers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedRedistributors", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60e0604052621275006004553480156200001857600080fd5b50604051620062ee380380620062ee8339810160408190526200003b91620002b8565b6200004633620001a9565b60018080556001600160a01b0380851660a052838116608090815290831660c05260408051918201815260008083526020838101828152428585019081524360608701908152600d80549889018155909452945190516001600160801b03908116600160801b0291161760039095027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019590955592517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb6850155517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb7909301929092556014805460ff19166012908117909155825180840190935280835271566f74652d657363726f7765642043616b6560701b929091019182526200016f9181620001f9565b5060408051808201909152600680825265766543616b6560d01b60209092019182526200019f91601391620001f9565b5050505062000349565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805462000207906200030c565b90600052602060002090601f0160209004810192826200022b576000855562000276565b82601f106200024657805160ff191683800117855562000276565b8280016001018555821562000276579182015b828111156200027657825182559160200191906001019062000259565b506200028492915062000288565b5090565b5b8082111562000284576000815560010162000289565b6001600160a01b0381168114620002b557600080fd5b50565b600080600060608486031215620002ce57600080fd5b8351620002db816200029f565b6020850151909350620002ee816200029f565b604085015190925062000301816200029f565b809150509250925092565b600181811c908216806200032157607f821691505b602082108114156200034357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c051615f05620003e960003960008181610a320152612017015260008181610ae90152818161139501528181611bda01528181611dc501528181611eeb01528181611f6101528181612e0401528181612f2201528181612fa001526132f8015260008181610c9301528181610dd101528181612585015281816139af01528181613c6f01528181613d8401526141540152615f056000f3fe608060405234801561001057600080fd5b50600436106103d65760003560e01c8063705096c711610208578063705096c71461099657806370a08231146109a9578063715018a6146109bc57806375cd6c67146109c45780637c5acb25146109d75780637c616fe6146109fa57806381fc83bb14610a0d578063827e8e0c14610a2d5780638ad4c44714610a545780638da5cb5b14610a675780638e90053014610a6f578063900cf0cf14610a7757806395d89b4114610a80578063981b24d014610a885780639c490f191461042b5780639d4b4ba114610a9b578063a621440414610aae578063a63dce7114610ab6578063a7ccf1e014610abe578063a88a885514610ad1578063aa94ab5914610ae4578063b52c05fe14610b0b578063b6bbbcd114610b1e578063b6e45a4e14610b38578063c0dd84bd14610b45578063c12ebb5f14610b68578063c172085e14610b7b578063c1d1192914610b8f578063c2c4c5c114610b98578063cfee396f14610ba0578063d2dcd93314610bb4578063d4eda63f14610bc7578063d73f98a314610bea578063db2e21bc14610bfd578063ec5570d014610c05578063f2c7a81b14610c18578063f2fde38b14610c20578063f4359ce514610c33578063f52a36f714610c3d578063fa09e63014610c73578063fb489a7b14610c86578063fc0c546a14610c8e578063ffc97ce914610cb557600080fd5b8062b79fd4146103db57806302641632146103f6578063047fc9aa146103fe578063052b726f14610407578063059f8b161461041c57806306a4da7e1461042b57806306fdde031461044657806308154df01461045b57806308c3dea7146104635780630a6373b31461046c5780630efe6a8b1461047f5780630f41e0d21461049257806312c470e91461049b57806312cae7af146104ae57806318160ddd146104c157806319577c6e146104c95780631959a002146104dc5780631bb8c61d1461059d5780632ea1fe7a146105b05780632f4f21e2146105c35780633037408d146105d657806330d9a62a146105e9578063313ce5671461060957806334d901a41461062857806336a5839114610663578063399f3a4f146106935780633d5c78bd146106a6578063403f4447146106b95780634ee2cd7e146106cc57806351cff8d9146106df578063539e5082146106f257806355ed0a781461077c57806358fca6a514610784578063598085ae1461078c5780635de9a1371461079f5780635e8bb48e146107e75780636386c1c71461081a5780636574deb71461094d5780636582a8c01461096057806365a5d5f01461097357806365f9008a1461097b57806367e7a7cb1461098e575b600080fd5b6103e3600081565b6040519081526020015b60405180910390f35b6103e3600381565b6103e360025481565b61041a6104153660046154dc565b610cd8565b005b6103e3670de0b6b3a764000081565b610433600181565b60405161ffff90911681526020016103ed565b61044e610e4e565b6040516103ed9190615534565b610433600081565b6103e360155481565b61041a61047a366004615567565b610edc565b61041a61048d366004615584565b61138a565b6103e360115481565b6103e36104a93660046154dc565b6113d2565b6103e36104bc366004615567565b61149e565b6103e36114aa565b61041a6104d73660046155c7565b61151a565b61054b6104ea366004615567565b600860205260009081526040902080546001909101546001600160a01b03909116906001600160801b0381169065ffffffffffff600160801b8204811691600160b01b81049091169061ffff600160e01b8204811691600160f01b90041686565b604080516001600160a01b0390971687526001600160801b03909516602087015265ffffffffffff938416948601949094529116606084015261ffff90811660808401521660a082015260c0016103ed565b61041a6105ab366004615600565b6115a0565b61041a6105be366004615685565b6116bb565b61041a6105d13660046154dc565b611734565b6103e36105e43660046154dc565b611871565b6016546105fc906001600160a01b031681565b6040516103ed91906156a2565b6014546106169060ff1681565b60405160ff90911681526020016103ed565b61063b6106363660046154dc565b611884565b60408051600f95860b81529390940b60208401529282015260608101919091526080016103ed565b60145461067b9061010090046001600160401b031681565b6040516001600160401b0390911681526020016103ed565b61041a6106a13660046156b6565b6118d4565b61041a6106b43660046156d8565b61192b565b61041a6106c73660046156d8565b6119e7565b6103e36106da3660046154dc565b611af5565b61041a6106ed366004615567565b611bcf565b610742610700366004615567565b6009602052600090815260409020546001600160681b0380821691600160681b810490911690600160d01b810464ffffffffff1690600160f81b900460ff1684565b604080516001600160681b03958616815294909316602085015264ffffffffff9091169183019190915260ff1660608201526080016103ed565b61041a611d6d565b610433600281565b61041a61079a366004615685565b6121d8565b6107cd6107ad366004615567565b60076020526000908152604090208054600190910154600f9190910b9082565b60408051600f9390930b83526020830191909152016103ed565b61080a6107f5366004615567565b600b6020526000908152604090205460ff1681565b60405190151581526020016103ed565b6108e8610828366004615567565b6001600160a01b039081166000818152600760209081526040808320815180830183528154600f0b81526001918201548185019081529585526008845293829020825160c08101845281549097168088529101546001600160801b03811693870184905265ffffffffffff600160801b82048116938801849052600160b01b8204166060880181905261ffff600160e01b8304811660808a01819052600160f01b9093041660a09098018890529451955195979596919593949293909190565b60408051600f9990990b895260208901979097526001600160a01b03909516958701959095526001600160801b03909216606086015265ffffffffffff90811660808601521660a084015261ffff91821660c08401521660e0820152610100016103ed565b61041a61095b3660046154dc565b612256565b6017546105fc906001600160a01b031681565b6103e3612615565b6003546105fc906001600160a01b031681565b6103e3600181565b61041a6109a43660046156d8565b612632565b6103e36109b7366004615567565b612698565b61041a61275a565b61041a6109d236600461570d565b612795565b61080a6109e5366004615567565b60196020526000908152604090205460ff1681565b61041a610a083660046156d8565b612961565b6103e3610a1b366004615567565b600f6020526000908152604090205481565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61063b610a623660046156d8565b612b0e565b6105fc612b52565b610616600081565b6103e3600c5481565b61044e612b61565b6103e3610a963660046156d8565b612b6e565b61041a610aa9366004615567565b612d69565b61041a613275565b610616600181565b61041a610acc366004615567565b6133d4565b6103e3610adf366004615567565b61349c565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61041a610b193660046156b6565b61353a565b60145461067b90600160481b90046001600160401b031681565b60055461080a9060ff1681565b61080a610b53366004615567565b600a6020526000908152604090205460ff1681565b61041a610b76366004615600565b6135a2565b60035461080a90600160a01b900460ff1681565b6103e360045481565b61041a6136b7565b60175461080a90600160a01b900460ff1681565b6103e3610bc23660046156d8565b6136db565b61080a610bd5366004615567565b60066020526000908152604090205460ff1681565b61041a610bf8366004615765565b613746565b61041a613825565b6103e3610c133660046154dc565b613a1b565b6103e3600281565b61041a610c2e366004615567565b613a27565b6103e362093a8081565b610c60610c4b3660046156d8565b601060205260009081526040902054600f0b81565b604051600f9190910b81526020016103ed565b61041a610c81366004615567565b613ac4565b61041a613ced565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61080a610cc3366004615567565b60186020526000908152604090205460ff1681565b33610ce1612b52565b6001600160a01b031614610d105760405162461bcd60e51b8152600401610d07906157af565b60405180910390fd5b6001600160a01b03821660009081526009602052604090208054600160f81b900460ff16600114610d535760405162461bcd60e51b8152600401610d07906157e4565b8054600160681b90046001600160681b0316821115610d81578054600160681b90046001600160681b031691505b805482908290600d90610da5908490600160681b90046001600160681b031661581f565b92506101000a8154816001600160681b0302191690836001600160681b03160217905550610e093330847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613dfb909392919063ffffffff16565b6040518281526001600160a01b0384169033907f7b85c81b5ab23faed50cf05b116ebb10456ca6320721e00b6513babed009b9e29060200160405180910390a3505050565b60128054610e5b90615847565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8790615847565b8015610ed45780601f10610ea957610100808354040283529160200191610ed4565b820191906000526020600020905b815481529060010190602001808311610eb757829003601f168201915b505050505081565b60026001541415610eff5760405162461bcd60e51b8152600401610d079061587c565b600260019081556001600160a01b038216600090815260096020526040902080549091600160f81b90910460ff1614610f4a5760405162461bcd60e51b8152600401610d07906157e4565b3360009081526008602052604081206001810154909190610f7990600160801b900465ffffffffffff16613e66565b9050428111610fbe5760405162461bcd60e51b8152602060048201526011602482015270155cd95c881b1bd8dac8195e1c1a5c9959607a1b6044820152606401610d07565b600454610fcb90426158b3565b6001830154600160b01b900465ffffffffffff1611610ffc5760405162461bcd60e51b8152600401610d07906158ca565b600182810154600160e01b900461ffff16146110475760405162461bcd60e51b815260206004820152600a60248201526908481b5a59dc985d195960b21b6044820152606401610d07565b6001820154600160f01b900461ffff16156110975760405162461bcd60e51b815260206004820152601060248201526f416c726561647920776974686472617760801b6044820152606401610d07565b6001828101805461ffff60e01b1916600160e11b17905582546001600160a01b0316600090815260076020908152604080832081518083019092528054600f0b80835294015491810191909152916110ee90613e80565b8454909150611107906001600160a01b03168383613ed6565b6040805180820182526001600160a01b0388166000818152600760208181529482208054600f90810b865293835290855260010154938301939093528151919291900b136111675760405162461bcd60e51b8152600401610d07906158ec565b4281602001511161118a5760405162461bcd60e51b8152600401610d079061591a565b6001808601546111ac9189916001600160801b03169060009085908290614096565b600185015486546001600160801b039091169087906000906111d89084906001600160681b031661594a565b82546101009290920a6001600160681b03818102199093169183160217909155600187015488546001600160801b0390911692508891600d91611224918591600160681b90041661594a565b82546101009290920a6001600160681b0381810219909316919092169190910217905550600185015460405162c2c90f60e11b81523360048201526001600160801b0382166024820152600160801b90910465ffffffffffff1660448201526001600160a01b03881690630185921e90606401600060405180830381600087803b1580156112b157600080fd5b505af11580156112c5573d6000803e3d6000fd5b5050505060018501546040516001600160a01b038916913391600080516020615eb083398151915291611312916001600160801b03821691600160801b900465ffffffffffff1690615975565b60405180910390a360018501546040516001600160a01b0389169133917f4af697c81385693e6ee5d15ccb781170dc8241f81c4983bf87cdf268d2fca5f591611375916001600160801b03821691600160801b900465ffffffffffff1690615975565b60405180910390a35050600180555050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103d65760405162461bcd60e51b8152600401610d0790615996565b6000438211156113f45760405162461bcd60e51b8152600401610d07906159bb565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a08301521561149657805161148e90846142a7565b915050611498565b505b92915050565b60006114988242614523565b6000611515600d600c54815481106114c4576114c46159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015242614617565b905090565b33611523612b52565b6001600160a01b0316146115495760405162461bcd60e51b8152600401610d07906157af565b6001600160a01b0382166000818152600b6020526040808220805460ff1916851515908117909155905190929133917f4f4d55f3b98fe4b3fbc9fb5e8ed05483cc8d794638edd690545eb5779e234a499190a45050565b336115a9612b52565b6001600160a01b0316146115cf5760405162461bcd60e51b8152600401610d07906157af565b60005b828110156116b55781601860008686858181106115f1576115f16159e5565b90506020020160208101906116069190615567565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055838382818110611640576116406159e5565b90506020020160208101906116559190615567565b6001600160a01b0316336001600160a01b03167fdfad9b83c215ff1a36483cf1688e5aeae2ac60f1c3f62f5229641234748f13b78460405161169b911515815260200190565b60405180910390a3806116ad816159fb565b9150506115d2565b50505050565b336116c4612b52565b6001600160a01b0316146116ea5760405162461bcd60e51b8152600401610d07906157af565b6005805460ff191682151590811790915560405190815233907f539ba344188cde95583cd695fe9a73d66f53c83a48e3d66e5b42a12650d93ecc906020015b60405180910390a250565b600260015414156117575760405162461bcd60e51b8152600401610d079061587c565b60026001556001600160a01b0382166000908152600a602052604090205460ff16156117b75760405162461bcd60e51b815260206004820152600f60248201526e496e636f72726563742070726f787960881b6044820152606401610d07565b6040805180820182526001600160a01b0384166000818152600760208181529482208054600f0b855292909152835260010154918101919091528161180e5760405162461bcd60e51b8152600401610d0790615a16565b60008160000151600f0b136118355760405162461bcd60e51b8152600401610d0790615a3b565b428160200151116118585760405162461bcd60e51b8152600401610d0790615a62565b6118688383600084600080614096565b50506001805550565b600061187d8383614523565b9392505050565b600e60205281600052604060002081815481106118a057600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9550600160801b90920490910b925084565b336000908152600a602052604090205460ff1661191d5760405162461bcd60e51b8152602060048201526007602482015266212070726f787960c81b6044820152606401610d07565b6119278282614706565b5050565b33611934612b52565b6001600160a01b03161461195a5760405162461bcd60e51b8152600401610d07906157af565b8015806119675750806001145b6119a15760405162461bcd60e51b815260206004820152600b60248201526a4f6e6c792030206f72203160a81b6044820152606401610d07565b60118054908290556040517f5238fc635590cf5e76ed0f591df4d7f3021d20f58e6d3405390197dd72a575fe906119db9083908590615a88565b60405180910390a15050565b3360009081526018602052604090205460ff16611a1d57333214611a1d5760405162461bcd60e51b8152600401610d0790615a96565b60026001541415611a405760405162461bcd60e51b8152600401610d079061587c565b60026001908155604080518082018252336000818152600760208181529482208054600f0b8552929091528352909201549082015281611a925760405162461bcd60e51b8152600401610d0790615a16565b60008160000151600f0b13611ab95760405162461bcd60e51b8152600401610d0790615a3b565b42816020015111611adc5760405162461bcd60e51b8152600401610d0790615a62565b611aed338360008460026000614096565b505060018055565b600043821115611b175760405162461bcd60e51b8152600401610d07906159bb565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a083015215611bc5578051611bb190846142a7565b611bbb85856142a7565b61148e9190615abb565b61148e84846142a7565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c175760405162461bcd60e51b8152600401610d0790615996565b6001600160a01b03808216600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a083015260021415611cac57600080fd5b80516001600160a01b031615801590611ccd5750608081015161ffff166001145b8015611cdf575060a081015161ffff16155b156119275780600001516001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611d2357600080fd5b505af1158015611d37573d6000803e3d6000fd5b5050506001600160a01b038316600090815260086020526040902060010180546001600160f01b0316600160f01b179055505050565b60026001541415611d905760405162461bcd60e51b8152600401610d079061587c565b6002600155600354600160a01b900460ff16611dbe5760405162461bcd60e51b8152600401610d0790615ad3565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401611e0f91906156a2565b61012060405180830381865afa158015611e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e519190615afa565b505096509650505050509250428211611e7c5760405162461bcd60e51b8152600401610d0790615a62565b3360009081526008602052604090206001810154600160e01b900461ffff1615611eb85760405162461bcd60e51b8152600401610d0790615b6e565b60018101805461ffff60e01b1916600160e01b17905560408051633a98ef3960e01b815290516000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691633a98ef39916004808201926020929091908290030181865afa158015611f37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5b9190615b98565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe19190615b98565b9050600060018584611ff3858b615bb1565b611ffd9190615be6565b61200791906158b3565b61201191906158b3565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634c96a389336040518263ffffffff1660e01b815260040161206191906156a2565b6020604051808303816000875af1158015612080573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120a49190615bfa565b6001600160a01b0381166000818152600a602052604090819020805460ff1916600190811790915588546001600160a01b031916831789558801805465ffffffffffff8c8116600160801b026001600160b01b03194292909216600160b01b02919091166001600160e01b0319909216919091176001600160801b038816171790555163399f3a4f60e01b81529192509063399f3a4f9061214b9085908b90600401615a88565b600060405180830381600087803b15801561216557600080fd5b505af1158015612179573d6000803e3d6000fd5b50505050806001600160a01b0316336001600160a01b03167f8519b84e949c6333da21ddea64e2c29ef66709e465ec9b0f24fb32eb2c003843848a6040516121c2929190615a88565b60405180910390a3505060018055505050505050565b336121e1612b52565b6001600160a01b0316146122075760405162461bcd60e51b8152600401610d07906157af565b60178054821515600160a01b0260ff60a01b1990911617905560405133907fdcc751463da04455ac459756e92d5ea118dd0dd631422cbf8353132417a52d9f9061172990841515815260200190565b600260015414156122795760405162461bcd60e51b8152600401610d079061587c565b6002600155601754600160a01b900460ff166122a75760405162461bcd60e51b8152600401610d0790615c17565b6001600160a01b0382166122b9573391505b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152816123005760405162461bcd60e51b8152600401610d0790615a16565b806020015142106123235760405162461bcd60e51b8152600401610d07906158ca565b601154156123435760405162461bcd60e51b8152600401610d0790615c17565b33600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b82041692820192909252600160d01b820464ffffffffff1692810192909252600160f81b900460ff1660608201819052600114156124755742816040015164ffffffffff16106123fb5760405162461bcd60e51b8152602060048201526014602482015273466f72626964206561726c79576974686472617760601b6044820152606401610d07565b600061240d8360000151600f0b613e80565b60208301519091506001600160681b031661242885836158b3565b10156124735760405162461bcd60e51b815260206004820152601a60248201527911195b1959d85d1bdc8818985b185b98d948195e18d95959195960321b6044820152606401610d07565b505b6020820151612485338486613ed6565b336000908152600b602052604081205460ff161580156124b4575060145461010090046001600160401b031615155b156125af57600062093a80426124ca8286615abb565b6124d491906158b3565b6124de9190615be6565b60145490915061271090879061250390849061010090046001600160401b0316615bb1565b61250d9190615bb1565b6125179190615be6565b6014549092506000906127109061253e90600160481b90046001600160401b031685615bb1565b6125489190615be6565b9050806015600082825461255c9190615abb565b90915550506016546125ac906001600160a01b031661257b83866158b3565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906148a6565b50505b6125bd8661257b83886158b3565b6040805186815260208101839052428183015290516001600160a01b0388169133917f08b526d7537cea7e5a629eb0495b5932c78911fd0bdeb02b822d69a6e25792549181900360600190a350506001805550505050565b600161262562093a8060d1615bb1565b61262f91906158b3565b81565b3361263b612b52565b6001600160a01b0316146126615760405162461bcd60e51b8152600401610d07906157af565b600481905560405181815233907fde15bb8e73a1f43abe6021a8ad5a5d79caf815a4d74e6dbd7d88cd57f06fdd8990602001611729565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a08401529091901561274a5780516127369042614523565b6127408442614523565b61187d9190615abb565b61187d8342614523565b50919050565b33612763612b52565b6001600160a01b0316146127895760405162461bcd60e51b8152600401610d07906157af565b61279360006148c5565b565b3361279e612b52565b6001600160a01b0316146127c45760405162461bcd60e51b8152600401610d07906157af565b60c0846001600160401b0316111561280d5760405162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606401610d07565b612710836001600160401b031611156128575760405162461bcd60e51b815260206004820152600c60248201526b0c4e0e640e8dede40d0d2ced60a31b6044820152606401610d07565b601480546001600160401b03858116600160481b818102600160481b600160881b03198a8516610100818102928316610100600160881b031989161793909317909755601680546001600160a01b038b81166001600160a01b03198084168217909455601780548d8416958116861790915560408051888d048c16808252602082019e909e52610100600160481b0319909c1690961797909704909816938901849052606089019690965285166080880181905260a08801969096529290931660c0860181905260e08601929092529193909133917f3de6c016cd3debec574d13c9966e6c847e64ac424da0b1eb70d3c93b68ec0537910160405180910390a25050505050505050565b3360009081526018602052604090205460ff16612997573332146129975760405162461bcd60e51b8152600401610d0790615a96565b600260015414156129ba5760405162461bcd60e51b8152600401610d079061587c565b60026001908155604080518082018252336000818152600760208181529482208054600f0b855292909152835290920154908201526129f882613e66565b915060008160000151600f0b13612a215760405162461bcd60e51b8152600401610d0790615a3b565b42816020015111612a445760405162461bcd60e51b8152600401610d0790615a62565b80602001518211612a905760405162461bcd60e51b815260206004820152601660248201527517db995dd55b9b1bd8dad51a5b59481d1bdbc81bdb1960521b6044820152606401610d07565b6001612aa062093a8060d1615bb1565b612aaa91906158b3565b612ab49042615abb565b821115612afd5760405162461bcd60e51b81526020600482015260176024820152765f6e6577556e6c6f636b54696d6520746f6f206c6f6e6760481b6044820152606401610d07565b611aed336000848460036000614096565b600d8181548110612b1e57600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9450600160801b90920490910b919084565b6000546001600160a01b031690565b60138054610e5b90615847565b600043821115612bb35760405162461bcd60e51b815260206004820152601060248201526f2130b2102fb13637b1b5a73ab6b132b960811b6044820152606401610d07565b600c546000612bc28483614915565b90506000600d8281548110612bd957612bd96159e5565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915083831015612cf7576000600d612c3a856001615abb565b81548110612c4a57612c4a6159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905285015191925014612cf15782606001518160600151612cb791906158b3565b83604001518260400151612ccb91906158b3565b6060850151612cda908a6158b3565b612ce49190615bb1565b612cee9190615be6565b91505b50612d46565b43826060015114612d46576060820151612d1190436158b3565b6040830151612d2090426158b3565b6060840151612d2f90896158b3565b612d399190615bb1565b612d439190615be6565b90505b612d5f82828460400151612d5a9190615abb565b614617565b9695505050505050565b60026001541415612d8c5760405162461bcd60e51b8152600401610d079061587c565b6002600155600354600160a01b900460ff16612dba5760405162461bcd60e51b8152600401610d0790615ad3565b6001600160a01b03811660009081526009602052604090208054600160f81b900460ff16600114612dfd5760405162461bcd60e51b8152600401610d07906157e4565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401612e4e91906156a2565b61012060405180830381865afa158015612e6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e909190615afa565b505096509650505050509250428211612ebb5760405162461bcd60e51b8152600401610d0790615a62565b3360009081526008602052604090206001810154600160e01b900461ffff1615612ef75760405162461bcd60e51b8152600401610d0790615b6e565b60018101805461ffff60e01b1916600160e11b17905560408051633a98ef3960e01b815290516000917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691633a98ef39916004808201926020929091908290030181865afa158015612f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f9a9190615b98565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ffc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130209190615b98565b9050600060018584613032858b615bb1565b61303c9190615be6565b61304691906158b3565b61305091906158b3565b600185810180546001600160b01b031916600160801b65ffffffffffff8b16026001600160801b031916176001600160801b0384161790556040805180820182526001600160a01b038d166000818152600760208181529482208054600f0b85529290915283529092015490820152909150816130df5760405162461bcd60e51b8152600401610d0790615a16565b60008160000151600f0b136131065760405162461bcd60e51b8152600401610d07906158ec565b428160200151116131295760405162461bcd60e51b8152600401610d079061591a565b61313a8a8360008460006001614096565b885482908a906000906131579084906001600160681b031661594a565b92506101000a8154816001600160681b0302191690836001600160681b031602179055508189600001600d8282829054906101000a90046001600160681b03166131a1919061594a565b82546001600160681b039182166101009390930a92830291909202199091161790555060405162c2c90f60e11b815233600482015260248101839052604481018890526001600160a01b038b1690630185921e90606401600060405180830381600087803b15801561321257600080fd5b505af1158015613226573d6000803e3d6000fd5b50505050896001600160a01b0316336001600160a01b0316600080516020615eb0833981519152848a60405161325d929190615a88565b60405180910390a35050600180555050505050505050565b3361327e612b52565b6001600160a01b0316146132a45760405162461bcd60e51b8152600401610d07906157af565b600354600160a01b900460ff16156132f45760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610d07565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632d19b9826040518163ffffffff1660e01b8152600401602060405180830381865afa158015613354573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133789190615bfa565b90506001600160a01b03811630146133be5760405162461bcd60e51b8152602060048201526009602482015268426164205643616b6560b81b6044820152606401610d07565b506003805460ff60a01b1916600160a01b179055565b336133dd612b52565b6001600160a01b0316146134035760405162461bcd60e51b8152600401610d07906157af565b6001600160a01b0381166134525760405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606401610d07565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fd1879d19b7e07327f8e491d8c5e05a4048155b7ee8f97f61e2b2233ae0e3a88890600090a250565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a08401529091901561275457805161187d9042614523565b3360009081526018602052604090205460ff16613570573332146135705760405162461bcd60e51b8152600401610d0790615a96565b600260015414156135935760405162461bcd60e51b8152600401610d079061587c565b6002600155611aed8282614706565b336135ab612b52565b6001600160a01b0316146135d15760405162461bcd60e51b8152600401610d07906157af565b60005b828110156116b55781601960008686858181106135f3576135f36159e5565b90506020020160208101906136089190615567565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055838382818110613642576136426159e5565b90506020020160208101906136579190615567565b6001600160a01b0316336001600160a01b03167f0c5e5180b1be108ebc3c1c5939cd6b59ca30067d07c5405f94304bf603c621428460405161369d911515815260200190565b60405180910390a3806136af816159fb565b9150506135d4565b604080518082019091526000808252602082018190526136d89082806149b3565b50565b6000611498600d600c54815481106136f5576136f56159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015283614617565b3361374f612b52565b6001600160a01b0316146137755760405162461bcd60e51b8152600401610d07906157af565b6001600160a01b03831660009081526009602052604090208261379957600061379c565b60015b81546001600160d01b0316600160f81b60ff929092169190910264ffffffffff60d01b191617600160d01b64ffffffffff841690810291909117825560408051851515815260208101929092526001600160a01b038616917f3fd4b992bc54a5edaa3b29f337c4048b314667d454123fbd81b327aaeea7df67910160405180910390a250505050565b600260015414156138485760405162461bcd60e51b8152600401610d079061587c565b600260015560055460ff1661389b5760405162461bcd60e51b8152602060048201526019602482015278466f7262696420656d657267656e637920776974686472617760381b6044820152606401610d07565b3360009081526006602052604090205460ff16156138cb5760405162461bcd60e51b8152600401610d0790615c37565b336000908152600660209081526040808320805460ff191660019081179091556007835281842082518084019093528054600f0b80845291015492820192909252911261394d5760405162461bcd60e51b815260206004820152601060248201526f139bc81b1bd8dad95908185b5bdd5b9d60821b6044820152606401610d07565b600061395f8260000151600f0b613e80565b33600090815260076020908152604080832080546001600160801b0319168155600101839055600e90915281209192506139999190615489565b336000818152600f60205260408120556139de907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690836148a6565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505060018055565b600061187d83836142a7565b33613a30612b52565b6001600160a01b031614613a565760405162461bcd60e51b8152600401610d07906157af565b6001600160a01b038116613abb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d07565b6136d8816148c5565b60026001541415613ae75760405162461bcd60e51b8152600401610d079061587c565b600260015533600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b820416928201839052600160d01b810464ffffffffff1693820193909352600160f81b90920460ff16606083015215613ba25760405162461bcd60e51b8152602060048201526024808201527f496e73756666696369656e7420696e6a656374696f6e20666f722064656c656760448201526330ba37b960e11b6064820152608401610d07565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152601154613c1a578060200151421015613c1a5760405162461bcd60e51b815260206004820152601060248201526f131bd8dac81b9bdd08195e1c1a5c995960821b6044820152606401610d07565b6001600160a01b038316613c2c573392505b6000613c3e8260000151600f0b613e80565b9050613c4b338383613ed6565b336000908152600a602052604090205460ff16613c9657613c966001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001685836148a6565b836001600160a01b0316336001600160a01b03167f55e21b0674b8095feb63d5336fb7b5b004d267585bfbb58005e8126a8ad7bc548342604051613cdb929190615a88565b60405180910390a35050600180555050565b3360009081526019602052604090205460ff16613d425760405162461bcd60e51b81526020600482015260136024820152722120776c2072656469737472696275746f727360681b6044820152606401610d07565b60026001541415613d655760405162461bcd60e51b8152600401610d079061587c565b6002600155601580546000909155601754613dad906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116836148a6565b60175460405133917f73dad76107243dbd9d398020575b5e3ad26d50fe161c81088dc8592a394855b791613dec916001600160a01b0316908590615c6a565b60405180910390a25060018055565b6040516001600160a01b03808516602483015283166044820152606481018290526116b59085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526150f5565b600062093a80613e768184615be6565b6114989190615bb1565b600080821215613ed25760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610d07565b5090565b6000613ee88360000151600f0b613e80565b905080821115613f2d5760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610d07565b604080518082019091528351600f0b815260208085015190820152818314613f59578360200151613f5c565b60005b6020850152613f73613f6e84846158b3565b6151c7565b600f0b84526001600160a01b0385166000908152600760209081526040909120855181546001600160801b0319166001600160801b0390911617815590850151600190910155600254613fc684826158b3565b600255613fd48683876149b3565b6003546001600160a01b0316156140655760035482516020840151604051630f28a72960e31b81526001600160a01b038a81166004830152600f9390930b6024820152604481019190915260648101879052911690637945394890608401600060405180830381600087803b15801561404c57600080fd5b505af1158015614060573d6000803e3d6000fd5b505050505b600080516020615e7083398151915281600254604051614086929190615a88565b60405180910390a1505050505050565b6002546140a38682615abb565b600255604080518082019091528451600f0b8152602080860151908201526140ca876151c7565b81516140d69190615c83565b600f0b815285156140e957602081018690525b6001600160a01b0388166000908152600760209081526040909120825181546001600160801b0319166001600160801b03909116178155908201516001909101556141358886836149b3565b8615801590614142575082155b1561417c5761417c6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308a613dfb565b6003546001600160a01b0316156142235760035485516020870151604051636e85ee4760e01b81526001600160a01b038c81166004830152602482018c9052604482018b9052600f9390930b6064820152608481019190915260a4810187905285151560c4820152911690636e85ee479060e401600060405180830381600087803b15801561420a57600080fd5b505af115801561421e573d6000803e3d6000fd5b505050505b602080820151604080518a81529283018790524290830152906001600160a01b038a16907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060600160405180910390a3600080516020615e7083398151915282600254604051614295929190615a88565b60405180910390a15050505050505050565b6000806142b48484615244565b9050806142c5576000915050611498565b6001600160a01b0384166000908152600e602052604081208054839081106142ef576142ef6159e5565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152600c54909250906143488683614915565b90506000600d828154811061435f5761435f6159e5565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b928401929092526001820154908301526002015460608201529150808484101561444d576000600d6143c1866001615abb565b815481106143d1576143d16159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905286015191925061442f91906158b3565b92508360400151816040015161444591906158b3565b915050614471565b606083015161445c90436158b3565b915082604001514261446e91906158b3565b90505b604083015182156144ae578284606001518b61448d91906158b3565b6144979084615bb1565b6144a19190615be6565b6144ab9082615abb565b90505b6144c1876040015182613f6e91906158b3565b87602001516144d09190615cd4565b875188906144df908390615d68565b600f90810b90915288516000910b1215905061450657600098505050505050505050611498565b865161451490600f0b613e80565b9b9a5050505050505050505050565b6001600160a01b0382166000908152600f60205260408120548061454b576000915050611498565b6001600160a01b0384166000908152600e60205260408120805483908110614575576145756159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b938301939093526001830154908201819052600290920154606082015291506145d290613f6e90866158b3565b81602001516145e19190615cd4565b81516145ed9190615d68565b600f0b8082526000131561460057600081525b805161460e90600f0b613e80565b95945050505050565b600080839050600061462c8560400151613e66565b905060005b60ff8110156146e25761464762093a8083615abb565b915060008583111561465b5785925061466f565b50600082815260106020526040902054600f0b5b614682846040015184613f6e91906158b3565b84602001516146919190615cd4565b845161469d9190615d68565b600f0b8452828614156146b057506146e2565b8084602001516146c09190615c83565b600f0b60208501525060408301829052806146da816159fb565b915050614631565b5060008260000151600f0b12156146f857600082525b815161460e90600f0b613e80565b3360009081526006602052604090205460ff16156147365760405162461bcd60e51b8152600401610d0790615c37565b61473f81613e66565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152909150826147895760405162461bcd60e51b8152600401610d0790615a16565b8051600f0b156147cc5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b1bd8dad95960921b6044820152606401610d07565b4282116148115760405162461bcd60e51b815260206004820152601360248201527217dd5b9b1bd8dad51a5b59481d1bdbc81bdb19606a1b6044820152606401610d07565b600161482162093a8060d1615bb1565b61482b91906158b3565b6148359042615abb565b82111561487b5760405162461bcd60e51b81526020600482015260146024820152735f756e6c6f636b54696d6520746f6f206c6f6e6760601b6044820152606401610d07565b336000818152600a60205260409020546148a1919085908590859060019060ff16614096565b505050565b6148a18363a9059cbb60e01b8484604051602401613e2f929190615c6a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008082815b60808110156149a957818310614930576149a9565b6000600261493e8486615abb565b614949906001615abb565b6149539190615be6565b905086600d8281548110614969576149696159e5565b9060005260206000209060030201600201541161498857809350614996565b6149936001826158b3565b92505b50806149a1816159fb565b91505061491b565b5090949350505050565b604080516080808201835260008083526020808401829052838501829052606080850183905285519384018652828452908301829052938201819052928101839052600c549192909181906001600160a01b03881615614c5357428760200151118015614a27575060008760000151600f0b135b15614a8857614a496001614a3f62093a8060d1615bb1565b613f6e91906158b3565b8751614a559190615db8565b600f0b602080870191909152870151614a7390613f6e9042906158b3565b8560200151614a829190615cd4565b600f0b85525b428660200151118015614aa2575060008660000151600f0b135b15614af957614aba6001614a3f62093a8060d1615bb1565b8651614ac69190615db8565b600f0b602080860191909152860151614ae490613f6e9042906158b3565b8460200151614af39190615cd4565b600f0b84525b6001600160a01b0388166000908152600f602052604090205480614b7d576001600160a01b0389166000908152600e60209081526040808320805460018181018355918552938390208a51938b01516001600160801b03908116600160801b0294169390931760039094029092019283558801519082015560608701516002909101555b614b88816001615abb565b6001600160a01b038a166000818152600f6020818152604080842095909555428a86019081524360608c01908152948452600e82528584208054600181810183559186528386208d518e8601516001600160801b03908116600160801b0291161760039092020190815591519082015593516002909401939093558b8301518252601083529290205490890151910b945015614c5157876020015187602001511415614c3657839250614c51565b602080880151600090815260109091526040902054600f0b92505b505b604080516080810182526000808252602082015242918101919091524360608201528115614cdc57600d8281548110614c8e57614c8e6159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015290505b604080820180518251608081018452600080825260208201819052835194820194909452606080860151908201529151909290421115614d53576040840151614d2590426158b3565b6060850151614d3490436158b3565b614d4690670de0b6b3a7640000615bb1565b614d509190615be6565b90505b6000614d5e84613e66565b905060005b60ff811015614f0e57614d7962093a8083615abb565b9150600042831115614d8d57429250614da1565b50600082815260106020526040902054600f0b5b6000614db0613f6e88866158b3565b8860200151614dbf9190615cd4565b8851909150614dcf908290615d68565b600f0b88526020880151614de4908390615c83565b600f90810b60208a015288516000910b1215614dff57600088525b60008860200151600f0b1215614e1757600060208901525b60408089018590528601519396508693670de0b6b3a764000090614e3b90866158b3565b614e459087615bb1565b614e4f9190615be6565b8660600151614e5e9190615abb565b6060890152614e6e896001615abb565b985042841415614e85575050436060870152614f0e565b600d8054600181018255600091909152885160208a01516001600160801b03908116600160801b029116176003909102600080516020615e308339815191528101919091556040890151600080516020615e908339815191528201556060890151600080516020615e508339815191529091015550508080614f06906159fb565b915050614d63565b50600c8690556001600160a01b038d1615614f9b57896020015189602001518660200151614f3c9190615c83565b614f469190615d68565b600f0b6020860152895189518651614f5e9190615c83565b614f689190615d68565b600f90810b865260208601516000910b1215614f8657600060208601525b60008560000151600f0b1215614f9b57600085525b600d8054600181018255600091909152855160208701516001600160801b03908116600160801b029116176003909102600080516020615e308339815191528101919091556040860151600080516020615e908339815191528201556060860151600080516020615e50833981519152909101556001600160a01b038d16156150e657428c60200151111561508b5760208a01516150399089615c83565b97508b602001518b60200151141561505d57602089015161505a9089615d68565b97505b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b038a161790555b428b6020015111156150e6578b602001518b6020015111156150e65760208901516150b69088615d68565b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b03831617905596505b50505050505050505050505050565b600061514a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166153089092919063ffffffff16565b8051909150156148a157808060200190518101906151689190615df6565b6148a15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d07565b600060016001607f1b031982128015906151e8575060016001607f1b038213155b613ed25760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401610d07565b6001600160a01b0382166000908152600f60205260408120548190815b60808110156149a957818310615276576149a9565b600060026152848486615abb565b61528f906001615abb565b6152999190615be6565b6001600160a01b0388166000908152600e6020526040902080549192508791839081106152c8576152c86159e5565b906000526020600020906003020160020154116152e7578093506152f5565b6152f26001826158b3565b92505b5080615300816159fb565b915050615261565b6060615317848460008561531f565b949350505050565b6060824710156153805760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d07565b6001600160a01b0385163b6153d75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d07565b600080866001600160a01b031685876040516153f39190615e13565b60006040518083038185875af1925050503d8060008114615430576040519150601f19603f3d011682016040523d82523d6000602084013e615435565b606091505b5091509150615445828286615450565b979650505050505050565b6060831561545f57508161187d565b82511561546f5782518084602001fd5b8160405162461bcd60e51b8152600401610d079190615534565b50805460008255600302906000526020600020908101906136d891905b80821115613ed25760008082556001820181905560028201556003016154a6565b6001600160a01b03811681146136d857600080fd5b600080604083850312156154ef57600080fd5b82356154fa816154c7565b946020939093013593505050565b60005b8381101561552357818101518382015260200161550b565b838111156116b55750506000910152565b6020815260008251806020840152615553816040850160208701615508565b601f01601f19169190910160400192915050565b60006020828403121561557957600080fd5b813561187d816154c7565b60008060006060848603121561559957600080fd5b83356155a4816154c7565b95602085013595506040909401359392505050565b80151581146136d857600080fd5b600080604083850312156155da57600080fd5b82356155e5816154c7565b915060208301356155f5816155b9565b809150509250929050565b60008060006040848603121561561557600080fd5b83356001600160401b038082111561562c57600080fd5b818601915086601f83011261564057600080fd5b81358181111561564f57600080fd5b8760208260051b850101111561566457600080fd5b6020928301955093505084013561567a816155b9565b809150509250925092565b60006020828403121561569757600080fd5b813561187d816155b9565b6001600160a01b0391909116815260200190565b600080604083850312156156c957600080fd5b50508035926020909101359150565b6000602082840312156156ea57600080fd5b5035919050565b80356001600160401b038116811461570857600080fd5b919050565b6000806000806080858703121561572357600080fd5b61572c856156f1565b935061573a602086016156f1565b9250604085013561574a816154c7565b9150606085013561575a816154c7565b939692955090935050565b60008060006060848603121561577a57600080fd5b8335615785816154c7565b92506020840135615795816155b9565b9150604084013564ffffffffff8116811461567a57600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600b908201526a10903232b632b3b0ba37b960a91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001600160681b038381169083168181101561583f5761583f615809565b039392505050565b600181811c9082168061585b57607f821691505b6020821081141561275457634e487b7160e01b600052602260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000828210156158c5576158c5615809565b500390565b602080825260089082015267546f6f206c61746560c01b604082015260600190565b6020808252601490820152732737903637b1b59037b7103232b632b3b0ba37b960611b604082015260600190565b60208082526016908201527511195b1959d85d1bdc881b1bd8dac8195e1c1a5c995960521b604082015260600190565b60006001600160681b0382811684821680830382111561596c5761596c615809565b01949350505050565b6001600160801b0392909216825265ffffffffffff16602082015260400190565b6020808252600b908201526a084818d85ad9481c1bdbdb60aa1b604082015260600190565b60208082526010908201526f3130b2102fb13637b1b5a73ab6b132b960811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615a0f57615a0f615809565b5060010190565b6020808252600b908201526a1098590817d85b5bdd5b9d60aa1b604082015260600190565b6020808252600d908201526c139bc81b1bd8dac8199bdd5b99609a1b604082015260600190565b6020808252600c908201526b131bd8dac8195e1c1a5c995960a21b604082015260600190565b918252602082015260400190565b6020808252600b908201526a0848195bd8481bdc881ddb60aa1b604082015260600190565b60008219821115615ace57615ace615809565b500190565b6020808252600d908201526c08481a5b9a5d1a585b1a5e9959609a1b604082015260600190565b60008060008060008060008060006101208a8c031215615b1957600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a0151615b55816155b9565b809250506101008a015190509295985092959850929598565b60208082526010908201526f105b1c9958591e481b5a59dc985d195960821b604082015260600190565b600060208284031215615baa57600080fd5b5051919050565b6000816000190483118215151615615bcb57615bcb615809565b500290565b634e487b7160e01b600052601260045260246000fd5b600082615bf557615bf5615bd0565b500490565b600060208284031215615c0c57600080fd5b815161187d816154c7565b602080825260069082015265119bdc989a5960d21b604082015260600190565b602080825260199082015278416c726561647920656d657267656e6379576974686472617760381b604082015260600190565b6001600160a01b03929092168252602082015260400190565b6000600f82810b9084900b828212801560016001607f1b0384900383131615615cae57615cae615809565b60016001607f1b03198390038212811615615ccb57615ccb615809565b50019392505050565b6000600f82810b9084900b60016001607f1b0383821384841380821684840486111615615d0357615d03615809565b60016001607f1b03196000851282811687830587121615615d2657615d26615809565b60008712925085820587128484161615615d4257615d42615809565b85850587128184161615615d5857615d58615809565b5050509290910295945050505050565b6000600f82810b9084900b828112801560016001607f1b0319830184121615615d9357615d93615809565b60016001607f1b0382018313811615615dae57615dae615809565b5090039392505050565b600081600f0b83600f0b80615dcf57615dcf615bd0565b60016001607f1b0319821460001982141615615ded57615ded615809565b90059392505050565b600060208284031215615e0857600080fd5b815161187d816155b9565b60008251615e25818460208701615508565b919091019291505056fed7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5d7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb75e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5cd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb67a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96a2646970667358221220301f95691f879c2ef77a5e58603636a30799566c9704a30f58d866f1852ed1ba64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103d65760003560e01c8063705096c711610208578063705096c71461099657806370a08231146109a9578063715018a6146109bc57806375cd6c67146109c45780637c5acb25146109d75780637c616fe6146109fa57806381fc83bb14610a0d578063827e8e0c14610a2d5780638ad4c44714610a545780638da5cb5b14610a675780638e90053014610a6f578063900cf0cf14610a7757806395d89b4114610a80578063981b24d014610a885780639c490f191461042b5780639d4b4ba114610a9b578063a621440414610aae578063a63dce7114610ab6578063a7ccf1e014610abe578063a88a885514610ad1578063aa94ab5914610ae4578063b52c05fe14610b0b578063b6bbbcd114610b1e578063b6e45a4e14610b38578063c0dd84bd14610b45578063c12ebb5f14610b68578063c172085e14610b7b578063c1d1192914610b8f578063c2c4c5c114610b98578063cfee396f14610ba0578063d2dcd93314610bb4578063d4eda63f14610bc7578063d73f98a314610bea578063db2e21bc14610bfd578063ec5570d014610c05578063f2c7a81b14610c18578063f2fde38b14610c20578063f4359ce514610c33578063f52a36f714610c3d578063fa09e63014610c73578063fb489a7b14610c86578063fc0c546a14610c8e578063ffc97ce914610cb557600080fd5b8062b79fd4146103db57806302641632146103f6578063047fc9aa146103fe578063052b726f14610407578063059f8b161461041c57806306a4da7e1461042b57806306fdde031461044657806308154df01461045b57806308c3dea7146104635780630a6373b31461046c5780630efe6a8b1461047f5780630f41e0d21461049257806312c470e91461049b57806312cae7af146104ae57806318160ddd146104c157806319577c6e146104c95780631959a002146104dc5780631bb8c61d1461059d5780632ea1fe7a146105b05780632f4f21e2146105c35780633037408d146105d657806330d9a62a146105e9578063313ce5671461060957806334d901a41461062857806336a5839114610663578063399f3a4f146106935780633d5c78bd146106a6578063403f4447146106b95780634ee2cd7e146106cc57806351cff8d9146106df578063539e5082146106f257806355ed0a781461077c57806358fca6a514610784578063598085ae1461078c5780635de9a1371461079f5780635e8bb48e146107e75780636386c1c71461081a5780636574deb71461094d5780636582a8c01461096057806365a5d5f01461097357806365f9008a1461097b57806367e7a7cb1461098e575b600080fd5b6103e3600081565b6040519081526020015b60405180910390f35b6103e3600381565b6103e360025481565b61041a6104153660046154dc565b610cd8565b005b6103e3670de0b6b3a764000081565b610433600181565b60405161ffff90911681526020016103ed565b61044e610e4e565b6040516103ed9190615534565b610433600081565b6103e360155481565b61041a61047a366004615567565b610edc565b61041a61048d366004615584565b61138a565b6103e360115481565b6103e36104a93660046154dc565b6113d2565b6103e36104bc366004615567565b61149e565b6103e36114aa565b61041a6104d73660046155c7565b61151a565b61054b6104ea366004615567565b600860205260009081526040902080546001909101546001600160a01b03909116906001600160801b0381169065ffffffffffff600160801b8204811691600160b01b81049091169061ffff600160e01b8204811691600160f01b90041686565b604080516001600160a01b0390971687526001600160801b03909516602087015265ffffffffffff938416948601949094529116606084015261ffff90811660808401521660a082015260c0016103ed565b61041a6105ab366004615600565b6115a0565b61041a6105be366004615685565b6116bb565b61041a6105d13660046154dc565b611734565b6103e36105e43660046154dc565b611871565b6016546105fc906001600160a01b031681565b6040516103ed91906156a2565b6014546106169060ff1681565b60405160ff90911681526020016103ed565b61063b6106363660046154dc565b611884565b60408051600f95860b81529390940b60208401529282015260608101919091526080016103ed565b60145461067b9061010090046001600160401b031681565b6040516001600160401b0390911681526020016103ed565b61041a6106a13660046156b6565b6118d4565b61041a6106b43660046156d8565b61192b565b61041a6106c73660046156d8565b6119e7565b6103e36106da3660046154dc565b611af5565b61041a6106ed366004615567565b611bcf565b610742610700366004615567565b6009602052600090815260409020546001600160681b0380821691600160681b810490911690600160d01b810464ffffffffff1690600160f81b900460ff1684565b604080516001600160681b03958616815294909316602085015264ffffffffff9091169183019190915260ff1660608201526080016103ed565b61041a611d6d565b610433600281565b61041a61079a366004615685565b6121d8565b6107cd6107ad366004615567565b60076020526000908152604090208054600190910154600f9190910b9082565b60408051600f9390930b83526020830191909152016103ed565b61080a6107f5366004615567565b600b6020526000908152604090205460ff1681565b60405190151581526020016103ed565b6108e8610828366004615567565b6001600160a01b039081166000818152600760209081526040808320815180830183528154600f0b81526001918201548185019081529585526008845293829020825160c08101845281549097168088529101546001600160801b03811693870184905265ffffffffffff600160801b82048116938801849052600160b01b8204166060880181905261ffff600160e01b8304811660808a01819052600160f01b9093041660a09098018890529451955195979596919593949293909190565b60408051600f9990990b895260208901979097526001600160a01b03909516958701959095526001600160801b03909216606086015265ffffffffffff90811660808601521660a084015261ffff91821660c08401521660e0820152610100016103ed565b61041a61095b3660046154dc565b612256565b6017546105fc906001600160a01b031681565b6103e3612615565b6003546105fc906001600160a01b031681565b6103e3600181565b61041a6109a43660046156d8565b612632565b6103e36109b7366004615567565b612698565b61041a61275a565b61041a6109d236600461570d565b612795565b61080a6109e5366004615567565b60196020526000908152604090205460ff1681565b61041a610a083660046156d8565b612961565b6103e3610a1b366004615567565b600f6020526000908152604090205481565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61063b610a623660046156d8565b612b0e565b6105fc612b52565b610616600081565b6103e3600c5481565b61044e612b61565b6103e3610a963660046156d8565b612b6e565b61041a610aa9366004615567565b612d69565b61041a613275565b610616600181565b61041a610acc366004615567565b6133d4565b6103e3610adf366004615567565b61349c565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61041a610b193660046156b6565b61353a565b60145461067b90600160481b90046001600160401b031681565b60055461080a9060ff1681565b61080a610b53366004615567565b600a6020526000908152604090205460ff1681565b61041a610b76366004615600565b6135a2565b60035461080a90600160a01b900460ff1681565b6103e360045481565b61041a6136b7565b60175461080a90600160a01b900460ff1681565b6103e3610bc23660046156d8565b6136db565b61080a610bd5366004615567565b60066020526000908152604090205460ff1681565b61041a610bf8366004615765565b613746565b61041a613825565b6103e3610c133660046154dc565b613a1b565b6103e3600281565b61041a610c2e366004615567565b613a27565b6103e362093a8081565b610c60610c4b3660046156d8565b601060205260009081526040902054600f0b81565b604051600f9190910b81526020016103ed565b61041a610c81366004615567565b613ac4565b61041a613ced565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61080a610cc3366004615567565b60186020526000908152604090205460ff1681565b33610ce1612b52565b6001600160a01b031614610d105760405162461bcd60e51b8152600401610d07906157af565b60405180910390fd5b6001600160a01b03821660009081526009602052604090208054600160f81b900460ff16600114610d535760405162461bcd60e51b8152600401610d07906157e4565b8054600160681b90046001600160681b0316821115610d81578054600160681b90046001600160681b031691505b805482908290600d90610da5908490600160681b90046001600160681b031661581f565b92506101000a8154816001600160681b0302191690836001600160681b03160217905550610e093330847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613dfb909392919063ffffffff16565b6040518281526001600160a01b0384169033907f7b85c81b5ab23faed50cf05b116ebb10456ca6320721e00b6513babed009b9e29060200160405180910390a3505050565b60128054610e5b90615847565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8790615847565b8015610ed45780601f10610ea957610100808354040283529160200191610ed4565b820191906000526020600020905b815481529060010190602001808311610eb757829003601f168201915b505050505081565b60026001541415610eff5760405162461bcd60e51b8152600401610d079061587c565b600260019081556001600160a01b038216600090815260096020526040902080549091600160f81b90910460ff1614610f4a5760405162461bcd60e51b8152600401610d07906157e4565b3360009081526008602052604081206001810154909190610f7990600160801b900465ffffffffffff16613e66565b9050428111610fbe5760405162461bcd60e51b8152602060048201526011602482015270155cd95c881b1bd8dac8195e1c1a5c9959607a1b6044820152606401610d07565b600454610fcb90426158b3565b6001830154600160b01b900465ffffffffffff1611610ffc5760405162461bcd60e51b8152600401610d07906158ca565b600182810154600160e01b900461ffff16146110475760405162461bcd60e51b815260206004820152600a60248201526908481b5a59dc985d195960b21b6044820152606401610d07565b6001820154600160f01b900461ffff16156110975760405162461bcd60e51b815260206004820152601060248201526f416c726561647920776974686472617760801b6044820152606401610d07565b6001828101805461ffff60e01b1916600160e11b17905582546001600160a01b0316600090815260076020908152604080832081518083019092528054600f0b80835294015491810191909152916110ee90613e80565b8454909150611107906001600160a01b03168383613ed6565b6040805180820182526001600160a01b0388166000818152600760208181529482208054600f90810b865293835290855260010154938301939093528151919291900b136111675760405162461bcd60e51b8152600401610d07906158ec565b4281602001511161118a5760405162461bcd60e51b8152600401610d079061591a565b6001808601546111ac9189916001600160801b03169060009085908290614096565b600185015486546001600160801b039091169087906000906111d89084906001600160681b031661594a565b82546101009290920a6001600160681b03818102199093169183160217909155600187015488546001600160801b0390911692508891600d91611224918591600160681b90041661594a565b82546101009290920a6001600160681b0381810219909316919092169190910217905550600185015460405162c2c90f60e11b81523360048201526001600160801b0382166024820152600160801b90910465ffffffffffff1660448201526001600160a01b03881690630185921e90606401600060405180830381600087803b1580156112b157600080fd5b505af11580156112c5573d6000803e3d6000fd5b5050505060018501546040516001600160a01b038916913391600080516020615eb083398151915291611312916001600160801b03821691600160801b900465ffffffffffff1690615975565b60405180910390a360018501546040516001600160a01b0389169133917f4af697c81385693e6ee5d15ccb781170dc8241f81c4983bf87cdf268d2fca5f591611375916001600160801b03821691600160801b900465ffffffffffff1690615975565b60405180910390a35050600180555050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103d65760405162461bcd60e51b8152600401610d0790615996565b6000438211156113f45760405162461bcd60e51b8152600401610d07906159bb565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a08301521561149657805161148e90846142a7565b915050611498565b505b92915050565b60006114988242614523565b6000611515600d600c54815481106114c4576114c46159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015242614617565b905090565b33611523612b52565b6001600160a01b0316146115495760405162461bcd60e51b8152600401610d07906157af565b6001600160a01b0382166000818152600b6020526040808220805460ff1916851515908117909155905190929133917f4f4d55f3b98fe4b3fbc9fb5e8ed05483cc8d794638edd690545eb5779e234a499190a45050565b336115a9612b52565b6001600160a01b0316146115cf5760405162461bcd60e51b8152600401610d07906157af565b60005b828110156116b55781601860008686858181106115f1576115f16159e5565b90506020020160208101906116069190615567565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055838382818110611640576116406159e5565b90506020020160208101906116559190615567565b6001600160a01b0316336001600160a01b03167fdfad9b83c215ff1a36483cf1688e5aeae2ac60f1c3f62f5229641234748f13b78460405161169b911515815260200190565b60405180910390a3806116ad816159fb565b9150506115d2565b50505050565b336116c4612b52565b6001600160a01b0316146116ea5760405162461bcd60e51b8152600401610d07906157af565b6005805460ff191682151590811790915560405190815233907f539ba344188cde95583cd695fe9a73d66f53c83a48e3d66e5b42a12650d93ecc906020015b60405180910390a250565b600260015414156117575760405162461bcd60e51b8152600401610d079061587c565b60026001556001600160a01b0382166000908152600a602052604090205460ff16156117b75760405162461bcd60e51b815260206004820152600f60248201526e496e636f72726563742070726f787960881b6044820152606401610d07565b6040805180820182526001600160a01b0384166000818152600760208181529482208054600f0b855292909152835260010154918101919091528161180e5760405162461bcd60e51b8152600401610d0790615a16565b60008160000151600f0b136118355760405162461bcd60e51b8152600401610d0790615a3b565b428160200151116118585760405162461bcd60e51b8152600401610d0790615a62565b6118688383600084600080614096565b50506001805550565b600061187d8383614523565b9392505050565b600e60205281600052604060002081815481106118a057600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9550600160801b90920490910b925084565b336000908152600a602052604090205460ff1661191d5760405162461bcd60e51b8152602060048201526007602482015266212070726f787960c81b6044820152606401610d07565b6119278282614706565b5050565b33611934612b52565b6001600160a01b03161461195a5760405162461bcd60e51b8152600401610d07906157af565b8015806119675750806001145b6119a15760405162461bcd60e51b815260206004820152600b60248201526a4f6e6c792030206f72203160a81b6044820152606401610d07565b60118054908290556040517f5238fc635590cf5e76ed0f591df4d7f3021d20f58e6d3405390197dd72a575fe906119db9083908590615a88565b60405180910390a15050565b3360009081526018602052604090205460ff16611a1d57333214611a1d5760405162461bcd60e51b8152600401610d0790615a96565b60026001541415611a405760405162461bcd60e51b8152600401610d079061587c565b60026001908155604080518082018252336000818152600760208181529482208054600f0b8552929091528352909201549082015281611a925760405162461bcd60e51b8152600401610d0790615a16565b60008160000151600f0b13611ab95760405162461bcd60e51b8152600401610d0790615a3b565b42816020015111611adc5760405162461bcd60e51b8152600401610d0790615a62565b611aed338360008460026000614096565b505060018055565b600043821115611b175760405162461bcd60e51b8152600401610d07906159bb565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a083015215611bc5578051611bb190846142a7565b611bbb85856142a7565b61148e9190615abb565b61148e84846142a7565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c175760405162461bcd60e51b8152600401610d0790615996565b6001600160a01b03808216600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a083015260021415611cac57600080fd5b80516001600160a01b031615801590611ccd5750608081015161ffff166001145b8015611cdf575060a081015161ffff16155b156119275780600001516001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611d2357600080fd5b505af1158015611d37573d6000803e3d6000fd5b5050506001600160a01b038316600090815260086020526040902060010180546001600160f01b0316600160f01b179055505050565b60026001541415611d905760405162461bcd60e51b8152600401610d079061587c565b6002600155600354600160a01b900460ff16611dbe5760405162461bcd60e51b8152600401610d0790615ad3565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401611e0f91906156a2565b61012060405180830381865afa158015611e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e519190615afa565b505096509650505050509250428211611e7c5760405162461bcd60e51b8152600401610d0790615a62565b3360009081526008602052604090206001810154600160e01b900461ffff1615611eb85760405162461bcd60e51b8152600401610d0790615b6e565b60018101805461ffff60e01b1916600160e01b17905560408051633a98ef3960e01b815290516000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691633a98ef39916004808201926020929091908290030181865afa158015611f37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5b9190615b98565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe19190615b98565b9050600060018584611ff3858b615bb1565b611ffd9190615be6565b61200791906158b3565b61201191906158b3565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634c96a389336040518263ffffffff1660e01b815260040161206191906156a2565b6020604051808303816000875af1158015612080573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120a49190615bfa565b6001600160a01b0381166000818152600a602052604090819020805460ff1916600190811790915588546001600160a01b031916831789558801805465ffffffffffff8c8116600160801b026001600160b01b03194292909216600160b01b02919091166001600160e01b0319909216919091176001600160801b038816171790555163399f3a4f60e01b81529192509063399f3a4f9061214b9085908b90600401615a88565b600060405180830381600087803b15801561216557600080fd5b505af1158015612179573d6000803e3d6000fd5b50505050806001600160a01b0316336001600160a01b03167f8519b84e949c6333da21ddea64e2c29ef66709e465ec9b0f24fb32eb2c003843848a6040516121c2929190615a88565b60405180910390a3505060018055505050505050565b336121e1612b52565b6001600160a01b0316146122075760405162461bcd60e51b8152600401610d07906157af565b60178054821515600160a01b0260ff60a01b1990911617905560405133907fdcc751463da04455ac459756e92d5ea118dd0dd631422cbf8353132417a52d9f9061172990841515815260200190565b600260015414156122795760405162461bcd60e51b8152600401610d079061587c565b6002600155601754600160a01b900460ff166122a75760405162461bcd60e51b8152600401610d0790615c17565b6001600160a01b0382166122b9573391505b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152816123005760405162461bcd60e51b8152600401610d0790615a16565b806020015142106123235760405162461bcd60e51b8152600401610d07906158ca565b601154156123435760405162461bcd60e51b8152600401610d0790615c17565b33600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b82041692820192909252600160d01b820464ffffffffff1692810192909252600160f81b900460ff1660608201819052600114156124755742816040015164ffffffffff16106123fb5760405162461bcd60e51b8152602060048201526014602482015273466f72626964206561726c79576974686472617760601b6044820152606401610d07565b600061240d8360000151600f0b613e80565b60208301519091506001600160681b031661242885836158b3565b10156124735760405162461bcd60e51b815260206004820152601a60248201527911195b1959d85d1bdc8818985b185b98d948195e18d95959195960321b6044820152606401610d07565b505b6020820151612485338486613ed6565b336000908152600b602052604081205460ff161580156124b4575060145461010090046001600160401b031615155b156125af57600062093a80426124ca8286615abb565b6124d491906158b3565b6124de9190615be6565b60145490915061271090879061250390849061010090046001600160401b0316615bb1565b61250d9190615bb1565b6125179190615be6565b6014549092506000906127109061253e90600160481b90046001600160401b031685615bb1565b6125489190615be6565b9050806015600082825461255c9190615abb565b90915550506016546125ac906001600160a01b031661257b83866158b3565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906148a6565b50505b6125bd8661257b83886158b3565b6040805186815260208101839052428183015290516001600160a01b0388169133917f08b526d7537cea7e5a629eb0495b5932c78911fd0bdeb02b822d69a6e25792549181900360600190a350506001805550505050565b600161262562093a8060d1615bb1565b61262f91906158b3565b81565b3361263b612b52565b6001600160a01b0316146126615760405162461bcd60e51b8152600401610d07906157af565b600481905560405181815233907fde15bb8e73a1f43abe6021a8ad5a5d79caf815a4d74e6dbd7d88cd57f06fdd8990602001611729565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a08401529091901561274a5780516127369042614523565b6127408442614523565b61187d9190615abb565b61187d8342614523565b50919050565b33612763612b52565b6001600160a01b0316146127895760405162461bcd60e51b8152600401610d07906157af565b61279360006148c5565b565b3361279e612b52565b6001600160a01b0316146127c45760405162461bcd60e51b8152600401610d07906157af565b60c0846001600160401b0316111561280d5760405162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606401610d07565b612710836001600160401b031611156128575760405162461bcd60e51b815260206004820152600c60248201526b0c4e0e640e8dede40d0d2ced60a31b6044820152606401610d07565b601480546001600160401b03858116600160481b818102600160481b600160881b03198a8516610100818102928316610100600160881b031989161793909317909755601680546001600160a01b038b81166001600160a01b03198084168217909455601780548d8416958116861790915560408051888d048c16808252602082019e909e52610100600160481b0319909c1690961797909704909816938901849052606089019690965285166080880181905260a08801969096529290931660c0860181905260e08601929092529193909133917f3de6c016cd3debec574d13c9966e6c847e64ac424da0b1eb70d3c93b68ec0537910160405180910390a25050505050505050565b3360009081526018602052604090205460ff16612997573332146129975760405162461bcd60e51b8152600401610d0790615a96565b600260015414156129ba5760405162461bcd60e51b8152600401610d079061587c565b60026001908155604080518082018252336000818152600760208181529482208054600f0b855292909152835290920154908201526129f882613e66565b915060008160000151600f0b13612a215760405162461bcd60e51b8152600401610d0790615a3b565b42816020015111612a445760405162461bcd60e51b8152600401610d0790615a62565b80602001518211612a905760405162461bcd60e51b815260206004820152601660248201527517db995dd55b9b1bd8dad51a5b59481d1bdbc81bdb1960521b6044820152606401610d07565b6001612aa062093a8060d1615bb1565b612aaa91906158b3565b612ab49042615abb565b821115612afd5760405162461bcd60e51b81526020600482015260176024820152765f6e6577556e6c6f636b54696d6520746f6f206c6f6e6760481b6044820152606401610d07565b611aed336000848460036000614096565b600d8181548110612b1e57600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9450600160801b90920490910b919084565b6000546001600160a01b031690565b60138054610e5b90615847565b600043821115612bb35760405162461bcd60e51b815260206004820152601060248201526f2130b2102fb13637b1b5a73ab6b132b960811b6044820152606401610d07565b600c546000612bc28483614915565b90506000600d8281548110612bd957612bd96159e5565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915083831015612cf7576000600d612c3a856001615abb565b81548110612c4a57612c4a6159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905285015191925014612cf15782606001518160600151612cb791906158b3565b83604001518260400151612ccb91906158b3565b6060850151612cda908a6158b3565b612ce49190615bb1565b612cee9190615be6565b91505b50612d46565b43826060015114612d46576060820151612d1190436158b3565b6040830151612d2090426158b3565b6060840151612d2f90896158b3565b612d399190615bb1565b612d439190615be6565b90505b612d5f82828460400151612d5a9190615abb565b614617565b9695505050505050565b60026001541415612d8c5760405162461bcd60e51b8152600401610d079061587c565b6002600155600354600160a01b900460ff16612dba5760405162461bcd60e51b8152600401610d0790615ad3565b6001600160a01b03811660009081526009602052604090208054600160f81b900460ff16600114612dfd5760405162461bcd60e51b8152600401610d07906157e4565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401612e4e91906156a2565b61012060405180830381865afa158015612e6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e909190615afa565b505096509650505050509250428211612ebb5760405162461bcd60e51b8152600401610d0790615a62565b3360009081526008602052604090206001810154600160e01b900461ffff1615612ef75760405162461bcd60e51b8152600401610d0790615b6e565b60018101805461ffff60e01b1916600160e11b17905560408051633a98ef3960e01b815290516000917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691633a98ef39916004808201926020929091908290030181865afa158015612f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f9a9190615b98565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ffc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130209190615b98565b9050600060018584613032858b615bb1565b61303c9190615be6565b61304691906158b3565b61305091906158b3565b600185810180546001600160b01b031916600160801b65ffffffffffff8b16026001600160801b031916176001600160801b0384161790556040805180820182526001600160a01b038d166000818152600760208181529482208054600f0b85529290915283529092015490820152909150816130df5760405162461bcd60e51b8152600401610d0790615a16565b60008160000151600f0b136131065760405162461bcd60e51b8152600401610d07906158ec565b428160200151116131295760405162461bcd60e51b8152600401610d079061591a565b61313a8a8360008460006001614096565b885482908a906000906131579084906001600160681b031661594a565b92506101000a8154816001600160681b0302191690836001600160681b031602179055508189600001600d8282829054906101000a90046001600160681b03166131a1919061594a565b82546001600160681b039182166101009390930a92830291909202199091161790555060405162c2c90f60e11b815233600482015260248101839052604481018890526001600160a01b038b1690630185921e90606401600060405180830381600087803b15801561321257600080fd5b505af1158015613226573d6000803e3d6000fd5b50505050896001600160a01b0316336001600160a01b0316600080516020615eb0833981519152848a60405161325d929190615a88565b60405180910390a35050600180555050505050505050565b3361327e612b52565b6001600160a01b0316146132a45760405162461bcd60e51b8152600401610d07906157af565b600354600160a01b900460ff16156132f45760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610d07565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632d19b9826040518163ffffffff1660e01b8152600401602060405180830381865afa158015613354573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133789190615bfa565b90506001600160a01b03811630146133be5760405162461bcd60e51b8152602060048201526009602482015268426164205643616b6560b81b6044820152606401610d07565b506003805460ff60a01b1916600160a01b179055565b336133dd612b52565b6001600160a01b0316146134035760405162461bcd60e51b8152600401610d07906157af565b6001600160a01b0381166134525760405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606401610d07565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fd1879d19b7e07327f8e491d8c5e05a4048155b7ee8f97f61e2b2233ae0e3a88890600090a250565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a08401529091901561275457805161187d9042614523565b3360009081526018602052604090205460ff16613570573332146135705760405162461bcd60e51b8152600401610d0790615a96565b600260015414156135935760405162461bcd60e51b8152600401610d079061587c565b6002600155611aed8282614706565b336135ab612b52565b6001600160a01b0316146135d15760405162461bcd60e51b8152600401610d07906157af565b60005b828110156116b55781601960008686858181106135f3576135f36159e5565b90506020020160208101906136089190615567565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055838382818110613642576136426159e5565b90506020020160208101906136579190615567565b6001600160a01b0316336001600160a01b03167f0c5e5180b1be108ebc3c1c5939cd6b59ca30067d07c5405f94304bf603c621428460405161369d911515815260200190565b60405180910390a3806136af816159fb565b9150506135d4565b604080518082019091526000808252602082018190526136d89082806149b3565b50565b6000611498600d600c54815481106136f5576136f56159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015283614617565b3361374f612b52565b6001600160a01b0316146137755760405162461bcd60e51b8152600401610d07906157af565b6001600160a01b03831660009081526009602052604090208261379957600061379c565b60015b81546001600160d01b0316600160f81b60ff929092169190910264ffffffffff60d01b191617600160d01b64ffffffffff841690810291909117825560408051851515815260208101929092526001600160a01b038616917f3fd4b992bc54a5edaa3b29f337c4048b314667d454123fbd81b327aaeea7df67910160405180910390a250505050565b600260015414156138485760405162461bcd60e51b8152600401610d079061587c565b600260015560055460ff1661389b5760405162461bcd60e51b8152602060048201526019602482015278466f7262696420656d657267656e637920776974686472617760381b6044820152606401610d07565b3360009081526006602052604090205460ff16156138cb5760405162461bcd60e51b8152600401610d0790615c37565b336000908152600660209081526040808320805460ff191660019081179091556007835281842082518084019093528054600f0b80845291015492820192909252911261394d5760405162461bcd60e51b815260206004820152601060248201526f139bc81b1bd8dad95908185b5bdd5b9d60821b6044820152606401610d07565b600061395f8260000151600f0b613e80565b33600090815260076020908152604080832080546001600160801b0319168155600101839055600e90915281209192506139999190615489565b336000818152600f60205260408120556139de907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690836148a6565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505060018055565b600061187d83836142a7565b33613a30612b52565b6001600160a01b031614613a565760405162461bcd60e51b8152600401610d07906157af565b6001600160a01b038116613abb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d07565b6136d8816148c5565b60026001541415613ae75760405162461bcd60e51b8152600401610d079061587c565b600260015533600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b820416928201839052600160d01b810464ffffffffff1693820193909352600160f81b90920460ff16606083015215613ba25760405162461bcd60e51b8152602060048201526024808201527f496e73756666696369656e7420696e6a656374696f6e20666f722064656c656760448201526330ba37b960e11b6064820152608401610d07565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152601154613c1a578060200151421015613c1a5760405162461bcd60e51b815260206004820152601060248201526f131bd8dac81b9bdd08195e1c1a5c995960821b6044820152606401610d07565b6001600160a01b038316613c2c573392505b6000613c3e8260000151600f0b613e80565b9050613c4b338383613ed6565b336000908152600a602052604090205460ff16613c9657613c966001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001685836148a6565b836001600160a01b0316336001600160a01b03167f55e21b0674b8095feb63d5336fb7b5b004d267585bfbb58005e8126a8ad7bc548342604051613cdb929190615a88565b60405180910390a35050600180555050565b3360009081526019602052604090205460ff16613d425760405162461bcd60e51b81526020600482015260136024820152722120776c2072656469737472696275746f727360681b6044820152606401610d07565b60026001541415613d655760405162461bcd60e51b8152600401610d079061587c565b6002600155601580546000909155601754613dad906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116836148a6565b60175460405133917f73dad76107243dbd9d398020575b5e3ad26d50fe161c81088dc8592a394855b791613dec916001600160a01b0316908590615c6a565b60405180910390a25060018055565b6040516001600160a01b03808516602483015283166044820152606481018290526116b59085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526150f5565b600062093a80613e768184615be6565b6114989190615bb1565b600080821215613ed25760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610d07565b5090565b6000613ee88360000151600f0b613e80565b905080821115613f2d5760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610d07565b604080518082019091528351600f0b815260208085015190820152818314613f59578360200151613f5c565b60005b6020850152613f73613f6e84846158b3565b6151c7565b600f0b84526001600160a01b0385166000908152600760209081526040909120855181546001600160801b0319166001600160801b0390911617815590850151600190910155600254613fc684826158b3565b600255613fd48683876149b3565b6003546001600160a01b0316156140655760035482516020840151604051630f28a72960e31b81526001600160a01b038a81166004830152600f9390930b6024820152604481019190915260648101879052911690637945394890608401600060405180830381600087803b15801561404c57600080fd5b505af1158015614060573d6000803e3d6000fd5b505050505b600080516020615e7083398151915281600254604051614086929190615a88565b60405180910390a1505050505050565b6002546140a38682615abb565b600255604080518082019091528451600f0b8152602080860151908201526140ca876151c7565b81516140d69190615c83565b600f0b815285156140e957602081018690525b6001600160a01b0388166000908152600760209081526040909120825181546001600160801b0319166001600160801b03909116178155908201516001909101556141358886836149b3565b8615801590614142575082155b1561417c5761417c6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308a613dfb565b6003546001600160a01b0316156142235760035485516020870151604051636e85ee4760e01b81526001600160a01b038c81166004830152602482018c9052604482018b9052600f9390930b6064820152608481019190915260a4810187905285151560c4820152911690636e85ee479060e401600060405180830381600087803b15801561420a57600080fd5b505af115801561421e573d6000803e3d6000fd5b505050505b602080820151604080518a81529283018790524290830152906001600160a01b038a16907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060600160405180910390a3600080516020615e7083398151915282600254604051614295929190615a88565b60405180910390a15050505050505050565b6000806142b48484615244565b9050806142c5576000915050611498565b6001600160a01b0384166000908152600e602052604081208054839081106142ef576142ef6159e5565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152600c54909250906143488683614915565b90506000600d828154811061435f5761435f6159e5565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b928401929092526001820154908301526002015460608201529150808484101561444d576000600d6143c1866001615abb565b815481106143d1576143d16159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905286015191925061442f91906158b3565b92508360400151816040015161444591906158b3565b915050614471565b606083015161445c90436158b3565b915082604001514261446e91906158b3565b90505b604083015182156144ae578284606001518b61448d91906158b3565b6144979084615bb1565b6144a19190615be6565b6144ab9082615abb565b90505b6144c1876040015182613f6e91906158b3565b87602001516144d09190615cd4565b875188906144df908390615d68565b600f90810b90915288516000910b1215905061450657600098505050505050505050611498565b865161451490600f0b613e80565b9b9a5050505050505050505050565b6001600160a01b0382166000908152600f60205260408120548061454b576000915050611498565b6001600160a01b0384166000908152600e60205260408120805483908110614575576145756159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b938301939093526001830154908201819052600290920154606082015291506145d290613f6e90866158b3565b81602001516145e19190615cd4565b81516145ed9190615d68565b600f0b8082526000131561460057600081525b805161460e90600f0b613e80565b95945050505050565b600080839050600061462c8560400151613e66565b905060005b60ff8110156146e25761464762093a8083615abb565b915060008583111561465b5785925061466f565b50600082815260106020526040902054600f0b5b614682846040015184613f6e91906158b3565b84602001516146919190615cd4565b845161469d9190615d68565b600f0b8452828614156146b057506146e2565b8084602001516146c09190615c83565b600f0b60208501525060408301829052806146da816159fb565b915050614631565b5060008260000151600f0b12156146f857600082525b815161460e90600f0b613e80565b3360009081526006602052604090205460ff16156147365760405162461bcd60e51b8152600401610d0790615c37565b61473f81613e66565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152909150826147895760405162461bcd60e51b8152600401610d0790615a16565b8051600f0b156147cc5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b1bd8dad95960921b6044820152606401610d07565b4282116148115760405162461bcd60e51b815260206004820152601360248201527217dd5b9b1bd8dad51a5b59481d1bdbc81bdb19606a1b6044820152606401610d07565b600161482162093a8060d1615bb1565b61482b91906158b3565b6148359042615abb565b82111561487b5760405162461bcd60e51b81526020600482015260146024820152735f756e6c6f636b54696d6520746f6f206c6f6e6760601b6044820152606401610d07565b336000818152600a60205260409020546148a1919085908590859060019060ff16614096565b505050565b6148a18363a9059cbb60e01b8484604051602401613e2f929190615c6a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008082815b60808110156149a957818310614930576149a9565b6000600261493e8486615abb565b614949906001615abb565b6149539190615be6565b905086600d8281548110614969576149696159e5565b9060005260206000209060030201600201541161498857809350614996565b6149936001826158b3565b92505b50806149a1816159fb565b91505061491b565b5090949350505050565b604080516080808201835260008083526020808401829052838501829052606080850183905285519384018652828452908301829052938201819052928101839052600c549192909181906001600160a01b03881615614c5357428760200151118015614a27575060008760000151600f0b135b15614a8857614a496001614a3f62093a8060d1615bb1565b613f6e91906158b3565b8751614a559190615db8565b600f0b602080870191909152870151614a7390613f6e9042906158b3565b8560200151614a829190615cd4565b600f0b85525b428660200151118015614aa2575060008660000151600f0b135b15614af957614aba6001614a3f62093a8060d1615bb1565b8651614ac69190615db8565b600f0b602080860191909152860151614ae490613f6e9042906158b3565b8460200151614af39190615cd4565b600f0b84525b6001600160a01b0388166000908152600f602052604090205480614b7d576001600160a01b0389166000908152600e60209081526040808320805460018181018355918552938390208a51938b01516001600160801b03908116600160801b0294169390931760039094029092019283558801519082015560608701516002909101555b614b88816001615abb565b6001600160a01b038a166000818152600f6020818152604080842095909555428a86019081524360608c01908152948452600e82528584208054600181810183559186528386208d518e8601516001600160801b03908116600160801b0291161760039092020190815591519082015593516002909401939093558b8301518252601083529290205490890151910b945015614c5157876020015187602001511415614c3657839250614c51565b602080880151600090815260109091526040902054600f0b92505b505b604080516080810182526000808252602082015242918101919091524360608201528115614cdc57600d8281548110614c8e57614c8e6159e5565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015290505b604080820180518251608081018452600080825260208201819052835194820194909452606080860151908201529151909290421115614d53576040840151614d2590426158b3565b6060850151614d3490436158b3565b614d4690670de0b6b3a7640000615bb1565b614d509190615be6565b90505b6000614d5e84613e66565b905060005b60ff811015614f0e57614d7962093a8083615abb565b9150600042831115614d8d57429250614da1565b50600082815260106020526040902054600f0b5b6000614db0613f6e88866158b3565b8860200151614dbf9190615cd4565b8851909150614dcf908290615d68565b600f0b88526020880151614de4908390615c83565b600f90810b60208a015288516000910b1215614dff57600088525b60008860200151600f0b1215614e1757600060208901525b60408089018590528601519396508693670de0b6b3a764000090614e3b90866158b3565b614e459087615bb1565b614e4f9190615be6565b8660600151614e5e9190615abb565b6060890152614e6e896001615abb565b985042841415614e85575050436060870152614f0e565b600d8054600181018255600091909152885160208a01516001600160801b03908116600160801b029116176003909102600080516020615e308339815191528101919091556040890151600080516020615e908339815191528201556060890151600080516020615e508339815191529091015550508080614f06906159fb565b915050614d63565b50600c8690556001600160a01b038d1615614f9b57896020015189602001518660200151614f3c9190615c83565b614f469190615d68565b600f0b6020860152895189518651614f5e9190615c83565b614f689190615d68565b600f90810b865260208601516000910b1215614f8657600060208601525b60008560000151600f0b1215614f9b57600085525b600d8054600181018255600091909152855160208701516001600160801b03908116600160801b029116176003909102600080516020615e308339815191528101919091556040860151600080516020615e908339815191528201556060860151600080516020615e50833981519152909101556001600160a01b038d16156150e657428c60200151111561508b5760208a01516150399089615c83565b97508b602001518b60200151141561505d57602089015161505a9089615d68565b97505b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b038a161790555b428b6020015111156150e6578b602001518b6020015111156150e65760208901516150b69088615d68565b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b03831617905596505b50505050505050505050505050565b600061514a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166153089092919063ffffffff16565b8051909150156148a157808060200190518101906151689190615df6565b6148a15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d07565b600060016001607f1b031982128015906151e8575060016001607f1b038213155b613ed25760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401610d07565b6001600160a01b0382166000908152600f60205260408120548190815b60808110156149a957818310615276576149a9565b600060026152848486615abb565b61528f906001615abb565b6152999190615be6565b6001600160a01b0388166000908152600e6020526040902080549192508791839081106152c8576152c86159e5565b906000526020600020906003020160020154116152e7578093506152f5565b6152f26001826158b3565b92505b5080615300816159fb565b915050615261565b6060615317848460008561531f565b949350505050565b6060824710156153805760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d07565b6001600160a01b0385163b6153d75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d07565b600080866001600160a01b031685876040516153f39190615e13565b60006040518083038185875af1925050503d8060008114615430576040519150601f19603f3d011682016040523d82523d6000602084013e615435565b606091505b5091509150615445828286615450565b979650505050505050565b6060831561545f57508161187d565b82511561546f5782518084602001fd5b8160405162461bcd60e51b8152600401610d079190615534565b50805460008255600302906000526020600020908101906136d891905b80821115613ed25760008082556001820181905560028201556003016154a6565b6001600160a01b03811681146136d857600080fd5b600080604083850312156154ef57600080fd5b82356154fa816154c7565b946020939093013593505050565b60005b8381101561552357818101518382015260200161550b565b838111156116b55750506000910152565b6020815260008251806020840152615553816040850160208701615508565b601f01601f19169190910160400192915050565b60006020828403121561557957600080fd5b813561187d816154c7565b60008060006060848603121561559957600080fd5b83356155a4816154c7565b95602085013595506040909401359392505050565b80151581146136d857600080fd5b600080604083850312156155da57600080fd5b82356155e5816154c7565b915060208301356155f5816155b9565b809150509250929050565b60008060006040848603121561561557600080fd5b83356001600160401b038082111561562c57600080fd5b818601915086601f83011261564057600080fd5b81358181111561564f57600080fd5b8760208260051b850101111561566457600080fd5b6020928301955093505084013561567a816155b9565b809150509250925092565b60006020828403121561569757600080fd5b813561187d816155b9565b6001600160a01b0391909116815260200190565b600080604083850312156156c957600080fd5b50508035926020909101359150565b6000602082840312156156ea57600080fd5b5035919050565b80356001600160401b038116811461570857600080fd5b919050565b6000806000806080858703121561572357600080fd5b61572c856156f1565b935061573a602086016156f1565b9250604085013561574a816154c7565b9150606085013561575a816154c7565b939692955090935050565b60008060006060848603121561577a57600080fd5b8335615785816154c7565b92506020840135615795816155b9565b9150604084013564ffffffffff8116811461567a57600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600b908201526a10903232b632b3b0ba37b960a91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001600160681b038381169083168181101561583f5761583f615809565b039392505050565b600181811c9082168061585b57607f821691505b6020821081141561275457634e487b7160e01b600052602260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000828210156158c5576158c5615809565b500390565b602080825260089082015267546f6f206c61746560c01b604082015260600190565b6020808252601490820152732737903637b1b59037b7103232b632b3b0ba37b960611b604082015260600190565b60208082526016908201527511195b1959d85d1bdc881b1bd8dac8195e1c1a5c995960521b604082015260600190565b60006001600160681b0382811684821680830382111561596c5761596c615809565b01949350505050565b6001600160801b0392909216825265ffffffffffff16602082015260400190565b6020808252600b908201526a084818d85ad9481c1bdbdb60aa1b604082015260600190565b60208082526010908201526f3130b2102fb13637b1b5a73ab6b132b960811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615a0f57615a0f615809565b5060010190565b6020808252600b908201526a1098590817d85b5bdd5b9d60aa1b604082015260600190565b6020808252600d908201526c139bc81b1bd8dac8199bdd5b99609a1b604082015260600190565b6020808252600c908201526b131bd8dac8195e1c1a5c995960a21b604082015260600190565b918252602082015260400190565b6020808252600b908201526a0848195bd8481bdc881ddb60aa1b604082015260600190565b60008219821115615ace57615ace615809565b500190565b6020808252600d908201526c08481a5b9a5d1a585b1a5e9959609a1b604082015260600190565b60008060008060008060008060006101208a8c031215615b1957600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a0151615b55816155b9565b809250506101008a015190509295985092959850929598565b60208082526010908201526f105b1c9958591e481b5a59dc985d195960821b604082015260600190565b600060208284031215615baa57600080fd5b5051919050565b6000816000190483118215151615615bcb57615bcb615809565b500290565b634e487b7160e01b600052601260045260246000fd5b600082615bf557615bf5615bd0565b500490565b600060208284031215615c0c57600080fd5b815161187d816154c7565b602080825260069082015265119bdc989a5960d21b604082015260600190565b602080825260199082015278416c726561647920656d657267656e6379576974686472617760381b604082015260600190565b6001600160a01b03929092168252602082015260400190565b6000600f82810b9084900b828212801560016001607f1b0384900383131615615cae57615cae615809565b60016001607f1b03198390038212811615615ccb57615ccb615809565b50019392505050565b6000600f82810b9084900b60016001607f1b0383821384841380821684840486111615615d0357615d03615809565b60016001607f1b03196000851282811687830587121615615d2657615d26615809565b60008712925085820587128484161615615d4257615d42615809565b85850587128184161615615d5857615d58615809565b5050509290910295945050505050565b6000600f82810b9084900b828112801560016001607f1b0319830184121615615d9357615d93615809565b60016001607f1b0382018313811615615dae57615dae615809565b5090039392505050565b600081600f0b83600f0b80615dcf57615dcf615bd0565b60016001607f1b0319821460001982141615615ded57615ded615809565b90059392505050565b600060208284031215615e0857600080fd5b815161187d816155b9565b60008251615e25818460208701615508565b919091019291505056fed7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5d7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb75e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5cd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb67a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96a2646970667358221220301f95691f879c2ef77a5e58603636a30799566c9704a30f58d866f1852ed1ba64736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/test/artifactsFile/VECakeTest.json b/projects/vecake/test/artifactsFile/VECakeTest.json new file mode 100644 index 00000000..bac2900d --- /dev/null +++ b/projects/vecake/test/artifactsFile/VECakeTest.json @@ -0,0 +1,1998 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VECakeTest", + "sourceName": "contracts/test/VECakeTest.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ICakePool", + "name": "_cakePool", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IProxyForCakePoolFactory", + "name": "_ProxyForCakePoolFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "DelegateFromCakePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lockTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "penalty", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "EarlyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InjectToDelegator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "MigrateFromCakePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "endTime", + "type": "uint256" + } + ], + "name": "MigrationConvertToDelegation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "farmBooster", + "type": "address" + } + ], + "name": "NewFarmBooster", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Redistribute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "previousBreaker", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "breaker", + "type": "uint256" + } + ], + "name": "SetBreaker", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "oldEarlyWithdrawFeeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newEarlyWithdrawFeeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "oldRedistributeBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newRedistribiteBps", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldTreasuryAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasuryAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldRedistributeAddr", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newRedistributeAddr", + "type": "address" + } + ], + "name": "SetEarlyWithdrawConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetEarlyWithdrawSwitch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetEmergencyWithdrawSwitch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "SetLimitTimeOfConvert", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "newValue", + "type": "bool" + } + ], + "name": "SetNoPenaltyForEarlyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "SetWhitelistedCaller", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "SetWhitelistedRedistributors", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "previousSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supply", + "type": "uint256" + } + ], + "name": "Supply", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isDelegator", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint40", + "name": "limitTimestampForEarlyWithdraw", + "type": "uint40" + } + ], + "name": "UpdateDelegator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "locker", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "WithdrawAll", + "type": "event" + }, + { + "inputs": [], + "name": "ACTION_CREATE_LOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_DEPOSIT_FOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_INCREASE_LOCK_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ACTION_INCREASE_UNLOCK_TIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CakePool", + "outputs": [ + { + "internalType": "contract ICakePool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DELEGATION_FROM_CAKE_POOL_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DELEGATOR_FLAG", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FarmBooster", + "outputs": [ + { + "internalType": "contract IFarmBooster", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_LOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIGRATION_FROM_CAKE_POOL_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NOT_DELEGATOR_FLAG", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NOT_WITHDRAW_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ProxyForCakePoolFactory", + "outputs": [ + { + "internalType": "contract IProxyForCakePoolFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WEEK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WITHDREW_FLAG", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accumRedistribute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAtForProxy", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "balanceOfAtTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "balanceOfAtUser", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOfForProxy", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "balanceOfUser", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "breaker", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpoint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "name": "createLockForProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + } + ], + "name": "delegateFromCakePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegator", + "outputs": [ + { + "internalType": "uint104", + "name": "delegatedCakeAmount", + "type": "uint104" + }, + { + "internalType": "uint104", + "name": "notInjectedCakeAmount", + "type": "uint104" + }, + { + "internalType": "uint40", + "name": "limitTimestampForEarlyWithdraw", + "type": "uint40" + }, + { + "internalType": "uint8", + "name": "isDelegator", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockDuration", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_for", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "depositFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "earlyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "earlyWithdrawBpsPerWeek", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "earlyWithdrawSwitch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdrawSwitch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "everEmergencyWithdraw", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getUserInfo", + "outputs": [ + { + "internalType": "int128", + "name": "amount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + }, + { + "internalType": "address", + "name": "cakePoolProxy", + "type": "address" + }, + { + "internalType": "uint128", + "name": "cakeAmount", + "type": "uint128" + }, + { + "internalType": "uint48", + "name": "lockEndTime", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "migrationTime", + "type": "uint48" + }, + { + "internalType": "uint16", + "name": "cakePoolType", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "withdrawFlag", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "increaseLockAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newUnlockTime", + "type": "uint256" + } + ], + "name": "increaseUnlockTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialization", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initializeCakePoolMigration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "injectToDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isCakePoolProxy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "limitTimeOfConvert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "locks", + "outputs": [ + { + "internalType": "int128", + "name": "amount", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFromCakePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + } + ], + "name": "migrationConvertToDelegation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "noPenaltyForEarlyWithdraw", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redistribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "redistributeAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redistributeBps", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_breaker", + "type": "uint256" + } + ], + "name": "setBreaker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "_newEarlyWithdrawBpsPerWeek", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "_newRedistributeBps", + "type": "uint64" + }, + { + "internalType": "address", + "name": "_newTreasuryAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_newRedistributeAddr", + "type": "address" + } + ], + "name": "setEarlyWithdrawConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_earlyWithdrawSwitch", + "type": "bool" + } + ], + "name": "setEarlyWithdrawSwitch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_emergencyWithdrawSwitch", + "type": "bool" + } + ], + "name": "setEmergencyWithdrawSwitch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_farmBooster", + "type": "address" + } + ], + "name": "setFarmBooster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_limitTime", + "type": "uint256" + } + ], + "name": "setLimitTimeOfConvert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_status", + "type": "bool" + } + ], + "name": "setNoPenaltyForEarlyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "callers", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "setWhitelistedCallers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "callers", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "ok", + "type": "bool" + } + ], + "name": "setWhitelistedRedistributors", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "slopeChanges", + "outputs": [ + { + "internalType": "int128", + "name": "", + "type": "int128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "supply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blockNumber", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "totalSupplyAtTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isDelegator", + "type": "bool" + }, + { + "internalType": "uint40", + "name": "_limitTimestampForEarlyWithdraw", + "type": "uint40" + } + ], + "name": "updateDelegator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ + { + "internalType": "address", + "name": "cakePoolProxy", + "type": "address" + }, + { + "internalType": "uint128", + "name": "cakeAmount", + "type": "uint128" + }, + { + "internalType": "uint48", + "name": "lockEndTime", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "migrationTime", + "type": "uint48" + }, + { + "internalType": "uint16", + "name": "cakePoolType", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "withdrawFlag", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userPointEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "userPointHistory", + "outputs": [ + { + "internalType": "int128", + "name": "bias", + "type": "int128" + }, + { + "internalType": "int128", + "name": "slope", + "type": "int128" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedCallers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedRedistributors", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60e0604052621275006004553480156200001857600080fd5b5060405162006380380380620063808339810160408190526200003b91620002b8565b6200004633620001a9565b60018080556001600160a01b0380851660a052838116608090815290831660c05260408051918201815260008083526020838101828152428585019081524360608701908152600d80549889018155909452945190516001600160801b03908116600160801b0291161760039095027fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb581019590955592517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb6850155517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb7909301929092556014805460ff19166012908117909155825180840190935280835271566f74652d657363726f7765642043616b6560701b929091019182526200016f9181620001f9565b5060408051808201909152600680825265766543616b6560d01b60209092019182526200019f91601391620001f9565b5050505062000349565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805462000207906200030c565b90600052602060002090601f0160209004810192826200022b576000855562000276565b82601f106200024657805160ff191683800117855562000276565b8280016001018555821562000276579182015b828111156200027657825182559160200191906001019062000259565b506200028492915062000288565b5090565b5b8082111562000284576000815560010162000289565b6001600160a01b0381168114620002b557600080fd5b50565b600080600060608486031215620002ce57600080fd5b8351620002db816200029f565b6020850151909350620002ee816200029f565b604085015190925062000301816200029f565b809150509250925092565b600181811c908216806200032157607f821691505b602082108114156200034357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c051615f97620003e960003960008181610a3201526120a9015260008181610ae90152818161139501528181611c6c01528181611e5701528181611f7d01528181611ff301528181612e9601528181612fb401528181613032015261338a015260008181610c9301528181610dd10152818161261701528181613a4101528181613d0101528181613e1601526141e60152615f976000f3fe608060405234801561001057600080fd5b50600436106103d65760003560e01c8063705096c711610208578063705096c71461099657806370a08231146109a9578063715018a6146109bc57806375cd6c67146109c45780637c5acb25146109d75780637c616fe6146109fa57806381fc83bb14610a0d578063827e8e0c14610a2d5780638ad4c44714610a545780638da5cb5b14610a675780638e90053014610a6f578063900cf0cf14610a7757806395d89b4114610a80578063981b24d014610a885780639c490f191461042b5780639d4b4ba114610a9b578063a621440414610aae578063a63dce7114610ab6578063a7ccf1e014610abe578063a88a885514610ad1578063aa94ab5914610ae4578063b52c05fe14610b0b578063b6bbbcd114610b1e578063b6e45a4e14610b38578063c0dd84bd14610b45578063c12ebb5f14610b68578063c172085e14610b7b578063c1d1192914610b8f578063c2c4c5c114610b98578063cfee396f14610ba0578063d2dcd93314610bb4578063d4eda63f14610bc7578063d73f98a314610bea578063db2e21bc14610bfd578063ec5570d014610c05578063f2c7a81b14610c18578063f2fde38b14610c20578063f4359ce514610c33578063f52a36f714610c3d578063fa09e63014610c73578063fb489a7b14610c86578063fc0c546a14610c8e578063ffc97ce914610cb557600080fd5b8062b79fd4146103db57806302641632146103f6578063047fc9aa146103fe578063052b726f14610407578063059f8b161461041c57806306a4da7e1461042b57806306fdde031461044657806308154df01461045b57806308c3dea7146104635780630a6373b31461046c5780630efe6a8b1461047f5780630f41e0d21461049257806312c470e91461049b57806312cae7af146104ae57806318160ddd146104c157806319577c6e146104c95780631959a002146104dc5780631bb8c61d1461059d5780632ea1fe7a146105b05780632f4f21e2146105c35780633037408d146105d657806330d9a62a146105e9578063313ce5671461060957806334d901a41461062857806336a5839114610663578063399f3a4f146106935780633d5c78bd146106a6578063403f4447146106b95780634ee2cd7e146106cc57806351cff8d9146106df578063539e5082146106f257806355ed0a781461077c57806358fca6a514610784578063598085ae1461078c5780635de9a1371461079f5780635e8bb48e146107e75780636386c1c71461081a5780636574deb71461094d5780636582a8c01461096057806365a5d5f01461097357806365f9008a1461097b57806367e7a7cb1461098e575b600080fd5b6103e3600081565b6040519081526020015b60405180910390f35b6103e3600381565b6103e360025481565b61041a61041536600461556e565b610cd8565b005b6103e3670de0b6b3a764000081565b610433600181565b60405161ffff90911681526020016103ed565b61044e610e4e565b6040516103ed91906155c6565b610433600081565b6103e360155481565b61041a61047a3660046155f9565b610edc565b61041a61048d366004615616565b61138a565b6103e360115481565b6103e36104a936600461556e565b61146a565b6103e36104bc3660046155f9565b611536565b6103e3611542565b61041a6104d7366004615659565b6115b2565b61054b6104ea3660046155f9565b600860205260009081526040902080546001909101546001600160a01b03909116906001600160801b0381169065ffffffffffff600160801b8204811691600160b01b81049091169061ffff600160e01b8204811691600160f01b90041686565b604080516001600160a01b0390971687526001600160801b03909516602087015265ffffffffffff938416948601949094529116606084015261ffff90811660808401521660a082015260c0016103ed565b61041a6105ab366004615692565b611638565b61041a6105be366004615717565b61174d565b61041a6105d136600461556e565b6117c6565b6103e36105e436600461556e565b611903565b6016546105fc906001600160a01b031681565b6040516103ed9190615734565b6014546106169060ff1681565b60405160ff90911681526020016103ed565b61063b61063636600461556e565b611916565b60408051600f95860b81529390940b60208401529282015260608101919091526080016103ed565b60145461067b9061010090046001600160401b031681565b6040516001600160401b0390911681526020016103ed565b61041a6106a1366004615748565b611966565b61041a6106b436600461576a565b6119bd565b61041a6106c736600461576a565b611a79565b6103e36106da36600461556e565b611b87565b61041a6106ed3660046155f9565b611c61565b6107426107003660046155f9565b6009602052600090815260409020546001600160681b0380821691600160681b810490911690600160d01b810464ffffffffff1690600160f81b900460ff1684565b604080516001600160681b03958616815294909316602085015264ffffffffff9091169183019190915260ff1660608201526080016103ed565b61041a611dff565b610433600281565b61041a61079a366004615717565b61226a565b6107cd6107ad3660046155f9565b60076020526000908152604090208054600190910154600f9190910b9082565b60408051600f9390930b83526020830191909152016103ed565b61080a6107f53660046155f9565b600b6020526000908152604090205460ff1681565b60405190151581526020016103ed565b6108e86108283660046155f9565b6001600160a01b039081166000818152600760209081526040808320815180830183528154600f0b81526001918201548185019081529585526008845293829020825160c08101845281549097168088529101546001600160801b03811693870184905265ffffffffffff600160801b82048116938801849052600160b01b8204166060880181905261ffff600160e01b8304811660808a01819052600160f01b9093041660a09098018890529451955195979596919593949293909190565b60408051600f9990990b895260208901979097526001600160a01b03909516958701959095526001600160801b03909216606086015265ffffffffffff90811660808601521660a084015261ffff91821660c08401521660e0820152610100016103ed565b61041a61095b36600461556e565b6122e8565b6017546105fc906001600160a01b031681565b6103e36126a7565b6003546105fc906001600160a01b031681565b6103e3600181565b61041a6109a436600461576a565b6126c4565b6103e36109b73660046155f9565b61272a565b61041a6127ec565b61041a6109d236600461579f565b612827565b61080a6109e53660046155f9565b60196020526000908152604090205460ff1681565b61041a610a0836600461576a565b6129f3565b6103e3610a1b3660046155f9565b600f6020526000908152604090205481565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61063b610a6236600461576a565b612ba0565b6105fc612be4565b610616600081565b6103e3600c5481565b61044e612bf3565b6103e3610a9636600461576a565b612c00565b61041a610aa93660046155f9565b612dfb565b61041a613307565b610616600181565b61041a610acc3660046155f9565b613466565b6103e3610adf3660046155f9565b61352e565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61041a610b19366004615748565b6135cc565b60145461067b90600160481b90046001600160401b031681565b60055461080a9060ff1681565b61080a610b533660046155f9565b600a6020526000908152604090205460ff1681565b61041a610b76366004615692565b613634565b60035461080a90600160a01b900460ff1681565b6103e360045481565b61041a613749565b60175461080a90600160a01b900460ff1681565b6103e3610bc236600461576a565b61376d565b61080a610bd53660046155f9565b60066020526000908152604090205460ff1681565b61041a610bf83660046157f7565b6137d8565b61041a6138b7565b6103e3610c1336600461556e565b613aad565b6103e3600281565b61041a610c2e3660046155f9565b613ab9565b6103e362093a8081565b610c60610c4b36600461576a565b601060205260009081526040902054600f0b81565b604051600f9190910b81526020016103ed565b61041a610c813660046155f9565b613b56565b61041a613d7f565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61080a610cc33660046155f9565b60186020526000908152604090205460ff1681565b33610ce1612be4565b6001600160a01b031614610d105760405162461bcd60e51b8152600401610d0790615841565b60405180910390fd5b6001600160a01b03821660009081526009602052604090208054600160f81b900460ff16600114610d535760405162461bcd60e51b8152600401610d0790615876565b8054600160681b90046001600160681b0316821115610d81578054600160681b90046001600160681b031691505b805482908290600d90610da5908490600160681b90046001600160681b03166158b1565b92506101000a8154816001600160681b0302191690836001600160681b03160217905550610e093330847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613e8d909392919063ffffffff16565b6040518281526001600160a01b0384169033907f7b85c81b5ab23faed50cf05b116ebb10456ca6320721e00b6513babed009b9e29060200160405180910390a3505050565b60128054610e5b906158d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e87906158d9565b8015610ed45780601f10610ea957610100808354040283529160200191610ed4565b820191906000526020600020905b815481529060010190602001808311610eb757829003601f168201915b505050505081565b60026001541415610eff5760405162461bcd60e51b8152600401610d079061590e565b600260019081556001600160a01b038216600090815260096020526040902080549091600160f81b90910460ff1614610f4a5760405162461bcd60e51b8152600401610d0790615876565b3360009081526008602052604081206001810154909190610f7990600160801b900465ffffffffffff16613ef8565b9050428111610fbe5760405162461bcd60e51b8152602060048201526011602482015270155cd95c881b1bd8dac8195e1c1a5c9959607a1b6044820152606401610d07565b600454610fcb9042615945565b6001830154600160b01b900465ffffffffffff1611610ffc5760405162461bcd60e51b8152600401610d079061595c565b600182810154600160e01b900461ffff16146110475760405162461bcd60e51b815260206004820152600a60248201526908481b5a59dc985d195960b21b6044820152606401610d07565b6001820154600160f01b900461ffff16156110975760405162461bcd60e51b815260206004820152601060248201526f416c726561647920776974686472617760801b6044820152606401610d07565b6001828101805461ffff60e01b1916600160e11b17905582546001600160a01b0316600090815260076020908152604080832081518083019092528054600f0b80835294015491810191909152916110ee90613f12565b8454909150611107906001600160a01b03168383613f68565b6040805180820182526001600160a01b0388166000818152600760208181529482208054600f90810b865293835290855260010154938301939093528151919291900b136111675760405162461bcd60e51b8152600401610d079061597e565b4281602001511161118a5760405162461bcd60e51b8152600401610d07906159ac565b6001808601546111ac9189916001600160801b03169060009085908290614128565b600185015486546001600160801b039091169087906000906111d89084906001600160681b03166159dc565b82546101009290920a6001600160681b03818102199093169183160217909155600187015488546001600160801b0390911692508891600d91611224918591600160681b9004166159dc565b82546101009290920a6001600160681b0381810219909316919092169190910217905550600185015460405162c2c90f60e11b81523360048201526001600160801b0382166024820152600160801b90910465ffffffffffff1660448201526001600160a01b03881690630185921e90606401600060405180830381600087803b1580156112b157600080fd5b505af11580156112c5573d6000803e3d6000fd5b5050505060018501546040516001600160a01b038916913391600080516020615f4283398151915291611312916001600160801b03821691600160801b900465ffffffffffff1690615a07565b60405180910390a360018501546040516001600160a01b0389169133917f4af697c81385693e6ee5d15ccb781170dc8241f81c4983bf87cdf268d2fca5f591611375916001600160801b03821691600160801b900465ffffffffffff1690615a07565b60405180910390a35050600180555050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113d25760405162461bcd60e51b8152600401610d0790615a28565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a08301521561146457600080fd5b50505050565b60004382111561148c5760405162461bcd60e51b8152600401610d0790615a4d565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a08301521561152e5780516115269084614339565b915050611530565b505b92915050565b600061153082426145b5565b60006115ad600d600c548154811061155c5761155c615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b938301939093526001830154908201526002909101546060820152426146a9565b905090565b336115bb612be4565b6001600160a01b0316146115e15760405162461bcd60e51b8152600401610d0790615841565b6001600160a01b0382166000818152600b6020526040808220805460ff1916851515908117909155905190929133917f4f4d55f3b98fe4b3fbc9fb5e8ed05483cc8d794638edd690545eb5779e234a499190a45050565b33611641612be4565b6001600160a01b0316146116675760405162461bcd60e51b8152600401610d0790615841565b60005b8281101561146457816018600086868581811061168957611689615a77565b905060200201602081019061169e91906155f9565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106116d8576116d8615a77565b90506020020160208101906116ed91906155f9565b6001600160a01b0316336001600160a01b03167fdfad9b83c215ff1a36483cf1688e5aeae2ac60f1c3f62f5229641234748f13b784604051611733911515815260200190565b60405180910390a38061174581615a8d565b91505061166a565b33611756612be4565b6001600160a01b03161461177c5760405162461bcd60e51b8152600401610d0790615841565b6005805460ff191682151590811790915560405190815233907f539ba344188cde95583cd695fe9a73d66f53c83a48e3d66e5b42a12650d93ecc906020015b60405180910390a250565b600260015414156117e95760405162461bcd60e51b8152600401610d079061590e565b60026001556001600160a01b0382166000908152600a602052604090205460ff16156118495760405162461bcd60e51b815260206004820152600f60248201526e496e636f72726563742070726f787960881b6044820152606401610d07565b6040805180820182526001600160a01b0384166000818152600760208181529482208054600f0b85529290915283526001015491810191909152816118a05760405162461bcd60e51b8152600401610d0790615aa8565b60008160000151600f0b136118c75760405162461bcd60e51b8152600401610d0790615acd565b428160200151116118ea5760405162461bcd60e51b8152600401610d0790615af4565b6118fa8383600084600080614128565b50506001805550565b600061190f83836145b5565b9392505050565b600e602052816000526040600020818154811061193257600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9550600160801b90920490910b925084565b336000908152600a602052604090205460ff166119af5760405162461bcd60e51b8152602060048201526007602482015266212070726f787960c81b6044820152606401610d07565b6119b98282614798565b5050565b336119c6612be4565b6001600160a01b0316146119ec5760405162461bcd60e51b8152600401610d0790615841565b8015806119f95750806001145b611a335760405162461bcd60e51b815260206004820152600b60248201526a4f6e6c792030206f72203160a81b6044820152606401610d07565b60118054908290556040517f5238fc635590cf5e76ed0f591df4d7f3021d20f58e6d3405390197dd72a575fe90611a6d9083908590615b1a565b60405180910390a15050565b3360009081526018602052604090205460ff16611aaf57333214611aaf5760405162461bcd60e51b8152600401610d0790615b28565b60026001541415611ad25760405162461bcd60e51b8152600401610d079061590e565b60026001908155604080518082018252336000818152600760208181529482208054600f0b8552929091528352909201549082015281611b245760405162461bcd60e51b8152600401610d0790615aa8565b60008160000151600f0b13611b4b5760405162461bcd60e51b8152600401610d0790615acd565b42816020015111611b6e5760405162461bcd60e51b8152600401610d0790615af4565b611b7f338360008460026000614128565b505060018055565b600043821115611ba95760405162461bcd60e51b8152600401610d0790615a4d565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a083015215611c57578051611c439084614339565b611c4d8585614339565b6115269190615b4d565b6115268484614339565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611ca95760405162461bcd60e51b8152600401610d0790615a28565b6001600160a01b03808216600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a083015260021415611d3e57600080fd5b80516001600160a01b031615801590611d5f5750608081015161ffff166001145b8015611d71575060a081015161ffff16155b156119b95780600001516001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611db557600080fd5b505af1158015611dc9573d6000803e3d6000fd5b5050506001600160a01b038316600090815260086020526040902060010180546001600160f01b0316600160f01b179055505050565b60026001541415611e225760405162461bcd60e51b8152600401610d079061590e565b6002600155600354600160a01b900460ff16611e505760405162461bcd60e51b8152600401610d0790615b65565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401611ea19190615734565b61012060405180830381865afa158015611ebf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee39190615b8c565b505096509650505050509250428211611f0e5760405162461bcd60e51b8152600401610d0790615af4565b3360009081526008602052604090206001810154600160e01b900461ffff1615611f4a5760405162461bcd60e51b8152600401610d0790615c00565b60018101805461ffff60e01b1916600160e01b17905560408051633a98ef3960e01b815290516000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691633a98ef39916004808201926020929091908290030181865afa158015611fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fed9190615c2a565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561204f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120739190615c2a565b9050600060018584612085858b615c43565b61208f9190615c78565b6120999190615945565b6120a39190615945565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634c96a389336040518263ffffffff1660e01b81526004016120f39190615734565b6020604051808303816000875af1158015612112573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121369190615c8c565b6001600160a01b0381166000818152600a602052604090819020805460ff1916600190811790915588546001600160a01b031916831789558801805465ffffffffffff8c8116600160801b026001600160b01b03194292909216600160b01b02919091166001600160e01b0319909216919091176001600160801b038816171790555163399f3a4f60e01b81529192509063399f3a4f906121dd9085908b90600401615b1a565b600060405180830381600087803b1580156121f757600080fd5b505af115801561220b573d6000803e3d6000fd5b50505050806001600160a01b0316336001600160a01b03167f8519b84e949c6333da21ddea64e2c29ef66709e465ec9b0f24fb32eb2c003843848a604051612254929190615b1a565b60405180910390a3505060018055505050505050565b33612273612be4565b6001600160a01b0316146122995760405162461bcd60e51b8152600401610d0790615841565b60178054821515600160a01b0260ff60a01b1990911617905560405133907fdcc751463da04455ac459756e92d5ea118dd0dd631422cbf8353132417a52d9f906117bb90841515815260200190565b6002600154141561230b5760405162461bcd60e51b8152600401610d079061590e565b6002600155601754600160a01b900460ff166123395760405162461bcd60e51b8152600401610d0790615ca9565b6001600160a01b03821661234b573391505b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152816123925760405162461bcd60e51b8152600401610d0790615aa8565b806020015142106123b55760405162461bcd60e51b8152600401610d079061595c565b601154156123d55760405162461bcd60e51b8152600401610d0790615ca9565b33600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b82041692820192909252600160d01b820464ffffffffff1692810192909252600160f81b900460ff1660608201819052600114156125075742816040015164ffffffffff161061248d5760405162461bcd60e51b8152602060048201526014602482015273466f72626964206561726c79576974686472617760601b6044820152606401610d07565b600061249f8360000151600f0b613f12565b60208301519091506001600160681b03166124ba8583615945565b10156125055760405162461bcd60e51b815260206004820152601a60248201527911195b1959d85d1bdc8818985b185b98d948195e18d95959195960321b6044820152606401610d07565b505b6020820151612517338486613f68565b336000908152600b602052604081205460ff16158015612546575060145461010090046001600160401b031615155b1561264157600062093a804261255c8286615b4d565b6125669190615945565b6125709190615c78565b60145490915061271090879061259590849061010090046001600160401b0316615c43565b61259f9190615c43565b6125a99190615c78565b601454909250600090612710906125d090600160481b90046001600160401b031685615c43565b6125da9190615c78565b905080601560008282546125ee9190615b4d565b909155505060165461263e906001600160a01b031661260d8386615945565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190614938565b50505b61264f8661260d8388615945565b6040805186815260208101839052428183015290516001600160a01b0388169133917f08b526d7537cea7e5a629eb0495b5932c78911fd0bdeb02b822d69a6e25792549181900360600190a350506001805550505050565b60016126b762093a8060d1615c43565b6126c19190615945565b81565b336126cd612be4565b6001600160a01b0316146126f35760405162461bcd60e51b8152600401610d0790615841565b600481905560405181815233907fde15bb8e73a1f43abe6021a8ad5a5d79caf815a4d74e6dbd7d88cd57f06fdd89906020016117bb565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a0840152909190156127dc5780516127c890426145b5565b6127d284426145b5565b61190f9190615b4d565b61190f83426145b5565b50919050565b336127f5612be4565b6001600160a01b03161461281b5760405162461bcd60e51b8152600401610d0790615841565b6128256000614957565b565b33612830612be4565b6001600160a01b0316146128565760405162461bcd60e51b8152600401610d0790615841565b60c0846001600160401b0316111561289f5760405162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606401610d07565b612710836001600160401b031611156128e95760405162461bcd60e51b815260206004820152600c60248201526b0c4e0e640e8dede40d0d2ced60a31b6044820152606401610d07565b601480546001600160401b03858116600160481b818102600160481b600160881b03198a8516610100818102928316610100600160881b031989161793909317909755601680546001600160a01b038b81166001600160a01b03198084168217909455601780548d8416958116861790915560408051888d048c16808252602082019e909e52610100600160481b0319909c1690961797909704909816938901849052606089019690965285166080880181905260a08801969096529290931660c0860181905260e08601929092529193909133917f3de6c016cd3debec574d13c9966e6c847e64ac424da0b1eb70d3c93b68ec0537910160405180910390a25050505050505050565b3360009081526018602052604090205460ff16612a2957333214612a295760405162461bcd60e51b8152600401610d0790615b28565b60026001541415612a4c5760405162461bcd60e51b8152600401610d079061590e565b60026001908155604080518082018252336000818152600760208181529482208054600f0b85529290915283529092015490820152612a8a82613ef8565b915060008160000151600f0b13612ab35760405162461bcd60e51b8152600401610d0790615acd565b42816020015111612ad65760405162461bcd60e51b8152600401610d0790615af4565b80602001518211612b225760405162461bcd60e51b815260206004820152601660248201527517db995dd55b9b1bd8dad51a5b59481d1bdbc81bdb1960521b6044820152606401610d07565b6001612b3262093a8060d1615c43565b612b3c9190615945565b612b469042615b4d565b821115612b8f5760405162461bcd60e51b81526020600482015260176024820152765f6e6577556e6c6f636b54696d6520746f6f206c6f6e6760481b6044820152606401610d07565b611b7f336000848460036000614128565b600d8181548110612bb057600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9450600160801b90920490910b919084565b6000546001600160a01b031690565b60138054610e5b906158d9565b600043821115612c455760405162461bcd60e51b815260206004820152601060248201526f2130b2102fb13637b1b5a73ab6b132b960811b6044820152606401610d07565b600c546000612c5484836149a7565b90506000600d8281548110612c6b57612c6b615a77565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915083831015612d89576000600d612ccc856001615b4d565b81548110612cdc57612cdc615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905285015191925014612d835782606001518160600151612d499190615945565b83604001518260400151612d5d9190615945565b6060850151612d6c908a615945565b612d769190615c43565b612d809190615c78565b91505b50612dd8565b43826060015114612dd8576060820151612da39043615945565b6040830151612db29042615945565b6060840151612dc19089615945565b612dcb9190615c43565b612dd59190615c78565b90505b612df182828460400151612dec9190615b4d565b6146a9565b9695505050505050565b60026001541415612e1e5760405162461bcd60e51b8152600401610d079061590e565b6002600155600354600160a01b900460ff16612e4c5760405162461bcd60e51b8152600401610d0790615b65565b6001600160a01b03811660009081526009602052604090208054600160f81b900460ff16600114612e8f5760405162461bcd60e51b8152600401610d0790615876565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401612ee09190615734565b61012060405180830381865afa158015612efe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f229190615b8c565b505096509650505050509250428211612f4d5760405162461bcd60e51b8152600401610d0790615af4565b3360009081526008602052604090206001810154600160e01b900461ffff1615612f895760405162461bcd60e51b8152600401610d0790615c00565b60018101805461ffff60e01b1916600160e11b17905560408051633a98ef3960e01b815290516000917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691633a98ef39916004808201926020929091908290030181865afa158015613008573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061302c9190615c2a565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561308e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130b29190615c2a565b90506000600185846130c4858b615c43565b6130ce9190615c78565b6130d89190615945565b6130e29190615945565b600185810180546001600160b01b031916600160801b65ffffffffffff8b16026001600160801b031916176001600160801b0384161790556040805180820182526001600160a01b038d166000818152600760208181529482208054600f0b85529290915283529092015490820152909150816131715760405162461bcd60e51b8152600401610d0790615aa8565b60008160000151600f0b136131985760405162461bcd60e51b8152600401610d079061597e565b428160200151116131bb5760405162461bcd60e51b8152600401610d07906159ac565b6131cc8a8360008460006001614128565b885482908a906000906131e99084906001600160681b03166159dc565b92506101000a8154816001600160681b0302191690836001600160681b031602179055508189600001600d8282829054906101000a90046001600160681b031661323391906159dc565b82546001600160681b039182166101009390930a92830291909202199091161790555060405162c2c90f60e11b815233600482015260248101839052604481018890526001600160a01b038b1690630185921e90606401600060405180830381600087803b1580156132a457600080fd5b505af11580156132b8573d6000803e3d6000fd5b50505050896001600160a01b0316336001600160a01b0316600080516020615f42833981519152848a6040516132ef929190615b1a565b60405180910390a35050600180555050505050505050565b33613310612be4565b6001600160a01b0316146133365760405162461bcd60e51b8152600401610d0790615841565b600354600160a01b900460ff16156133865760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610d07565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632d19b9826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061340a9190615c8c565b90506001600160a01b03811630146134505760405162461bcd60e51b8152602060048201526009602482015268426164205643616b6560b81b6044820152606401610d07565b506003805460ff60a01b1916600160a01b179055565b3361346f612be4565b6001600160a01b0316146134955760405162461bcd60e51b8152600401610d0790615841565b6001600160a01b0381166134e45760405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606401610d07565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fd1879d19b7e07327f8e491d8c5e05a4048155b7ee8f97f61e2b2233ae0e3a88890600090a250565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a0840152909190156127e657805161190f90426145b5565b3360009081526018602052604090205460ff16613602573332146136025760405162461bcd60e51b8152600401610d0790615b28565b600260015414156136255760405162461bcd60e51b8152600401610d079061590e565b6002600155611b7f8282614798565b3361363d612be4565b6001600160a01b0316146136635760405162461bcd60e51b8152600401610d0790615841565b60005b8281101561146457816019600086868581811061368557613685615a77565b905060200201602081019061369a91906155f9565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106136d4576136d4615a77565b90506020020160208101906136e991906155f9565b6001600160a01b0316336001600160a01b03167f0c5e5180b1be108ebc3c1c5939cd6b59ca30067d07c5405f94304bf603c621428460405161372f911515815260200190565b60405180910390a38061374181615a8d565b915050613666565b6040805180820190915260008082526020820181905261376a908280614a45565b50565b6000611530600d600c548154811061378757613787615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b938301939093526001830154908201526002909101546060820152836146a9565b336137e1612be4565b6001600160a01b0316146138075760405162461bcd60e51b8152600401610d0790615841565b6001600160a01b03831660009081526009602052604090208261382b57600061382e565b60015b81546001600160d01b0316600160f81b60ff929092169190910264ffffffffff60d01b191617600160d01b64ffffffffff841690810291909117825560408051851515815260208101929092526001600160a01b038616917f3fd4b992bc54a5edaa3b29f337c4048b314667d454123fbd81b327aaeea7df67910160405180910390a250505050565b600260015414156138da5760405162461bcd60e51b8152600401610d079061590e565b600260015560055460ff1661392d5760405162461bcd60e51b8152602060048201526019602482015278466f7262696420656d657267656e637920776974686472617760381b6044820152606401610d07565b3360009081526006602052604090205460ff161561395d5760405162461bcd60e51b8152600401610d0790615cc9565b336000908152600660209081526040808320805460ff191660019081179091556007835281842082518084019093528054600f0b8084529101549282019290925291126139df5760405162461bcd60e51b815260206004820152601060248201526f139bc81b1bd8dad95908185b5bdd5b9d60821b6044820152606401610d07565b60006139f18260000151600f0b613f12565b33600090815260076020908152604080832080546001600160801b0319168155600101839055600e9091528120919250613a2b919061551b565b336000818152600f6020526040812055613a70907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083614938565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505060018055565b600061190f8383614339565b33613ac2612be4565b6001600160a01b031614613ae85760405162461bcd60e51b8152600401610d0790615841565b6001600160a01b038116613b4d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d07565b61376a81614957565b60026001541415613b795760405162461bcd60e51b8152600401610d079061590e565b600260015533600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b820416928201839052600160d01b810464ffffffffff1693820193909352600160f81b90920460ff16606083015215613c345760405162461bcd60e51b8152602060048201526024808201527f496e73756666696369656e7420696e6a656374696f6e20666f722064656c656760448201526330ba37b960e11b6064820152608401610d07565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152601154613cac578060200151421015613cac5760405162461bcd60e51b815260206004820152601060248201526f131bd8dac81b9bdd08195e1c1a5c995960821b6044820152606401610d07565b6001600160a01b038316613cbe573392505b6000613cd08260000151600f0b613f12565b9050613cdd338383613f68565b336000908152600a602052604090205460ff16613d2857613d286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168583614938565b836001600160a01b0316336001600160a01b03167f55e21b0674b8095feb63d5336fb7b5b004d267585bfbb58005e8126a8ad7bc548342604051613d6d929190615b1a565b60405180910390a35050600180555050565b3360009081526019602052604090205460ff16613dd45760405162461bcd60e51b81526020600482015260136024820152722120776c2072656469737472696275746f727360681b6044820152606401610d07565b60026001541415613df75760405162461bcd60e51b8152600401610d079061590e565b6002600155601580546000909155601754613e3f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683614938565b60175460405133917f73dad76107243dbd9d398020575b5e3ad26d50fe161c81088dc8592a394855b791613e7e916001600160a01b0316908590615cfc565b60405180910390a25060018055565b6040516001600160a01b03808516602483015283166044820152606481018290526114649085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152615187565b600062093a80613f088184615c78565b6115309190615c43565b600080821215613f645760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610d07565b5090565b6000613f7a8360000151600f0b613f12565b905080821115613fbf5760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610d07565b604080518082019091528351600f0b815260208085015190820152818314613feb578360200151613fee565b60005b60208501526140056140008484615945565b615259565b600f0b84526001600160a01b0385166000908152600760209081526040909120855181546001600160801b0319166001600160801b03909116178155908501516001909101556002546140588482615945565b600255614066868387614a45565b6003546001600160a01b0316156140f75760035482516020840151604051630f28a72960e31b81526001600160a01b038a81166004830152600f9390930b6024820152604481019190915260648101879052911690637945394890608401600060405180830381600087803b1580156140de57600080fd5b505af11580156140f2573d6000803e3d6000fd5b505050505b600080516020615f0283398151915281600254604051614118929190615b1a565b60405180910390a1505050505050565b6002546141358682615b4d565b600255604080518082019091528451600f0b81526020808601519082015261415c87615259565b81516141689190615d15565b600f0b8152851561417b57602081018690525b6001600160a01b0388166000908152600760209081526040909120825181546001600160801b0319166001600160801b03909116178155908201516001909101556141c7888683614a45565b86158015906141d4575082155b1561420e5761420e6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308a613e8d565b6003546001600160a01b0316156142b55760035485516020870151604051636e85ee4760e01b81526001600160a01b038c81166004830152602482018c9052604482018b9052600f9390930b6064820152608481019190915260a4810187905285151560c4820152911690636e85ee479060e401600060405180830381600087803b15801561429c57600080fd5b505af11580156142b0573d6000803e3d6000fd5b505050505b602080820151604080518a81529283018790524290830152906001600160a01b038a16907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060600160405180910390a3600080516020615f0283398151915282600254604051614327929190615b1a565b60405180910390a15050505050505050565b60008061434684846152d6565b905080614357576000915050611530565b6001600160a01b0384166000908152600e6020526040812080548390811061438157614381615a77565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152600c54909250906143da86836149a7565b90506000600d82815481106143f1576143f1615a77565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915080848410156144df576000600d614453866001615b4d565b8154811061446357614463615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b9383019390935260018301549082015260029091015460608083018290528601519192506144c19190615945565b9250836040015181604001516144d79190615945565b915050614503565b60608301516144ee9043615945565b91508260400151426145009190615945565b90505b60408301518215614540578284606001518b61451f9190615945565b6145299084615c43565b6145339190615c78565b61453d9082615b4d565b90505b6145538760400151826140009190615945565b87602001516145629190615d66565b87518890614571908390615dfa565b600f90810b90915288516000910b1215905061459857600098505050505050505050611530565b86516145a690600f0b613f12565b9b9a5050505050505050505050565b6001600160a01b0382166000908152600f6020526040812054806145dd576000915050611530565b6001600160a01b0384166000908152600e6020526040812080548390811061460757614607615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820181905260029092015460608201529150614664906140009086615945565b81602001516146739190615d66565b815161467f9190615dfa565b600f0b8082526000131561469257600081525b80516146a090600f0b613f12565b95945050505050565b60008083905060006146be8560400151613ef8565b905060005b60ff811015614774576146d962093a8083615b4d565b91506000858311156146ed57859250614701565b50600082815260106020526040902054600f0b5b6147148460400151846140009190615945565b84602001516147239190615d66565b845161472f9190615dfa565b600f0b8452828614156147425750614774565b8084602001516147529190615d15565b600f0b602085015250604083018290528061476c81615a8d565b9150506146c3565b5060008260000151600f0b121561478a57600082525b81516146a090600f0b613f12565b3360009081526006602052604090205460ff16156147c85760405162461bcd60e51b8152600401610d0790615cc9565b6147d181613ef8565b3360009081526007602090815260409182902082518084019093528054600f0b835260010154908201529091508261481b5760405162461bcd60e51b8152600401610d0790615aa8565b8051600f0b1561485e5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b1bd8dad95960921b6044820152606401610d07565b4282116148a35760405162461bcd60e51b815260206004820152601360248201527217dd5b9b1bd8dad51a5b59481d1bdbc81bdb19606a1b6044820152606401610d07565b60016148b362093a8060d1615c43565b6148bd9190615945565b6148c79042615b4d565b82111561490d5760405162461bcd60e51b81526020600482015260146024820152735f756e6c6f636b54696d6520746f6f206c6f6e6760601b6044820152606401610d07565b336000818152600a6020526040902054614933919085908590859060019060ff16614128565b505050565b6149338363a9059cbb60e01b8484604051602401613ec1929190615cfc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008082815b6080811015614a3b578183106149c257614a3b565b600060026149d08486615b4d565b6149db906001615b4d565b6149e59190615c78565b905086600d82815481106149fb576149fb615a77565b90600052602060002090600302016002015411614a1a57809350614a28565b614a25600182615945565b92505b5080614a3381615a8d565b9150506149ad565b5090949350505050565b604080516080808201835260008083526020808401829052838501829052606080850183905285519384018652828452908301829052938201819052928101839052600c549192909181906001600160a01b03881615614ce557428760200151118015614ab9575060008760000151600f0b135b15614b1a57614adb6001614ad162093a8060d1615c43565b6140009190615945565b8751614ae79190615e4a565b600f0b602080870191909152870151614b0590614000904290615945565b8560200151614b149190615d66565b600f0b85525b428660200151118015614b34575060008660000151600f0b135b15614b8b57614b4c6001614ad162093a8060d1615c43565b8651614b589190615e4a565b600f0b602080860191909152860151614b7690614000904290615945565b8460200151614b859190615d66565b600f0b84525b6001600160a01b0388166000908152600f602052604090205480614c0f576001600160a01b0389166000908152600e60209081526040808320805460018181018355918552938390208a51938b01516001600160801b03908116600160801b0294169390931760039094029092019283558801519082015560608701516002909101555b614c1a816001615b4d565b6001600160a01b038a166000818152600f6020818152604080842095909555428a86019081524360608c01908152948452600e82528584208054600181810183559186528386208d518e8601516001600160801b03908116600160801b0291161760039092020190815591519082015593516002909401939093558b8301518252601083529290205490890151910b945015614ce357876020015187602001511415614cc857839250614ce3565b602080880151600090815260109091526040902054600f0b92505b505b604080516080810182526000808252602082015242918101919091524360608201528115614d6e57600d8281548110614d2057614d20615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015290505b604080820180518251608081018452600080825260208201819052835194820194909452606080860151908201529151909290421115614de5576040840151614db79042615945565b6060850151614dc69043615945565b614dd890670de0b6b3a7640000615c43565b614de29190615c78565b90505b6000614df084613ef8565b905060005b60ff811015614fa057614e0b62093a8083615b4d565b9150600042831115614e1f57429250614e33565b50600082815260106020526040902054600f0b5b6000614e426140008886615945565b8860200151614e519190615d66565b8851909150614e61908290615dfa565b600f0b88526020880151614e76908390615d15565b600f90810b60208a015288516000910b1215614e9157600088525b60008860200151600f0b1215614ea957600060208901525b60408089018590528601519396508693670de0b6b3a764000090614ecd9086615945565b614ed79087615c43565b614ee19190615c78565b8660600151614ef09190615b4d565b6060890152614f00896001615b4d565b985042841415614f17575050436060870152614fa0565b600d8054600181018255600091909152885160208a01516001600160801b03908116600160801b029116176003909102600080516020615ec28339815191528101919091556040890151600080516020615f228339815191528201556060890151600080516020615ee28339815191529091015550508080614f9890615a8d565b915050614df5565b50600c8690556001600160a01b038d161561502d57896020015189602001518660200151614fce9190615d15565b614fd89190615dfa565b600f0b6020860152895189518651614ff09190615d15565b614ffa9190615dfa565b600f90810b865260208601516000910b121561501857600060208601525b60008560000151600f0b121561502d57600085525b600d8054600181018255600091909152855160208701516001600160801b03908116600160801b029116176003909102600080516020615ec28339815191528101919091556040860151600080516020615f228339815191528201556060860151600080516020615ee2833981519152909101556001600160a01b038d161561517857428c60200151111561511d5760208a01516150cb9089615d15565b97508b602001518b6020015114156150ef5760208901516150ec9089615dfa565b97505b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b038a161790555b428b602001511115615178578b602001518b6020015111156151785760208901516151489088615dfa565b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b03831617905596505b50505050505050505050505050565b60006151dc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661539a9092919063ffffffff16565b80519091501561493357808060200190518101906151fa9190615e88565b6149335760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d07565b600060016001607f1b0319821280159061527a575060016001607f1b038213155b613f645760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401610d07565b6001600160a01b0382166000908152600f60205260408120548190815b6080811015614a3b5781831061530857614a3b565b600060026153168486615b4d565b615321906001615b4d565b61532b9190615c78565b6001600160a01b0388166000908152600e60205260409020805491925087918390811061535a5761535a615a77565b9060005260206000209060030201600201541161537957809350615387565b615384600182615945565b92505b508061539281615a8d565b9150506152f3565b60606153a984846000856153b1565b949350505050565b6060824710156154125760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d07565b6001600160a01b0385163b6154695760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d07565b600080866001600160a01b031685876040516154859190615ea5565b60006040518083038185875af1925050503d80600081146154c2576040519150601f19603f3d011682016040523d82523d6000602084013e6154c7565b606091505b50915091506154d78282866154e2565b979650505050505050565b606083156154f157508161190f565b8251156155015782518084602001fd5b8160405162461bcd60e51b8152600401610d0791906155c6565b508054600082556003029060005260206000209081019061376a91905b80821115613f64576000808255600182018190556002820155600301615538565b6001600160a01b038116811461376a57600080fd5b6000806040838503121561558157600080fd5b823561558c81615559565b946020939093013593505050565b60005b838110156155b557818101518382015260200161559d565b838111156114645750506000910152565b60208152600082518060208401526155e581604085016020870161559a565b601f01601f19169190910160400192915050565b60006020828403121561560b57600080fd5b813561190f81615559565b60008060006060848603121561562b57600080fd5b833561563681615559565b95602085013595506040909401359392505050565b801515811461376a57600080fd5b6000806040838503121561566c57600080fd5b823561567781615559565b915060208301356156878161564b565b809150509250929050565b6000806000604084860312156156a757600080fd5b83356001600160401b03808211156156be57600080fd5b818601915086601f8301126156d257600080fd5b8135818111156156e157600080fd5b8760208260051b85010111156156f657600080fd5b6020928301955093505084013561570c8161564b565b809150509250925092565b60006020828403121561572957600080fd5b813561190f8161564b565b6001600160a01b0391909116815260200190565b6000806040838503121561575b57600080fd5b50508035926020909101359150565b60006020828403121561577c57600080fd5b5035919050565b80356001600160401b038116811461579a57600080fd5b919050565b600080600080608085870312156157b557600080fd5b6157be85615783565b93506157cc60208601615783565b925060408501356157dc81615559565b915060608501356157ec81615559565b939692955090935050565b60008060006060848603121561580c57600080fd5b833561581781615559565b925060208401356158278161564b565b9150604084013564ffffffffff8116811461570c57600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600b908201526a10903232b632b3b0ba37b960a91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001600160681b03838116908316818110156158d1576158d161589b565b039392505050565b600181811c908216806158ed57607f821691505b602082108114156127e657634e487b7160e01b600052602260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000828210156159575761595761589b565b500390565b602080825260089082015267546f6f206c61746560c01b604082015260600190565b6020808252601490820152732737903637b1b59037b7103232b632b3b0ba37b960611b604082015260600190565b60208082526016908201527511195b1959d85d1bdc881b1bd8dac8195e1c1a5c995960521b604082015260600190565b60006001600160681b038281168482168083038211156159fe576159fe61589b565b01949350505050565b6001600160801b0392909216825265ffffffffffff16602082015260400190565b6020808252600b908201526a084818d85ad9481c1bdbdb60aa1b604082015260600190565b60208082526010908201526f3130b2102fb13637b1b5a73ab6b132b960811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615aa157615aa161589b565b5060010190565b6020808252600b908201526a1098590817d85b5bdd5b9d60aa1b604082015260600190565b6020808252600d908201526c139bc81b1bd8dac8199bdd5b99609a1b604082015260600190565b6020808252600c908201526b131bd8dac8195e1c1a5c995960a21b604082015260600190565b918252602082015260400190565b6020808252600b908201526a0848195bd8481bdc881ddb60aa1b604082015260600190565b60008219821115615b6057615b6061589b565b500190565b6020808252600d908201526c08481a5b9a5d1a585b1a5e9959609a1b604082015260600190565b60008060008060008060008060006101208a8c031215615bab57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a0151615be78161564b565b809250506101008a015190509295985092959850929598565b60208082526010908201526f105b1c9958591e481b5a59dc985d195960821b604082015260600190565b600060208284031215615c3c57600080fd5b5051919050565b6000816000190483118215151615615c5d57615c5d61589b565b500290565b634e487b7160e01b600052601260045260246000fd5b600082615c8757615c87615c62565b500490565b600060208284031215615c9e57600080fd5b815161190f81615559565b602080825260069082015265119bdc989a5960d21b604082015260600190565b602080825260199082015278416c726561647920656d657267656e6379576974686472617760381b604082015260600190565b6001600160a01b03929092168252602082015260400190565b6000600f82810b9084900b828212801560016001607f1b0384900383131615615d4057615d4061589b565b60016001607f1b03198390038212811615615d5d57615d5d61589b565b50019392505050565b6000600f82810b9084900b60016001607f1b0383821384841380821684840486111615615d9557615d9561589b565b60016001607f1b03196000851282811687830587121615615db857615db861589b565b60008712925085820587128484161615615dd457615dd461589b565b85850587128184161615615dea57615dea61589b565b5050509290910295945050505050565b6000600f82810b9084900b828112801560016001607f1b0319830184121615615e2557615e2561589b565b60016001607f1b0382018313811615615e4057615e4061589b565b5090039392505050565b600081600f0b83600f0b80615e6157615e61615c62565b60016001607f1b0319821460001982141615615e7f57615e7f61589b565b90059392505050565b600060208284031215615e9a57600080fd5b815161190f8161564b565b60008251615eb781846020870161559a565b919091019291505056fed7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5d7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb75e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5cd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb67a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96a2646970667358221220b6025fd4a2599000652864fa5c24e4cef152b4de735d9e6b7ae5baeab385308264736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103d65760003560e01c8063705096c711610208578063705096c71461099657806370a08231146109a9578063715018a6146109bc57806375cd6c67146109c45780637c5acb25146109d75780637c616fe6146109fa57806381fc83bb14610a0d578063827e8e0c14610a2d5780638ad4c44714610a545780638da5cb5b14610a675780638e90053014610a6f578063900cf0cf14610a7757806395d89b4114610a80578063981b24d014610a885780639c490f191461042b5780639d4b4ba114610a9b578063a621440414610aae578063a63dce7114610ab6578063a7ccf1e014610abe578063a88a885514610ad1578063aa94ab5914610ae4578063b52c05fe14610b0b578063b6bbbcd114610b1e578063b6e45a4e14610b38578063c0dd84bd14610b45578063c12ebb5f14610b68578063c172085e14610b7b578063c1d1192914610b8f578063c2c4c5c114610b98578063cfee396f14610ba0578063d2dcd93314610bb4578063d4eda63f14610bc7578063d73f98a314610bea578063db2e21bc14610bfd578063ec5570d014610c05578063f2c7a81b14610c18578063f2fde38b14610c20578063f4359ce514610c33578063f52a36f714610c3d578063fa09e63014610c73578063fb489a7b14610c86578063fc0c546a14610c8e578063ffc97ce914610cb557600080fd5b8062b79fd4146103db57806302641632146103f6578063047fc9aa146103fe578063052b726f14610407578063059f8b161461041c57806306a4da7e1461042b57806306fdde031461044657806308154df01461045b57806308c3dea7146104635780630a6373b31461046c5780630efe6a8b1461047f5780630f41e0d21461049257806312c470e91461049b57806312cae7af146104ae57806318160ddd146104c157806319577c6e146104c95780631959a002146104dc5780631bb8c61d1461059d5780632ea1fe7a146105b05780632f4f21e2146105c35780633037408d146105d657806330d9a62a146105e9578063313ce5671461060957806334d901a41461062857806336a5839114610663578063399f3a4f146106935780633d5c78bd146106a6578063403f4447146106b95780634ee2cd7e146106cc57806351cff8d9146106df578063539e5082146106f257806355ed0a781461077c57806358fca6a514610784578063598085ae1461078c5780635de9a1371461079f5780635e8bb48e146107e75780636386c1c71461081a5780636574deb71461094d5780636582a8c01461096057806365a5d5f01461097357806365f9008a1461097b57806367e7a7cb1461098e575b600080fd5b6103e3600081565b6040519081526020015b60405180910390f35b6103e3600381565b6103e360025481565b61041a61041536600461556e565b610cd8565b005b6103e3670de0b6b3a764000081565b610433600181565b60405161ffff90911681526020016103ed565b61044e610e4e565b6040516103ed91906155c6565b610433600081565b6103e360155481565b61041a61047a3660046155f9565b610edc565b61041a61048d366004615616565b61138a565b6103e360115481565b6103e36104a936600461556e565b61146a565b6103e36104bc3660046155f9565b611536565b6103e3611542565b61041a6104d7366004615659565b6115b2565b61054b6104ea3660046155f9565b600860205260009081526040902080546001909101546001600160a01b03909116906001600160801b0381169065ffffffffffff600160801b8204811691600160b01b81049091169061ffff600160e01b8204811691600160f01b90041686565b604080516001600160a01b0390971687526001600160801b03909516602087015265ffffffffffff938416948601949094529116606084015261ffff90811660808401521660a082015260c0016103ed565b61041a6105ab366004615692565b611638565b61041a6105be366004615717565b61174d565b61041a6105d136600461556e565b6117c6565b6103e36105e436600461556e565b611903565b6016546105fc906001600160a01b031681565b6040516103ed9190615734565b6014546106169060ff1681565b60405160ff90911681526020016103ed565b61063b61063636600461556e565b611916565b60408051600f95860b81529390940b60208401529282015260608101919091526080016103ed565b60145461067b9061010090046001600160401b031681565b6040516001600160401b0390911681526020016103ed565b61041a6106a1366004615748565b611966565b61041a6106b436600461576a565b6119bd565b61041a6106c736600461576a565b611a79565b6103e36106da36600461556e565b611b87565b61041a6106ed3660046155f9565b611c61565b6107426107003660046155f9565b6009602052600090815260409020546001600160681b0380821691600160681b810490911690600160d01b810464ffffffffff1690600160f81b900460ff1684565b604080516001600160681b03958616815294909316602085015264ffffffffff9091169183019190915260ff1660608201526080016103ed565b61041a611dff565b610433600281565b61041a61079a366004615717565b61226a565b6107cd6107ad3660046155f9565b60076020526000908152604090208054600190910154600f9190910b9082565b60408051600f9390930b83526020830191909152016103ed565b61080a6107f53660046155f9565b600b6020526000908152604090205460ff1681565b60405190151581526020016103ed565b6108e86108283660046155f9565b6001600160a01b039081166000818152600760209081526040808320815180830183528154600f0b81526001918201548185019081529585526008845293829020825160c08101845281549097168088529101546001600160801b03811693870184905265ffffffffffff600160801b82048116938801849052600160b01b8204166060880181905261ffff600160e01b8304811660808a01819052600160f01b9093041660a09098018890529451955195979596919593949293909190565b60408051600f9990990b895260208901979097526001600160a01b03909516958701959095526001600160801b03909216606086015265ffffffffffff90811660808601521660a084015261ffff91821660c08401521660e0820152610100016103ed565b61041a61095b36600461556e565b6122e8565b6017546105fc906001600160a01b031681565b6103e36126a7565b6003546105fc906001600160a01b031681565b6103e3600181565b61041a6109a436600461576a565b6126c4565b6103e36109b73660046155f9565b61272a565b61041a6127ec565b61041a6109d236600461579f565b612827565b61080a6109e53660046155f9565b60196020526000908152604090205460ff1681565b61041a610a0836600461576a565b6129f3565b6103e3610a1b3660046155f9565b600f6020526000908152604090205481565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61063b610a6236600461576a565b612ba0565b6105fc612be4565b610616600081565b6103e3600c5481565b61044e612bf3565b6103e3610a9636600461576a565b612c00565b61041a610aa93660046155f9565b612dfb565b61041a613307565b610616600181565b61041a610acc3660046155f9565b613466565b6103e3610adf3660046155f9565b61352e565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61041a610b19366004615748565b6135cc565b60145461067b90600160481b90046001600160401b031681565b60055461080a9060ff1681565b61080a610b533660046155f9565b600a6020526000908152604090205460ff1681565b61041a610b76366004615692565b613634565b60035461080a90600160a01b900460ff1681565b6103e360045481565b61041a613749565b60175461080a90600160a01b900460ff1681565b6103e3610bc236600461576a565b61376d565b61080a610bd53660046155f9565b60066020526000908152604090205460ff1681565b61041a610bf83660046157f7565b6137d8565b61041a6138b7565b6103e3610c1336600461556e565b613aad565b6103e3600281565b61041a610c2e3660046155f9565b613ab9565b6103e362093a8081565b610c60610c4b36600461576a565b601060205260009081526040902054600f0b81565b604051600f9190910b81526020016103ed565b61041a610c813660046155f9565b613b56565b61041a613d7f565b6105fc7f000000000000000000000000000000000000000000000000000000000000000081565b61080a610cc33660046155f9565b60186020526000908152604090205460ff1681565b33610ce1612be4565b6001600160a01b031614610d105760405162461bcd60e51b8152600401610d0790615841565b60405180910390fd5b6001600160a01b03821660009081526009602052604090208054600160f81b900460ff16600114610d535760405162461bcd60e51b8152600401610d0790615876565b8054600160681b90046001600160681b0316821115610d81578054600160681b90046001600160681b031691505b805482908290600d90610da5908490600160681b90046001600160681b03166158b1565b92506101000a8154816001600160681b0302191690836001600160681b03160217905550610e093330847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316613e8d909392919063ffffffff16565b6040518281526001600160a01b0384169033907f7b85c81b5ab23faed50cf05b116ebb10456ca6320721e00b6513babed009b9e29060200160405180910390a3505050565b60128054610e5b906158d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e87906158d9565b8015610ed45780601f10610ea957610100808354040283529160200191610ed4565b820191906000526020600020905b815481529060010190602001808311610eb757829003601f168201915b505050505081565b60026001541415610eff5760405162461bcd60e51b8152600401610d079061590e565b600260019081556001600160a01b038216600090815260096020526040902080549091600160f81b90910460ff1614610f4a5760405162461bcd60e51b8152600401610d0790615876565b3360009081526008602052604081206001810154909190610f7990600160801b900465ffffffffffff16613ef8565b9050428111610fbe5760405162461bcd60e51b8152602060048201526011602482015270155cd95c881b1bd8dac8195e1c1a5c9959607a1b6044820152606401610d07565b600454610fcb9042615945565b6001830154600160b01b900465ffffffffffff1611610ffc5760405162461bcd60e51b8152600401610d079061595c565b600182810154600160e01b900461ffff16146110475760405162461bcd60e51b815260206004820152600a60248201526908481b5a59dc985d195960b21b6044820152606401610d07565b6001820154600160f01b900461ffff16156110975760405162461bcd60e51b815260206004820152601060248201526f416c726561647920776974686472617760801b6044820152606401610d07565b6001828101805461ffff60e01b1916600160e11b17905582546001600160a01b0316600090815260076020908152604080832081518083019092528054600f0b80835294015491810191909152916110ee90613f12565b8454909150611107906001600160a01b03168383613f68565b6040805180820182526001600160a01b0388166000818152600760208181529482208054600f90810b865293835290855260010154938301939093528151919291900b136111675760405162461bcd60e51b8152600401610d079061597e565b4281602001511161118a5760405162461bcd60e51b8152600401610d07906159ac565b6001808601546111ac9189916001600160801b03169060009085908290614128565b600185015486546001600160801b039091169087906000906111d89084906001600160681b03166159dc565b82546101009290920a6001600160681b03818102199093169183160217909155600187015488546001600160801b0390911692508891600d91611224918591600160681b9004166159dc565b82546101009290920a6001600160681b0381810219909316919092169190910217905550600185015460405162c2c90f60e11b81523360048201526001600160801b0382166024820152600160801b90910465ffffffffffff1660448201526001600160a01b03881690630185921e90606401600060405180830381600087803b1580156112b157600080fd5b505af11580156112c5573d6000803e3d6000fd5b5050505060018501546040516001600160a01b038916913391600080516020615f4283398151915291611312916001600160801b03821691600160801b900465ffffffffffff1690615a07565b60405180910390a360018501546040516001600160a01b0389169133917f4af697c81385693e6ee5d15ccb781170dc8241f81c4983bf87cdf268d2fca5f591611375916001600160801b03821691600160801b900465ffffffffffff1690615a07565b60405180910390a35050600180555050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113d25760405162461bcd60e51b8152600401610d0790615a28565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a08301521561146457600080fd5b50505050565b60004382111561148c5760405162461bcd60e51b8152600401610d0790615a4d565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a08301521561152e5780516115269084614339565b915050611530565b505b92915050565b600061153082426145b5565b60006115ad600d600c548154811061155c5761155c615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b938301939093526001830154908201526002909101546060820152426146a9565b905090565b336115bb612be4565b6001600160a01b0316146115e15760405162461bcd60e51b8152600401610d0790615841565b6001600160a01b0382166000818152600b6020526040808220805460ff1916851515908117909155905190929133917f4f4d55f3b98fe4b3fbc9fb5e8ed05483cc8d794638edd690545eb5779e234a499190a45050565b33611641612be4565b6001600160a01b0316146116675760405162461bcd60e51b8152600401610d0790615841565b60005b8281101561146457816018600086868581811061168957611689615a77565b905060200201602081019061169e91906155f9565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106116d8576116d8615a77565b90506020020160208101906116ed91906155f9565b6001600160a01b0316336001600160a01b03167fdfad9b83c215ff1a36483cf1688e5aeae2ac60f1c3f62f5229641234748f13b784604051611733911515815260200190565b60405180910390a38061174581615a8d565b91505061166a565b33611756612be4565b6001600160a01b03161461177c5760405162461bcd60e51b8152600401610d0790615841565b6005805460ff191682151590811790915560405190815233907f539ba344188cde95583cd695fe9a73d66f53c83a48e3d66e5b42a12650d93ecc906020015b60405180910390a250565b600260015414156117e95760405162461bcd60e51b8152600401610d079061590e565b60026001556001600160a01b0382166000908152600a602052604090205460ff16156118495760405162461bcd60e51b815260206004820152600f60248201526e496e636f72726563742070726f787960881b6044820152606401610d07565b6040805180820182526001600160a01b0384166000818152600760208181529482208054600f0b85529290915283526001015491810191909152816118a05760405162461bcd60e51b8152600401610d0790615aa8565b60008160000151600f0b136118c75760405162461bcd60e51b8152600401610d0790615acd565b428160200151116118ea5760405162461bcd60e51b8152600401610d0790615af4565b6118fa8383600084600080614128565b50506001805550565b600061190f83836145b5565b9392505050565b600e602052816000526040600020818154811061193257600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9550600160801b90920490910b925084565b336000908152600a602052604090205460ff166119af5760405162461bcd60e51b8152602060048201526007602482015266212070726f787960c81b6044820152606401610d07565b6119b98282614798565b5050565b336119c6612be4565b6001600160a01b0316146119ec5760405162461bcd60e51b8152600401610d0790615841565b8015806119f95750806001145b611a335760405162461bcd60e51b815260206004820152600b60248201526a4f6e6c792030206f72203160a81b6044820152606401610d07565b60118054908290556040517f5238fc635590cf5e76ed0f591df4d7f3021d20f58e6d3405390197dd72a575fe90611a6d9083908590615b1a565b60405180910390a15050565b3360009081526018602052604090205460ff16611aaf57333214611aaf5760405162461bcd60e51b8152600401610d0790615b28565b60026001541415611ad25760405162461bcd60e51b8152600401610d079061590e565b60026001908155604080518082018252336000818152600760208181529482208054600f0b8552929091528352909201549082015281611b245760405162461bcd60e51b8152600401610d0790615aa8565b60008160000151600f0b13611b4b5760405162461bcd60e51b8152600401610d0790615acd565b42816020015111611b6e5760405162461bcd60e51b8152600401610d0790615af4565b611b7f338360008460026000614128565b505060018055565b600043821115611ba95760405162461bcd60e51b8152600401610d0790615a4d565b6001600160a01b03808416600090815260086020908152604091829020825160c08101845281549094168085526001909101546001600160801b0381169285019290925265ffffffffffff600160801b8304811693850193909352600160b01b8204909216606084015261ffff600160e01b820481166080850152600160f01b9091041660a083015215611c57578051611c439084614339565b611c4d8585614339565b6115269190615b4d565b6115268484614339565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611ca95760405162461bcd60e51b8152600401610d0790615a28565b6001600160a01b03808216600090815260086020908152604091829020825160c08101845281549094168452600101546001600160801b0381169184019190915265ffffffffffff600160801b8204811692840192909252600160b01b8104909116606083015261ffff600160e01b8204811660808401819052600160f01b9092041660a083015260021415611d3e57600080fd5b80516001600160a01b031615801590611d5f5750608081015161ffff166001145b8015611d71575060a081015161ffff16155b156119b95780600001516001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611db557600080fd5b505af1158015611dc9573d6000803e3d6000fd5b5050506001600160a01b038316600090815260086020526040902060010180546001600160f01b0316600160f01b179055505050565b60026001541415611e225760405162461bcd60e51b8152600401610d079061590e565b6002600155600354600160a01b900460ff16611e505760405162461bcd60e51b8152600401610d0790615b65565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401611ea19190615734565b61012060405180830381865afa158015611ebf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee39190615b8c565b505096509650505050509250428211611f0e5760405162461bcd60e51b8152600401610d0790615af4565b3360009081526008602052604090206001810154600160e01b900461ffff1615611f4a5760405162461bcd60e51b8152600401610d0790615c00565b60018101805461ffff60e01b1916600160e01b17905560408051633a98ef3960e01b815290516000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691633a98ef39916004808201926020929091908290030181865afa158015611fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fed9190615c2a565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561204f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120739190615c2a565b9050600060018584612085858b615c43565b61208f9190615c78565b6120999190615945565b6120a39190615945565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634c96a389336040518263ffffffff1660e01b81526004016120f39190615734565b6020604051808303816000875af1158015612112573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121369190615c8c565b6001600160a01b0381166000818152600a602052604090819020805460ff1916600190811790915588546001600160a01b031916831789558801805465ffffffffffff8c8116600160801b026001600160b01b03194292909216600160b01b02919091166001600160e01b0319909216919091176001600160801b038816171790555163399f3a4f60e01b81529192509063399f3a4f906121dd9085908b90600401615b1a565b600060405180830381600087803b1580156121f757600080fd5b505af115801561220b573d6000803e3d6000fd5b50505050806001600160a01b0316336001600160a01b03167f8519b84e949c6333da21ddea64e2c29ef66709e465ec9b0f24fb32eb2c003843848a604051612254929190615b1a565b60405180910390a3505060018055505050505050565b33612273612be4565b6001600160a01b0316146122995760405162461bcd60e51b8152600401610d0790615841565b60178054821515600160a01b0260ff60a01b1990911617905560405133907fdcc751463da04455ac459756e92d5ea118dd0dd631422cbf8353132417a52d9f906117bb90841515815260200190565b6002600154141561230b5760405162461bcd60e51b8152600401610d079061590e565b6002600155601754600160a01b900460ff166123395760405162461bcd60e51b8152600401610d0790615ca9565b6001600160a01b03821661234b573391505b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152816123925760405162461bcd60e51b8152600401610d0790615aa8565b806020015142106123b55760405162461bcd60e51b8152600401610d079061595c565b601154156123d55760405162461bcd60e51b8152600401610d0790615ca9565b33600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b82041692820192909252600160d01b820464ffffffffff1692810192909252600160f81b900460ff1660608201819052600114156125075742816040015164ffffffffff161061248d5760405162461bcd60e51b8152602060048201526014602482015273466f72626964206561726c79576974686472617760601b6044820152606401610d07565b600061249f8360000151600f0b613f12565b60208301519091506001600160681b03166124ba8583615945565b10156125055760405162461bcd60e51b815260206004820152601a60248201527911195b1959d85d1bdc8818985b185b98d948195e18d95959195960321b6044820152606401610d07565b505b6020820151612517338486613f68565b336000908152600b602052604081205460ff16158015612546575060145461010090046001600160401b031615155b1561264157600062093a804261255c8286615b4d565b6125669190615945565b6125709190615c78565b60145490915061271090879061259590849061010090046001600160401b0316615c43565b61259f9190615c43565b6125a99190615c78565b601454909250600090612710906125d090600160481b90046001600160401b031685615c43565b6125da9190615c78565b905080601560008282546125ee9190615b4d565b909155505060165461263e906001600160a01b031661260d8386615945565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190614938565b50505b61264f8661260d8388615945565b6040805186815260208101839052428183015290516001600160a01b0388169133917f08b526d7537cea7e5a629eb0495b5932c78911fd0bdeb02b822d69a6e25792549181900360600190a350506001805550505050565b60016126b762093a8060d1615c43565b6126c19190615945565b81565b336126cd612be4565b6001600160a01b0316146126f35760405162461bcd60e51b8152600401610d0790615841565b600481905560405181815233907fde15bb8e73a1f43abe6021a8ad5a5d79caf815a4d74e6dbd7d88cd57f06fdd89906020016117bb565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a0840152909190156127dc5780516127c890426145b5565b6127d284426145b5565b61190f9190615b4d565b61190f83426145b5565b50919050565b336127f5612be4565b6001600160a01b03161461281b5760405162461bcd60e51b8152600401610d0790615841565b6128256000614957565b565b33612830612be4565b6001600160a01b0316146128565760405162461bcd60e51b8152600401610d0790615841565b60c0846001600160401b0316111561289f5760405162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606401610d07565b612710836001600160401b031611156128e95760405162461bcd60e51b815260206004820152600c60248201526b0c4e0e640e8dede40d0d2ced60a31b6044820152606401610d07565b601480546001600160401b03858116600160481b818102600160481b600160881b03198a8516610100818102928316610100600160881b031989161793909317909755601680546001600160a01b038b81166001600160a01b03198084168217909455601780548d8416958116861790915560408051888d048c16808252602082019e909e52610100600160481b0319909c1690961797909704909816938901849052606089019690965285166080880181905260a08801969096529290931660c0860181905260e08601929092529193909133917f3de6c016cd3debec574d13c9966e6c847e64ac424da0b1eb70d3c93b68ec0537910160405180910390a25050505050505050565b3360009081526018602052604090205460ff16612a2957333214612a295760405162461bcd60e51b8152600401610d0790615b28565b60026001541415612a4c5760405162461bcd60e51b8152600401610d079061590e565b60026001908155604080518082018252336000818152600760208181529482208054600f0b85529290915283529092015490820152612a8a82613ef8565b915060008160000151600f0b13612ab35760405162461bcd60e51b8152600401610d0790615acd565b42816020015111612ad65760405162461bcd60e51b8152600401610d0790615af4565b80602001518211612b225760405162461bcd60e51b815260206004820152601660248201527517db995dd55b9b1bd8dad51a5b59481d1bdbc81bdb1960521b6044820152606401610d07565b6001612b3262093a8060d1615c43565b612b3c9190615945565b612b469042615b4d565b821115612b8f5760405162461bcd60e51b81526020600482015260176024820152765f6e6577556e6c6f636b54696d6520746f6f206c6f6e6760481b6044820152606401610d07565b611b7f336000848460036000614128565b600d8181548110612bb057600080fd5b6000918252602090912060039091020180546001820154600290920154600f82810b9450600160801b90920490910b919084565b6000546001600160a01b031690565b60138054610e5b906158d9565b600043821115612c455760405162461bcd60e51b815260206004820152601060248201526f2130b2102fb13637b1b5a73ab6b132b960811b6044820152606401610d07565b600c546000612c5484836149a7565b90506000600d8281548110612c6b57612c6b615a77565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915083831015612d89576000600d612ccc856001615b4d565b81548110612cdc57612cdc615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606080830182905285015191925014612d835782606001518160600151612d499190615945565b83604001518260400151612d5d9190615945565b6060850151612d6c908a615945565b612d769190615c43565b612d809190615c78565b91505b50612dd8565b43826060015114612dd8576060820151612da39043615945565b6040830151612db29042615945565b6060840151612dc19089615945565b612dcb9190615c43565b612dd59190615c78565b90505b612df182828460400151612dec9190615b4d565b6146a9565b9695505050505050565b60026001541415612e1e5760405162461bcd60e51b8152600401610d079061590e565b6002600155600354600160a01b900460ff16612e4c5760405162461bcd60e51b8152600401610d0790615b65565b6001600160a01b03811660009081526009602052604090208054600160f81b900460ff16600114612e8f5760405162461bcd60e51b8152600401610d0790615876565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631959a002336040518263ffffffff1660e01b8152600401612ee09190615734565b61012060405180830381865afa158015612efe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f229190615b8c565b505096509650505050509250428211612f4d5760405162461bcd60e51b8152600401610d0790615af4565b3360009081526008602052604090206001810154600160e01b900461ffff1615612f895760405162461bcd60e51b8152600401610d0790615c00565b60018101805461ffff60e01b1916600160e11b17905560408051633a98ef3960e01b815290516000917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691633a98ef39916004808201926020929091908290030181865afa158015613008573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061302c9190615c2a565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561308e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130b29190615c2a565b90506000600185846130c4858b615c43565b6130ce9190615c78565b6130d89190615945565b6130e29190615945565b600185810180546001600160b01b031916600160801b65ffffffffffff8b16026001600160801b031916176001600160801b0384161790556040805180820182526001600160a01b038d166000818152600760208181529482208054600f0b85529290915283529092015490820152909150816131715760405162461bcd60e51b8152600401610d0790615aa8565b60008160000151600f0b136131985760405162461bcd60e51b8152600401610d079061597e565b428160200151116131bb5760405162461bcd60e51b8152600401610d07906159ac565b6131cc8a8360008460006001614128565b885482908a906000906131e99084906001600160681b03166159dc565b92506101000a8154816001600160681b0302191690836001600160681b031602179055508189600001600d8282829054906101000a90046001600160681b031661323391906159dc565b82546001600160681b039182166101009390930a92830291909202199091161790555060405162c2c90f60e11b815233600482015260248101839052604481018890526001600160a01b038b1690630185921e90606401600060405180830381600087803b1580156132a457600080fd5b505af11580156132b8573d6000803e3d6000fd5b50505050896001600160a01b0316336001600160a01b0316600080516020615f42833981519152848a6040516132ef929190615b1a565b60405180910390a35050600180555050505050505050565b33613310612be4565b6001600160a01b0316146133365760405162461bcd60e51b8152600401610d0790615841565b600354600160a01b900460ff16156133865760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610d07565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632d19b9826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156133e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061340a9190615c8c565b90506001600160a01b03811630146134505760405162461bcd60e51b8152602060048201526009602482015268426164205643616b6560b81b6044820152606401610d07565b506003805460ff60a01b1916600160a01b179055565b3361346f612be4565b6001600160a01b0316146134955760405162461bcd60e51b8152600401610d0790615841565b6001600160a01b0381166134e45760405162461bcd60e51b815260206004820152601660248201527543616e6e6f74206265207a65726f206164647265737360501b6044820152606401610d07565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fd1879d19b7e07327f8e491d8c5e05a4048155b7ee8f97f61e2b2233ae0e3a88890600090a250565b6001600160a01b038082166000908152600860209081526040808320815160c08101835281549095168086526001909101546001600160801b0381169386019390935265ffffffffffff600160801b8404811692860192909252600160b01b8304909116606085015261ffff600160e01b830481166080860152600160f01b90920490911660a0840152909190156127e657805161190f90426145b5565b3360009081526018602052604090205460ff16613602573332146136025760405162461bcd60e51b8152600401610d0790615b28565b600260015414156136255760405162461bcd60e51b8152600401610d079061590e565b6002600155611b7f8282614798565b3361363d612be4565b6001600160a01b0316146136635760405162461bcd60e51b8152600401610d0790615841565b60005b8281101561146457816019600086868581811061368557613685615a77565b905060200201602081019061369a91906155f9565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106136d4576136d4615a77565b90506020020160208101906136e991906155f9565b6001600160a01b0316336001600160a01b03167f0c5e5180b1be108ebc3c1c5939cd6b59ca30067d07c5405f94304bf603c621428460405161372f911515815260200190565b60405180910390a38061374181615a8d565b915050613666565b6040805180820190915260008082526020820181905261376a908280614a45565b50565b6000611530600d600c548154811061378757613787615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b938301939093526001830154908201526002909101546060820152836146a9565b336137e1612be4565b6001600160a01b0316146138075760405162461bcd60e51b8152600401610d0790615841565b6001600160a01b03831660009081526009602052604090208261382b57600061382e565b60015b81546001600160d01b0316600160f81b60ff929092169190910264ffffffffff60d01b191617600160d01b64ffffffffff841690810291909117825560408051851515815260208101929092526001600160a01b038616917f3fd4b992bc54a5edaa3b29f337c4048b314667d454123fbd81b327aaeea7df67910160405180910390a250505050565b600260015414156138da5760405162461bcd60e51b8152600401610d079061590e565b600260015560055460ff1661392d5760405162461bcd60e51b8152602060048201526019602482015278466f7262696420656d657267656e637920776974686472617760381b6044820152606401610d07565b3360009081526006602052604090205460ff161561395d5760405162461bcd60e51b8152600401610d0790615cc9565b336000908152600660209081526040808320805460ff191660019081179091556007835281842082518084019093528054600f0b8084529101549282019290925291126139df5760405162461bcd60e51b815260206004820152601060248201526f139bc81b1bd8dad95908185b5bdd5b9d60821b6044820152606401610d07565b60006139f18260000151600f0b613f12565b33600090815260076020908152604080832080546001600160801b0319168155600101839055600e9091528120919250613a2b919061551b565b336000818152600f6020526040812055613a70907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083614938565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505060018055565b600061190f8383614339565b33613ac2612be4565b6001600160a01b031614613ae85760405162461bcd60e51b8152600401610d0790615841565b6001600160a01b038116613b4d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d07565b61376a81614957565b60026001541415613b795760405162461bcd60e51b8152600401610d079061590e565b600260015533600090815260096020908152604091829020825160808101845290546001600160681b038082168352600160681b820416928201839052600160d01b810464ffffffffff1693820193909352600160f81b90920460ff16606083015215613c345760405162461bcd60e51b8152602060048201526024808201527f496e73756666696369656e7420696e6a656374696f6e20666f722064656c656760448201526330ba37b960e11b6064820152608401610d07565b3360009081526007602090815260409182902082518084019093528054600f0b83526001015490820152601154613cac578060200151421015613cac5760405162461bcd60e51b815260206004820152601060248201526f131bd8dac81b9bdd08195e1c1a5c995960821b6044820152606401610d07565b6001600160a01b038316613cbe573392505b6000613cd08260000151600f0b613f12565b9050613cdd338383613f68565b336000908152600a602052604090205460ff16613d2857613d286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168583614938565b836001600160a01b0316336001600160a01b03167f55e21b0674b8095feb63d5336fb7b5b004d267585bfbb58005e8126a8ad7bc548342604051613d6d929190615b1a565b60405180910390a35050600180555050565b3360009081526019602052604090205460ff16613dd45760405162461bcd60e51b81526020600482015260136024820152722120776c2072656469737472696275746f727360681b6044820152606401610d07565b60026001541415613df75760405162461bcd60e51b8152600401610d079061590e565b6002600155601580546000909155601754613e3f906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683614938565b60175460405133917f73dad76107243dbd9d398020575b5e3ad26d50fe161c81088dc8592a394855b791613e7e916001600160a01b0316908590615cfc565b60405180910390a25060018055565b6040516001600160a01b03808516602483015283166044820152606481018290526114649085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152615187565b600062093a80613f088184615c78565b6115309190615c43565b600080821215613f645760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610d07565b5090565b6000613f7a8360000151600f0b613f12565b905080821115613fbf5760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610d07565b604080518082019091528351600f0b815260208085015190820152818314613feb578360200151613fee565b60005b60208501526140056140008484615945565b615259565b600f0b84526001600160a01b0385166000908152600760209081526040909120855181546001600160801b0319166001600160801b03909116178155908501516001909101556002546140588482615945565b600255614066868387614a45565b6003546001600160a01b0316156140f75760035482516020840151604051630f28a72960e31b81526001600160a01b038a81166004830152600f9390930b6024820152604481019190915260648101879052911690637945394890608401600060405180830381600087803b1580156140de57600080fd5b505af11580156140f2573d6000803e3d6000fd5b505050505b600080516020615f0283398151915281600254604051614118929190615b1a565b60405180910390a1505050505050565b6002546141358682615b4d565b600255604080518082019091528451600f0b81526020808601519082015261415c87615259565b81516141689190615d15565b600f0b8152851561417b57602081018690525b6001600160a01b0388166000908152600760209081526040909120825181546001600160801b0319166001600160801b03909116178155908201516001909101556141c7888683614a45565b86158015906141d4575082155b1561420e5761420e6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308a613e8d565b6003546001600160a01b0316156142b55760035485516020870151604051636e85ee4760e01b81526001600160a01b038c81166004830152602482018c9052604482018b9052600f9390930b6064820152608481019190915260a4810187905285151560c4820152911690636e85ee479060e401600060405180830381600087803b15801561429c57600080fd5b505af11580156142b0573d6000803e3d6000fd5b505050505b602080820151604080518a81529283018790524290830152906001600160a01b038a16907f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f99060600160405180910390a3600080516020615f0283398151915282600254604051614327929190615b1a565b60405180910390a15050505050505050565b60008061434684846152d6565b905080614357576000915050611530565b6001600160a01b0384166000908152600e6020526040812080548390811061438157614381615a77565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152600c54909250906143da86836149a7565b90506000600d82815481106143f1576143f1615a77565b600091825260208083206040805160808101825260039094029091018054600f81810b8652600160801b909104900b92840192909252600182015490830152600201546060820152915080848410156144df576000600d614453866001615b4d565b8154811061446357614463615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b9383019390935260018301549082015260029091015460608083018290528601519192506144c19190615945565b9250836040015181604001516144d79190615945565b915050614503565b60608301516144ee9043615945565b91508260400151426145009190615945565b90505b60408301518215614540578284606001518b61451f9190615945565b6145299084615c43565b6145339190615c78565b61453d9082615b4d565b90505b6145538760400151826140009190615945565b87602001516145629190615d66565b87518890614571908390615dfa565b600f90810b90915288516000910b1215905061459857600098505050505050505050611530565b86516145a690600f0b613f12565b9b9a5050505050505050505050565b6001600160a01b0382166000908152600f6020526040812054806145dd576000915050611530565b6001600160a01b0384166000908152600e6020526040812080548390811061460757614607615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820181905260029092015460608201529150614664906140009086615945565b81602001516146739190615d66565b815161467f9190615dfa565b600f0b8082526000131561469257600081525b80516146a090600f0b613f12565b95945050505050565b60008083905060006146be8560400151613ef8565b905060005b60ff811015614774576146d962093a8083615b4d565b91506000858311156146ed57859250614701565b50600082815260106020526040902054600f0b5b6147148460400151846140009190615945565b84602001516147239190615d66565b845161472f9190615dfa565b600f0b8452828614156147425750614774565b8084602001516147529190615d15565b600f0b602085015250604083018290528061476c81615a8d565b9150506146c3565b5060008260000151600f0b121561478a57600082525b81516146a090600f0b613f12565b3360009081526006602052604090205460ff16156147c85760405162461bcd60e51b8152600401610d0790615cc9565b6147d181613ef8565b3360009081526007602090815260409182902082518084019093528054600f0b835260010154908201529091508261481b5760405162461bcd60e51b8152600401610d0790615aa8565b8051600f0b1561485e5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b1bd8dad95960921b6044820152606401610d07565b4282116148a35760405162461bcd60e51b815260206004820152601360248201527217dd5b9b1bd8dad51a5b59481d1bdbc81bdb19606a1b6044820152606401610d07565b60016148b362093a8060d1615c43565b6148bd9190615945565b6148c79042615b4d565b82111561490d5760405162461bcd60e51b81526020600482015260146024820152735f756e6c6f636b54696d6520746f6f206c6f6e6760601b6044820152606401610d07565b336000818152600a6020526040902054614933919085908590859060019060ff16614128565b505050565b6149338363a9059cbb60e01b8484604051602401613ec1929190615cfc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008082815b6080811015614a3b578183106149c257614a3b565b600060026149d08486615b4d565b6149db906001615b4d565b6149e59190615c78565b905086600d82815481106149fb576149fb615a77565b90600052602060002090600302016002015411614a1a57809350614a28565b614a25600182615945565b92505b5080614a3381615a8d565b9150506149ad565b5090949350505050565b604080516080808201835260008083526020808401829052838501829052606080850183905285519384018652828452908301829052938201819052928101839052600c549192909181906001600160a01b03881615614ce557428760200151118015614ab9575060008760000151600f0b135b15614b1a57614adb6001614ad162093a8060d1615c43565b6140009190615945565b8751614ae79190615e4a565b600f0b602080870191909152870151614b0590614000904290615945565b8560200151614b149190615d66565b600f0b85525b428660200151118015614b34575060008660000151600f0b135b15614b8b57614b4c6001614ad162093a8060d1615c43565b8651614b589190615e4a565b600f0b602080860191909152860151614b7690614000904290615945565b8460200151614b859190615d66565b600f0b84525b6001600160a01b0388166000908152600f602052604090205480614c0f576001600160a01b0389166000908152600e60209081526040808320805460018181018355918552938390208a51938b01516001600160801b03908116600160801b0294169390931760039094029092019283558801519082015560608701516002909101555b614c1a816001615b4d565b6001600160a01b038a166000818152600f6020818152604080842095909555428a86019081524360608c01908152948452600e82528584208054600181810183559186528386208d518e8601516001600160801b03908116600160801b0291161760039092020190815591519082015593516002909401939093558b8301518252601083529290205490890151910b945015614ce357876020015187602001511415614cc857839250614ce3565b602080880151600090815260109091526040902054600f0b92505b505b604080516080810182526000808252602082015242918101919091524360608201528115614d6e57600d8281548110614d2057614d20615a77565b60009182526020918290206040805160808101825260039093029091018054600f81810b8552600160801b909104900b93830193909352600183015490820152600290910154606082015290505b604080820180518251608081018452600080825260208201819052835194820194909452606080860151908201529151909290421115614de5576040840151614db79042615945565b6060850151614dc69043615945565b614dd890670de0b6b3a7640000615c43565b614de29190615c78565b90505b6000614df084613ef8565b905060005b60ff811015614fa057614e0b62093a8083615b4d565b9150600042831115614e1f57429250614e33565b50600082815260106020526040902054600f0b5b6000614e426140008886615945565b8860200151614e519190615d66565b8851909150614e61908290615dfa565b600f0b88526020880151614e76908390615d15565b600f90810b60208a015288516000910b1215614e9157600088525b60008860200151600f0b1215614ea957600060208901525b60408089018590528601519396508693670de0b6b3a764000090614ecd9086615945565b614ed79087615c43565b614ee19190615c78565b8660600151614ef09190615b4d565b6060890152614f00896001615b4d565b985042841415614f17575050436060870152614fa0565b600d8054600181018255600091909152885160208a01516001600160801b03908116600160801b029116176003909102600080516020615ec28339815191528101919091556040890151600080516020615f228339815191528201556060890151600080516020615ee28339815191529091015550508080614f9890615a8d565b915050614df5565b50600c8690556001600160a01b038d161561502d57896020015189602001518660200151614fce9190615d15565b614fd89190615dfa565b600f0b6020860152895189518651614ff09190615d15565b614ffa9190615dfa565b600f90810b865260208601516000910b121561501857600060208601525b60008560000151600f0b121561502d57600085525b600d8054600181018255600091909152855160208701516001600160801b03908116600160801b029116176003909102600080516020615ec28339815191528101919091556040860151600080516020615f228339815191528201556060860151600080516020615ee2833981519152909101556001600160a01b038d161561517857428c60200151111561511d5760208a01516150cb9089615d15565b97508b602001518b6020015114156150ef5760208901516150ec9089615dfa565b97505b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b038a161790555b428b602001511115615178578b602001518b6020015111156151785760208901516151489088615dfa565b60208c810151600090815260109091526040902080546001600160801b0319166001600160801b03831617905596505b50505050505050505050505050565b60006151dc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661539a9092919063ffffffff16565b80519091501561493357808060200190518101906151fa9190615e88565b6149335760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d07565b600060016001607f1b0319821280159061527a575060016001607f1b038213155b613f645760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401610d07565b6001600160a01b0382166000908152600f60205260408120548190815b6080811015614a3b5781831061530857614a3b565b600060026153168486615b4d565b615321906001615b4d565b61532b9190615c78565b6001600160a01b0388166000908152600e60205260409020805491925087918390811061535a5761535a615a77565b9060005260206000209060030201600201541161537957809350615387565b615384600182615945565b92505b508061539281615a8d565b9150506152f3565b60606153a984846000856153b1565b949350505050565b6060824710156154125760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d07565b6001600160a01b0385163b6154695760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d07565b600080866001600160a01b031685876040516154859190615ea5565b60006040518083038185875af1925050503d80600081146154c2576040519150601f19603f3d011682016040523d82523d6000602084013e6154c7565b606091505b50915091506154d78282866154e2565b979650505050505050565b606083156154f157508161190f565b8251156155015782518084602001fd5b8160405162461bcd60e51b8152600401610d0791906155c6565b508054600082556003029060005260206000209081019061376a91905b80821115613f64576000808255600182018190556002820155600301615538565b6001600160a01b038116811461376a57600080fd5b6000806040838503121561558157600080fd5b823561558c81615559565b946020939093013593505050565b60005b838110156155b557818101518382015260200161559d565b838111156114645750506000910152565b60208152600082518060208401526155e581604085016020870161559a565b601f01601f19169190910160400192915050565b60006020828403121561560b57600080fd5b813561190f81615559565b60008060006060848603121561562b57600080fd5b833561563681615559565b95602085013595506040909401359392505050565b801515811461376a57600080fd5b6000806040838503121561566c57600080fd5b823561567781615559565b915060208301356156878161564b565b809150509250929050565b6000806000604084860312156156a757600080fd5b83356001600160401b03808211156156be57600080fd5b818601915086601f8301126156d257600080fd5b8135818111156156e157600080fd5b8760208260051b85010111156156f657600080fd5b6020928301955093505084013561570c8161564b565b809150509250925092565b60006020828403121561572957600080fd5b813561190f8161564b565b6001600160a01b0391909116815260200190565b6000806040838503121561575b57600080fd5b50508035926020909101359150565b60006020828403121561577c57600080fd5b5035919050565b80356001600160401b038116811461579a57600080fd5b919050565b600080600080608085870312156157b557600080fd5b6157be85615783565b93506157cc60208601615783565b925060408501356157dc81615559565b915060608501356157ec81615559565b939692955090935050565b60008060006060848603121561580c57600080fd5b833561581781615559565b925060208401356158278161564b565b9150604084013564ffffffffff8116811461570c57600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600b908201526a10903232b632b3b0ba37b960a91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001600160681b03838116908316818110156158d1576158d161589b565b039392505050565b600181811c908216806158ed57607f821691505b602082108114156127e657634e487b7160e01b600052602260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000828210156159575761595761589b565b500390565b602080825260089082015267546f6f206c61746560c01b604082015260600190565b6020808252601490820152732737903637b1b59037b7103232b632b3b0ba37b960611b604082015260600190565b60208082526016908201527511195b1959d85d1bdc881b1bd8dac8195e1c1a5c995960521b604082015260600190565b60006001600160681b038281168482168083038211156159fe576159fe61589b565b01949350505050565b6001600160801b0392909216825265ffffffffffff16602082015260400190565b6020808252600b908201526a084818d85ad9481c1bdbdb60aa1b604082015260600190565b60208082526010908201526f3130b2102fb13637b1b5a73ab6b132b960811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615aa157615aa161589b565b5060010190565b6020808252600b908201526a1098590817d85b5bdd5b9d60aa1b604082015260600190565b6020808252600d908201526c139bc81b1bd8dac8199bdd5b99609a1b604082015260600190565b6020808252600c908201526b131bd8dac8195e1c1a5c995960a21b604082015260600190565b918252602082015260400190565b6020808252600b908201526a0848195bd8481bdc881ddb60aa1b604082015260600190565b60008219821115615b6057615b6061589b565b500190565b6020808252600d908201526c08481a5b9a5d1a585b1a5e9959609a1b604082015260600190565b60008060008060008060008060006101208a8c031215615bab57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a0151615be78161564b565b809250506101008a015190509295985092959850929598565b60208082526010908201526f105b1c9958591e481b5a59dc985d195960821b604082015260600190565b600060208284031215615c3c57600080fd5b5051919050565b6000816000190483118215151615615c5d57615c5d61589b565b500290565b634e487b7160e01b600052601260045260246000fd5b600082615c8757615c87615c62565b500490565b600060208284031215615c9e57600080fd5b815161190f81615559565b602080825260069082015265119bdc989a5960d21b604082015260600190565b602080825260199082015278416c726561647920656d657267656e6379576974686472617760381b604082015260600190565b6001600160a01b03929092168252602082015260400190565b6000600f82810b9084900b828212801560016001607f1b0384900383131615615d4057615d4061589b565b60016001607f1b03198390038212811615615d5d57615d5d61589b565b50019392505050565b6000600f82810b9084900b60016001607f1b0383821384841380821684840486111615615d9557615d9561589b565b60016001607f1b03196000851282811687830587121615615db857615db861589b565b60008712925085820587128484161615615dd457615dd461589b565b85850587128184161615615dea57615dea61589b565b5050509290910295945050505050565b6000600f82810b9084900b828112801560016001607f1b0319830184121615615e2557615e2561589b565b60016001607f1b0382018313811615615e4057615e4061589b565b5090039392505050565b600081600f0b83600f0b80615e6157615e61615c62565b60016001607f1b0319821460001982141615615e7f57615e7f61589b565b90059392505050565b600060208284031215615e9a57600080fd5b815161190f8161564b565b60008251615eb781846020870161559a565b919091019291505056fed7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5d7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb75e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5cd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb67a260b029728603ffc0679b0360160ac6e1daf21270ab94c6acdf3deabd0ef96a2646970667358221220b6025fd4a2599000652864fa5c24e4cef152b4de735d9e6b7ae5baeab385308264736f6c634300080a0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/projects/vecake/tsconfig.json b/projects/vecake/tsconfig.json new file mode 100644 index 00000000..dd966549 --- /dev/null +++ b/projects/vecake/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "noImplicitAny": false + } +}