Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 79 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unsubscribe By A... | 18115774 | 497 days ago | IN | 0 ETH | 0.00150235 | ||||
Change Min Ratio... | 12599045 | 1321 days ago | IN | 0 ETH | 0.00058294 | ||||
Change Min Ratio... | 12599042 | 1321 days ago | IN | 0 ETH | 0.00058294 | ||||
Unsubscribe By A... | 12243928 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243928 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243928 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243928 | 1376 days ago | IN | 0 ETH | 0.00557941 | ||||
Unsubscribe By A... | 12243928 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243927 | 1376 days ago | IN | 0 ETH | 0.00557941 | ||||
Unsubscribe By A... | 12243927 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243927 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243927 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243927 | 1376 days ago | IN | 0 ETH | 0.00557941 | ||||
Unsubscribe By A... | 12243927 | 1376 days ago | IN | 0 ETH | 0.00557941 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.00557941 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.00557941 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.00557941 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.00557941 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.00557941 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.0054007 | ||||
Unsubscribe By A... | 12243926 | 1376 days ago | IN | 0 ETH | 0.0054007 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
SubscriptionsV2
Compiler Version
v0.5.7+commit.6da8b019
Optimization Enabled:
Yes with 20000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-04-08 */ pragma solidity ^0.5.0; pragma experimental ABIEncoderV2; contract Manager { function last(address) public returns (uint); function cdpCan(address, uint, address) public view returns (uint); function ilks(uint) public view returns (bytes32); function owns(uint) public view returns (address); function urns(uint) public view returns (address); function vat() public view returns (address); function open(bytes32, address) public returns (uint); function give(uint, address) public; function cdpAllow(uint, address, uint) public; function urnAllow(address, uint) public; function frob(uint, int, int) public; function flux(uint, address, uint) public; function move(uint, address, uint) public; function exit(address, uint, address, uint) public; function quit(uint, address) public; function enter(address, uint) public; function shift(uint, uint) public; } contract StaticV2 { enum Method { Boost, Repay } struct CdpHolder { uint128 minRatio; uint128 maxRatio; uint128 optimalRatioBoost; uint128 optimalRatioRepay; address owner; uint cdpId; bool boostEnabled; bool nextPriceEnabled; } struct SubPosition { uint arrPos; bool subscribed; } } interface ERC20 { function totalSupply() external view returns (uint256 supply); function balanceOf(address _owner) external view returns (uint256 balance); function transfer(address _to, uint256 _value) external returns (bool success); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success); function approve(address _spender, uint256 _value) external returns (bool success); function allowance(address _owner, address _spender) external view returns (uint256 remaining); function decimals() external view returns (uint256 digits); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } interface ExchangeInterface { function swapEtherToToken(uint256 _ethAmount, address _tokenAddress, uint256 _maxAmount) external payable returns (uint256, uint256); function swapTokenToEther(address _tokenAddress, uint256 _amount, uint256 _maxAmount) external returns (uint256); function swapTokenToToken(address _src, address _dest, uint256 _amount) external payable returns (uint256); function getExpectedRate(address src, address dest, uint256 srcQty) external view returns (uint256 expectedRate); } contract SaverLogger { event Repay( uint256 indexed cdpId, address indexed owner, uint256 collateralAmount, uint256 daiAmount ); event Boost( uint256 indexed cdpId, address indexed owner, uint256 daiAmount, uint256 collateralAmount ); function LogRepay(uint256 _cdpId, address _owner, uint256 _collateralAmount, uint256 _daiAmount) public { emit Repay(_cdpId, _owner, _collateralAmount, _daiAmount); } function LogBoost(uint256 _cdpId, address _owner, uint256 _daiAmount, uint256 _collateralAmount) public { emit Boost(_cdpId, _owner, _daiAmount, _collateralAmount); } } contract Discount { address public owner; mapping(address => CustomServiceFee) public serviceFees; uint256 constant MAX_SERVICE_FEE = 400; struct CustomServiceFee { bool active; uint256 amount; } constructor() public { owner = msg.sender; } function isCustomFeeSet(address _user) public view returns (bool) { return serviceFees[_user].active; } function getCustomServiceFee(address _user) public view returns (uint256) { return serviceFees[_user].amount; } function setServiceFee(address _user, uint256 _fee) public { require(msg.sender == owner, "Only owner"); require(_fee >= MAX_SERVICE_FEE || _fee == 0); serviceFees[_user] = CustomServiceFee({active: true, amount: _fee}); } function disableServiceFee(address _user) public { require(msg.sender == owner, "Only owner"); serviceFees[_user] = CustomServiceFee({active: false, amount: 0}); } } contract PipInterface { function read() public returns (bytes32); } contract Spotter { struct Ilk { PipInterface pip; uint256 mat; } mapping (bytes32 => Ilk) public ilks; uint256 public par; } contract Jug { struct Ilk { uint256 duty; uint256 rho; } mapping (bytes32 => Ilk) public ilks; function drip(bytes32) public returns (uint); } contract Vat { struct Urn { uint256 ink; uint256 art; } struct Ilk { uint256 Art; uint256 rate; uint256 spot; uint256 line; uint256 dust; } mapping (bytes32 => mapping (address => Urn )) public urns; mapping (bytes32 => Ilk) public ilks; mapping (bytes32 => mapping (address => uint)) public gem; function can(address, address) public view returns (uint); function dai(address) public view returns (uint); function frob(bytes32, address, address, address, int, int) public; function hope(address) public; function move(address, address, uint) public; } contract Gem { function dec() public returns (uint); function gem() public returns (Gem); function join(address, uint) public payable; function exit(address, uint) public; function approve(address, uint) public; function transfer(address, uint) public returns (bool); function transferFrom(address, address, uint) public returns (bool); function deposit() public payable; function withdraw(uint) public; function allowance(address, address) public returns (uint); } contract DaiJoin { function vat() public returns (Vat); function dai() public returns (Gem); function join(address, uint) public payable; function exit(address, uint) public; } contract TokenInterface { function allowance(address, address) public returns (uint256); function balanceOf(address) public returns (uint256); function approve(address, uint256) public; function transfer(address, uint256) public returns (bool); function transferFrom(address, address, uint256) public returns (bool); function deposit() public payable; function withdraw(uint256) public; } contract SaverExchangeInterface { function getBestPrice( uint256 _amount, address _srcToken, address _destToken, uint256 _exchangeType ) public view returns (address, uint256); } contract ConstantAddressesExchangeMainnet { address public constant MAKER_DAI_ADDRESS = 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359; address public constant KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address public constant MKR_ADDRESS = 0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2; address public constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address payable public constant WALLET_ID = 0x322d58b9E75a6918f7e7849AEe0fF09369977e08; address public constant LOGGER_ADDRESS = 0xeCf88e1ceC2D2894A0295DB3D86Fe7CE4991E6dF; address public constant DISCOUNT_ADDRESS = 0x1b14E8D511c9A4395425314f849bD737BAF8208F; address public constant GAS_TOKEN_INTERFACE_ADDRESS = 0x0000000000b3F879cb30FE243b4Dfee438691c04; address public constant SAVER_EXCHANGE_ADDRESS = 0x862F3dcF1104b8a9468fBb8B843C37C31B41eF09; address public constant MANAGER_ADDRESS = 0x5ef30b9986345249bc32d8928B7ee64DE9435E39; address public constant VAT_ADDRESS = 0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B; address public constant SPOTTER_ADDRESS = 0x65C79fcB50Ca1594B025960e539eD7A9a6D434A3; address public constant PROXY_ACTIONS = 0x82ecD135Dce65Fbc6DbdD0e4237E0AF93FFD5038; address public constant JUG_ADDRESS = 0x19c0976f590D67707E62397C87829d896Dc0f1F1; address public constant DAI_JOIN_ADDRESS = 0x9759A6Ac90977b93B58547b4A71c78317f391A28; address public constant ETH_JOIN_ADDRESS = 0x2F0b23f53734252Bda2277357e97e1517d6B042A; address public constant MIGRATION_ACTIONS_PROXY = 0xe4B22D484958E582098A98229A24e8A43801b674; address public constant SAI_ADDRESS = 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359; address public constant DAI_ADDRESS = 0x6B175474E89094C44Da98b954EedeAC495271d0F; address payable public constant SCD_MCD_MIGRATION = 0xc73e0383F3Aff3215E6f04B0331D58CeCf0Ab849; address public constant ERC20_PROXY_0X = 0x95E6F48254609A6ee006F7D493c8e5fB97094ceF; address public constant NEW_IDAI_ADDRESS = 0x6c1E2B0f67e00c06c8e2BE7Dc681Ab785163fF4D; } contract ConstantAddressesExchangeKovan { address public constant MAKER_DAI_ADDRESS = 0xC4375B7De8af5a38a93548eb8453a498222C4fF2; address public constant KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address public constant MKR_ADDRESS = 0xAaF64BFCC32d0F15873a02163e7E500671a4ffcD; address public constant WETH_ADDRESS = 0xd0A1E359811322d97991E03f863a0C30C2cF029C; address payable public constant WALLET_ID = 0x54b44C6B18fc0b4A1010B21d524c338D1f8065F6; address public constant LOGGER_ADDRESS = 0x32d0e18f988F952Eb3524aCE762042381a2c39E5; address public constant DISCOUNT_ADDRESS = 0x1297c1105FEDf45E0CF6C102934f32C4EB780929; address public constant GAS_TOKEN_INTERFACE_ADDRESS = 0x0000000000170CcC93903185bE5A2094C870Df62; address public constant SAVER_EXCHANGE_ADDRESS = 0xACA7d11e3f482418C324aAC8e90AaD0431f692A6; address public constant MANAGER_ADDRESS = 0x1476483dD8C35F25e568113C5f70249D3976ba21; address public constant VAT_ADDRESS = 0xbA987bDB501d131f766fEe8180Da5d81b34b69d9; address public constant SPOTTER_ADDRESS = 0x3a042de6413eDB15F2784f2f97cC68C7E9750b2D; address public constant PROXY_ACTIONS = 0xd1D24637b9109B7f61459176EdcfF9Be56283a7B; address public constant JUG_ADDRESS = 0xcbB7718c9F39d05aEEDE1c472ca8Bf804b2f1EaD; address public constant DAI_JOIN_ADDRESS = 0x5AA71a3ae1C0bd6ac27A1f28e1415fFFB6F15B8c; address public constant ETH_JOIN_ADDRESS = 0x775787933e92b709f2a3C70aa87999696e74A9F8; address public constant MIGRATION_ACTIONS_PROXY = 0x433870076aBd08865f0e038dcC4Ac6450e313Bd8; address public constant SAI_ADDRESS = 0xC4375B7De8af5a38a93548eb8453a498222C4fF2; address public constant DAI_ADDRESS = 0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa; address payable public constant SCD_MCD_MIGRATION = 0x411B2Faa662C8e3E5cF8f01dFdae0aeE482ca7b0; address public constant ERC20_PROXY_0X = 0x95E6F48254609A6ee006F7D493c8e5fB97094ceF; address public constant NEW_IDAI_ADDRESS = 0x6c1E2B0f67e00c06c8e2BE7Dc681Ab785163fF4D; } contract ConstantAddressesExchange is ConstantAddressesExchangeMainnet {} contract ExchangeHelper is ConstantAddressesExchange { function swap(uint[4] memory _data, address _src, address _dest, address _exchangeAddress, bytes memory _callData) internal returns (uint) { address wrapper; uint price; uint[2] memory tokens; bool success; tokens[1] = _data[0]; _src = wethToKyberEth(_src); _dest = wethToKyberEth(_dest); address[3] memory orderAddresses = [_exchangeAddress, _src, _dest]; if (_data[2] == 4) { if (orderAddresses[1] != KYBER_ETH_ADDRESS) { ERC20(orderAddresses[1]).approve(address(ERC20_PROXY_0X), _data[0]); } (success, tokens[0], ) = takeOrder(orderAddresses, _callData, address(this).balance, _data[0]); require(success && tokens[0] > 0, "0x transaction failed"); } if (tokens[0] == 0) { (wrapper, price) = SaverExchangeInterface(SAVER_EXCHANGE_ADDRESS).getBestPrice(_data[0], orderAddresses[1], orderAddresses[2], _data[2]); require(price > _data[1] || _data[3] > _data[1], "Slippage hit"); if (_data[3] >= price) { if (orderAddresses[1] != KYBER_ETH_ADDRESS) { ERC20(orderAddresses[1]).approve(address(ERC20_PROXY_0X), _data[0]); } (success, tokens[0], tokens[1]) = takeOrder(orderAddresses, _callData, address(this).balance, _data[0]); } if (tokens[1] > 0) { if (tokens[1] != _data[0]) { (wrapper, price) = SaverExchangeInterface(SAVER_EXCHANGE_ADDRESS).getBestPrice(tokens[1], orderAddresses[1], orderAddresses[2], _data[2]); } require(price > _data[1], "Slippage hit onchain price"); if (orderAddresses[1] == KYBER_ETH_ADDRESS) { uint tRet; (tRet,) = ExchangeInterface(wrapper).swapEtherToToken.value(tokens[1])(tokens[1], orderAddresses[2], uint(-1)); tokens[0] += tRet; } else { ERC20(orderAddresses[1]).transfer(wrapper, tokens[1]); if (orderAddresses[2] == KYBER_ETH_ADDRESS) { tokens[0] += ExchangeInterface(wrapper).swapTokenToEther(orderAddresses[1], tokens[1], uint(-1)); } else { tokens[0] += ExchangeInterface(wrapper).swapTokenToToken(orderAddresses[1], orderAddresses[2], tokens[1]); } } } } return tokens[0]; } function takeOrder(address[3] memory _addresses, bytes memory _data, uint _value, uint _amount) private returns(bool, uint, uint) { bool success; (success, ) = _addresses[0].call.value(_value)(_data); uint tokensLeft = _amount; uint tokensReturned = 0; if (success){ if (_addresses[1] == KYBER_ETH_ADDRESS) { tokensLeft = address(this).balance; } else { tokensLeft = ERC20(_addresses[1]).balanceOf(address(this)); } if (_addresses[2] == KYBER_ETH_ADDRESS) { TokenInterface(WETH_ADDRESS).withdraw(TokenInterface(WETH_ADDRESS).balanceOf(address(this))); tokensReturned = address(this).balance; } else { tokensReturned = ERC20(_addresses[2]).balanceOf(address(this)); } } return (success, tokensReturned, tokensLeft); } function wethToKyberEth(address _src) internal pure returns (address) { return _src == WETH_ADDRESS ? KYBER_ETH_ADDRESS : _src; } } contract DSMath { function add(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x); } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x - y) <= x); } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { require(y == 0 || (z = x * y) / y == x); } function div(uint256 x, uint256 y) internal pure returns (uint256 z) { return x / y; } function min(uint256 x, uint256 y) internal pure returns (uint256 z) { return x <= y ? x : y; } function max(uint256 x, uint256 y) internal pure returns (uint256 z) { return x >= y ? x : y; } function imin(int256 x, int256 y) internal pure returns (int256 z) { return x <= y ? x : y; } function imax(int256 x, int256 y) internal pure returns (int256 z) { return x >= y ? x : y; } uint256 constant WAD = 10**18; uint256 constant RAY = 10**27; function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, y), WAD / 2) / WAD; } function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, y), RAY / 2) / RAY; } function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, WAD), y / 2) / y; } function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, RAY), y / 2) / y; } function rpow(uint256 x, uint256 n) internal pure returns (uint256 z) { z = n % 2 != 0 ? x : RAY; for (n /= 2; n != 0; n /= 2) { x = rmul(x, x); if (n % 2 != 0) { z = rmul(z, x); } } } } contract DSAuthority { function canCall(address src, address dst, bytes4 sig) public view returns (bool); } contract DSAuthEvents { event LogSetAuthority(address indexed authority); event LogSetOwner(address indexed owner); } contract DSAuth is DSAuthEvents { DSAuthority public authority; address public owner; constructor() public { owner = msg.sender; emit LogSetOwner(msg.sender); } function setOwner(address owner_) public auth { owner = owner_; emit LogSetOwner(owner); } function setAuthority(DSAuthority authority_) public auth { authority = authority_; emit LogSetAuthority(address(authority)); } modifier auth { require(isAuthorized(msg.sender, msg.sig)); _; } function isAuthorized(address src, bytes4 sig) internal view returns (bool) { if (src == address(this)) { return true; } else if (src == owner) { return true; } else if (authority == DSAuthority(0)) { return false; } else { return authority.canCall(src, address(this), sig); } } } contract DSNote { event LogNote( bytes4 indexed sig, address indexed guy, bytes32 indexed foo, bytes32 indexed bar, uint256 wad, bytes fax ) anonymous; modifier note { bytes32 foo; bytes32 bar; assembly { foo := calldataload(4) bar := calldataload(36) } emit LogNote(msg.sig, msg.sender, foo, bar, msg.value, msg.data); _; } } contract DSProxy is DSAuth, DSNote { DSProxyCache public cache; constructor(address _cacheAddr) public { require(setCache(_cacheAddr)); } function() external payable {} function execute(bytes memory _code, bytes memory _data) public payable returns (address target, bytes32 response) { target = cache.read(_code); if (target == address(0)) { target = cache.write(_code); } response = execute(target, _data); } function execute(address _target, bytes memory _data) public payable auth note returns (bytes32 response) { require(_target != address(0)); assembly { let succeeded := delegatecall( sub(gas, 5000), _target, add(_data, 0x20), mload(_data), 0, 32 ) response := mload(0) switch iszero(succeeded) case 1 { revert(0, 0) } } } function setCache(address _cacheAddr) public payable auth note returns (bool) { require(_cacheAddr != address(0)); cache = DSProxyCache(_cacheAddr); return true; } } contract DSProxyCache { mapping(bytes32 => address) cache; function read(bytes memory _code) public view returns (address) { bytes32 hash = keccak256(_code); return cache[hash]; } function write(bytes memory _code) public returns (address target) { assembly { target := create(0, add(_code, 0x20), mload(_code)) switch iszero(extcodesize(target)) case 1 { revert(0, 0) } } bytes32 hash = keccak256(_code); cache[hash] = target; } } contract Join { bytes32 public ilk; function dec() public returns (uint); function gem() public returns (Gem); function join(address, uint) public payable; function exit(address, uint) public; } contract SaverProxyHelper is DSMath { function normalizeDrawAmount(uint _amount, uint _rate, uint _daiVatBalance) internal pure returns (int dart) { if (_daiVatBalance < mul(_amount, RAY)) { dart = toPositiveInt(sub(mul(_amount, RAY), _daiVatBalance) / _rate); dart = mul(uint(dart), _rate) < mul(_amount, RAY) ? dart + 1 : dart; } } function toRad(uint _wad) internal pure returns (uint) { return mul(_wad, 10 ** 27); } function convertTo18(address _joinAddr, uint256 _amount) internal returns (uint256) { return mul(_amount, 10 ** (18 - Join(_joinAddr).dec())); } function toPositiveInt(uint _x) internal pure returns (int y) { y = int(_x); require(y >= 0, "int-overflow"); } function normalizePaybackAmount(address _vat, address _urn, bytes32 _ilk) internal view returns (int amount) { uint dai = Vat(_vat).dai(_urn); (, uint rate,,,) = Vat(_vat).ilks(_ilk); (, uint art) = Vat(_vat).urns(_ilk, _urn); amount = toPositiveInt(dai / rate); amount = uint(amount) <= art ? - amount : - toPositiveInt(art); } function getAllDebt(address _vat, address _usr, address _urn, bytes32 _ilk) internal view returns (uint daiAmount) { (, uint rate,,,) = Vat(_vat).ilks(_ilk); (, uint art) = Vat(_vat).urns(_ilk, _urn); uint dai = Vat(_vat).dai(_usr); uint rad = sub(mul(art, rate), dai); daiAmount = rad / RAY; daiAmount = mul(daiAmount, RAY) < rad ? daiAmount + 1 : daiAmount; } function getCollateralAddr(address _joinAddr) internal returns (address) { return address(Join(_joinAddr).gem()); } function getCdpInfo(Manager _manager, uint _cdpId, bytes32 _ilk) public view returns (uint, uint) { address vat = _manager.vat(); address urn = _manager.urns(_cdpId); (uint collateral, uint debt) = Vat(vat).urns(_ilk, urn); (,uint rate,,,) = Vat(vat).ilks(_ilk); return (collateral, rmul(debt, rate)); } function getOwner(Manager _manager, uint _cdpId) public view returns (address) { DSProxy proxy = DSProxy(uint160(_manager.owns(_cdpId))); return proxy.owner(); } } contract MCDSaverProxy is SaverProxyHelper, ExchangeHelper { uint public constant SERVICE_FEE = 400; bytes32 public constant ETH_ILK = 0x4554482d41000000000000000000000000000000000000000000000000000000; bytes32 public constant USDC_ILK = 0x555344432d410000000000000000000000000000000000000000000000000000; Manager public constant manager = Manager(MANAGER_ADDRESS); Vat public constant vat = Vat(VAT_ADDRESS); DaiJoin public constant daiJoin = DaiJoin(DAI_JOIN_ADDRESS); Spotter public constant spotter = Spotter(SPOTTER_ADDRESS); modifier boostCheck(uint _cdpId) { bytes32 ilk = manager.ilks(_cdpId); address urn = manager.urns(_cdpId); (uint collateralBefore, ) = vat.urns(ilk, urn); _; (uint collateralAfter, ) = vat.urns(ilk, urn); require(collateralAfter > collateralBefore); } modifier repayCheck(uint _cdpId) { bytes32 ilk = manager.ilks(_cdpId); uint beforeRatio = getRatio(_cdpId, ilk); _; uint afterRatio = getRatio(_cdpId, ilk); require(afterRatio > beforeRatio || afterRatio == 0); } function repay( uint[6] memory _data, address _joinAddr, address _exchangeAddress, bytes memory _callData ) public payable repayCheck(_data[0]) { address owner = getOwner(manager, _data[0]); bytes32 ilk = manager.ilks(_data[0]); uint[3] memory temp; temp[0] = drawCollateral(_data[0], ilk, _joinAddr, _data[1]); uint[4] memory swapData = [temp[0], _data[2], _data[3], _data[5]]; temp[1] = swap(swapData, getCollateralAddr(_joinAddr), DAI_ADDRESS, _exchangeAddress, _callData); temp[2] = sub(temp[1], getFee(temp[1], _data[4], owner)); paybackDebt(_data[0], ilk, temp[2], owner); if (address(this).balance > 0) { tx.origin.transfer(address(this).balance); } SaverLogger(LOGGER_ADDRESS).LogRepay(_data[0], owner, temp[0], temp[1]); } function boost( uint[6] memory _data, address _joinAddr, address _exchangeAddress, bytes memory _callData ) public payable boostCheck(_data[0]) { address owner = getOwner(manager, _data[0]); bytes32 ilk = manager.ilks(_data[0]); uint[3] memory temp; temp[0] = drawDai(_data[0], ilk, _data[1]); temp[1] = sub(temp[0], getFee(temp[0], _data[4], owner)); uint[4] memory swapData = [temp[1], _data[2], _data[3], _data[5]]; temp[2] = swap(swapData, DAI_ADDRESS, getCollateralAddr(_joinAddr), _exchangeAddress, _callData); addCollateral(_data[0], _joinAddr, temp[2]); if (address(this).balance > 0) { tx.origin.transfer(address(this).balance); } SaverLogger(LOGGER_ADDRESS).LogBoost(_data[0], owner, temp[0], temp[2]); } function drawDai(uint _cdpId, bytes32 _ilk, uint _daiAmount) internal returns (uint) { uint rate = Jug(JUG_ADDRESS).drip(_ilk); uint daiVatBalance = vat.dai(manager.urns(_cdpId)); uint maxAmount = getMaxDebt(_cdpId, _ilk); if (_daiAmount >= maxAmount) { _daiAmount = sub(maxAmount, 1); } manager.frob(_cdpId, int(0), normalizeDrawAmount(_daiAmount, rate, daiVatBalance)); manager.move(_cdpId, address(this), toRad(_daiAmount)); if (vat.can(address(this), address(DAI_JOIN_ADDRESS)) == 0) { vat.hope(DAI_JOIN_ADDRESS); } DaiJoin(DAI_JOIN_ADDRESS).exit(address(this), _daiAmount); return _daiAmount; } function addCollateral(uint _cdpId, address _joinAddr, uint _amount) internal { int convertAmount = 0; if (_joinAddr == ETH_JOIN_ADDRESS) { Join(_joinAddr).gem().deposit.value(_amount)(); convertAmount = toPositiveInt(_amount); } else { convertAmount = toPositiveInt(convertTo18(_joinAddr, _amount)); } Join(_joinAddr).gem().approve(_joinAddr, _amount); Join(_joinAddr).join(address(this), _amount); vat.frob( manager.ilks(_cdpId), manager.urns(_cdpId), address(this), address(this), convertAmount, 0 ); } function drawCollateral(uint _cdpId, bytes32 _ilk, address _joinAddr, uint _amount) internal returns (uint) { uint maxCollateral = getMaxCollateral(_cdpId, _ilk); if (_amount >= maxCollateral) { _amount = sub(maxCollateral, 1); } uint frobAmount = _ilk == USDC_ILK ? _amount * (10 ** 12) : _amount; manager.frob(_cdpId, -toPositiveInt(frobAmount), 0); manager.flux(_cdpId, address(this), frobAmount); Join(_joinAddr).exit(address(this), _amount); if (_joinAddr == ETH_JOIN_ADDRESS) { Join(_joinAddr).gem().withdraw(_amount); } return _amount; } function paybackDebt(uint _cdpId, bytes32 _ilk, uint _daiAmount, address _owner) internal { address urn = manager.urns(_cdpId); uint wholeDebt = getAllDebt(VAT_ADDRESS, urn, urn, _ilk); if (_daiAmount > wholeDebt) { ERC20(DAI_ADDRESS).transfer(_owner, sub(_daiAmount, wholeDebt)); _daiAmount = wholeDebt; } daiJoin.dai().approve(DAI_JOIN_ADDRESS, _daiAmount); daiJoin.join(urn, _daiAmount); manager.frob(_cdpId, 0, normalizePaybackAmount(VAT_ADDRESS, urn, _ilk)); } function getFee(uint _amount, uint _gasCost, address _owner) internal returns (uint feeAmount) { uint fee = SERVICE_FEE; if (Discount(DISCOUNT_ADDRESS).isCustomFeeSet(_owner)) { fee = Discount(DISCOUNT_ADDRESS).getCustomServiceFee(_owner); } feeAmount = (fee == 0) ? 0 : (_amount / fee); if (_gasCost != 0) { uint ethDaiPrice = getPrice(ETH_ILK); _gasCost = rmul(_gasCost, ethDaiPrice); feeAmount = add(feeAmount, _gasCost); } if (feeAmount > (_amount / 5)) { feeAmount = _amount / 5; } ERC20(DAI_ADDRESS).transfer(WALLET_ID, feeAmount); } function getMaxCollateral(uint _cdpId, bytes32 _ilk) public view returns (uint) { uint price = getPrice(_ilk); (uint collateral, uint debt) = getCdpInfo(manager, _cdpId, _ilk); (, uint mat) = Spotter(SPOTTER_ADDRESS).ilks(_ilk); uint maxCollateral = sub(sub(collateral, (div(mul(mat, debt), price))), 10); uint normalizeMaxCollateral = _ilk == USDC_ILK ? maxCollateral / (10 ** 12) : maxCollateral; return normalizeMaxCollateral; } function getMaxDebt(uint _cdpId, bytes32 _ilk) public view returns (uint) { uint price = getPrice(_ilk); (, uint mat) = spotter.ilks(_ilk); (uint collateral, uint debt) = getCdpInfo(manager, _cdpId, _ilk); return sub(sub(div(mul(collateral, price), mat), debt), 10); } function getPrice(bytes32 _ilk) public view returns (uint) { (, uint mat) = spotter.ilks(_ilk); (,,uint spot,,) = vat.ilks(_ilk); return rmul(rmul(spot, spotter.par()), mat); } function getRatio(uint _cdpId, bytes32 _ilk) public view returns (uint) { uint price = getPrice( _ilk); (uint collateral, uint debt) = getCdpInfo(manager, _cdpId, _ilk); if (debt == 0) return 0; return rdiv(wmul(collateral, price), debt); } function getCdpDetailedInfo(uint _cdpId) public view returns (uint collateral, uint debt, uint price, bytes32 ilk) { address urn = manager.urns(_cdpId); ilk = manager.ilks(_cdpId); (collateral, debt) = vat.urns(ilk, urn); (,uint rate,,,) = vat.ilks(ilk); debt = rmul(debt, rate); price = getPrice(ilk); } } contract ConstantAddressesMainnet { address public constant MAKER_DAI_ADDRESS = 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359; address public constant IDAI_ADDRESS = 0x14094949152EDDBFcd073717200DA82fEd8dC960; address public constant SOLO_MARGIN_ADDRESS = 0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e; address public constant CDAI_ADDRESS = 0xF5DCe57282A584D2746FaF1593d3121Fcac444dC; address public constant KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address public constant MKR_ADDRESS = 0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2; address public constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public constant VOX_ADDRESS = 0x9B0F70Df76165442ca6092939132bBAEA77f2d7A; address public constant PETH_ADDRESS = 0xf53AD2c6851052A81B42133467480961B2321C09; address public constant TUB_ADDRESS = 0x448a5065aeBB8E423F0896E6c5D525C040f59af3; address payable public constant WALLET_ID = 0x322d58b9E75a6918f7e7849AEe0fF09369977e08; address public constant LOGGER_ADDRESS = 0xeCf88e1ceC2D2894A0295DB3D86Fe7CE4991E6dF; address public constant OTC_ADDRESS = 0x794e6e91555438aFc3ccF1c5076A74F42133d08D; address public constant DISCOUNT_ADDRESS = 0x1b14E8D511c9A4395425314f849bD737BAF8208F; address public constant KYBER_WRAPPER = 0x8F337bD3b7F2b05d9A8dC8Ac518584e833424893; address public constant UNISWAP_WRAPPER = 0x1e30124FDE14533231216D95F7798cD0061e5cf8; address public constant ETH2DAI_WRAPPER = 0xd7BBB1777E13b6F535Dec414f575b858ed300baF; address public constant OASIS_WRAPPER = 0x9aBE2715D2d99246269b8E17e9D1b620E9bf6558; address public constant KYBER_INTERFACE = 0x818E6FECD516Ecc3849DAf6845e3EC868087B755; address public constant UNISWAP_FACTORY = 0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95; address public constant FACTORY_ADDRESS = 0x5a15566417e6C1c9546523066500bDDBc53F88C7; address public constant PIP_INTERFACE_ADDRESS = 0x729D19f657BD0614b4985Cf1D82531c67569197B; address public constant PROXY_REGISTRY_INTERFACE_ADDRESS = 0x4678f0a6958e4D2Bc4F1BAF7Bc52E8F3564f3fE4; address public constant GAS_TOKEN_INTERFACE_ADDRESS = 0x0000000000b3F879cb30FE243b4Dfee438691c04; address public constant SAVINGS_LOGGER_ADDRESS = 0x89b3635BD2bAD145C6f92E82C9e83f06D5654984; address public constant SAVER_EXCHANGE_ADDRESS = 0x6eC6D98e2AF940436348883fAFD5646E9cdE2446; address public constant COMPOUND_DAI_ADDRESS = 0x25a01a05C188DaCBCf1D61Af55D4a5B4021F7eeD; address public constant STUPID_EXCHANGE = 0x863E41FE88288ebf3fcd91d8Dbb679fb83fdfE17; address public constant MANAGER_ADDRESS = 0x5ef30b9986345249bc32d8928B7ee64DE9435E39; address public constant VAT_ADDRESS = 0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B; address public constant SPOTTER_ADDRESS = 0x65C79fcB50Ca1594B025960e539eD7A9a6D434A3; address public constant PROXY_ACTIONS = 0x82ecD135Dce65Fbc6DbdD0e4237E0AF93FFD5038; address public constant JUG_ADDRESS = 0x19c0976f590D67707E62397C87829d896Dc0f1F1; address public constant DAI_JOIN_ADDRESS = 0x9759A6Ac90977b93B58547b4A71c78317f391A28; address public constant ETH_JOIN_ADDRESS = 0x2F0b23f53734252Bda2277357e97e1517d6B042A; address public constant MIGRATION_ACTIONS_PROXY = 0xe4B22D484958E582098A98229A24e8A43801b674; address public constant SAI_ADDRESS = 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359; address public constant DAI_ADDRESS = 0x6B175474E89094C44Da98b954EedeAC495271d0F; address payable public constant SCD_MCD_MIGRATION = 0xc73e0383F3Aff3215E6f04B0331D58CeCf0Ab849; address public constant SUBSCRIPTION_ADDRESS = 0x83152CAA0d344a2Fd428769529e2d490A88f4393; address public constant MONITOR_ADDRESS = 0x3F4339816EDEF8D3d3970DB2993e2e0Ec6010760; address public constant NEW_CDAI_ADDRESS = 0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643; address public constant NEW_IDAI_ADDRESS = 0x493C57C4763932315A328269E1ADaD09653B9081; address public constant ERC20_PROXY_0X = 0x95E6F48254609A6ee006F7D493c8e5fB97094ceF; } contract ConstantAddressesKovan { address public constant KYBER_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address public constant WETH_ADDRESS = 0xd0A1E359811322d97991E03f863a0C30C2cF029C; address public constant MAKER_DAI_ADDRESS = 0xC4375B7De8af5a38a93548eb8453a498222C4fF2; address public constant MKR_ADDRESS = 0xAaF64BFCC32d0F15873a02163e7E500671a4ffcD; address public constant VOX_ADDRESS = 0xBb4339c0aB5B1d9f14Bd6e3426444A1e9d86A1d9; address public constant PETH_ADDRESS = 0xf4d791139cE033Ad35DB2B2201435fAd668B1b64; address public constant TUB_ADDRESS = 0xa71937147b55Deb8a530C7229C442Fd3F31b7db2; address public constant LOGGER_ADDRESS = 0x32d0e18f988F952Eb3524aCE762042381a2c39E5; address payable public constant WALLET_ID = 0x54b44C6B18fc0b4A1010B21d524c338D1f8065F6; address public constant OTC_ADDRESS = 0x4A6bC4e803c62081ffEbCc8d227B5a87a58f1F8F; address public constant COMPOUND_DAI_ADDRESS = 0x25a01a05C188DaCBCf1D61Af55D4a5B4021F7eeD; address public constant SOLO_MARGIN_ADDRESS = 0x4EC3570cADaAEE08Ae384779B0f3A45EF85289DE; address public constant IDAI_ADDRESS = 0xA1e58F3B1927743393b25f261471E1f2D3D9f0F6; address public constant CDAI_ADDRESS = 0xb6b09fBffBa6A5C4631e5F7B2e3Ee183aC259c0d; address public constant STUPID_EXCHANGE = 0x863E41FE88288ebf3fcd91d8Dbb679fb83fdfE17; address public constant DISCOUNT_ADDRESS = 0x1297c1105FEDf45E0CF6C102934f32C4EB780929; address public constant SAI_SAVER_PROXY = 0xADB7c74bCe932fC6C27ddA3Ac2344707d2fBb0E6; address public constant KYBER_WRAPPER = 0x68c56FF0E7BBD30AF9Ad68225479449869fC1bA0; address public constant UNISWAP_WRAPPER = 0x2A4ee140F05f1Ba9A07A020b07CCFB76CecE4b43; address public constant ETH2DAI_WRAPPER = 0x823cde416973a19f98Bb9C96d97F4FE6C9A7238B; address public constant OASIS_WRAPPER = 0x0257Ba4876863143bbeDB7847beC583e4deb6fE6; address public constant SAVER_EXCHANGE_ADDRESS = 0xACA7d11e3f482418C324aAC8e90AaD0431f692A6; address public constant FACTORY_ADDRESS = 0xc72E74E474682680a414b506699bBcA44ab9a930; address public constant PIP_INTERFACE_ADDRESS = 0xA944bd4b25C9F186A846fd5668941AA3d3B8425F; address public constant PROXY_REGISTRY_INTERFACE_ADDRESS = 0x64A436ae831C1672AE81F674CAb8B6775df3475C; address public constant GAS_TOKEN_INTERFACE_ADDRESS = 0x0000000000170CcC93903185bE5A2094C870Df62; address public constant KYBER_INTERFACE = 0x692f391bCc85cefCe8C237C01e1f636BbD70EA4D; address public constant SAVINGS_LOGGER_ADDRESS = 0x2aa889D809B29c608dA99767837D189dAe12a874; address public constant UNISWAP_FACTORY = 0xf5D915570BC477f9B8D6C0E980aA81757A3AaC36; address public constant MANAGER_ADDRESS = 0x1476483dD8C35F25e568113C5f70249D3976ba21; address public constant VAT_ADDRESS = 0xbA987bDB501d131f766fEe8180Da5d81b34b69d9; address public constant SPOTTER_ADDRESS = 0x3a042de6413eDB15F2784f2f97cC68C7E9750b2D; address public constant JUG_ADDRESS = 0xcbB7718c9F39d05aEEDE1c472ca8Bf804b2f1EaD; address public constant DAI_JOIN_ADDRESS = 0x5AA71a3ae1C0bd6ac27A1f28e1415fFFB6F15B8c; address public constant ETH_JOIN_ADDRESS = 0x775787933e92b709f2a3C70aa87999696e74A9F8; address public constant MIGRATION_ACTIONS_PROXY = 0x433870076aBd08865f0e038dcC4Ac6450e313Bd8; address public constant PROXY_ACTIONS = 0xd1D24637b9109B7f61459176EdcfF9Be56283a7B; address public constant SAI_ADDRESS = 0xC4375B7De8af5a38a93548eb8453a498222C4fF2; address public constant DAI_ADDRESS = 0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa; address payable public constant SCD_MCD_MIGRATION = 0x411B2Faa662C8e3E5cF8f01dFdae0aeE482ca7b0; address public constant SUBSCRIPTION_ADDRESS = 0xFC41f79776061a396635aD0b9dF7a640A05063C1; address public constant MONITOR_ADDRESS = 0xfC1Fc0502e90B7A3766f93344E1eDb906F8A75DD; address public constant NEW_CDAI_ADDRESS = 0xe7bc397DBd069fC7d0109C0636d06888bb50668c; address public constant NEW_IDAI_ADDRESS = 0x6c1E2B0f67e00c06c8e2BE7Dc681Ab785163fF4D; } contract ConstantAddresses is ConstantAddressesMainnet {} contract AdminAuth { address public owner; address public admin; modifier onlyOwner() { require(owner == msg.sender); _; } constructor() public { owner = msg.sender; } function setAdminByOwner(address _admin) public { require(msg.sender == owner); require(_admin == address(0)); admin = _admin; } function setAdminByAdmin(address _admin) public { require(msg.sender == admin); admin = _admin; } function setOwnerByAdmin(address _owner) public { require(msg.sender == admin); owner = _owner; } } contract SubscriptionsV2 is AdminAuth, StaticV2, ConstantAddresses { bytes32 internal constant ETH_ILK = 0x4554482d41000000000000000000000000000000000000000000000000000000; bytes32 internal constant BAT_ILK = 0x4241542d41000000000000000000000000000000000000000000000000000000; CdpHolder[] public subscribers; mapping (uint => SubPosition) public subscribersPos; mapping (bytes32 => uint) public minLimits; uint public changeIndex; Manager public manager = Manager(MANAGER_ADDRESS); Vat public vat = Vat(VAT_ADDRESS); Spotter public spotter = Spotter(SPOTTER_ADDRESS); MCDSaverProxy public saverProxy; event Subscribed(address indexed owner, uint cdpId); event Unsubscribed(address indexed owner, uint cdpId); event Updated(address indexed owner, uint cdpId); event ParamUpdates(address indexed owner, uint cdpId, uint128, uint128, uint128, uint128, bool boostEnabled); constructor(address _saverProxy) public { saverProxy = MCDSaverProxy(_saverProxy); minLimits[ETH_ILK] = 1700000000000000000; minLimits[BAT_ILK] = 1700000000000000000; } function subscribe(uint _cdpId, uint128 _minRatio, uint128 _maxRatio, uint128 _optimalBoost, uint128 _optimalRepay, bool _boostEnabled, bool _nextPriceEnabled) external { require(isOwner(msg.sender, _cdpId), "Must be called by Cdp owner"); uint128 localMaxRatio = _boostEnabled ? _maxRatio : uint128(-1); require(checkParams(manager.ilks(_cdpId), _minRatio, localMaxRatio), "Must be correct params"); SubPosition storage subInfo = subscribersPos[_cdpId]; CdpHolder memory subscription = CdpHolder({ minRatio: _minRatio, maxRatio: localMaxRatio, optimalRatioBoost: _optimalBoost, optimalRatioRepay: _optimalRepay, owner: msg.sender, cdpId: _cdpId, boostEnabled: _boostEnabled, nextPriceEnabled: _nextPriceEnabled }); changeIndex++; if (subInfo.subscribed) { subscribers[subInfo.arrPos] = subscription; emit Updated(msg.sender, _cdpId); emit ParamUpdates(msg.sender, _cdpId, _minRatio, localMaxRatio, _optimalBoost, _optimalRepay, _boostEnabled); } else { subscribers.push(subscription); subInfo.arrPos = subscribers.length - 1; subInfo.subscribed = true; emit Subscribed(msg.sender, _cdpId); } } function unsubscribe(uint _cdpId) external { require(isOwner(msg.sender, _cdpId), "Must be called by Cdp owner"); _unsubscribe(_cdpId); } function isOwner(address _owner, uint _cdpId) internal view returns (bool) { return getOwner(_cdpId) == _owner; } function checkParams(bytes32 _ilk, uint128 _minRatio, uint128 _maxRatio) internal view returns (bool) { if (_minRatio < minLimits[_ilk]) { return false; } if (_minRatio > _maxRatio) { return false; } return true; } function _unsubscribe(uint _cdpId) internal { require(subscribers.length > 0, "Must have subscribers in the list"); SubPosition storage subInfo = subscribersPos[_cdpId]; require(subInfo.subscribed, "Must first be subscribed"); uint lastCdpId = subscribers[subscribers.length - 1].cdpId; SubPosition storage subInfo2 = subscribersPos[lastCdpId]; subInfo2.arrPos = subInfo.arrPos; subscribers[subInfo.arrPos] = subscribers[subscribers.length - 1]; delete subscribers[subscribers.length - 1]; subscribers.length--; changeIndex++; subInfo.subscribed = false; subInfo.arrPos = 0; emit Unsubscribed(msg.sender, _cdpId); } function getOwner(uint _cdpId) public view returns(address) { return manager.owns(_cdpId); } function getSubscribedInfo(uint _cdpId) public view returns(bool, uint128, uint128, uint128, uint128, address, uint coll, uint debt) { SubPosition memory subInfo = subscribersPos[_cdpId]; if (!subInfo.subscribed) return (false, 0, 0, 0, 0, address(0), 0, 0); (coll, debt) = saverProxy.getCdpInfo(manager, _cdpId, manager.ilks(_cdpId)); CdpHolder memory subscriber = subscribers[subInfo.arrPos]; return ( true, subscriber.minRatio, subscriber.maxRatio, subscriber.optimalRatioRepay, subscriber.optimalRatioBoost, subscriber.owner, coll, debt ); } function getCdpHolder(uint _cdpId) public view returns (bool subscribed, CdpHolder memory) { SubPosition memory subInfo = subscribersPos[_cdpId]; if (!subInfo.subscribed) return (false, CdpHolder(0, 0, 0, 0, address(0), 0, false, false)); CdpHolder memory subscriber = subscribers[subInfo.arrPos]; return (true, subscriber); } function getIlkInfo(bytes32 _ilk, uint _cdpId) public view returns(bytes32 ilk, uint art, uint rate, uint spot, uint line, uint dust, uint mat, uint par) { if (_ilk == bytes32(0)) { _ilk = manager.ilks(_cdpId); } ilk = _ilk; (,mat) = spotter.ilks(_ilk); par = spotter.par(); (art, rate, spot, line, dust) = vat.ilks(_ilk); } function getSubscribers() public view returns (CdpHolder[] memory) { return subscribers; } function getSubscribersByPage(uint _page, uint _perPage) public view returns (CdpHolder[] memory) { CdpHolder[] memory holders = new CdpHolder[](_perPage); uint start = _page * _perPage; uint end = start + _perPage; uint count = 0; for (uint i=start; i<end; i++) { holders[count] = subscribers[i]; count++; } return holders; } function changeMinRatios(bytes32 _ilk, uint _newRatio) public onlyOwner { minLimits[_ilk] = _newRatio; } function unsubscribeByAdmin(uint _cdpId) public onlyOwner { SubPosition storage subInfo = subscribersPos[_cdpId]; if (subInfo.subscribed) { _unsubscribe(_cdpId); } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"WETH_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getSubscribers","outputs":[{"components":[{"name":"minRatio","type":"uint128"},{"name":"maxRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAVINGS_LOGGER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"changeIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"getCdpHolder","outputs":[{"name":"subscribed","type":"bool"},{"components":[{"name":"minRatio","type":"uint128"},{"name":"maxRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PIP_INTERFACE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"setOwnerByAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"KYBER_ETH_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OTC_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"IDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ilk","type":"bytes32"},{"name":"_cdpId","type":"uint256"}],"name":"getIlkInfo","outputs":[{"name":"ilk","type":"bytes32"},{"name":"art","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"spot","type":"uint256"},{"name":"line","type":"uint256"},{"name":"dust","type":"uint256"},{"name":"mat","type":"uint256"},{"name":"par","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spotter","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GAS_TOKEN_INTERFACE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VOX_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MANAGER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MONITOR_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ETH2DAI_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"manager","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"STUPID_EXCHANGE","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"subscribers","outputs":[{"name":"minRatio","type":"uint128"},{"name":"maxRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cdpId","type":"uint256"},{"name":"_minRatio","type":"uint128"},{"name":"_maxRatio","type":"uint128"},{"name":"_optimalBoost","type":"uint128"},{"name":"_optimalRepay","type":"uint128"},{"name":"_boostEnabled","type":"bool"},{"name":"_nextPriceEnabled","type":"bool"}],"name":"subscribe","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MIGRATION_ACTIONS_PROXY","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"minLimits","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SPOTTER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"subscribersPos","outputs":[{"name":"arrPos","type":"uint256"},{"name":"subscribed","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PROXY_REGISTRY_INTERFACE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PROXY_ACTIONS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MKR_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FACTORY_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_page","type":"uint256"},{"name":"_perPage","type":"uint256"}],"name":"getSubscribersByPage","outputs":[{"components":[{"name":"minRatio","type":"uint128"},{"name":"maxRatio","type":"uint128"},{"name":"optimalRatioBoost","type":"uint128"},{"name":"optimalRatioRepay","type":"uint128"},{"name":"owner","type":"address"},{"name":"cdpId","type":"uint256"},{"name":"boostEnabled","type":"bool"},{"name":"nextPriceEnabled","type":"bool"}],"name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"unsubscribeByAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"LOGGER_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAVER_EXCHANGE_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAKER_DAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DISCOUNT_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_admin","type":"address"}],"name":"setAdminByAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"JUG_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"unsubscribe","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"NEW_CDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"KYBER_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SUBSCRIPTION_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"NEW_IDAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"COMPOUND_DAI_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"UNISWAP_FACTORY","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"OASIS_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PETH_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cdpId","type":"uint256"}],"name":"getSubscribedInfo","outputs":[{"name":"","type":"bool"},{"name":"","type":"uint128"},{"name":"","type":"uint128"},{"name":"","type":"uint128"},{"name":"","type":"uint128"},{"name":"","type":"address"},{"name":"coll","type":"uint256"},{"name":"debt","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"KYBER_INTERFACE","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VAT_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DAI_JOIN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERC20_PROXY_0X","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"WALLET_ID","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SOLO_MARGIN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"UNISWAP_WRAPPER","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_admin","type":"address"}],"name":"setAdminByOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"saverProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_ilk","type":"bytes32"},{"name":"_newRatio","type":"uint256"}],"name":"changeMinRatios","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"TUB_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ETH_JOIN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SCD_MCD_MIGRATION","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_saverProxy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"}],"name":"Subscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"}],"name":"Unsubscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"}],"name":"Updated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"cdpId","type":"uint256"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"","type":"uint128"},{"indexed":false,"name":"boostEnabled","type":"bool"}],"name":"ParamUpdates","type":"event"}]
Contract Creation Code
6080604052600680546001600160a01b0319908116735ef30b9986345249bc32d8928b7ee64de9435e39179091556007805482167335d1b3f3d7966a1dfe207aa4514c12a259a0492b179055600880549091167365c79fcb50ca1594b025960e539ed7a9a6d434a31790553480156200007757600080fd5b5060405160208062002dce83398101806040526200009991908101906200015a565b60008054336001600160a01b0319918216178255600980549091166001600160a01b03939093169290921790915560046020526717979cfe362a00007f2fb357aebef160fd75ce664729c8e2216cfee265795aab1152e7181cdfed75ca8190557f4241542d410000000000000000000000000000000000000000000000000000009091527ffd6342f3ccba8bc28da74f01de4496e97af7b04f32e6fac899814fb562f4802255620001a2565b600062000153825162000183565b9392505050565b6000602082840312156200016d57600080fd5b60006200017b848462000145565b949350505050565b6000620001908262000196565b92915050565b6001600160a01b031690565b612c1c80620001b26000396000f3fe608060405234801561001057600080fd5b50600436106104215760003560e01c80638cf0a2d611610235578063c917c2d311610135578063d36b907d116100c8578063edcab04e11610097578063f1d253961161007c578063f1d253961461075a578063f835247214610762578063f851a4401461076a57610421565b8063edcab04e1461073f578063f0d405e51461075257610421565b8063d36b907d14610714578063ddaa293c1461071c578063deca5f8814610724578063ebc723cb1461073757610421565b8063cf786f8f11610104578063cf786f8f146106f4578063cfac57c7146106fc578063d0cc728914610704578063d3661fa51461070c57610421565b8063c917c2d3146106b5578063c9fde270146106bd578063cc8e42ce146106c5578063ce9bde1d146106ec57610421565b8063acbeba61116101c8578063bc17effa11610197578063c16921b71161017c578063c16921b714610692578063c41a360a1461069a578063c74c0fac146106ad57610421565b8063bc17effa14610682578063bf42d9471461068a57610421565b8063acbeba6114610657578063ad0b27fb1461065f578063ad7359c914610672578063b175afa11461067a57610421565b806394f0eb3d1161020457806394f0eb3d146106345780639da779e914610469578063a46a66c91461063c578063a7304bf71461064457610421565b80638cf0a2d6146105fe5780638da5cb5b1461061157806391dfdbb61461061957806394bfbe741461062c57610421565b806336569e77116103405780636197114a116102d35780636f06810a116102a2578063819854e711610287578063819854e7146105e6578063825ffd92146105ee5780638823151b146105f657610421565b80636f06810a146105bd578063728c0092146105de57610421565b80636197114a1461058757806362da5d901461059a57806364157b55146105a25780636738929f146105b557610421565b806343fb75e81161030f57806343fb75e814610548578063481c6a7514610550578063502237d71461055857806359221a681461056057610421565b806336569e771461052857806336e6da1114610530578063380d42441461053857806342c1eb4e1461054057610421565b80631e48907b116103b85780632d5eeb3f116103875780632d5eeb3f146104dc5780632e2bf30a146104e45780632e77468d1461050b57806332ac5cd21461052057610421565b80631e48907b146104af57806329f7fc9e146104c45780632a441f05146104cc5780632a4c0a1a146104d457610421565b80630bd4a73e116103f45780630bd4a73e14610469578063106b0339146104715780631da1542f146104865780631dab52b0146104a757610421565b8063040141e5146104265780630531b2ad1461044457806305cc61ad1461044c57806308204ea314610461575b600080fd5b61042e610772565b60405161043b9190612921565b60405180910390f35b61042e61078a565b6104546107a2565b60405161043b919061292f565b61042e61089a565b61042e6108b2565b6104796108ca565b60405161043b91906129d3565b610499610494366004612507565b6108d0565b60405161043b929190612940565b61042e610a3d565b6104c26104bd3660046124c3565b610a55565b005b61042e610ac0565b61042e610ad8565b61042e610af0565b61042e610b08565b6104f76104f2366004612543565b610b20565b60405161043b9897969594939291906129e1565b610513610de3565b60405161043b9190612a31565b61042e610dff565b610513610e12565b61042e610e2e565b61042e610e46565b61042e610e5e565b61042e610e76565b610513610e8e565b61042e610eaa565b61057361056e366004612507565b610ec2565b60405161043b989796959493929190612aa7565b6104c26105953660046125ad565b610f57565b61042e6115b8565b6104796105b0366004612507565b6115d0565b61042e6115e2565b6105d06105cb366004612507565b6115fa565b60405161043b929190612b11565b61042e611616565b61042e61162e565b61042e611646565b61042e61165e565b61045461060c366004612543565b611676565b61042e6117bf565b6104c2610627366004612507565b6117db565b61042e611827565b61042e61183f565b61042e611857565b6104c26106523660046124c3565b61186f565b61042e6118da565b6104c261066d366004612507565b6118f2565b61042e61193e565b61042e611956565b61042e61196e565b61042e611986565b61042e61199e565b61042e6106a8366004612507565b6119b6565b61042e611a5d565b61042e611a75565b61042e611a8d565b6106d86106d3366004612507565b611aa5565b60405161043b98979695949392919061295c565b61042e611d2a565b61042e611d42565b61042e611d5a565b61042e611d72565b61042e611d8a565b61042e611da2565b61042e611dba565b6104c26107323660046124c3565b611dd2565b610513611e17565b6104c261074d366004612543565b611e33565b61042e611e69565b61042e611e81565b61042e611e99565b61042e611eb1565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b73f5dce57282a584d2746faf1593d3121fcac444dc81565b60606002805480602002602001604051908101604052809291908181526020016000905b828210156108905760008481526020908190206040805161010080820183526005870290930180546fffffffffffffffffffffffffffffffff80821684527001000000000000000000000000000000009182900481168488015260018084015480831696860196909652919094049093166060830152600281015473ffffffffffffffffffffffffffffffffffffffff166080830152600381015460a08301526004015460ff808216151560c0840152939004909216151560e083015290835290920191016107c6565b5050505090505b90565b7389b3635bd2bad145c6f92e82c9e83f06d565498481565b7389d24a6b4ccb1b6faa2625fe562bdd9a2326035981565b60055481565b60006108da612364565b6108e26123a8565b506000838152600360209081526040918290208251808401909352805483526001015460ff16151590820181905261095e5750506040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052909150610a38565b610966612364565b600282600001518154811061097757fe5b6000918252602091829020604080516101008082018352600590940290920180546fffffffffffffffffffffffffffffffff8082168552700100000000000000000000000000000000918290048116968501969096526001808301548088169486019490945292049094166060830152600284015473ffffffffffffffffffffffffffffffffffffffff166080830152600384015460a083015260049093015460ff808216151560c0840152929004909116151560e0820152909450925050505b915091565b73729d19f657bd0614b4985cf1d82531c67569197b81565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a7957600080fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b73794e6e91555438afc3ccf1c5076a74f42133d08d81565b736b175474e89094c44da98b954eedeac495271d0f81565b7314094949152eddbfcd073717200da82fed8dc96081565b60008080808080808089610bd7576006546040517f2c2cb9fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690632c2cb9fd90610b84908c906004016129d3565b60206040518083038186803b158015610b9c57600080fd5b505afa158015610bb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610bd49190810190612525565b99505b6008546040517fd9638d360000000000000000000000000000000000000000000000000000000081528b995073ffffffffffffffffffffffffffffffffffffffff9091169063d9638d3690610c30908b906004016129d3565b604080518083038186803b158015610c4757600080fd5b505afa158015610c5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610c7f919081019061257d565b600854604080517f495d32cb000000000000000000000000000000000000000000000000000000008152905192955073ffffffffffffffffffffffffffffffffffffffff909116925063495d32cb916004808301926020929190829003018186803b158015610ced57600080fd5b505afa158015610d01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610d259190810190612525565b6007546040517fd9638d3600000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff169063d9638d3690610d7c908d906004016129d3565b60a06040518083038186803b158015610d9457600080fd5b505afa158015610da8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610dcc9190810190612668565b9b9e939d50919b5099909850965091945092509050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b6eb3f879cb30fe243b4dfee438691c0481565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b739b0f70df76165442ca6092939132bbaea77f2d7a81565b735ef30b9986345249bc32d8928b7ee64de9435e3981565b733f4339816edef8d3d3970db2993e2e0ec601076081565b73d7bbb1777e13b6f535dec414f575b858ed300baf81565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b73863e41fe88288ebf3fcd91d8dbb679fb83fdfe1781565b60028181548110610ecf57fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546fffffffffffffffffffffffffffffffff80851696507001000000000000000000000000000000009485900481169584821695909404169273ffffffffffffffffffffffffffffffffffffffff909216919060ff8082169161010090041688565b610f613388611ecd565b610fa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790612a97565b60405180910390fd5b600082610fcd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610fcf565b855b6006546040517f2c2cb9fd0000000000000000000000000000000000000000000000000000000081529192506110839173ffffffffffffffffffffffffffffffffffffffff90911690632c2cb9fd9061102c908c906004016129d3565b60206040518083038186803b15801561104457600080fd5b505afa158015611058573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061107c9190810190612525565b8883611f0d565b6110b9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790612a87565b60008881526003602052604090206110cf612364565b5060408051610100810182526fffffffffffffffffffffffffffffffff808b168252848116602083015288811692820192909252908616606082015233608082015260a081018a905284151560c082015283151560e082015260058054600190810190915582015460ff16156113445780600283600001548154811061115157fe5b60009182526020918290208351600592909202018054928401517fffffffffffffffffffffffffffffffff000000000000000000000000000000009384166fffffffffffffffffffffffffffffffff938416178316700100000000000000000000000000000000918416820217825560408086015160018401805460608901519716918616919091178516959094169091029390931790915560808301516002820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560a0830151600382015560c08301516004909101805460e0909401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909416911515919091177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010093151593909302929092179091555133907f3eaf52d76d675c02ceed20f7ebcafbd308b4b8f24b33233e3c631749f1fbf23a906112df908d906129d3565b60405180910390a23373ffffffffffffffffffffffffffffffffffffffff167f119b24f3a0ed1dcb65538fb3ae7c0abe4ee9ffc181c3d115a5378581bba4f3a68b8b868b8b8b60405161133796959493929190612b2c565b60405180910390a26115ac565b6002805460018082018355600083905283517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace6005909302928301805460208701517fffffffffffffffffffffffffffffffff000000000000000000000000000000009182166fffffffffffffffffffffffffffffffff9485161784167001000000000000000000000000000000009185168202179092556040808801517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf8701805460608b01519416918616919091178516929094169092021790915560808501517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad0840180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560a08501517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad184015560c08501517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2909301805460e08701517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00918216951515959095177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101009515159590950294909417905592547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01855584810180549092161790555133907f4b90d6788928d63c1821907a6a8b95f40d26562d8fe41b105f7489db9966dfcb906115a3908d906129d3565b60405180910390a25b50505050505050505050565b73e4b22d484958e582098a98229a24e8a43801b67481565b60046020526000908152604090205481565b7365c79fcb50ca1594b025960e539ed7a9a6d434a381565b6003602052600090815260409020805460019091015460ff1682565b734678f0a6958e4d2bc4f1baf7bc52e8f3564f3fe481565b7382ecd135dce65fbc6dbdd0e4237e0af93ffd503881565b739f8f72aa9304c8b593d555f12ef6589cc3a579a281565b735a15566417e6c1c9546523066500bddbc53f88c781565b606080826040519080825280602002602001820160405280156116b357816020015b6116a0612364565b8152602001906001900390816116985790505b5090508383028084016000825b828110156117b157600281815481106116d557fe5b6000918252602091829020604080516101008082018352600590940290920180546fffffffffffffffffffffffffffffffff8082168552700100000000000000000000000000000000918290048116968501969096526001820154808716938501939093529091049093166060820152600283015473ffffffffffffffffffffffffffffffffffffffff166080820152600383015460a082015260049092015460ff808216151560c085015291900416151560e0820152855186908490811061179a57fe5b6020908102919091010152600191820191016116c0565b509293505050505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146117ff57600080fd5b6000818152600360205260409020600181015460ff16156118235761182382611f7c565b5050565b73ecf88e1cec2d2894a0295db3d86fe7ce4991e6df81565b736ec6d98e2af940436348883fafd5646e9cde244681565b731b14e8d511c9a4395425314f849bd737baf8208f81565b60015473ffffffffffffffffffffffffffffffffffffffff16331461189357600080fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b7319c0976f590d67707e62397c87829d896dc0f1f181565b6118fc3382611ecd565b611932576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790612a97565b61193b81611f7c565b50565b735d3a536e4d6dbd6114cc1ead35777bab948e364381565b738f337bd3b7f2b05d9a8dc8ac518584e83342489381565b7383152caa0d344a2fd428769529e2d490a88f439381565b73493c57c4763932315a328269e1adad09653b908181565b7325a01a05c188dacbcf1d61af55d4a5b4021f7eed81565b6006546040517f8161b12000000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff1690638161b12090611a0d9085906004016129d3565b60206040518083038186803b158015611a2557600080fd5b505afa158015611a39573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506117b991908101906124e9565b73c0a47dfe034b400b47bdad5fecda2621de6c4d9581565b739abe2715d2d99246269b8e17e9d1b620e9bf655881565b73f53ad2c6851052a81b42133467480961b2321c0981565b600080600080600080600080611ab96123a8565b506000898152600360209081526040918290208251808401909352805483526001015460ff161515908201819052611b0a575060009750879650869550859450849350839250829150819050611d1f565b6009546006546040517f2c2cb9fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831692634115fe6b9216908d908290632c2cb9fd90611b6f9084906004016129d3565b60206040518083038186803b158015611b8757600080fd5b505afa158015611b9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611bbf9190810190612525565b6040518463ffffffff1660e01b8152600401611bdd93929190612a3f565b604080518083038186803b158015611bf457600080fd5b505afa158015611c08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c2c9190810190612649565b9093509150611c39612364565b6002826000015181548110611c4a57fe5b6000918252602091829020604080516101008082018352600590940290920180546fffffffffffffffffffffffffffffffff8082168086527001000000000000000000000000000000009283900482169786018890526001808501548084169688018790529390930490911660608601819052600284015473ffffffffffffffffffffffffffffffffffffffff1660808701819052600385015460a088015260049094015460ff808216151560c0890152979004909616151560e0909501949094529e50919c50929a50909850909650945050505b919395975091939597565b73818e6fecd516ecc3849daf6845e3ec868087b75581565b7335d1b3f3d7966a1dfe207aa4514c12a259a0492b81565b739759a6ac90977b93b58547b4a71c78317f391a2881565b7395e6f48254609a6ee006f7d493c8e5fb97094cef81565b73322d58b9e75a6918f7e7849aee0ff09369977e0881565b731e0447b19bb6ecfdae1e4ae1694b0c3659614e4e81565b731e30124fde14533231216d95f7798cd0061e5cf881565b60005473ffffffffffffffffffffffffffffffffffffffff163314611df657600080fd5b73ffffffffffffffffffffffffffffffffffffffff81161561189357600080fd5b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314611e5757600080fd5b60009182526004602052604090912055565b73448a5065aebb8e423f0896e6c5d525c040f59af381565b732f0b23f53734252bda2277357e97e1517d6b042a81565b73c73e0383f3aff3215e6f04b0331d58cecf0ab84981565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60008273ffffffffffffffffffffffffffffffffffffffff16611eef836119b6565b73ffffffffffffffffffffffffffffffffffffffff16149392505050565b6000838152600460205260408120546fffffffffffffffffffffffffffffffff84161015611f3d57506000611f75565b816fffffffffffffffffffffffffffffffff16836fffffffffffffffffffffffffffffffff161115611f7157506000611f75565b5060015b9392505050565b600254611fb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790612a77565b6000818152600360205260409020600181015460ff16612001576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790612a67565b60028054600091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061203557fe5b6000918252602080832060036005909302018201548084529190526040909120835481556002805492935090917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061208e57fe5b906000526020600020906005020160028460000154815481106120ad57fe5b60009182526020909120825460059092020180546fffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffffffffffff00000000000000000000000000000000918216178083558454908416700100000000000000000000000000000000918290048516820217835560018086018054918501805492871692909416919091178084559054908516908290049094160292909217909155600280830154818301805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffffff000000000000000000000000000000000000000090921691909117905560038084015490830155600492830180549390920180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff94851615151780825592547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff90931661010093849004909416151590920292909217905580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061224757fe5b60009182526020822060059091020181815560018101829055600280820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600382019290925560040180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690558054906122eb907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83016123bf565b50600580546001908101909155830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556000835560405133907f3a55fe27d475f752627ad5cef7a30389a812bdee18d467b4601ea007cfbace01906123569087906129d3565b60405180910390a250505050565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081019190915290565b604080518082019091526000808252602082015290565b8154818355818111156123eb576005028160050283600052602060002091820191016123eb91906123f0565b505050565b61089791905b8082111561246b576000808255600182018190556002820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560038201556004810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690556005016123f6565b5090565b6000611f758235612b99565b6000611f758251612b99565b6000611f758235612ba4565b6000611f758235610897565b6000611f758251610897565b6000611f758251612bd7565b6000611f758235612ba9565b6000602082840312156124d557600080fd5b60006124e1848461246f565b949350505050565b6000602082840312156124fb57600080fd5b60006124e1848461247b565b60006020828403121561251957600080fd5b60006124e18484612493565b60006020828403121561253757600080fd5b60006124e1848461249f565b6000806040838503121561255657600080fd5b60006125628585612493565b925050602061257385828601612493565b9150509250929050565b6000806040838503121561259057600080fd5b600061259c85856124ab565b92505060206125738582860161249f565b600080600080600080600060e0888a0312156125c857600080fd5b60006125d48a8a612493565b97505060206125e58a828b016124b7565b96505060406125f68a828b016124b7565b95505060606126078a828b016124b7565b94505060806126188a828b016124b7565b93505060a06126298a828b01612487565b92505060c061263a8a828b01612487565b91505092959891949750929550565b6000806040838503121561265c57600080fd5b600061259c858561249f565b600080600080600060a0868803121561268057600080fd5b600061268c888861249f565b955050602061269d8882890161249f565b94505060406126ae8882890161249f565b93505060606126bf8882890161249f565b92505060806126d08882890161249f565b9150509295509295909350565b60006126e9838361287b565b50506101000190565b6126fb81612b99565b82525050565b600061270c82612b8c565b6127168185612b90565b935061272183612b86565b60005b8281101561274c576127378683516126dd565b955061274282612b86565b9150600101612724565b5093949350505050565b6126fb81612ba4565b6126fb81610897565b6126fb81612bd7565b600061277e601883612b90565b7f4d75737420666972737420626520737562736372696265640000000000000000815260200192915050565b60006127b7602183612b90565b7f4d757374206861766520737562736372696265727320696e20746865206c697381527f7400000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000612816601683612b90565b7f4d75737420626520636f727265637420706172616d7300000000000000000000815260200192915050565b600061284f601b83612b90565b7f4d7573742062652063616c6c656420627920436470206f776e65720000000000815260200192915050565b805161010083019061288d8482612918565b5060208201516128a06020850182612918565b5060408201516128b36040850182612918565b5060608201516128c66060850182612918565b5060808201516128d960808501826126f2565b5060a08201516128ec60a085018261275f565b5060c08201516128ff60c0850182612756565b5060e082015161291260e0850182612756565b50505050565b6126fb81612ba9565b602081016117b982846126f2565b60208082528101611f758184612701565b610120810161294f8285612756565b611f75602083018461287b565b610100810161296b828b612756565b612978602083018a612918565b6129856040830189612918565b6129926060830188612918565b61299f6080830187612918565b6129ac60a08301866126f2565b6129b960c083018561275f565b6129c660e083018461275f565b9998505050505050505050565b602081016117b9828461275f565b61010081016129f0828b61275f565b6129fd602083018a61275f565b612a0a604083018961275f565b612a17606083018861275f565b612a24608083018761275f565b6129ac60a083018661275f565b602081016117b98284612768565b60608101612a4d8286612768565b612a5a602083018561275f565b6124e1604083018461275f565b602080825281016117b981612771565b602080825281016117b9816127aa565b602080825281016117b981612809565b602080825281016117b981612842565b6101008101612ab6828b612918565b612ac3602083018a612918565b612ad06040830189612918565b612add6060830188612918565b612aea60808301876126f2565b612af760a083018661275f565b612b0460c0830185612756565b6129c660e0830184612756565b60408101612b1f828561275f565b611f756020830184612756565b60c08101612b3a828961275f565b612b476020830188612918565b612b546040830187612918565b612b616060830186612918565b612b6e6080830185612918565b612b7b60a0830184612756565b979650505050505050565b60200190565b5190565b90815260200190565b60006117b982612bbe565b151590565b6fffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b60006117b982612b9956fea265627a7a723058200934f170125875170ea975cd20eb0db56efb7edee9c9cd183341f778212075df6c6578706572696d656e74616cf50037000000000000000000000000c563ace6facd385cb1f34fa723f412cc64e63d47
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106104215760003560e01c80638cf0a2d611610235578063c917c2d311610135578063d36b907d116100c8578063edcab04e11610097578063f1d253961161007c578063f1d253961461075a578063f835247214610762578063f851a4401461076a57610421565b8063edcab04e1461073f578063f0d405e51461075257610421565b8063d36b907d14610714578063ddaa293c1461071c578063deca5f8814610724578063ebc723cb1461073757610421565b8063cf786f8f11610104578063cf786f8f146106f4578063cfac57c7146106fc578063d0cc728914610704578063d3661fa51461070c57610421565b8063c917c2d3146106b5578063c9fde270146106bd578063cc8e42ce146106c5578063ce9bde1d146106ec57610421565b8063acbeba61116101c8578063bc17effa11610197578063c16921b71161017c578063c16921b714610692578063c41a360a1461069a578063c74c0fac146106ad57610421565b8063bc17effa14610682578063bf42d9471461068a57610421565b8063acbeba6114610657578063ad0b27fb1461065f578063ad7359c914610672578063b175afa11461067a57610421565b806394f0eb3d1161020457806394f0eb3d146106345780639da779e914610469578063a46a66c91461063c578063a7304bf71461064457610421565b80638cf0a2d6146105fe5780638da5cb5b1461061157806391dfdbb61461061957806394bfbe741461062c57610421565b806336569e77116103405780636197114a116102d35780636f06810a116102a2578063819854e711610287578063819854e7146105e6578063825ffd92146105ee5780638823151b146105f657610421565b80636f06810a146105bd578063728c0092146105de57610421565b80636197114a1461058757806362da5d901461059a57806364157b55146105a25780636738929f146105b557610421565b806343fb75e81161030f57806343fb75e814610548578063481c6a7514610550578063502237d71461055857806359221a681461056057610421565b806336569e771461052857806336e6da1114610530578063380d42441461053857806342c1eb4e1461054057610421565b80631e48907b116103b85780632d5eeb3f116103875780632d5eeb3f146104dc5780632e2bf30a146104e45780632e77468d1461050b57806332ac5cd21461052057610421565b80631e48907b146104af57806329f7fc9e146104c45780632a441f05146104cc5780632a4c0a1a146104d457610421565b80630bd4a73e116103f45780630bd4a73e14610469578063106b0339146104715780631da1542f146104865780631dab52b0146104a757610421565b8063040141e5146104265780630531b2ad1461044457806305cc61ad1461044c57806308204ea314610461575b600080fd5b61042e610772565b60405161043b9190612921565b60405180910390f35b61042e61078a565b6104546107a2565b60405161043b919061292f565b61042e61089a565b61042e6108b2565b6104796108ca565b60405161043b91906129d3565b610499610494366004612507565b6108d0565b60405161043b929190612940565b61042e610a3d565b6104c26104bd3660046124c3565b610a55565b005b61042e610ac0565b61042e610ad8565b61042e610af0565b61042e610b08565b6104f76104f2366004612543565b610b20565b60405161043b9897969594939291906129e1565b610513610de3565b60405161043b9190612a31565b61042e610dff565b610513610e12565b61042e610e2e565b61042e610e46565b61042e610e5e565b61042e610e76565b610513610e8e565b61042e610eaa565b61057361056e366004612507565b610ec2565b60405161043b989796959493929190612aa7565b6104c26105953660046125ad565b610f57565b61042e6115b8565b6104796105b0366004612507565b6115d0565b61042e6115e2565b6105d06105cb366004612507565b6115fa565b60405161043b929190612b11565b61042e611616565b61042e61162e565b61042e611646565b61042e61165e565b61045461060c366004612543565b611676565b61042e6117bf565b6104c2610627366004612507565b6117db565b61042e611827565b61042e61183f565b61042e611857565b6104c26106523660046124c3565b61186f565b61042e6118da565b6104c261066d366004612507565b6118f2565b61042e61193e565b61042e611956565b61042e61196e565b61042e611986565b61042e61199e565b61042e6106a8366004612507565b6119b6565b61042e611a5d565b61042e611a75565b61042e611a8d565b6106d86106d3366004612507565b611aa5565b60405161043b98979695949392919061295c565b61042e611d2a565b61042e611d42565b61042e611d5a565b61042e611d72565b61042e611d8a565b61042e611da2565b61042e611dba565b6104c26107323660046124c3565b611dd2565b610513611e17565b6104c261074d366004612543565b611e33565b61042e611e69565b61042e611e81565b61042e611e99565b61042e611eb1565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b73f5dce57282a584d2746faf1593d3121fcac444dc81565b60606002805480602002602001604051908101604052809291908181526020016000905b828210156108905760008481526020908190206040805161010080820183526005870290930180546fffffffffffffffffffffffffffffffff80821684527001000000000000000000000000000000009182900481168488015260018084015480831696860196909652919094049093166060830152600281015473ffffffffffffffffffffffffffffffffffffffff166080830152600381015460a08301526004015460ff808216151560c0840152939004909216151560e083015290835290920191016107c6565b5050505090505b90565b7389b3635bd2bad145c6f92e82c9e83f06d565498481565b7389d24a6b4ccb1b6faa2625fe562bdd9a2326035981565b60055481565b60006108da612364565b6108e26123a8565b506000838152600360209081526040918290208251808401909352805483526001015460ff16151590820181905261095e5750506040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052909150610a38565b610966612364565b600282600001518154811061097757fe5b6000918252602091829020604080516101008082018352600590940290920180546fffffffffffffffffffffffffffffffff8082168552700100000000000000000000000000000000918290048116968501969096526001808301548088169486019490945292049094166060830152600284015473ffffffffffffffffffffffffffffffffffffffff166080830152600384015460a083015260049093015460ff808216151560c0840152929004909116151560e0820152909450925050505b915091565b73729d19f657bd0614b4985cf1d82531c67569197b81565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a7957600080fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b73794e6e91555438afc3ccf1c5076a74f42133d08d81565b736b175474e89094c44da98b954eedeac495271d0f81565b7314094949152eddbfcd073717200da82fed8dc96081565b60008080808080808089610bd7576006546040517f2c2cb9fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690632c2cb9fd90610b84908c906004016129d3565b60206040518083038186803b158015610b9c57600080fd5b505afa158015610bb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610bd49190810190612525565b99505b6008546040517fd9638d360000000000000000000000000000000000000000000000000000000081528b995073ffffffffffffffffffffffffffffffffffffffff9091169063d9638d3690610c30908b906004016129d3565b604080518083038186803b158015610c4757600080fd5b505afa158015610c5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610c7f919081019061257d565b600854604080517f495d32cb000000000000000000000000000000000000000000000000000000008152905192955073ffffffffffffffffffffffffffffffffffffffff909116925063495d32cb916004808301926020929190829003018186803b158015610ced57600080fd5b505afa158015610d01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610d259190810190612525565b6007546040517fd9638d3600000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff169063d9638d3690610d7c908d906004016129d3565b60a06040518083038186803b158015610d9457600080fd5b505afa158015610da8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610dcc9190810190612668565b9b9e939d50919b5099909850965091945092509050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b6eb3f879cb30fe243b4dfee438691c0481565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b739b0f70df76165442ca6092939132bbaea77f2d7a81565b735ef30b9986345249bc32d8928b7ee64de9435e3981565b733f4339816edef8d3d3970db2993e2e0ec601076081565b73d7bbb1777e13b6f535dec414f575b858ed300baf81565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b73863e41fe88288ebf3fcd91d8dbb679fb83fdfe1781565b60028181548110610ecf57fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546fffffffffffffffffffffffffffffffff80851696507001000000000000000000000000000000009485900481169584821695909404169273ffffffffffffffffffffffffffffffffffffffff909216919060ff8082169161010090041688565b610f613388611ecd565b610fa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790612a97565b60405180910390fd5b600082610fcd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610fcf565b855b6006546040517f2c2cb9fd0000000000000000000000000000000000000000000000000000000081529192506110839173ffffffffffffffffffffffffffffffffffffffff90911690632c2cb9fd9061102c908c906004016129d3565b60206040518083038186803b15801561104457600080fd5b505afa158015611058573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061107c9190810190612525565b8883611f0d565b6110b9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790612a87565b60008881526003602052604090206110cf612364565b5060408051610100810182526fffffffffffffffffffffffffffffffff808b168252848116602083015288811692820192909252908616606082015233608082015260a081018a905284151560c082015283151560e082015260058054600190810190915582015460ff16156113445780600283600001548154811061115157fe5b60009182526020918290208351600592909202018054928401517fffffffffffffffffffffffffffffffff000000000000000000000000000000009384166fffffffffffffffffffffffffffffffff938416178316700100000000000000000000000000000000918416820217825560408086015160018401805460608901519716918616919091178516959094169091029390931790915560808301516002820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560a0830151600382015560c08301516004909101805460e0909401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909416911515919091177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010093151593909302929092179091555133907f3eaf52d76d675c02ceed20f7ebcafbd308b4b8f24b33233e3c631749f1fbf23a906112df908d906129d3565b60405180910390a23373ffffffffffffffffffffffffffffffffffffffff167f119b24f3a0ed1dcb65538fb3ae7c0abe4ee9ffc181c3d115a5378581bba4f3a68b8b868b8b8b60405161133796959493929190612b2c565b60405180910390a26115ac565b6002805460018082018355600083905283517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace6005909302928301805460208701517fffffffffffffffffffffffffffffffff000000000000000000000000000000009182166fffffffffffffffffffffffffffffffff9485161784167001000000000000000000000000000000009185168202179092556040808801517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf8701805460608b01519416918616919091178516929094169092021790915560808501517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad0840180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560a08501517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad184015560c08501517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2909301805460e08701517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00918216951515959095177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101009515159590950294909417905592547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01855584810180549092161790555133907f4b90d6788928d63c1821907a6a8b95f40d26562d8fe41b105f7489db9966dfcb906115a3908d906129d3565b60405180910390a25b50505050505050505050565b73e4b22d484958e582098a98229a24e8a43801b67481565b60046020526000908152604090205481565b7365c79fcb50ca1594b025960e539ed7a9a6d434a381565b6003602052600090815260409020805460019091015460ff1682565b734678f0a6958e4d2bc4f1baf7bc52e8f3564f3fe481565b7382ecd135dce65fbc6dbdd0e4237e0af93ffd503881565b739f8f72aa9304c8b593d555f12ef6589cc3a579a281565b735a15566417e6c1c9546523066500bddbc53f88c781565b606080826040519080825280602002602001820160405280156116b357816020015b6116a0612364565b8152602001906001900390816116985790505b5090508383028084016000825b828110156117b157600281815481106116d557fe5b6000918252602091829020604080516101008082018352600590940290920180546fffffffffffffffffffffffffffffffff8082168552700100000000000000000000000000000000918290048116968501969096526001820154808716938501939093529091049093166060820152600283015473ffffffffffffffffffffffffffffffffffffffff166080820152600383015460a082015260049092015460ff808216151560c085015291900416151560e0820152855186908490811061179a57fe5b6020908102919091010152600191820191016116c0565b509293505050505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146117ff57600080fd5b6000818152600360205260409020600181015460ff16156118235761182382611f7c565b5050565b73ecf88e1cec2d2894a0295db3d86fe7ce4991e6df81565b736ec6d98e2af940436348883fafd5646e9cde244681565b731b14e8d511c9a4395425314f849bd737baf8208f81565b60015473ffffffffffffffffffffffffffffffffffffffff16331461189357600080fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b7319c0976f590d67707e62397c87829d896dc0f1f181565b6118fc3382611ecd565b611932576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790612a97565b61193b81611f7c565b50565b735d3a536e4d6dbd6114cc1ead35777bab948e364381565b738f337bd3b7f2b05d9a8dc8ac518584e83342489381565b7383152caa0d344a2fd428769529e2d490a88f439381565b73493c57c4763932315a328269e1adad09653b908181565b7325a01a05c188dacbcf1d61af55d4a5b4021f7eed81565b6006546040517f8161b12000000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff1690638161b12090611a0d9085906004016129d3565b60206040518083038186803b158015611a2557600080fd5b505afa158015611a39573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506117b991908101906124e9565b73c0a47dfe034b400b47bdad5fecda2621de6c4d9581565b739abe2715d2d99246269b8e17e9d1b620e9bf655881565b73f53ad2c6851052a81b42133467480961b2321c0981565b600080600080600080600080611ab96123a8565b506000898152600360209081526040918290208251808401909352805483526001015460ff161515908201819052611b0a575060009750879650869550859450849350839250829150819050611d1f565b6009546006546040517f2c2cb9fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831692634115fe6b9216908d908290632c2cb9fd90611b6f9084906004016129d3565b60206040518083038186803b158015611b8757600080fd5b505afa158015611b9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611bbf9190810190612525565b6040518463ffffffff1660e01b8152600401611bdd93929190612a3f565b604080518083038186803b158015611bf457600080fd5b505afa158015611c08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c2c9190810190612649565b9093509150611c39612364565b6002826000015181548110611c4a57fe5b6000918252602091829020604080516101008082018352600590940290920180546fffffffffffffffffffffffffffffffff8082168086527001000000000000000000000000000000009283900482169786018890526001808501548084169688018790529390930490911660608601819052600284015473ffffffffffffffffffffffffffffffffffffffff1660808701819052600385015460a088015260049094015460ff808216151560c0890152979004909616151560e0909501949094529e50919c50929a50909850909650945050505b919395975091939597565b73818e6fecd516ecc3849daf6845e3ec868087b75581565b7335d1b3f3d7966a1dfe207aa4514c12a259a0492b81565b739759a6ac90977b93b58547b4a71c78317f391a2881565b7395e6f48254609a6ee006f7d493c8e5fb97094cef81565b73322d58b9e75a6918f7e7849aee0ff09369977e0881565b731e0447b19bb6ecfdae1e4ae1694b0c3659614e4e81565b731e30124fde14533231216d95f7798cd0061e5cf881565b60005473ffffffffffffffffffffffffffffffffffffffff163314611df657600080fd5b73ffffffffffffffffffffffffffffffffffffffff81161561189357600080fd5b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314611e5757600080fd5b60009182526004602052604090912055565b73448a5065aebb8e423f0896e6c5d525c040f59af381565b732f0b23f53734252bda2277357e97e1517d6b042a81565b73c73e0383f3aff3215e6f04b0331d58cecf0ab84981565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60008273ffffffffffffffffffffffffffffffffffffffff16611eef836119b6565b73ffffffffffffffffffffffffffffffffffffffff16149392505050565b6000838152600460205260408120546fffffffffffffffffffffffffffffffff84161015611f3d57506000611f75565b816fffffffffffffffffffffffffffffffff16836fffffffffffffffffffffffffffffffff161115611f7157506000611f75565b5060015b9392505050565b600254611fb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790612a77565b6000818152600360205260409020600181015460ff16612001576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790612a67565b60028054600091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061203557fe5b6000918252602080832060036005909302018201548084529190526040909120835481556002805492935090917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061208e57fe5b906000526020600020906005020160028460000154815481106120ad57fe5b60009182526020909120825460059092020180546fffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffffffffffff00000000000000000000000000000000918216178083558454908416700100000000000000000000000000000000918290048516820217835560018086018054918501805492871692909416919091178084559054908516908290049094160292909217909155600280830154818301805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffffff000000000000000000000000000000000000000090921691909117905560038084015490830155600492830180549390920180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff94851615151780825592547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff90931661010093849004909416151590920292909217905580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061224757fe5b60009182526020822060059091020181815560018101829055600280820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600382019290925560040180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690558054906122eb907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83016123bf565b50600580546001908101909155830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556000835560405133907f3a55fe27d475f752627ad5cef7a30389a812bdee18d467b4601ea007cfbace01906123569087906129d3565b60405180910390a250505050565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081019190915290565b604080518082019091526000808252602082015290565b8154818355818111156123eb576005028160050283600052602060002091820191016123eb91906123f0565b505050565b61089791905b8082111561246b576000808255600182018190556002820180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560038201556004810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690556005016123f6565b5090565b6000611f758235612b99565b6000611f758251612b99565b6000611f758235612ba4565b6000611f758235610897565b6000611f758251610897565b6000611f758251612bd7565b6000611f758235612ba9565b6000602082840312156124d557600080fd5b60006124e1848461246f565b949350505050565b6000602082840312156124fb57600080fd5b60006124e1848461247b565b60006020828403121561251957600080fd5b60006124e18484612493565b60006020828403121561253757600080fd5b60006124e1848461249f565b6000806040838503121561255657600080fd5b60006125628585612493565b925050602061257385828601612493565b9150509250929050565b6000806040838503121561259057600080fd5b600061259c85856124ab565b92505060206125738582860161249f565b600080600080600080600060e0888a0312156125c857600080fd5b60006125d48a8a612493565b97505060206125e58a828b016124b7565b96505060406125f68a828b016124b7565b95505060606126078a828b016124b7565b94505060806126188a828b016124b7565b93505060a06126298a828b01612487565b92505060c061263a8a828b01612487565b91505092959891949750929550565b6000806040838503121561265c57600080fd5b600061259c858561249f565b600080600080600060a0868803121561268057600080fd5b600061268c888861249f565b955050602061269d8882890161249f565b94505060406126ae8882890161249f565b93505060606126bf8882890161249f565b92505060806126d08882890161249f565b9150509295509295909350565b60006126e9838361287b565b50506101000190565b6126fb81612b99565b82525050565b600061270c82612b8c565b6127168185612b90565b935061272183612b86565b60005b8281101561274c576127378683516126dd565b955061274282612b86565b9150600101612724565b5093949350505050565b6126fb81612ba4565b6126fb81610897565b6126fb81612bd7565b600061277e601883612b90565b7f4d75737420666972737420626520737562736372696265640000000000000000815260200192915050565b60006127b7602183612b90565b7f4d757374206861766520737562736372696265727320696e20746865206c697381527f7400000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000612816601683612b90565b7f4d75737420626520636f727265637420706172616d7300000000000000000000815260200192915050565b600061284f601b83612b90565b7f4d7573742062652063616c6c656420627920436470206f776e65720000000000815260200192915050565b805161010083019061288d8482612918565b5060208201516128a06020850182612918565b5060408201516128b36040850182612918565b5060608201516128c66060850182612918565b5060808201516128d960808501826126f2565b5060a08201516128ec60a085018261275f565b5060c08201516128ff60c0850182612756565b5060e082015161291260e0850182612756565b50505050565b6126fb81612ba9565b602081016117b982846126f2565b60208082528101611f758184612701565b610120810161294f8285612756565b611f75602083018461287b565b610100810161296b828b612756565b612978602083018a612918565b6129856040830189612918565b6129926060830188612918565b61299f6080830187612918565b6129ac60a08301866126f2565b6129b960c083018561275f565b6129c660e083018461275f565b9998505050505050505050565b602081016117b9828461275f565b61010081016129f0828b61275f565b6129fd602083018a61275f565b612a0a604083018961275f565b612a17606083018861275f565b612a24608083018761275f565b6129ac60a083018661275f565b602081016117b98284612768565b60608101612a4d8286612768565b612a5a602083018561275f565b6124e1604083018461275f565b602080825281016117b981612771565b602080825281016117b9816127aa565b602080825281016117b981612809565b602080825281016117b981612842565b6101008101612ab6828b612918565b612ac3602083018a612918565b612ad06040830189612918565b612add6060830188612918565b612aea60808301876126f2565b612af760a083018661275f565b612b0460c0830185612756565b6129c660e0830184612756565b60408101612b1f828561275f565b611f756020830184612756565b60c08101612b3a828961275f565b612b476020830188612918565b612b546040830187612918565b612b616060830186612918565b612b6e6080830185612918565b612b7b60a0830184612756565b979650505050505050565b60200190565b5190565b90815260200190565b60006117b982612bbe565b151590565b6fffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b60006117b982612b9956fea265627a7a723058200934f170125875170ea975cd20eb0db56efb7edee9c9cd183341f778212075df6c6578706572696d656e74616cf50037
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c563ace6facd385cb1f34fa723f412cc64e63d47
-----Decoded View---------------
Arg [0] : _saverProxy (address): 0xC563aCE6FACD385cB1F34fA723f412Cc64E63D47
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c563ace6facd385cb1f34fa723f412cc64e63d47
Loading...
Loading
Loading...
Loading
OVERVIEW
Smart contract handling user subscriptions and configurations for DeFi Saver Automation v2.Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.