pragma solidity ^0.4.2;

contract Xotik {

    string public name = "Xotik";

    string public symbol = "XOT";
    string public standard = "Xotik v1.0";
    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    function Xotik(uint256 _initialSupply) public {
        balanceOf[msg.sender] = _initialSupply;
        // totalSupply = _initialSupply;

    function transfer(address _to, uint256 _value) public returns (bool success) {
        require(balanceOf[msg.sender] >= _value);

        balanceOf[msg.sender] -= _value;
        balanceOf[_to] += _value;

        Transfer(msg.sender, _to, _value);

        return true;

Screenshot of truffle console is here


Your Transfer event is not defined, you should add : event Transfer(address from, address to, uint256 value); in your state variables declaration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.