Discover more of Etherscan's tools and services in one place.
Sponsored
Contract Source Code:
File 1 of 1 : BlastsICO.sol<i class='far fa-question-circle text-muted ms-2' data-bs-trigger='hover' data-bs-toggle='tooltip' data-bs-html='true' data-bs-title='Click on the check box to select individual contract to compare. Only 1 contract can be selected from each side.'></i>
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IUniswapV2Pair { function getReserves() external view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast); } contract BlastsICO { uint256 public rate = 2; address public admin; mapping(address => uint256) public buyer; constructor() { admin = address(0xE82a5F5E23Ad37d25d33ec4FD864dcA1e329d7c6); } function buy() external payable { uint256 amount = msg.value; require(amount > 0 , "Amount ether need > 0"); uint256 chw = getETHPrice()* amount / rate; (bool sent, ) = admin.call{value: amount}(""); require(sent, "Failed to send Ether"); buyer[msg.sender] = buyer[msg.sender] + chw; } receive() external payable {} function getETHPrice() public view returns(uint) { IUniswapV2Pair pair = IUniswapV2Pair(address(0x0d4a11d5EEaaC28EC3F61d100daF4d40471f1852)); (uint Res0, uint Res1,) = pair.getReserves(); // decimals uint res1 = Res1*(10**12); return((res1)/Res0); } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
My Name Tag:
Private Note:
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.