More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
1053012 | 22 days ago | Contract Creation | 0 APE |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x06B54a70...d0869F2b3 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
CamelotPair
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 0 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity =0.5.16; import './interfaces/ICamelotPair.sol'; import './UniswapV2ERC20.sol'; import './libraries/Math.sol'; import './interfaces/IERC20.sol'; import './interfaces/ICamelotFactory.sol'; import './interfaces/IUniswapV2Callee.sol'; contract CamelotPair is ICamelotPair, UniswapV2ERC20 { using SafeMath for uint; uint public constant MINIMUM_LIQUIDITY = 10 ** 3; bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)'))); address public factory; address public token0; address public token1; bool public initialized; uint public constant FEE_DENOMINATOR = 100000; uint public constant MAX_FEE_PERCENT = 2000; // = 2% uint112 private reserve0; // uses single storage slot, accessible via getReserves uint112 private reserve1; // uses single storage slot, accessible via getReserves uint16 public token0FeePercent = 500; // default = 0.5% // uses single storage slot, accessible via getReserves uint16 public token1FeePercent = 500; // default = 0.5% // uses single storage slot, accessible via getReserves uint public precisionMultiplier0; uint public precisionMultiplier1; uint public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event bool public stableSwap; // if set to true, defines pair type as stable bool public pairTypeImmutable; // if set to true, stableSwap states cannot be updated anymore uint private unlocked = 1; modifier lock() { require(unlocked == 1, 'CamelotPair: LOCKED'); unlocked = 0; _; unlocked = 1; } function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint16 _token0FeePercent, uint16 _token1FeePercent) { _reserve0 = reserve0; _reserve1 = reserve1; _token0FeePercent = token0FeePercent; _token1FeePercent = token1FeePercent; } function _safeTransfer(address token, address to, uint value) private { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(SELECTOR, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'CamelotPair: TRANSFER_FAILED'); } event DrainWrongToken(address indexed token, address to); event FeePercentUpdated(uint16 token0FeePercent, uint16 token1FeePercent); event SetStableSwap(bool prevStableSwap, bool stableSwap); event SetPairTypeImmutable(); event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); event Skim(); constructor() public { factory = msg.sender; } // called once by the factory at time of deployment function initialize(address _token0, address _token1) external { require(msg.sender == factory && !initialized, 'CamelotPair: FORBIDDEN'); // sufficient check token0 = _token0; token1 = _token1; precisionMultiplier0 = 10 ** uint(IERC20(_token0).decimals()); precisionMultiplier1 = 10 ** uint(IERC20(_token1).decimals()); initialized = true; } /** * @dev Updates the swap fees percent * * Can only be called by the factory's feeAmountOwner */ function setFeePercent(uint16 newToken0FeePercent, uint16 newToken1FeePercent) external lock { require(msg.sender == ICamelotFactory(factory).feePercentOwner(), "CamelotPair: only factory's feeAmountOwner"); require(newToken0FeePercent <= MAX_FEE_PERCENT && newToken1FeePercent <= MAX_FEE_PERCENT, "CamelotPair: feePercent mustn't exceed the maximum"); require(newToken0FeePercent > 0 && newToken1FeePercent > 0, "CamelotPair: feePercent mustn't exceed the minimum"); token0FeePercent = newToken0FeePercent; token1FeePercent = newToken1FeePercent; emit FeePercentUpdated(newToken0FeePercent, newToken1FeePercent); } function setStableSwap(bool stable, uint112 expectedReserve0, uint112 expectedReserve1) external lock { require(msg.sender == ICamelotFactory(factory).setStableOwner(), "CamelotPair: only factory's setStableOwner"); require(!pairTypeImmutable, "CamelotPair: immutable"); require(stable != stableSwap, "CamelotPair: no update"); require(expectedReserve0 == reserve0 && expectedReserve1 == reserve1, "CamelotPair: failed"); bool feeOn = _mintFee(reserve0, reserve1); emit SetStableSwap(stableSwap, stable); stableSwap = stable; kLast = (stable && feeOn) ? _k(uint(reserve0), uint(reserve1)) : 0; } function setPairTypeImmutable() external lock { require(msg.sender == ICamelotFactory(factory).owner(), "CamelotPair: only factory's owner"); require(!pairTypeImmutable, "CamelotPair: already immutable"); pairTypeImmutable = true; emit SetPairTypeImmutable(); } // update reserves function _update(uint balance0, uint balance1) private { require(balance0 <= uint112(- 1) && balance1 <= uint112(- 1), 'CamelotPair: OVERFLOW'); reserve0 = uint112(balance0); reserve1 = uint112(balance1); emit Sync(uint112(balance0), uint112(balance1)); } // if fee is on, mint liquidity equivalent to "factory.ownerFeeShare()" of the growth in sqrt(k) // only for uni configuration function _mintFee(uint112 _reserve0, uint112 _reserve1) private returns (bool feeOn) { if(stableSwap) return false; (uint ownerFeeShare, address feeTo) = ICamelotFactory(factory).feeInfo(); feeOn = feeTo != address(0); uint _kLast = kLast; // gas savings if (feeOn) { if (_kLast != 0) { uint rootK = Math.sqrt(_k(uint(_reserve0), uint(_reserve1))); uint rootKLast = Math.sqrt(_kLast); if (rootK > rootKLast) { uint d = (FEE_DENOMINATOR.mul(100) / ownerFeeShare).sub(100); uint numerator = totalSupply.mul(rootK.sub(rootKLast)).mul(100); uint denominator = rootK.mul(d).add(rootKLast.mul(100)); uint liquidity = numerator / denominator; if (liquidity > 0) _mint(feeTo, liquidity); } } } else if (_kLast != 0) { kLast = 0; } } // this low-level function should be called from a contract which performs important safety checks function mint(address to) external lock returns (uint liquidity) { (uint112 _reserve0, uint112 _reserve1,,) = getReserves(); // gas savings uint balance0 = IERC20(token0).balanceOf(address(this)); uint balance1 = IERC20(token1).balanceOf(address(this)); uint amount0 = balance0.sub(_reserve0); uint amount1 = balance1.sub(_reserve1); bool feeOn = _mintFee(_reserve0, _reserve1); uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee if (_totalSupply == 0) { liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY); _mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens } else { liquidity = Math.min(amount0.mul(_totalSupply) / _reserve0, amount1.mul(_totalSupply) / _reserve1); } require(liquidity > 0, 'CamelotPair: INSUFFICIENT_LIQUIDITY_MINTED'); _mint(to, liquidity); _update(balance0, balance1); if (feeOn) kLast = _k(uint(reserve0), uint(reserve1)); // reserve0 and reserve1 are up-to-date emit Mint(msg.sender, amount0, amount1); } // this low-level function should be called from a contract which performs important safety checks function burn(address to) external lock returns (uint amount0, uint amount1) { (uint112 _reserve0, uint112 _reserve1,,) = getReserves(); // gas savings address _token0 = token0; // gas savings address _token1 = token1; // gas savings uint balance0 = IERC20(_token0).balanceOf(address(this)); uint balance1 = IERC20(_token1).balanceOf(address(this)); uint liquidity = balanceOf[address(this)]; bool feeOn = _mintFee(_reserve0, _reserve1); uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee amount0 = liquidity.mul(balance0) / _totalSupply; // using balances ensures pro-rata distribution amount1 = liquidity.mul(balance1) / _totalSupply; // using balances ensures pro-rata distribution require(amount0 > 0 && amount1 > 0, 'CamelotPair: INSUFFICIENT_LIQUIDITY_BURNED'); _burn(address(this), liquidity); _safeTransfer(_token0, to, amount0); _safeTransfer(_token1, to, amount1); balance0 = IERC20(_token0).balanceOf(address(this)); balance1 = IERC20(_token1).balanceOf(address(this)); _update(balance0, balance1); if (feeOn) kLast = _k(uint(reserve0), uint(reserve1)); // reserve0 and reserve1 are up-to-date emit Burn(msg.sender, amount0, amount1, to); } struct TokensData { address token0; address token1; uint amount0Out; uint amount1Out; uint balance0; uint balance1; uint remainingFee0; uint remainingFee1; } // this low-level function should be called from a contract which performs important safety checks function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external { TokensData memory tokensData = TokensData({ token0: token0, token1: token1, amount0Out: amount0Out, amount1Out: amount1Out, balance0: 0, balance1: 0, remainingFee0: 0, remainingFee1: 0 }); _swap(tokensData, to, data, address(0)); } // this low-level function should be called from a contract which performs important safety checks function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data, address referrer) external { TokensData memory tokensData = TokensData({ token0: token0, token1: token1, amount0Out: amount0Out, amount1Out: amount1Out, balance0: 0, balance1: 0, remainingFee0: 0, remainingFee1: 0 }); _swap(tokensData, to, data, referrer); } function _swap(TokensData memory tokensData, address to, bytes memory data, address referrer) internal lock { require(tokensData.amount0Out > 0 || tokensData.amount1Out > 0, 'CamelotPair: INSUFFICIENT_OUTPUT_AMOUNT'); (uint112 _reserve0, uint112 _reserve1, uint16 _token0FeePercent, uint16 _token1FeePercent) = getReserves(); require(tokensData.amount0Out < _reserve0 && tokensData.amount1Out < _reserve1, 'CamelotPair: INSUFFICIENT_LIQUIDITY'); { require(to != tokensData.token0 && to != tokensData.token1, 'CamelotPair: INVALID_TO'); // optimistically transfer tokens if (tokensData.amount0Out > 0) _safeTransfer(tokensData.token0, to, tokensData.amount0Out); // optimistically transfer tokens if (tokensData.amount1Out > 0) _safeTransfer(tokensData.token1, to, tokensData.amount1Out); if (data.length > 0) IUniswapV2Callee(to).uniswapV2Call(msg.sender, tokensData.amount0Out, tokensData.amount1Out, data); tokensData.balance0 = IERC20(tokensData.token0).balanceOf(address(this)); tokensData.balance1 = IERC20(tokensData.token1).balanceOf(address(this)); } uint amount0In = tokensData.balance0 > _reserve0 - tokensData.amount0Out ? tokensData.balance0 - (_reserve0 - tokensData.amount0Out) : 0; uint amount1In = tokensData.balance1 > _reserve1 - tokensData.amount1Out ? tokensData.balance1 - (_reserve1 - tokensData.amount1Out) : 0; require(amount0In > 0 || amount1In > 0, 'CamelotPair: INSUFFICIENT_INPUT_AMOUNT'); tokensData.remainingFee0 = amount0In.mul(_token0FeePercent) / FEE_DENOMINATOR; tokensData.remainingFee1 = amount1In.mul(_token1FeePercent) / FEE_DENOMINATOR; {// scope for referer/stable fees management uint fee = 0; uint referrerInputFeeShare = referrer != address(0) ? ICamelotFactory(factory).referrersFeeShare(referrer) : 0; if (referrerInputFeeShare > 0) { if (amount0In > 0) { fee = amount0In.mul(referrerInputFeeShare).mul(_token0FeePercent) / (FEE_DENOMINATOR ** 2); tokensData.remainingFee0 = tokensData.remainingFee0.sub(fee); _safeTransfer(tokensData.token0, referrer, fee); } if (amount1In > 0) { fee = amount1In.mul(referrerInputFeeShare).mul(_token1FeePercent) / (FEE_DENOMINATOR ** 2); tokensData.remainingFee1 = tokensData.remainingFee1.sub(fee); _safeTransfer(tokensData.token1, referrer, fee); } } if(stableSwap){ (uint ownerFeeShare, address feeTo) = ICamelotFactory(factory).feeInfo(); if(feeTo != address(0)) { ownerFeeShare = FEE_DENOMINATOR.sub(referrerInputFeeShare).mul(ownerFeeShare); if (amount0In > 0) { fee = amount0In.mul(ownerFeeShare).mul(_token0FeePercent) / (FEE_DENOMINATOR ** 3); tokensData.remainingFee0 = tokensData.remainingFee0.sub(fee); _safeTransfer(tokensData.token0, feeTo, fee); } if (amount1In > 0) { fee = amount1In.mul(ownerFeeShare).mul(_token1FeePercent) / (FEE_DENOMINATOR ** 3); tokensData.remainingFee1 = tokensData.remainingFee1.sub(fee); _safeTransfer(tokensData.token1, feeTo, fee); } } } // readjust tokens balance if (amount0In > 0) tokensData.balance0 = IERC20(tokensData.token0).balanceOf(address(this)); if (amount1In > 0) tokensData.balance1 = IERC20(tokensData.token1).balanceOf(address(this)); } {// scope for reserve{0,1}Adjusted, avoids stack too deep errors uint balance0Adjusted = tokensData.balance0.sub(tokensData.remainingFee0); uint balance1Adjusted = tokensData.balance1.sub(tokensData.remainingFee1); require(_k(balance0Adjusted, balance1Adjusted) >= _k(uint(_reserve0), uint(_reserve1)), 'CamelotPair: K'); } _update(tokensData.balance0, tokensData.balance1); emit Swap(msg.sender, amount0In, amount1In, tokensData.amount0Out, tokensData.amount1Out, to); } function _k(uint balance0, uint balance1) internal view returns (uint) { if (stableSwap) { uint _x = balance0.mul(1e18) / precisionMultiplier0; uint _y = balance1.mul(1e18) / precisionMultiplier1; uint _a = (_x.mul(_y)) / 1e18; uint _b = (_x.mul(_x) / 1e18).add(_y.mul(_y) / 1e18); return _a.mul(_b) / 1e18; // x3y+y3x >= k } return balance0.mul(balance1); } function _get_y(uint x0, uint xy, uint y) internal pure returns (uint) { for (uint i = 0; i < 255; i++) { uint y_prev = y; uint k = _f(x0, y); if (k < xy) { uint dy = (xy - k) * 1e18 / _d(x0, y); y = y + dy; } else { uint dy = (k - xy) * 1e18 / _d(x0, y); y = y - dy; } if (y > y_prev) { if (y - y_prev <= 1) { return y; } } else { if (y_prev - y <= 1) { return y; } } } return y; } function _f(uint x0, uint y) internal pure returns (uint) { return x0 * (y * y / 1e18 * y / 1e18) / 1e18 + (x0 * x0 / 1e18 * x0 / 1e18) * y / 1e18; } function _d(uint x0, uint y) internal pure returns (uint) { return 3 * x0 * (y * y / 1e18) / 1e18 + (x0 * x0 / 1e18 * x0 / 1e18); } function getAmountOut(uint amountIn, address tokenIn) external view returns (uint) { uint16 feePercent = tokenIn == token0 ? token0FeePercent : token1FeePercent; return _getAmountOut(amountIn, tokenIn, uint(reserve0), uint(reserve1), feePercent); } function _getAmountOut(uint amountIn, address tokenIn, uint _reserve0, uint _reserve1, uint feePercent) internal view returns (uint) { if (stableSwap) { amountIn = amountIn.sub(amountIn.mul(feePercent) / FEE_DENOMINATOR); // remove fee from amount received uint xy = _k(_reserve0, _reserve1); _reserve0 = _reserve0 * 1e18 / precisionMultiplier0; _reserve1 = _reserve1 * 1e18 / precisionMultiplier1; (uint reserveA, uint reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); amountIn = tokenIn == token0 ? amountIn * 1e18 / precisionMultiplier0 : amountIn * 1e18 / precisionMultiplier1; uint y = reserveB - _get_y(amountIn + reserveA, xy, reserveB); return y * (tokenIn == token0 ? precisionMultiplier1 : precisionMultiplier0) / 1e18; } else { (uint reserveA, uint reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0); amountIn = amountIn.mul(FEE_DENOMINATOR.sub(feePercent)); return (amountIn.mul(reserveB)) / (reserveA.mul(FEE_DENOMINATOR).add(amountIn)); } } // force balances to match reserves function skim(address to) external lock { address _token0 = token0; // gas savings address _token1 = token1; // gas savings _safeTransfer(_token0, to, IERC20(_token0).balanceOf(address(this)).sub(reserve0)); _safeTransfer(_token1, to, IERC20(_token1).balanceOf(address(this)).sub(reserve1)); emit Skim(); } // force reserves to match balances function sync() external lock { uint token0Balance = IERC20(token0).balanceOf(address(this)); uint token1Balance = IERC20(token1).balanceOf(address(this)); require(token0Balance != 0 && token1Balance != 0, "CamelotPair: liquidity ratio not initialized"); _update(token0Balance, token1Balance); } /** * @dev Allow to recover token sent here by mistake * * Can only be called by factory's owner */ function drainWrongToken(address token, address to) external lock { require(msg.sender == ICamelotFactory(factory).owner(), "CamelotPair: only factory's owner"); require(token != token0 && token != token1, "CamelotPair: invalid token"); _safeTransfer(token, to, IERC20(token).balanceOf(address(this))); emit DrainWrongToken(token, to); } }
pragma solidity >=0.5.0; interface ICamelotFactory { event PairCreated(address indexed token0, address indexed token1, address pair, uint256); function owner() external view returns (address); function feePercentOwner() external view returns (address); function setStableOwner() external view returns (address); function feeTo() external view returns (address); function ownerFeeShare() external view returns (uint256); function referrersFeeShare(address) external view returns (uint256); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function feeInfo() external view returns (uint _ownerFeeShare, address _feeTo); }
pragma solidity >=0.5.0; interface ICamelotPair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint16 token0feePercent, uint16 token1FeePercent); function getAmountOut(uint amountIn, address tokenIn) external view returns (uint); function kLast() external view returns (uint); function setFeePercent(uint16 token0FeePercent, uint16 token1FeePercent) external; function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data, address referrer) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
pragma solidity >=0.5.0; interface IERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); }
pragma solidity >=0.5.0; interface IUniswapV2Callee { function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external; }
pragma solidity >=0.5.0; interface IUniswapV2ERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; }
pragma solidity =0.5.16; // a library for performing various math operations library Math { function min(uint x, uint y) internal pure returns (uint z) { z = x < y ? x : y; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function sqrt(uint y) internal pure returns (uint z) { if (y > 3) { z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } }
pragma solidity =0.5.16; // a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math) library SafeMath { function add(uint x, uint y) internal pure returns (uint z) { require((z = x + y) >= x, 'ds-math-add-overflow'); } function sub(uint x, uint y) internal pure returns (uint z) { require((z = x - y) <= x, 'ds-math-sub-underflow'); } function mul(uint x, uint y) internal pure returns (uint z) { require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow'); } }
pragma solidity =0.5.16; import './interfaces/IUniswapV2ERC20.sol'; import './libraries/SafeMath.sol'; contract UniswapV2ERC20 is IUniswapV2ERC20 { using SafeMath for uint; string public constant name = 'Camelot LP'; string public constant symbol = 'CMLT-LP'; uint8 public constant decimals = 18; uint public totalSupply; mapping(address => uint) public balanceOf; mapping(address => mapping(address => uint)) public allowance; bytes32 public DOMAIN_SEPARATOR; // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; mapping(address => uint) public nonces; event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); constructor() public { uint chainId; assembly { chainId := chainid } DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'), keccak256(bytes(name)), keccak256(bytes('1')), chainId, address(this) ) ); } function _mint(address to, uint value) internal { totalSupply = totalSupply.add(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(address(0), to, value); } function _burn(address from, uint value) internal { balanceOf[from] = balanceOf[from].sub(value); totalSupply = totalSupply.sub(value); emit Transfer(from, address(0), value); } function _approve(address owner, address spender, uint value) private { allowance[owner][spender] = value; emit Approval(owner, spender, value); } function _transfer(address from, address to, uint value) private { balanceOf[from] = balanceOf[from].sub(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(from, to, value); } function approve(address spender, uint value) external returns (bool) { _approve(msg.sender, spender, value); return true; } function transfer(address to, uint value) external returns (bool) { _transfer(msg.sender, to, value); return true; } function transferFrom(address from, address to, uint value) external returns (bool) { if (allowance[from][msg.sender] != uint(-1)) { uint remaining = allowance[from][msg.sender].sub(value); allowance[from][msg.sender] = remaining; emit Approval(from, msg.sender, remaining); } _transfer(from, to, value); return true; } function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external { require(deadline >= block.timestamp, 'UniswapV2: EXPIRED'); bytes32 digest = keccak256( abi.encodePacked( '\x19\x01', DOMAIN_SEPARATOR, keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline)) ) ); address recoveredAddress = ecrecover(digest, v, r, s); require(recoveredAddress != address(0) && recoveredAddress == owner, 'UniswapV2: INVALID_SIGNATURE'); _approve(owner, spender, value); } }
{ "optimizer": { "enabled": true, "runs": 0 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"DrainWrongToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"token0FeePercent","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"token1FeePercent","type":"uint16"}],"name":"FeePercentUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"SetPairTypeImmutable","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"prevStableSwap","type":"bool"},{"indexed":false,"internalType":"bool","name":"stableSwap","type":"bool"}],"name":"SetStableSwap","type":"event"},{"anonymous":false,"inputs":[],"name":"Skim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_FEE_PERCENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"drainWrongToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint16","name":"_token0FeePercent","type":"uint16"},{"internalType":"uint16","name":"_token1FeePercent","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pairTypeImmutable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"precisionMultiplier0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"precisionMultiplier1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint16","name":"newToken0FeePercent","type":"uint16"},{"internalType":"uint16","name":"newToken1FeePercent","type":"uint16"}],"name":"setFeePercent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setPairTypeImmutable","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"stable","type":"bool"},{"internalType":"uint112","name":"expectedReserve0","type":"uint112"},{"internalType":"uint112","name":"expectedReserve1","type":"uint112"}],"name":"setStableSwap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"stableSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"address","name":"referrer","type":"address"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token0FeePercent","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1FeePercent","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101d85760003560e01c8063022c0d9f146101dd57806306fdde03146102695780630902f1ac146102e6578063095ea7b3146103245780630dfe168114610364578063158ef93e1461038857806318160ddd1461039057806323b872dd146103aa578063288e5d02146103e05780632fcd1692146103e85780633029e5d41461040757806330adf81f1461043d578063313ce567146104455780633644e515146104635780633b9f1dc01461046b5780633ba1707714610473578063485cc9551461047b57806348e5d260146104a957806362ecec03146104d257806367d81740146104da5780636a627842146104e25780636e1fdd7f1461050857806370a082311461059b5780637464fc3d146105c15780637ecebe00146105c957806389afcb44146105ef57806395d89b411461062e5780639e548b7f14610636578063a9059cbb1461063e578063b6200b071461066a578063ba9a7a5614610672578063bc25cf771461067a578063c45a0155146106a0578063d21220a7146106a8578063d505accf146106b0578063d73792a914610701578063dd62ed3e14610709578063f140a35a14610737578063f39ac11f14610763578063fff6cae914610791575b600080fd5b610267600480360360808110156101f357600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b81111561022957600080fd5b82018360208201111561023b57600080fd5b803590602001918460018302840111600160201b8311171561025c57600080fd5b509092509050610799565b005b61027161083a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102ab578181015183820152602001610293565b50505050905090810190601f1680156102d85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102ee610860565b604080516001600160701b03958616815293909416602084015261ffff9182168385015216606082015290519081900360800190f35b6103506004803603604081101561033a57600080fd5b506001600160a01b038135169060200135610893565b604080519115158252519081900360200190f35b61036c6108aa565b604080516001600160a01b039092168252519081900360200190f35b6103506108b9565b6103986108c9565b60408051918252519081900360200190f35b610350600480360360608110156103c057600080fd5b506001600160a01b038135811691602081013590911690604001356108cf565b610398610994565b6103f061099a565b6040805161ffff9092168252519081900360200190f35b6102676004803603606081101561041d57600080fd5b5080351515906001600160701b03602082013581169160400135166109ab565b610398610c8f565b61044d610ca1565b6040805160ff9092168252519081900360200190f35b610398610ca6565b610398610cac565b610267610cb2565b6102676004803603604081101561049157600080fd5b506001600160a01b0381358116916020013516610e4f565b610267600480360360408110156104bf57600080fd5b5061ffff81358116916020013516610fe3565b6103f0611208565b610398611219565b610398600480360360208110156104f857600080fd5b50356001600160a01b031661121f565b610267600480360360a081101561051e57600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b81111561055457600080fd5b82018360208201111561056657600080fd5b803590602001918460018302840111600160201b8311171561058757600080fd5b9193509150356001600160a01b031661151e565b610398600480360360208110156105b157600080fd5b50356001600160a01b03166115c2565b6103986115d4565b610398600480360360208110156105df57600080fd5b50356001600160a01b03166115da565b6106156004803603602081101561060557600080fd5b50356001600160a01b03166115ec565b6040805192835260208301919091528051918290030190f35b610271611985565b6103506119a8565b6103506004803603604081101561065457600080fd5b506001600160a01b0381351690602001356119b1565b6103506119be565b6103986119cc565b6102676004803603602081101561069057600080fd5b50356001600160a01b03166119d2565b61036c611b60565b61036c611b6f565b610267600480360360e08110156106c657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611b7e565b610398611d6d565b6103986004803603604081101561071f57600080fd5b506001600160a01b0381358116916020013516611d74565b6103986004803603604081101561074d57600080fd5b50803590602001356001600160a01b0316611d91565b6102676004803603604081101561077957600080fd5b506001600160a01b0381358116916020013516611e01565b610267612052565b6107a161376b565b5060408051610100810182526006546001600160a01b039081168252600754166020808301919091528183018890526060820187905260006080830181905260a0830181905260c0830181905260e08301528251601f8501829004820281018201909352838352909161083291839187918790879081908401838280828437600092018290525092506121f0915050565b505050505050565b6040518060400160405280600a815260200169043616d656c6f74204c560b41b81525081565b6008546001600160701b0380821692600160701b83049091169161ffff600160e01b8204811692600160f01b9092041690565b60006108a0338484612ba3565b5060015b92915050565b6006546001600160a01b031681565b600754600160a01b900460ff1681565b60005481565b6001600160a01b03831660009081526002602090815260408083203384529091528120546000191461097e576001600160a01b038416600090815260026020908152604080832033845290915281205461092f908463ffffffff612bf316565b6001600160a01b038616600081815260026020908152604080832033808552908352928190208590558051858152905194955091936000805160206139988339815191529281900390910190a3505b610989848484612c43565b5060015b9392505050565b600a5481565b600854600160f01b900461ffff1681565b600d546001146109f0576040805162461bcd60e51b815260206004820152601360248201526000805160206138c4833981519152604482015290519081900360640190fd5b6000600d5560055460408051637e1c813560e11b815290516001600160a01b039092169163fc39026a91600480820192602092909190829003018186803b158015610a3a57600080fd5b505afa158015610a4e573d6000803e3d6000fd5b505050506040513d6020811015610a6457600080fd5b50516001600160a01b03163314610aac5760405162461bcd60e51b815260040180806020018281038252602a8152602001806139e2602a913960400191505060405180910390fd5b600c54610100900460ff1615610b02576040805162461bcd60e51b815260206004820152601660248201527543616d656c6f74506169723a20696d6d757461626c6560501b604482015290519081900360640190fd5b600c5460ff1615158315151415610b59576040805162461bcd60e51b815260206004820152601660248201527543616d656c6f74506169723a206e6f2075706461746560501b604482015290519081900360640190fd5b6008546001600160701b038381169116148015610b8a57506008546001600160701b03828116600160701b90920416145b610bd1576040805162461bcd60e51b815260206004820152601360248201527210d85b595b1bdd14185a5c8e8819985a5b1959606a1b604482015290519081900360640190fd5b600854600090610bf4906001600160701b0380821691600160701b900416612ceb565b600c546040805160ff90921615158252861515602083015280519293507fb6a86710bde53aa7fb1b3856279e2af5b476d53e2dd0902cf17a0911b5a43a8b92918290030190a1600c805460ff191685158015919091179091558490610c565750805b610c61576000610c81565b600854610c81906001600160701b0380821691600160701b900416612ea4565b600b5550506001600d555050565b60008051602061397883398151915281565b601281565b60035481565b60095481565b600d54600114610cf7576040805162461bcd60e51b815260206004820152601360248201526000805160206138c4833981519152604482015290519081900360640190fd5b6000600d5560055460408051638da5cb5b60e01b815290516001600160a01b0390921691638da5cb5b91600480820192602092909190829003018186803b158015610d4157600080fd5b505afa158015610d55573d6000803e3d6000fd5b505050506040513d6020811015610d6b57600080fd5b50516001600160a01b03163314610db35760405162461bcd60e51b81526004018080602001828103825260218152602001806138a36021913960400191505060405180910390fd5b600c54610100900460ff1615610e10576040805162461bcd60e51b815260206004820152601e60248201527f43616d656c6f74506169723a20616c726561647920696d6d757461626c650000604482015290519081900360640190fd5b600c805461ff0019166101001790556040517f09122c41ae733a4d7740324d50e35fbd6ee85be3c1312a45596d8045150ab2f290600090a16001600d55565b6005546001600160a01b031633148015610e735750600754600160a01b900460ff16155b610ebd576040805162461bcd60e51b815260206004820152601660248201527521b0b6b2b637ba2830b4b91d102327a92124a22222a760511b604482015290519081900360640190fd5b600680546001600160a01b038085166001600160a01b0319928316811790935560078054918516919092161790556040805163313ce56760e01b8152905163313ce56791600480820192602092909190829003018186803b158015610f2157600080fd5b505afa158015610f35573d6000803e3d6000fd5b505050506040513d6020811015610f4b57600080fd5b505160ff16600a0a6009556040805163313ce56760e01b815290516001600160a01b0383169163313ce567916004808301926020929190829003018186803b158015610f9657600080fd5b505afa158015610faa573d6000803e3d6000fd5b505050506040513d6020811015610fc057600080fd5b505160ff16600a90810a905550506007805460ff60a01b1916600160a01b179055565b600d54600114611028576040805162461bcd60e51b815260206004820152601360248201526000805160206138c4833981519152604482015290519081900360640190fd5b6000600d5560055460408051634c21771560e01b815290516001600160a01b0390921691634c21771591600480820192602092909190829003018186803b15801561107257600080fd5b505afa158015611086573d6000803e3d6000fd5b505050506040513d602081101561109c57600080fd5b50516001600160a01b031633146110e45760405162461bcd60e51b815260040180806020018281038252602a81526020018061392e602a913960400191505060405180910390fd5b6107d08261ffff161115801561110057506107d08161ffff1611155b61113b5760405162461bcd60e51b81526004018080602001828103825260328152602001806138196032913960400191505060405180910390fd5b60008261ffff16118015611153575060008161ffff16115b61118e5760405162461bcd60e51b81526004018080602001828103825260328152602001806138716032913960400191505060405180910390fd5b6008805461ffff60e01b1916600160e01b61ffff858116918202929092176001600160f01b0316600160f01b9285169283021790925560408051928352602083019190915280517fa4877b8ecb5a00ba277e4bceeeb187a669e7113649774dfbea05c259ce27f17b9281900390910190a150506001600d55565b600854600160e01b900461ffff1681565b6107d081565b6000600d54600114611266576040805162461bcd60e51b815260206004820152601360248201526000805160206138c4833981519152604482015290519081900360640190fd5b6000600d81905580611276610860565b5050600654604080516370a0823160e01b815230600482015290519395509193506000926001600160a01b03909116916370a08231916024808301926020929190829003018186803b1580156112cb57600080fd5b505afa1580156112df573d6000803e3d6000fd5b505050506040513d60208110156112f557600080fd5b5051600754604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561134857600080fd5b505afa15801561135c573d6000803e3d6000fd5b505050506040513d602081101561137257600080fd5b505190506000611391836001600160701b03871663ffffffff612bf316565b905060006113ae836001600160701b03871663ffffffff612bf316565b905060006113bc8787612ceb565b60005490915080611405576113f16103e86113e56113e0878763ffffffff612fba16565b61301d565b9063ffffffff612bf316565b985061140060006103e861306f565b611454565b6114516001600160701b038916611422868463ffffffff612fba16565b8161142957fe5b046001600160701b038916611444868563ffffffff612fba16565b8161144b57fe5b046130f3565b98505b600089116114935760405162461bcd60e51b815260040180806020018281038252602a8152602001806137c3602a913960400191505060405180910390fd5b61149d8a8a61306f565b6114a78686613109565b81156114d1576008546114cd906001600160701b0380821691600160701b900416612ea4565b600b555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600d5550949695505050505050565b61152661376b565b5060408051610100810182526006546001600160a01b039081168252600754166020808301919091528183018990526060820188905260006080830181905260a0830181905260c0830181905260e08301528251601f860182900482028101820190935284835290916115b9918391889188908890819084018382808284376000920191909152508892506121f0915050565b50505050505050565b60016020526000908152604090205481565b600b5481565b60046020526000908152604090205481565b600080600d54600114611634576040805162461bcd60e51b815260206004820152601360248201526000805160206138c4833981519152604482015290519081900360640190fd5b6000600d81905580611644610860565b5050600654600754604080516370a0823160e01b815230600482015290519496509294506001600160a01b039182169391169160009184916370a08231916024808301926020929190829003018186803b1580156116a157600080fd5b505afa1580156116b5573d6000803e3d6000fd5b505050506040513d60208110156116cb57600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038516916370a08231916024808301926020929190829003018186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b5051306000908152600160205260408120549192506117628888612ceb565b60005490915080611779848763ffffffff612fba16565b8161178057fe5b049a5080611794848663ffffffff612fba16565b8161179b57fe5b04995060008b1180156117ae575060008a115b6117e95760405162461bcd60e51b815260040180806020018281038252602a8152602001806139b8602a913960400191505060405180910390fd5b6117f330846131e8565b6117fe878d8d613274565b611809868d8c613274565b604080516370a0823160e01b815230600482015290516001600160a01b038916916370a08231916024808301926020929190829003018186803b15801561184f57600080fd5b505afa158015611863573d6000803e3d6000fd5b505050506040513d602081101561187957600080fd5b5051604080516370a0823160e01b815230600482015290519196506001600160a01b038816916370a0823191602480820192602092909190829003018186803b1580156118c557600080fd5b505afa1580156118d9573d6000803e3d6000fd5b505050506040513d60208110156118ef57600080fd5b505193506118fd8585613109565b811561192757600854611923906001600160701b0380821691600160701b900416612ea4565b600b555b604080518c8152602081018c905281516001600160a01b038f169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a35050505050505050506001600d81905550915091565b604051806040016040528060078152602001660434d4c542d4c560cc1b81525081565b600c5460ff1681565b60006108a0338484612c43565b600c54610100900460ff1681565b6103e881565b600d54600114611a17576040805162461bcd60e51b815260206004820152601360248201526000805160206138c4833981519152604482015290519081900360640190fd5b6000600d55600654600754600854604080516370a0823160e01b815230600482015290516001600160a01b039485169490931692611ac69285928792611ac1926001600160701b03169185916370a0823191602480820192602092909190829003018186803b158015611a8957600080fd5b505afa158015611a9d573d6000803e3d6000fd5b505050506040513d6020811015611ab357600080fd5b50519063ffffffff612bf316565b613274565b600854604080516370a0823160e01b81523060048201529051611b2d9284928792611ac192600160701b90046001600160701b0316916001600160a01b038616916370a0823191602480820192602092909190829003018186803b158015611a8957600080fd5b6040517f21ad22495c9c75cd1c94756f91824e779c0c8a8e168b267c790df464fe056b7990600090a150506001600d5550565b6005546001600160a01b031681565b6007546001600160a01b031681565b42841015611bc8576040805162461bcd60e51b8152602060048201526012602482015271155b9a5cddd85c158c8e881156141254915160721b604482015290519081900360640190fd5b6003546001600160a01b0380891660008181526004602090815260408083208054600180820190925582516000805160206139788339815191528186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e280820193601f1981019281900390910190855afa158015611cd1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611d075750886001600160a01b0316816001600160a01b0316145b611d57576040805162461bcd60e51b815260206004820152601c60248201527b556e697377617056323a20494e56414c49445f5349474e415455524560201b604482015290519081900360640190fd5b611d62898989612ba3565b505050505050505050565b620186a081565b600260209081526000928352604080842090915290825290205481565b60065460009081906001600160a01b03848116911614611dbe57600854600160f01b900461ffff16611dcd565b600854600160e01b900461ffff165b600854909150611df990859085906001600160701b0380821691600160701b90041661ffff8616613409565b949350505050565b600d54600114611e46576040805162461bcd60e51b815260206004820152601360248201526000805160206138c4833981519152604482015290519081900360640190fd5b6000600d5560055460408051638da5cb5b60e01b815290516001600160a01b0390921691638da5cb5b91600480820192602092909190829003018186803b158015611e9057600080fd5b505afa158015611ea4573d6000803e3d6000fd5b505050506040513d6020811015611eba57600080fd5b50516001600160a01b03163314611f025760405162461bcd60e51b81526004018080602001828103825260218152602001806138a36021913960400191505060405180910390fd5b6006546001600160a01b03838116911614801590611f2e57506007546001600160a01b03838116911614155b611f7c576040805162461bcd60e51b815260206004820152601a60248201527921b0b6b2b637ba2830b4b91d1034b73b30b634b2103a37b5b2b760311b604482015290519081900360640190fd5b6120088282846001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015611fd757600080fd5b505afa158015611feb573d6000803e3d6000fd5b505050506040513d602081101561200157600080fd5b5051613274565b604080516001600160a01b0383811682529151918416917f368a9dc863ecb94b5ba32a682e26295b10d9c2666fad7d785ebdf262c3c524139181900360200190a250506001600d55565b600d54600114612097576040805162461bcd60e51b815260206004820152601360248201526000805160206138c4833981519152604482015290519081900360640190fd5b6000600d819055600654604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b5051600754604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561216657600080fd5b505afa15801561217a573d6000803e3d6000fd5b505050506040513d602081101561219057600080fd5b5051905081158015906121a257508015155b6121dd5760405162461bcd60e51b815260040180806020018281038252602c8152602001806137ed602c913960400191505060405180910390fd5b6121e78282613109565b50506001600d55565b600d54600114612235576040805162461bcd60e51b815260206004820152601360248201526000805160206138c4833981519152604482015290519081900360640190fd5b6000600d556040840151151580612250575060008460600151115b61228b5760405162461bcd60e51b81526004018080602001828103825260278152602001806139076027913960400191505060405180910390fd5b600080600080612299610860565b9350935093509350836001600160701b031688604001511080156122c95750826001600160701b03168860600151105b6123045760405162461bcd60e51b81526004018080602001828103825260238152602001806138e46023913960400191505060405180910390fd5b87516001600160a01b03888116911614801590612337575087602001516001600160a01b0316876001600160a01b031614155b612382576040805162461bcd60e51b815260206004820152601760248201527643616d656c6f74506169723a20494e56414c49445f544f60481b604482015290519081900360640190fd5b60408801511561239f5761239f8860000151888a60400151613274565b6060880151156123bc576123bc8860200151888a60600151613274565b8551156124b657866001600160a01b03166310d1e85c338a604001518b606001518a6040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561244e578181015183820152602001612436565b50505050905090810190601f16801561247b5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561249d57600080fd5b505af11580156124b1573d6000803e3d6000fd5b505050505b8751604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561250057600080fd5b505afa158015612514573d6000803e3d6000fd5b505050506040513d602081101561252a57600080fd5b50516080890152602088810151604080516370a0823160e01b815230600482015290516001600160a01b03909216926370a0823192602480840193829003018186803b15801561257957600080fd5b505afa15801561258d573d6000803e3d6000fd5b505050506040513d60208110156125a357600080fd5b505160a0890152604088015160808901516000916001600160701b03871603106125ce5760006125e5565b8860400151856001600160701b0316038960800151035b905060008960600151856001600160701b0316038a60a001511161260a576000612621565b8960600151856001600160701b0316038a60a00151035b905060008211806126325750600081115b61266d5760405162461bcd60e51b815260040180806020018281038252602681526020018061384b6026913960400191505060405180910390fd5b620186a06126858361ffff871663ffffffff612fba16565b8161268c57fe5b0460c08b0152620186a06126aa8261ffff861663ffffffff612fba16565b816126b157fe5b0460e08b01526000806001600160a01b0389166126cf576000612749565b60055460408051631c60f51f60e21b81526001600160a01b038c8116600483015291519190921691637183d47c916024808301926020929190829003018186803b15801561271c57600080fd5b505afa158015612730573d6000803e3d6000fd5b505050506040513d602081101561274657600080fd5b50515b9050801561280e5783156127b4576402540be40061278161ffff8816612775878563ffffffff612fba16565b9063ffffffff612fba16565b8161278857fe5b0491506127a2828d60c00151612bf390919063ffffffff16565b60c08d01528b516127b4908a84613274565b821561280e576402540be4006127d861ffff8716612775868563ffffffff612fba16565b816127df57fe5b0491506127f9828d60e00151612bf390919063ffffffff16565b60e08d015260208c015161280e908a84613274565b600c5460ff16156129765760055460408051634cadad5760e11b8152815160009384936001600160a01b039091169263995b5aae9260048083019392829003018186803b15801561285e57600080fd5b505afa158015612872573d6000803e3d6000fd5b505050506040513d604081101561288857600080fd5b50805160209091015190925090506001600160a01b03811615612973576128bc82612775620186a08663ffffffff612bf316565b915085156129175766038d7ea4c680006128e461ffff8a16612775898663ffffffff612fba16565b816128eb57fe5b049350612905848f60c00151612bf390919063ffffffff16565b60c08f01528d51612917908286613274565b84156129735766038d7ea4c6800061293d61ffff8916612775888663ffffffff612fba16565b8161294457fe5b04935061295e848f60e00151612bf390919063ffffffff16565b60e08f015260208e0151612973908286613274565b50505b83156129f8578b51604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156129c657600080fd5b505afa1580156129da573d6000803e3d6000fd5b505050506040513d60208110156129f057600080fd5b505160808d01525b8215612a78576020808d0151604080516370a0823160e01b815230600482015290516001600160a01b03909216926370a0823192602480840193829003018186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b505160a08d01525b50506000612a978b60c001518c60800151612bf390919063ffffffff16565b90506000612ab68c60e001518d60a00151612bf390919063ffffffff16565b9050612ad4886001600160701b0316886001600160701b0316612ea4565b612ade8383612ea4565b1015612b22576040805162461bcd60e51b815260206004820152600e60248201526d43616d656c6f74506169723a204b60901b604482015290519081900360640190fd5b5050612b368a608001518b60a00151613109565b6040808b01516060808d0151835186815260208101869052808501939093529082015290516001600160a01b038b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600d555050505050505050565b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291516000805160206139988339815191529281900390910190a3505050565b808203828111156108a4576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b6001600160a01b038316600090815260016020526040902054612c6c908263ffffffff612bf316565b6001600160a01b038085166000908152600160205260408082209390935590841681522054612ca1908263ffffffff6135d716565b6001600160a01b03808416600081815260016020908152604091829020949094558051858152905191939287169260008051602061395883398151915292918290030190a3505050565b600c5460009060ff1615612d01575060006108a4565b60055460408051634cadad5760e11b8152815160009384936001600160a01b039091169263995b5aae9260048083019392829003018186803b158015612d4657600080fd5b505afa158015612d5a573d6000803e3d6000fd5b505050506040513d6040811015612d7057600080fd5b508051602090910151600b546001600160a01b038216158015965092945090925090612e8f578015612e8a576000612dbd6113e0886001600160701b0316886001600160701b0316612ea4565b90506000612dca8361301d565b905080821115612e87576000612e03606487612def620186a08363ffffffff612fba16565b81612df657fe5b049063ffffffff612bf316565b90506000612e2e6064612775612e1f878763ffffffff612bf316565b6000549063ffffffff612fba16565b90506000612e62612e4685606463ffffffff612fba16565b612e56878663ffffffff612fba16565b9063ffffffff6135d716565b90506000818381612e6f57fe5b0490508015612e8257612e82888261306f565b505050505b50505b612e9b565b8015612e9b576000600b555b50505092915050565b600c5460009060ff1615612faa57600954600090612ed085670de0b6b3a764000063ffffffff612fba16565b81612ed757fe5b0490506000600a54612efa670de0b6b3a764000086612fba90919063ffffffff16565b81612f0157fe5b0490506000670de0b6b3a7640000612f1f848463ffffffff612fba16565b81612f2657fe5b0490506000612f7c670de0b6b3a7640000612f47858063ffffffff612fba16565b81612f4e57fe5b04670de0b6b3a7640000612f68878063ffffffff612fba16565b81612f6f57fe5b049063ffffffff6135d716565b9050670de0b6b3a7640000612f97838363ffffffff612fba16565b81612f9e57fe5b049450505050506108a4565b61098d838363ffffffff612fba16565b6000811580612fd557505080820282828281612fd257fe5b04145b6108a4576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b60006003821115613060575080600160028204015b8181101561305a5780915060028182858161304957fe5b04018161305257fe5b049050613032565b5061306a565b811561306a575060015b919050565b600054613082908263ffffffff6135d716565b60009081556001600160a01b0383168152600160205260409020546130ad908263ffffffff6135d716565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391926000805160206139588339815191529281900390910190a35050565b6000818310613102578161098d565b5090919050565b6001600160701b03821180159061312757506001600160701b038111155b613170576040805162461bcd60e51b815260206004820152601560248201527443616d656c6f74506169723a204f564552464c4f5760581b604482015290519081900360640190fd5b600880546001600160701b0319166001600160701b03848116918217600160701b600160e01b031916600160701b9185169182021790925560408051918252602082019290925281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a15050565b6001600160a01b038216600090815260016020526040902054613211908263ffffffff612bf316565b6001600160a01b0383166000908152600160205260408120919091555461323e908263ffffffff612bf316565b60009081556040805183815290516001600160a01b03851691600080516020613958833981519152919081900360200190a35050565b60408051808201825260198152787472616e7366657228616464726573732c75696e743235362960381b60209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009460609489169392918291908083835b6020831061331d5780518252601f1990920191602091820191016132fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461337f576040519150601f19603f3d011682016040523d82523d6000602084013e613384565b606091505b50915091508180156133b25750805115806133b257508080602001905160208110156133af57600080fd5b50515b613402576040805162461bcd60e51b815260206004820152601c60248201527b10d85b595b1bdd14185a5c8e881514905394d1915497d1905253115160221b604482015290519081900360640190fd5b5050505050565b600c5460009060ff161561354c57613444620186a061342e888563ffffffff612fba16565b8161343557fe5b8891900463ffffffff612bf316565b955060006134528585612ea4565b905060095485670de0b6b3a7640000028161346957fe5b049450600a5484670de0b6b3a7640000028161348157fe5b600654919004945060009081906001600160a01b038981169116146134a75785876134aa565b86865b60065491935091506001600160a01b038981169116146134df57600a5489670de0b6b3a764000002816134d957fe5b046134f6565b60095489670de0b6b3a764000002816134f457fe5b045b98506000613507838b018584613626565b6006549083039150670de0b6b3a7640000906001600160a01b038b811691161461353357600954613537565b600a545b82028161354057fe5b049450505050506135ce565b60065460009081906001600160a01b0388811691161461356d578486613570565b85855b909250905061359861358b620186a08663ffffffff612bf316565b899063ffffffff612fba16565b97506135b188612e5684620186a063ffffffff612fba16565b6135c1898363ffffffff612fba16565b816135c857fe5b04925050505b95945050505050565b808201828110156108a4576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b6000805b60ff8110156136de5782600061364087836136e7565b9050858110156136765760006136568887613737565b828803670de0b6b3a7640000028161366a57fe5b0495909501945061369d565b60006136828887613737565b878303670de0b6b3a7640000028161369657fe5b0490950394505b818511156136bf576001828603116136ba5784935050505061098d565b6136d4565b6001858303116136d45784935050505061098d565b505060010161362a565b50909392505050565b6000670de0b6b3a76400008281858181800204028161370257fe5b04028161370b57fe5b04670de0b6b3a764000080848181800204028161372457fe5b0485028161372e57fe5b04019392505050565b6000670de0b6b3a7640000838181800204028161375057fe5b04670de0b6b3a7640000808480020485600302028161372e57fe5b60405180610100016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe43616d656c6f74506169723a20494e53554646494349454e545f4c49515549444954595f4d494e54454443616d656c6f74506169723a206c697175696469747920726174696f206e6f7420696e697469616c697a656443616d656c6f74506169723a2066656550657263656e74206d7573746e27742065786365656420746865206d6178696d756d43616d656c6f74506169723a20494e53554646494349454e545f494e5055545f414d4f554e5443616d656c6f74506169723a2066656550657263656e74206d7573746e27742065786365656420746865206d696e696d756d43616d656c6f74506169723a206f6e6c7920666163746f72792773206f776e657243616d656c6f74506169723a204c4f434b45440000000000000000000000000043616d656c6f74506169723a20494e53554646494349454e545f4c495155494449545943616d656c6f74506169723a20494e53554646494349454e545f4f55545055545f414d4f554e5443616d656c6f74506169723a206f6e6c7920666163746f7279277320666565416d6f756e744f776e6572ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92543616d656c6f74506169723a20494e53554646494349454e545f4c49515549444954595f4255524e454443616d656c6f74506169723a206f6e6c7920666163746f7279277320736574537461626c654f776e6572a265627a7a72315820ddd92a27b7678cbe68b6e13fbd88ca132ad21aa3bc1ed2695602324a90feea9064736f6c63430005100032
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ 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.