Уважаемые пользователи Голос!
Сайт доступен в режиме «чтение» до сентября 2020 года. Операции с токенами Golos, Cyber можно проводить, используя альтернативные клиенты или через эксплорер Cyberway. Подробности здесь: https://golos.io/@goloscore/operacii-s-tokenami-golos-cyber-1594822432061
С уважением, команда “Голос”
GOLOS
RU
EN
UA
anyone
6 лет назад

ico

pragma solidity ^0.4.18;

/*
Ⓒ Roman Lanskoj
Ethereum 0x4bcc85fa097ad0f5618cb9bb5bc0affbaec359b5
ownedcoin.net
2017
*/

contract realmoney {
address public owner;
address public newowner;
function realmoney() payable {
owner = msg.sender;
}
modifier onlyOwner {
require(owner == msg.sender);
_;
}
function changeOwner(address _owner) onlyOwner public {
newowner = _owner;

}
function confirmOwner() public {
require(newowner == msg.sender);
owner = newowner;
}
}
contract Limitedsale is realmoney{

uint256 public totalSupply;
mapping (address => uint256) public balanceOf;


event Transfer(address indexed from, address indexed to, uint256 value);

function Limitedsale() payable realmoney() {
totalSupply = 1000000000;
balanceOf[this] = 900000000;
balanceOf[owner] = totalSupply - balanceOf[this];
Transfer(this, owner, balanceOf[owner]);
}

function () payable {
    require(balanceOf[this] > 0);
    uint256 tokens = 500 * msg.value/1000000000000000000;
    if (tokens > balanceOf[this]) {
        tokens = balanceOf[this];
        uint valueWei = tokens * 1000000000000000000 / 500;
        msg.sender.transfer(msg.value - valueWei);
    }
require(tokens > 0);
balanceOf[msg.sender] += tokens;
balanceOf[this] -= tokens;
Transfer(this, msg.sender, tokens);
}

}

contract Coin is Limitedsale {
string public standart = 'Token 0.1';
string public name = '10x Limitedsale';
string public symbol = "10x";
uint8 public decimals = 2;

 modifier onlyPayloadSize(uint size) {
 if(msg.data.length < size + 4) {
   throw;
 }
 _;

}
function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) {
require(balanceOf[msg.sender] >= _value);
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
}
}

contract SmartContract is Coin {
function SmartContract() payable Coin() {}
function withdraw() public onlyOwner {
owner.transfer(this.balance);
}

}

/*
Ⓒ Roman Lanskoj
Ethereum 0x4bcc85fa097ad0f5618cb9bb5bc0affbaec359b5
ownedcoin.net
2017
*/

это open-source контракт ICO на эфире за моим авторством

0
0.028 GOLOS
На Golos с January 2017
Комментарии (0)
Сортировать по:
Сначала старые