-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vs
committed
Mar 14, 2018
0 parents
commit 164e3be
Showing
282 changed files
with
36,045 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
pragma solidity ^0.4.18; | ||
|
||
|
||
import 'zeppelin-solidity/contracts/crowdsale/validation/WhitelistedCrowdsale.sol'; | ||
import 'zeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol'; | ||
import 'zeppelin-solidity/contracts/token/ERC20/ERC20.sol'; | ||
|
||
|
||
/** | ||
* @title CrowdsaleRDC0 | ||
* @dev Crowdsale-0 | ||
*/ | ||
contract CrowdsaleRDC0 is WhitelistedCrowdsale, TimedCrowdsale { | ||
|
||
function CrowdsaleRDC0(ERC20 _token, uint256 _startTime, uint256 _finishTime, uint _rate) TimedCrowdsale(_startTime, _finishTime) Crowdsale( _rate, msg.sender, _token ) public payable { | ||
} | ||
|
||
|
||
function _forwardFunds() internal { | ||
//eth don't transfer to another account / деньги не уходят на другой кошелек | ||
//wallet.transfer(msg.value); | ||
} | ||
|
||
function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal onlyWhileOpen { | ||
super._preValidatePurchase(_beneficiary, _weiAmount); | ||
} | ||
|
||
function _processPurchase(address _beneficiary, uint256 _tokenAmount) internal { | ||
token.transfer(_beneficiary, _tokenAmount); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
pragma solidity ^0.4.17; | ||
|
||
contract Migrations { | ||
address public owner; | ||
uint public last_completed_migration; | ||
|
||
modifier restricted() { | ||
if (msg.sender == owner) _; | ||
} | ||
|
||
function Migrations() public { | ||
owner = msg.sender; | ||
} | ||
|
||
function setCompleted(uint completed) public restricted { | ||
last_completed_migration = completed; | ||
} | ||
|
||
function upgrade(address new_address) public restricted { | ||
Migrations upgraded = Migrations(new_address); | ||
upgraded.setCompleted(last_completed_migration); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
pragma solidity ^0.4.18; | ||
|
||
|
||
import 'zeppelin-solidity/contracts/token/ERC20/BurnableToken.sol'; | ||
import 'zeppelin-solidity/contracts/token/ERC20/StandardToken.sol'; | ||
import 'zeppelin-solidity/contracts/ownership/Ownable.sol'; | ||
|
||
|
||
/** | ||
* @title TokenRDC | ||
* | ||
*/ | ||
contract TokenRDC is BurnableToken, StandardToken, Ownable { | ||
|
||
string public constant name = "ROOMCOIN"; | ||
|
||
string public constant symbol = "RDC"; | ||
|
||
uint32 public constant decimals = 18; | ||
|
||
uint256 public INITIAL_SUPPLY = 60000000 * (10 ** uint256(decimals)); | ||
|
||
address public currentCrowdsale; | ||
|
||
function TokenRDC( address _foundation, address _team, address _BAP ) public { | ||
require( _foundation != address(0x0)); | ||
require( _team != address(0x0)); | ||
require( _BAP != address(0x0)); | ||
|
||
uint256 dec = 10 ** uint256(decimals); //1000000000000000000; | ||
totalSupply_ = INITIAL_SUPPLY; | ||
|
||
/* | ||
balances[msg.sender] = 39600000 * dec; // Public 66% | ||
balances[_foundation] = 12000000 * dec; // Foundation 20% | ||
balances[_team] = 6000000 * dec; // Team 10% | ||
balances[_BAP] = 2400000 * dec; // Bounty, Advisor, Partnership 4% | ||
*/ | ||
|
||
balances[msg.sender] = INITIAL_SUPPLY; | ||
transfer( _foundation, 12000000 * dec ); // Foundation 20% | ||
transfer( _team, 6000000 * dec ); // Team 10% | ||
transfer( _BAP, 2400000 * dec ); // Bounty, Advisor, Partnership 4% | ||
} | ||
|
||
/** | ||
* @dev transfer token to crowdsale's contract / переводим токены на адрес контратракта распродажи | ||
* @param _crowdsale The address of crowdsale's contract. | ||
*/ | ||
function startCrowdsale0( address _crowdsale ) onlyOwner public { | ||
_startCrowdsale( _crowdsale, 4500000 ); | ||
} | ||
|
||
/** | ||
* @dev transfer token to crowdsale's contract / переводим токены на адрес контратракта распродажи | ||
* @param _crowdsale The address of crowdsale's contract. | ||
*/ | ||
function startCrowdsale1( address _crowdsale ) onlyOwner public { | ||
_startCrowdsale( _crowdsale, 7920000 ); | ||
} | ||
|
||
/** | ||
* @dev transfer token to crowdsale's contract / переводим токены на адрес контратракта распродажи | ||
* @param _crowdsale The address of crowdsale's contract. | ||
*/ | ||
function startCrowdsale2( address _crowdsale ) onlyOwner public { | ||
_startCrowdsale( _crowdsale, balances[owner] ); | ||
} | ||
|
||
/** | ||
* @dev transfer token to crowdsale's contract / переводим токены на адрес контратракта распродажи | ||
* @param _crowdsale The address of crowdsale's contract. | ||
* @param _value The amount to be transferred. | ||
*/ | ||
function _startCrowdsale( address _crowdsale, uint256 _value ) onlyOwner internal { | ||
require(currentCrowdsale == address(0)); | ||
currentCrowdsale = _crowdsale; | ||
uint256 dec = 10 ** uint256(decimals); | ||
uint256 val = _value * dec; | ||
if( val > balances[owner] ) { | ||
val = balances[ owner ]; | ||
} | ||
transfer( _crowdsale, val ); | ||
} | ||
|
||
/** | ||
* @dev transfer token back to owner / переводим токены обратно владельцу контнракта | ||
* | ||
*/ | ||
function finishCrowdsale() onlyOwner public returns (bool) { | ||
require(currentCrowdsale != address(0)); | ||
require( balances[currentCrowdsale] > 0 ); | ||
|
||
uint256 value = balances[ currentCrowdsale ]; | ||
balances[currentCrowdsale] = 0; | ||
balances[owner] = balances[owner].add(value); | ||
Transfer(currentCrowdsale, owner, value); | ||
|
||
currentCrowdsale = address(0); | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var Migrations = artifacts.require("./Migrations.sol"); | ||
|
||
module.exports = function(deployer) { | ||
deployer.deploy(Migrations); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var TokenRDC = artifacts.require("./TokenRDC.sol"); | ||
|
||
module.exports = function(deployer) { | ||
deployer.deploy(TokenRDC,"0x01","0x02","0x03"); | ||
//deployer.link(ConvertLib, MetaCoin); | ||
//deployer.deploy(MetaCoin); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.