mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove trailing whitespace in all contract files.
This commit is contained in:
@@ -23,14 +23,14 @@ contract abstractModule {
|
||||
}
|
||||
|
||||
contract moduleHandler is multiOwner, announcementTypes {
|
||||
|
||||
|
||||
struct modules_s {
|
||||
address addr;
|
||||
bytes32 name;
|
||||
bool schellingEvent;
|
||||
bool transferEvent;
|
||||
}
|
||||
|
||||
|
||||
modules_s[] public modules;
|
||||
address public foundationAddress;
|
||||
uint256 debugModeUntil = block.number + 1000000;
|
||||
@@ -40,10 +40,10 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function load(address foundation, bool forReplace, address Token, address Premium, address Publisher, address Schelling, address Provider) public {
|
||||
/*
|
||||
Loading modulest to ModuleHandler.
|
||||
|
||||
|
||||
This module can be called only once and only by the owner, if every single module and its database are already put on the blockchain.
|
||||
If forReaplace is true, than the ModuleHandler will be replaced. Before the publishing of its replace, the new contract must be already on the blockchain.
|
||||
|
||||
|
||||
@foundation Address of foundation.
|
||||
@forReplace Is it for replace or not. If not, it will be connected to the module.
|
||||
@Token address of token.
|
||||
@@ -64,7 +64,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
/*
|
||||
Inside function for registration of the modules in the database.
|
||||
If the call is false, won't happen any direct call.
|
||||
|
||||
|
||||
@input _Structure of module.
|
||||
@call Is connect to the module or not.
|
||||
*/
|
||||
@@ -84,7 +84,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function getModuleAddressByName(string memory name) public view returns( bool success, bool found, address addr ) {
|
||||
/*
|
||||
Search by name for module. The result is an Ethereum address.
|
||||
|
||||
|
||||
@name Name of module.
|
||||
@addr Address of module.
|
||||
@found Is there any result.
|
||||
@@ -97,7 +97,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function getModuleIDByHash(bytes32 hashOfName) public view returns( bool success, bool found, uint256 id ) {
|
||||
/*
|
||||
Search by hash of name in the module array. The result is an index array.
|
||||
|
||||
|
||||
@name Name of module.
|
||||
@id Index of module.
|
||||
@found Was there any result or not.
|
||||
@@ -112,7 +112,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function getModuleIDByName(string memory name) public view returns( bool success, bool found, uint256 id ) {
|
||||
/*
|
||||
Search by name for module. The result is an index array.
|
||||
|
||||
|
||||
@name Name of module.
|
||||
@id Index of module.
|
||||
@found Was there any result or not.
|
||||
@@ -128,7 +128,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function getModuleIDByAddress(address addr) public view returns( bool success, bool found, uint256 id ) {
|
||||
/*
|
||||
Search by ethereum address for module. The result is an index array.
|
||||
|
||||
|
||||
@name Name of module.
|
||||
@id Index of module.
|
||||
@found Was there any result or not.
|
||||
@@ -143,7 +143,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function replaceModule(string name, address addr, bool callCallback) external returns (bool success) {
|
||||
/*
|
||||
Module replace, can be called only by the Publisher contract.
|
||||
|
||||
|
||||
@name Name of module.
|
||||
@addr Address of module.
|
||||
@bool Was there any result or not.
|
||||
@@ -166,7 +166,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
modules[_id].addr = addr;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function callReplaceCallback(string moduleName, address newModule) external returns (bool success) {
|
||||
require( block.number < debugModeUntil );
|
||||
if ( ! insertAndCheckDo(calcDoHash("callReplaceCallback", keccak256(abi.encodePacked(moduleName, newModule)))) ) {
|
||||
@@ -181,7 +181,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function newModule(string name, address addr, bool schellingEvent, bool transferEvent) external returns (bool success) {
|
||||
/*
|
||||
Adding new module to the database. Can be called only by the Publisher contract.
|
||||
|
||||
|
||||
@name Name of module.
|
||||
@addr Address of module.
|
||||
@schellingEvent Gets it new Schelling round notification?
|
||||
@@ -202,7 +202,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function dropModule(string name, bool callCallback) external returns (bool success) {
|
||||
/*
|
||||
Deleting module from the database. Can be called only by the Publisher contract.
|
||||
|
||||
|
||||
@name Name of module to delete.
|
||||
@bool Was the function successful?
|
||||
@callCallback Call the replaceable module to confirm replacement or not.
|
||||
@@ -223,7 +223,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
delete modules[_id];
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function callDisableCallback(string moduleName) external returns (bool success) {
|
||||
require( block.number < debugModeUntil );
|
||||
if ( ! insertAndCheckDo(calcDoHash("callDisableCallback", keccak256(bytes(moduleName)))) ) {
|
||||
@@ -234,14 +234,14 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
require( abstractModule(modules[_id].addr).disableModule(true) );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function broadcastTransfer(address from, address to, uint256 value) external returns (bool success) {
|
||||
/*
|
||||
Announcing transactions for the modules.
|
||||
|
||||
|
||||
Can be called only by the token module.
|
||||
Only the configured modules get notifications.( transferEvent )
|
||||
|
||||
|
||||
@from from who.
|
||||
@to to who.
|
||||
@value amount.
|
||||
@@ -261,7 +261,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
Announcing new Schelling round for the modules.
|
||||
Can be called only by the Schelling module.
|
||||
Only the configured modules get notifications( schellingEvent ).
|
||||
|
||||
|
||||
@roundID Number of Schelling round.
|
||||
@reward Coin emission in this Schelling round.
|
||||
@bool Was the function successful?
|
||||
@@ -278,10 +278,10 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function replaceModuleHandler(address newHandler) external returns (bool success) {
|
||||
/*
|
||||
Replacing ModuleHandler.
|
||||
|
||||
|
||||
Can be called only by the publisher.
|
||||
Every module will be informed about the ModuleHandler replacement.
|
||||
|
||||
|
||||
@newHandler Address of the new ModuleHandler.
|
||||
@bool Was the function successful?
|
||||
*/
|
||||
@@ -301,7 +301,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function balanceOf(address owner) public view returns (bool success, uint256 value) {
|
||||
/*
|
||||
Query of token balance.
|
||||
|
||||
|
||||
@owner address
|
||||
@value balance.
|
||||
@success was the function successful?
|
||||
@@ -313,7 +313,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function totalSupply() public view returns (bool success, uint256 value) {
|
||||
/*
|
||||
Query of the whole token amount.
|
||||
|
||||
|
||||
@value amount.
|
||||
@success was the function successful?
|
||||
*/
|
||||
@@ -324,7 +324,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function isICO() public view returns (bool success, bool ico) {
|
||||
/*
|
||||
Query of ICO state
|
||||
|
||||
|
||||
@ico Is ICO in progress?.
|
||||
@success was the function successful?
|
||||
*/
|
||||
@@ -335,7 +335,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function getCurrentSchellingRoundID() public view returns (bool success, uint256 round) {
|
||||
/*
|
||||
Query of number of the actual Schelling round.
|
||||
|
||||
|
||||
@round Schelling round.
|
||||
@success was the function successful?
|
||||
*/
|
||||
@@ -346,10 +346,10 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function mint(address to, uint256 value) external returns (bool success) {
|
||||
/*
|
||||
Token emission request. Can be called only by the provider.
|
||||
|
||||
|
||||
@to Place of new token
|
||||
@value Token amount
|
||||
|
||||
|
||||
@success Was the function successful?
|
||||
*/
|
||||
(bool _success, bool _found, uint256 _id) = getModuleIDByAddress(msg.sender);
|
||||
@@ -362,7 +362,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function transfer(address from, address to, uint256 value, bool fee) external returns (bool success) {
|
||||
/*
|
||||
Token transaction request. Can be called only by a module.
|
||||
|
||||
|
||||
@from from who.
|
||||
@to To who.
|
||||
@value Token amount.
|
||||
@@ -379,7 +379,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function processTransactionFee(address from, uint256 value) external returns (bool success) {
|
||||
/*
|
||||
Token transaction fee. Can be called only by the provider.
|
||||
|
||||
|
||||
@from From who.
|
||||
@value Token amount.
|
||||
@success Was the function successful?
|
||||
@@ -394,7 +394,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function burn(address from, uint256 value) external returns (bool success) {
|
||||
/*
|
||||
Token burn. Can be called only by Schelling.
|
||||
|
||||
|
||||
@from From who.
|
||||
@value Token amount.
|
||||
@success Was the function successful?
|
||||
@@ -409,7 +409,7 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
function configureModule(string moduleName, announcementType aType, uint256 value) external returns (bool success) {
|
||||
/*
|
||||
Changing configuration of a module. Can be called only by Publisher or while debug mode by owners.
|
||||
|
||||
|
||||
@moduleName Module name which will be configured
|
||||
@aType Type of variable (announcementType).
|
||||
@value New value
|
||||
@@ -432,14 +432,14 @@ contract moduleHandler is multiOwner, announcementTypes {
|
||||
/*
|
||||
Freezing CORION Platform. Can be called only by the owner.
|
||||
Freeze can not be recalled!
|
||||
|
||||
|
||||
@forever Is it forever or not?
|
||||
*/
|
||||
require( owners[msg.sender] );
|
||||
if ( forever ) {
|
||||
if ( ! insertAndCheckDo(calcDoHash("freezing", keccak256(abi.encodePacked(forever)))) ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
for ( uint256 a=0 ; a<modules.length ; a++ ) {
|
||||
require( abstractModule(modules[a].addr).disableModule(forever) );
|
||||
|
||||
Reference in New Issue
Block a user