Modificaciones del contrato de SmartToken [cerrado]

Quiero crear un Smart Token en la red ethereum real y he estado probando este contrato en la red de prueba ropsten, parece funcionar perfectamente como lo quiero, ahora si publicara exactamente el mismo contrato en la red ether real. funciona de la misma manera?

Y también, ¿me estoy perdiendo cosas letales o algún error letal que luego causará un error? ¿Alguna parte importante que se pueda mejorar y alguna parte que parezca extraña?

pragma solidity ^0.4.15;

/**
 * Math operations with safety checks
 */
contract SafeMath {
function safeMul(uint a, uint b) internal returns (uint) {
    uint c = a * b;
    assert(a == 0 || c / a == b);
    return c;
}

function safeDiv(uint a, uint b) internal returns (uint) {
    assert(b > 0);
    uint c = a / b;
    assert(a == b * c + a % b);
    return c;
}

function safeSub(uint a, uint b) internal returns (uint) {
    assert(b <= a);
    return a - b;
}

function safeAdd(uint a, uint b) internal returns (uint) {
    uint c = a + b;
    assert(c >= a);
    return c;
}

function max64(uint64 a, uint64 b) internal constant returns (uint64) {
    return a >= b ? a : b;
}

function min64(uint64 a, uint64 b) internal constant returns (uint64) 
{
    return a < b ? a : b;
}

function max256(uint256 a, uint256 b) internal constant returns 
(uint256) {
    return a >= b ? a : b;
}

function min256(uint256 a, uint256 b) internal constant returns 
(uint256) {
    return a < b ? a : b;
}

//This is built in the Solidity language anyway as far as I know
function assert(bool assertion) internal {
    if (!assertion) {
        throw;
    }
}
 }

 contract ERC20Basic {
uint public totalSupply;
function balanceOf(address who) constant returns (uint);
function transfer(address to, uint value);
event Transfer(address indexed from, address indexed to, uint value);
 }

  contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) constant returns 
(uint);

function transferFrom(address from, address to, uint value);
function approve(address spender, uint value);
event Approval(address indexed owner, address indexed spender, uint 
value);
 }

 contract BasicToken is ERC20Basic, SafeMath {

mapping(address => uint) balances;

     /**
   * @dev transfer token for a specified address
   * @param _to The address to transfer to.
   * @param _value The amount to be transferred.
  */

function transfer(address _to, uint _value) {
    balances[msg.sender] = safeSub(balances[msg.sender], _value);
    balances[_to] = safeAdd(balances[_to], _value);
    Transfer(msg.sender, _to, _value);
}

      /**
   * @dev Gets the balance of the specified address.
   * @param _owner The address to query the the balance of. 
   * @return An uint256 representing the amount owned by the passed address.
   */
function balanceOf(address _owner) constant returns (uint balance) {
    return balances[_owner];
}

 }


 contract StandardToken is BasicToken, ERC20 {

mapping (address => mapping (address => uint)) allowed;

function transferFrom(address _from, address _to, uint _value) {
    var _allowance = allowed[_from][msg.sender];

    // Check is not needed because safeSub(_allowance, _value) will already throw if this condition is not met
    // if (_value > _allowance) throw;

    balances[_to] = safeAdd(balances[_to], _value);
    balances[_from] = safeSub(balances[_from], _value);
    allowed[_from][msg.sender] = safeSub(_allowance, _value);
    Transfer(_from, _to, _value);
}

function approve(address _spender, uint _value) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
}

function allowance(address _owner, address _spender) constant returns 
(uint remaining) {
    return allowed[_owner][_spender];
} 

 }

 contract Ownable {
   address public owner =0x00000;


   /**
    * @dev The Ownable constructor sets the original `owner` of the 
 contract to the sender
    * account.
    */
   function Ownable() {
     owner = msg.sender;
   }


   /**
    * @dev Throws if called by any account other than the owner.
    */
   modifier onlyOwner() {
     require(msg.sender == owner);
_;
   }


   /**
    * @dev Allows the current owner to transfer control of the contract to a newOwner.
    * @param newOwner The address to transfer ownership to.
    */
   function transferOwnership(address newOwner) onlyOwner {
     require(newOwner != address(0));      
     owner = newOwner;
   }

 }

contract CrowdsaleToken is StandardToken , Ownable {


   uint public startBlock= block.timestamp;
   uint public endBlock= startBlock + noOfSec;



  string public constant name = "EcoToken";
  string public constant symbol = "ECT";
  uint public constant decimals = 0;
  // replace with your fund collection multisig address 
  address public constant multisig = 0x000000; 
  uint public constant INITIAL_SUPPLY = 10000;

 function CrowdsaleToken() {
balances[msg.sender] = INITIAL_SUPPLY;
  }


  // 1 ether = 400 example tokens 
  uint public constant PRICE = 400;

   function () payable {
     createTokens(msg.sender);
   }

   function createTokens(address recipient) payable {
     if (msg.value == 0) {
       throw;
     }

require(now >= startBlock && now <= endBlock); 

uint tokens = safeDiv(safeMul(msg.value * 1.01 ether, getPrice()), 1000000000000000000 ether);
totalSupply = safeAdd(safeAdd(totalSupply, tokens), INITIAL_SUPPLY);

balances[recipient] = safeAdd(balances[recipient], tokens);

if (!multisig.send(msg.value)) {
  throw;
}
  }

// replace this with any other price function
  function getPrice() constant returns (uint result) {
    return PRICE;
}
  }
Voto para cerrar esta pregunta como fuera de tema porque no parece una pregunta.
... fue un montón de períodos en los que hice ese voto de cierre.
@taid No edite las preguntas para eliminar contenido. Incluso si una pregunta se cierra como demasiado amplia, sigue siendo una referencia útil y debe conservarse. Si tiene otras inquietudes y cree que la publicación debe eliminarse, comuníquese con un moderador.

Respuestas (1)

Primero, su contrato debería funcionar de manera idéntica en la red de prueba y en la red principal (aparte del hecho de que el estado en las dos cadenas es diferente, por supuesto).

En segundo lugar, y esta es solo mi opinión, está cometiendo un error "letal" al solicitar que se revise su contrato inteligente en un foro público.

Si fuera 'malo' (¡no lo soy!) fingiría ser 'útil' y revisaría su contrato. Si encontrara algún lugar donde pudiera robar su dinero, fingiría que todo funciona bien, y luego le permitiría implementarlo y diez segundos después de que recaudara mega-dinero, robaría su éter. Es una mala idea pedir una revisión de alguien que no sea un experto conocido en contratos inteligentes.

Dios mío, no estaba al tanto de esto, ¿qué debo hacer ahora? Además, ¿hay algún lugar donde pueda robar mi dinero en este contrato? también explícame cómo me robaría el éter? muchas gracias por aclarar esto. ¿Puedo por favor ponerme en contacto con usted?
También debe asegurarse de que no haya conflicto de intereses con el experto que revisa su contrato.