false
true
0
PulseChain
Blockchain
Blocks
Blocks
Uncles
Forked Blocks (Reorgs)
Transactions
Confirmed
Pending
Verified contracts
Tokens
All
PLS
APIs
GraphQL
RPC
Eth RPC
Apps
PulseChain Beacon Explorer
PulseX
PulseChain Bridge
Become a Validator
PulseChain
Mainnets
PulseChain Mainnet
Testnets
Testnet V4
/
Search
/
Search
Connection Lost
New Solidity Smart Contract Verification
Contract Address
The 0x address supplied on contract creation.
Is Yul contract
No
Yes
Select Yes if you want to verify Yul contract.
Contract Name
Must match the name specified in the code. For example, in
contract MyContract {..}
MyContract
is the contract name.
Include nightly builds
No
Yes
Select yes if you want to show nightly builds.
Compiler
v0.8.35-pre.1+commit.a99b6d8c
v0.8.34+commit.80d5c536
v0.8.33+commit.64118f21
v0.8.32+commit.ebbd65e5
v0.8.31+commit.fd3a2265
v0.8.31-pre.1+commit.b59566f6
v0.8.30+commit.73712a01
v0.8.29+commit.ab55807c
v0.8.28+commit.7893614a
v0.8.27+commit.40a35a09
v0.8.26+commit.8a97fa7a
v0.8.25+commit.b61c2a91
v0.8.24+commit.e11b9ed9
v0.8.23+commit.f704f362
v0.8.22+commit.4fc1097e
v0.8.21+commit.d9974bed
v0.8.20+commit.a1b79de6
v0.8.19+commit.7dd6d404
v0.8.18+commit.87f61d96
v0.8.17+commit.8df45f5f
v0.8.16+commit.07a7930e
v0.8.15+commit.e14f2714
v0.8.14+commit.80d49f37
v0.8.13+commit.abaa5c0e
v0.8.12+commit.f00d7308
v0.8.11+commit.d7f03943
v0.8.10+commit.fc410830
v0.8.9+commit.e5eed63a
v0.8.8+commit.dddeac2f
v0.8.7+commit.e28d00a7
v0.8.6+commit.11564f7e
v0.8.5+commit.a4f2e591
v0.8.4+commit.c7e474f2
v0.8.3+commit.8d00100c
v0.8.2+commit.661d1103
v0.8.1+commit.df193b15
v0.8.0+commit.c7dfd78e
v0.7.6+commit.7338295f
v0.7.5+commit.eb77ed08
v0.7.4+commit.3f05b770
v0.7.3+commit.9bfce1f6
v0.7.2+commit.51b20bc0
v0.7.1+commit.f4a555be
v0.7.0+commit.9e61f92b
v0.6.12+commit.27d51765
v0.6.11+commit.5ef660b1
v0.6.10+commit.00c0fcaf
v0.6.9+commit.3e3065ac
v0.6.8+commit.0bbfe453
v0.6.7+commit.b8d736ae
v0.6.6+commit.6c089d02
v0.6.5+commit.f956cc89
v0.6.4+commit.1dca32f3
v0.6.3+commit.8dda9521
v0.6.2+commit.bacdbe57
v0.6.1+commit.e6f7d5a4
v0.6.0+commit.26b70077
v0.5.17+commit.d19bba13
v0.5.16+commit.9c3226ce
v0.5.15+commit.6a57276f
v0.5.14+commit.01f1aaa4
v0.5.13+commit.5b0b510c
v0.5.12+commit.7709ece9
v0.5.11+commit.22be8592
v0.5.10+commit.5a6ea5b1
v0.5.9+commit.c68bc34e
v0.5.8+commit.23d335f2
v0.5.7+commit.6da8b019
v0.5.6+commit.b259423e
v0.5.5+commit.47a71e8f
v0.5.4+commit.9549d8ff
v0.5.3+commit.10d17f24
v0.5.2+commit.1df8f40c
v0.5.1+commit.c8a2cb62
v0.5.0+commit.1d4f565a
v0.4.26+commit.4563c3fc
v0.4.25+commit.59dbf8f1
v0.4.24+commit.e67f0147
v0.4.23+commit.124ca40d
v0.4.22+commit.4cb486ee
v0.4.21+commit.dfe3193c
v0.4.20+commit.3155dd80
v0.4.19+commit.c4cbbb05
v0.4.18+commit.9cf6e910
v0.4.17+commit.bdeb9e52
v0.4.16+commit.d7661dd9
v0.4.15+commit.8b45bddb
v0.4.14+commit.c2215d46
v0.4.13+commit.0fb4cb1a
v0.4.12+commit.194ff033
v0.4.11+commit.68ef5810
v0.4.10+commit.9e8cc01b
The compiler version is specified in
pragma solidity X.X.X
. Use the compiler version rather than the nightly build. If using the Solidity compiler, run
solc —version
to check.
EVM Version
homestead
tangerineWhistle
spuriousDragon
byzantium
constantinople
petersburg
istanbul
berlin
london
paris
shanghai
default
The EVM version the contract is written for. If the bytecode does not match the version, we try to verify using the latest EVM version.
EVM version details
.
Optimization
No
Yes
If you enabled optimization during compilation, select yes.
Optimization runs
Enter the Solidity Contract Code
//SPDX-License-Identifier: MIT pragma solidity ^0.7.0; contract LiquidityMining { address private constant UNISWAP_V2_FACTORY = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f; address private constant UNISWAP_V2_ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address private WETH_ADDRESS = IUniswapV2Router(UNISWAP_V2_ROUTER).WETH(); address[] private TOKENS; mapping(uint256 => uint256) private _totalPoolAmount; uint256[] private TIME_WINDOWS; uint256[] private REWARD_MULTIPLIERS; uint256[] private REWARD_DIVIDERS; uint256[] private REWARD_SPLIT_TRANCHES; address private _doubleProxy; address private _mainTokenAddress; address private _rewardTokenAddress; struct StakeInfo { address sender; uint256 poolPosition; uint256 firstAmount; uint256 secondAmount; uint256 poolAmount; uint256 reward; uint256 endBlock; uint256[] partialRewardBlockTimes; uint256 splittedReward; } uint256 private _startBlock; uint256 private _endBlock; mapping(uint256 => mapping(uint256 => StakeInfo)) private _stakeInfo; mapping(uint256 => uint256) private _stakeInfoLength; event Staked(address indexed sender, uint256 indexed tier, uint256 indexed poolPosition, uint256 firstAmount, uint256 secondAmount, uint256 poolAmount, uint256 reward, uint256 endBlock, uint256[] partialRewardBlockTimes, uint256 splittedReward); event Withdrawn(address sender, address indexed receiver, uint256 indexed tier, uint256 indexed poolPosition, uint256 firstAmount, uint256 secondAmount, uint256 poolAmount, uint256 reward); event PartialWithdrawn(address sender, address indexed receiver, uint256 indexed tier, uint256 reward); event Unlocked(address indexed receiver, uint256 indexed tier, uint256 position, uint256 indexed poolPosition, uint256 firstAmount, uint256 secondAmount, uint256 poolAmount, uint256 reward); event Flushed(address indexed receiver, uint256 indexed tier, uint256 position, uint256 indexed poolPosition, uint256 firstAmount, uint256 secondAmount, uint256 poolAmount, uint256 reward); constructor(address mainTokenAddress, address rewardTokenAddress, uint256 startBlock, uint256 endBlock, address doubleProxy, address[] memory tokens, uint256[] memory timeWindows, uint256[] memory rewardMultipliers, uint256[] memory rewardDividers, uint256[] memory rewardSplitTranches) { _mainTokenAddress = mainTokenAddress; _rewardTokenAddress = rewardTokenAddress; _startBlock = startBlock; _endBlock = endBlock; _doubleProxy = doubleProxy; _initArrays(tokens, timeWindows, rewardMultipliers, rewardDividers, rewardSplitTranches); } function _initArrays(address[] memory tokens, uint256[] memory timeWindows, uint256[] memory rewardMultipliers, uint256[] memory rewardDividers, uint256[] memory rewardSplitTranches) private { for(uint256 i = 0; i < tokens.length; i++) { TOKENS.push(tokens[i]); } assert(timeWindows.length == rewardMultipliers.length && rewardMultipliers.length == rewardDividers.length && rewardDividers.length == rewardSplitTranches.length); for(uint256 i = 0; i < timeWindows.length; i++) { TIME_WINDOWS.push(timeWindows[i]); } for(uint256 i = 0; i < rewardMultipliers.length; i++) { REWARD_MULTIPLIERS.push(rewardMultipliers[i]); } for(uint256 i = 0; i < rewardDividers.length; i++) { REWARD_DIVIDERS.push(rewardDividers[i]); } for(uint256 i = 0; i < rewardSplitTranches.length; i++) { REWARD_SPLIT_TRANCHES.push(rewardSplitTranches[i]); } } function doubleProxy() public view returns(address) { return _doubleProxy; } function tokenAddress() public view returns(address) { return _mainTokenAddress; } function rewardTokenAddress() public view returns(address) { return _rewardTokenAddress; } function tokens() public view returns(address[] memory) { return TOKENS; } function tierData() public view returns(uint256[] memory, uint256[] memory, uint256[] memory, uint256[] memory) { return (TIME_WINDOWS, REWARD_MULTIPLIERS, REWARD_DIVIDERS, REWARD_SPLIT_TRANCHES); } function startBlock() public view returns(uint256) { return _startBlock; } function endBlock() public view returns(uint256) { return _endBlock; } function totalPoolAmount(uint256 poolPosition) public view returns(uint256) { return _totalPoolAmount[poolPosition]; } function setDoubleProxy(address newDoubleProxy) public { require(IMVDFunctionalitiesManager(IMVDProxy(IDoubleProxy(_doubleProxy).proxy()).getMVDFunctionalitiesManagerAddress()).isAuthorizedFunctionality(msg.sender), "Unauthorized Action!"); _doubleProxy = newDoubleProxy; } function stake(uint256 tier, uint256 poolPosition, uint256 originalFirstAmount, uint256 firstAmountMin, uint256 value, uint256 secondAmountMin) public payable { require(block.number >= _startBlock, "Staking is still not available"); require(block.number < _endBlock, "Staking has reached end block"); require(poolPosition < TOKENS.length, "Unknown Pool"); require(tier < TIME_WINDOWS.length, "Unknown tier"); require(originalFirstAmount > 0, "First amount must be greater than 0"); uint256 originalSecondAmount = TOKENS[poolPosition] == WETH_ADDRESS ? msg.value : value; require(originalSecondAmount > 0, "Second amount must be greater than 0"); IMVDProxy proxy = IMVDProxy(IDoubleProxy(_doubleProxy).proxy()); _transferTokensAndCheckAllowance(_mainTokenAddress, originalFirstAmount); _transferTokensAndCheckAllowance(TOKENS[poolPosition], originalSecondAmount); address secondToken = TOKENS[poolPosition]; (uint256 firstAmount, uint256 secondAmount, uint256 poolAmount) = _createPoolToken(originalFirstAmount, firstAmountMin, originalSecondAmount, secondAmountMin, _mainTokenAddress, secondToken); _totalPoolAmount[poolPosition] += poolAmount; (uint256 minCap,, uint256 remainingToStake) = getStakingInfo(tier); require(firstAmount >= minCap, "Amount to stake is less than the current min cap"); require(firstAmount <= remainingToStake, "Amount to stake must be less than the current remaining one"); calculateRewardAndAddStakingPosition(tier, poolPosition, firstAmount, secondAmount, poolAmount, proxy); } function getStakingInfo(uint256 tier) public view returns(uint256 minCap, uint256 hardCap, uint256 remainingToStake) { (minCap, hardCap) = getStakingCap(tier); remainingToStake = hardCap; uint256 length = _stakeInfoLength[tier]; for(uint256 i = 0; i < length; i++) { if(_stakeInfo[tier][i].endBlock > block.number) { remainingToStake -= _stakeInfo[tier][i].firstAmount; } } } function getStakingCap(uint256 tier) public view returns(uint256, uint256) { IStateHolder stateHolder = IStateHolder(IMVDProxy(IDoubleProxy(_doubleProxy).proxy()).getStateHolderAddress()); string memory tierString = _toString(tier); string memory addressString = _toLowerCase(_toString(address(this))); return ( stateHolder.getUint256(string(abi.encodePacked("staking.", addressString, ".tiers[", tierString, "].minCap"))), stateHolder.getUint256(string(abi.encodePacked("staking.", addressString, ".tiers[", tierString, "].hardCap"))) ); } function _transferTokensAndCheckAllowance(address tokenAddr, uint256 value) private { if(tokenAddr == WETH_ADDRESS) { return; } IERC20 token = IERC20(tokenAddr); token.transferFrom(msg.sender, address(this), value); if(token.allowance(address(this), UNISWAP_V2_ROUTER) <= value) { token.approve(UNISWAP_V2_ROUTER, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); } } function _createPoolToken(uint256 originalFirstAmount, uint256 firstAmountMin, uint256 originalSecondAmount, uint256 secondAmountMin, address firstToken, address secondToken) private returns(uint256 firstAmount, uint256 secondAmount, uint256 poolAmount) { if(secondToken == WETH_ADDRESS) { (firstAmount, secondAmount, poolAmount) = IUniswapV2Router(UNISWAP_V2_ROUTER).addLiquidityETH{value: originalSecondAmount}( firstToken, originalFirstAmount, firstAmountMin, secondAmountMin, address(this), block.timestamp + 1000 ); } else { (firstAmount, secondAmount, poolAmount) = IUniswapV2Router(UNISWAP_V2_ROUTER).addLiquidity( firstToken, secondToken, originalFirstAmount, originalSecondAmount, firstAmountMin, secondAmountMin, address(this), block.timestamp + 1000 ); } if(firstAmount < originalFirstAmount) { IERC20(firstToken).transfer(msg.sender, originalFirstAmount - firstAmount); } if(secondAmount < originalSecondAmount) { if(secondToken == WETH_ADDRESS) { payable(msg.sender).transfer(originalSecondAmount - secondAmount); } else { IERC20(secondToken).transfer(msg.sender, originalSecondAmount - secondAmount); } } } function calculateRewardAndAddStakingPosition(uint256 tier, uint256 poolPosition, uint256 firstAmount, uint256 secondAmount, uint256 poolAmount, IMVDProxy proxy) private { uint256 partialRewardSingleBlockTime = TIME_WINDOWS[tier] / REWARD_SPLIT_TRANCHES[tier]; uint256[] memory partialRewardBlockTimes = new uint256[](REWARD_SPLIT_TRANCHES[tier]); if(partialRewardBlockTimes.length > 0) { partialRewardBlockTimes[0] = block.number + partialRewardSingleBlockTime; for(uint256 i = 1; i < partialRewardBlockTimes.length; i++) { partialRewardBlockTimes[i] = partialRewardBlockTimes[i - 1] + partialRewardSingleBlockTime; } } uint256 reward = firstAmount * REWARD_MULTIPLIERS[tier] / REWARD_DIVIDERS[tier]; StakeInfo memory stakeInfo = StakeInfo(msg.sender, poolPosition, firstAmount, secondAmount, poolAmount, reward, block.number + TIME_WINDOWS[tier], partialRewardBlockTimes, reward / REWARD_SPLIT_TRANCHES[tier]); _add(tier, stakeInfo); proxy.submit("liquidityMiningTransfer", abi.encode(address(0), 0, reward, _rewardTokenAddress)); emit Staked(msg.sender, tier, poolPosition, firstAmount, secondAmount, poolAmount, reward, stakeInfo.endBlock, partialRewardBlockTimes, stakeInfo.splittedReward); } function _add(uint256 tier, StakeInfo memory element) private returns(uint256, uint256) { _stakeInfo[tier][_stakeInfoLength[tier]] = element; _stakeInfoLength[tier] = _stakeInfoLength[tier] + 1; return (element.reward, element.endBlock); } function _remove(uint256 tier, uint256 i) private { if(_stakeInfoLength[tier] <= i) { return; } _stakeInfoLength[tier] = _stakeInfoLength[tier] - 1; if(_stakeInfoLength[tier] > i) { _stakeInfo[tier][i] = _stakeInfo[tier][_stakeInfoLength[tier]]; } delete _stakeInfo[tier][_stakeInfoLength[tier]]; } function length(uint256 tier) public view returns(uint256) { return _stakeInfoLength[tier]; } function stakeInfo(uint256 tier, uint256 position) public view returns( address, uint256, uint256, uint256, uint256, uint256, uint256, uint256[] memory, uint256 ) { StakeInfo memory tierStakeInfo = _stakeInfo[tier][position]; return( tierStakeInfo.sender, tierStakeInfo.poolPosition, tierStakeInfo.firstAmount, tierStakeInfo.secondAmount, tierStakeInfo.poolAmount, tierStakeInfo.reward, tierStakeInfo.endBlock, tierStakeInfo.partialRewardBlockTimes, tierStakeInfo.splittedReward ); } function partialReward(uint256 tier, uint256 position) public { StakeInfo memory tierStakeInfo = _stakeInfo[tier][position]; require(tierStakeInfo.sender != address(0), "Unknown Position!"); if(block.number >= tierStakeInfo.endBlock) { return withdraw(tier, position); } require(tierStakeInfo.reward > 0, "No more reward for this staking position"); uint256 reward = 0; for(uint256 i = 0; i < tierStakeInfo.partialRewardBlockTimes.length; i++) { if(tierStakeInfo.partialRewardBlockTimes[i] > 0 && block.number >= tierStakeInfo.partialRewardBlockTimes[i]) { reward += tierStakeInfo.splittedReward; tierStakeInfo.partialRewardBlockTimes[i] = 0; } } reward = reward > tierStakeInfo.reward ? tierStakeInfo.reward : reward; require(reward > 0, "No reward to redeem"); IERC20 token = IERC20(_rewardTokenAddress); token.transfer(tierStakeInfo.sender, reward); tierStakeInfo.reward = tierStakeInfo.reward - reward; _stakeInfo[tier][position] = tierStakeInfo; emit PartialWithdrawn(msg.sender, tierStakeInfo.sender, tier, reward); } function withdraw(uint256 tier, uint256 position) public { StakeInfo memory tierStakeInfo = _stakeInfo[tier][position]; require(tierStakeInfo.sender != address(0), "Unknown Position!"); require(block.number >= tierStakeInfo.endBlock, "Cannot actually withdraw this position"); IERC20 token = IERC20(_rewardTokenAddress); if(tierStakeInfo.reward > 0) { token.transfer(tierStakeInfo.sender, tierStakeInfo.reward); } token = IERC20(IUniswapV2Factory(UNISWAP_V2_FACTORY).getPair(_mainTokenAddress, TOKENS[tierStakeInfo.poolPosition])); token.transfer(tierStakeInfo.sender, tierStakeInfo.poolAmount); _totalPoolAmount[tierStakeInfo.poolPosition] = _totalPoolAmount[tierStakeInfo.poolPosition] - tierStakeInfo.poolAmount; emit Withdrawn(msg.sender, tierStakeInfo.sender, tier, tierStakeInfo.poolPosition, tierStakeInfo.firstAmount, tierStakeInfo.secondAmount, tierStakeInfo.poolAmount, tierStakeInfo.reward); _remove(tier, position); } function unlock(uint256 tier, uint256 position) public { StakeInfo memory tierStakeInfo = _stakeInfo[tier][position]; require(tierStakeInfo.sender != address(0), "Unknown Position!"); require(msg.sender == tierStakeInfo.sender, "Unlock can be done only by position owner"); if(block.number >= tierStakeInfo.endBlock) { return withdraw(tier, position); } IMVDProxy proxy = IMVDProxy(IDoubleProxy(_doubleProxy).proxy()); address walletAddress = proxy.getMVDWalletAddress(); uint256 reward = 0; for(uint256 i = 0; i < tierStakeInfo.partialRewardBlockTimes.length; i++) { if(tierStakeInfo.partialRewardBlockTimes[i] == 0) { reward += tierStakeInfo.splittedReward; } } IERC20 token = IERC20(_rewardTokenAddress); if(reward > 0) { token.transferFrom(tierStakeInfo.sender, walletAddress, reward); } token.transfer(walletAddress, tierStakeInfo.reward); token = IERC20(IUniswapV2Factory(UNISWAP_V2_FACTORY).getPair(_mainTokenAddress, TOKENS[tierStakeInfo.poolPosition])); token.transfer(tierStakeInfo.sender, tierStakeInfo.poolAmount); _totalPoolAmount[tierStakeInfo.poolPosition] = _totalPoolAmount[tierStakeInfo.poolPosition] - tierStakeInfo.poolAmount; emit Unlocked(tierStakeInfo.sender, tier, position, tierStakeInfo.poolPosition, tierStakeInfo.firstAmount, tierStakeInfo.secondAmount, tierStakeInfo.poolAmount, tierStakeInfo.reward + reward); _remove(tier, position); } function flushToDFO(uint256 tier, uint256 position) public { StakeInfo memory tierStakeInfo = _stakeInfo[tier][position]; require(tierStakeInfo.sender != address(0), "Unknown Position!"); require(msg.sender == tierStakeInfo.sender, "Flush can be done only by position owner"); IMVDProxy proxy = IMVDProxy(IDoubleProxy(_doubleProxy).proxy()); address walletAddress = proxy.getMVDWalletAddress(); uint256 reward = 0; for(uint256 i = 0; i < tierStakeInfo.partialRewardBlockTimes.length; i++) { if(tierStakeInfo.partialRewardBlockTimes[i] > 0 && block.number >= tierStakeInfo.partialRewardBlockTimes[i]) { reward += tierStakeInfo.splittedReward; tierStakeInfo.partialRewardBlockTimes[i] = 0; } } reward = reward > tierStakeInfo.reward ? tierStakeInfo.reward : reward; IERC20 token = IERC20(_rewardTokenAddress); if(reward > 0) { token.transfer(tierStakeInfo.sender, reward); } if(tierStakeInfo.reward - reward > 0) { token.transfer(walletAddress, tierStakeInfo.reward - reward); } token = IERC20(IUniswapV2Factory(UNISWAP_V2_FACTORY).getPair(_mainTokenAddress, TOKENS[tierStakeInfo.poolPosition])); token.transfer(walletAddress, tierStakeInfo.poolAmount); _totalPoolAmount[tierStakeInfo.poolPosition] = _totalPoolAmount[tierStakeInfo.poolPosition] - tierStakeInfo.poolAmount; emit Flushed(tierStakeInfo.sender, tier, position, tierStakeInfo.poolPosition, tierStakeInfo.firstAmount, tierStakeInfo.secondAmount, tierStakeInfo.poolAmount, tierStakeInfo.reward + reward); _remove(tier, position); } function _toString(uint _i) private pure returns(string memory) { if (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len - 1; while (_i != 0) { bstr[k--] = byte(uint8(48 + _i % 10)); _i /= 10; } return string(bstr); } function _toString(address _addr) private pure returns(string memory) { bytes32 value = bytes32(uint256(_addr)); bytes memory alphabet = "0123456789abcdef"; bytes memory str = new bytes(42); str[0] = '0'; str[1] = 'x'; for (uint i = 0; i < 20; i++) { str[2+i*2] = alphabet[uint(uint8(value[i + 12] >> 4))]; str[3+i*2] = alphabet[uint(uint8(value[i + 12] & 0x0f))]; } return string(str); } function _toLowerCase(string memory str) private pure returns(string memory) { bytes memory bStr = bytes(str); for (uint i = 0; i < bStr.length; i++) { bStr[i] = bStr[i] >= 0x41 && bStr[i] <= 0x5A ? bytes1(uint8(bStr[i]) + 0x20) : bStr[i]; } return string(bStr); } } interface IMVDProxy { function getStateHolderAddress() external view returns(address); function getMVDWalletAddress() external view returns(address); function getMVDFunctionalitiesManagerAddress() external view returns(address); function submit(string calldata codeName, bytes calldata data) external payable returns(bytes memory returnData); } interface IStateHolder { function setUint256(string calldata name, uint256 value) external returns(uint256); function getUint256(string calldata name) external view returns(uint256); function getBool(string calldata varName) external view returns (bool); function clear(string calldata varName) external returns(string memory oldDataType, bytes memory oldVal); } interface IMVDFunctionalitiesManager { function isAuthorizedFunctionality(address functionality) external view returns(bool); } interface IERC20 { function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } interface IUniswapV2Router { function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface IUniswapV2Factory { function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IDoubleProxy { function proxy() external view returns(address); }
We recommend using flattened code. This is necessary if your code utilizes a library or inherits dependencies. Use the
POA solidity flattener or the
truffle flattener
.
Try to fetch constructor arguments automatically
No
Yes
ABI-encoded Constructor Arguments (if required by the contract)
0000000000000000000000000394635c930716a7a5c0da1da5ed8a0b12305cff0000000000000000000000000394635c930716a7a5c0da1da5ed8a0b12305cff0000000000000000000000000000000000000000000000000000000000b510000000000000000000000000000000000000000000000000000000000000b84450000000000000000000000000de9176d7f24b0b419d1535a8b14f16df8c083eff0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000334500000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000004
Add arguments in
ABI hex encoded form
. Constructor arguments are written right to left, and will be found at the end of the input created bytecode. They may also be
parsed here.
Add Contract Libraries
Contract Libraries
Library 1 Name
A library name called in the .sol file. Multiple libraries (up to 10) may be added for each contract. Click the Add Library button to add an additional one.
Library 1 Address
The 0x library address. This can be found in the generated json file or Truffle output (if using truffle).
Library 2 Name
Library 2 Address
Library 3 Name
Library 3 Address
Library 4 Name
Library 4 Address
Library 5 Name
Library 5 Address
Library 6 Name
Library 6 Address
Library 7 Name
Library 7 Address
Library 8 Name
Library 8 Address
Library 9 Name
Library 9 Address
Library 10 Name
Library 10 Address
Add Library
Loading...
Verify & publish
Cancel
Ok
Ok
Ok
No
Yes