Skip to content
Verified contractPartial

BlockVentureCoin

Address0x0747af71e2034bc2d2fcad388a264f5ccdff505c
Balance

0 ETH

 

Transactions

121

 

Compiler

solc 0.4.16

 

Same code

Only this contract

 

Details

Compiler
solc 0.4.16+commit.d7661dd9
Language
solidity
Optimization
No
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
4,505,130
Creation transaction
0x3c844654ba…3e090d2b25

BlockVentureCoin.sol

pragma solidity ^ 0.4 .11;



contract tokenRecipient {

    function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData);

}





contract ERC20 {



    function totalSupply() constant returns(uint _totalSupply);



    function balanceOf(address who) constant returns(uint256);



    function transfer(address to, uint value) returns(bool ok);



    function transferFrom(address from, address to, uint value) returns(bool ok);



    function approve(address spender, uint value) returns(bool ok);



    function allowance(address owner, address spender) constant returns(uint);

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

    event Approval(address indexed owner, address indexed spender, uint value);



}





 

contract BlockVentureCoin is ERC20 {





    string public standard = 'BVC 1.1';

    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    

    

    

   

    mapping( address => uint256) public balanceOf;

    mapping( uint => address) public accountIndex;

    uint accountCount;

    

    mapping(address => mapping(address => uint256)) public allowance;

   

    

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

    event Approval(address indexed _owner, address indexed spender, uint value);

    event Message ( address a, uint256 amount );

    event Burn(address indexed from, uint256 value);





   

    

    function BlockVentureCoin() {

         

        uint supply = 10000000000000000; 

        appendTokenHolders( msg.sender );

        balanceOf[msg.sender] =  supply;

        totalSupply = supply; 

        name = "BlockVentureCoin"; 

        symbol = "BVC"; 

        decimals = 8; 

       

 

        

  

    }

    

  

  

    function balanceOf(address tokenHolder) constant returns(uint256) {



        return balanceOf[tokenHolder];

    }



    function totalSupply() constant returns(uint256) {



        return totalSupply;

    }



    function getAccountCount() constant returns(uint256) {



        return accountCount;

    }



    function getAddress(uint slot) constant returns(address) {



        return accountIndex[slot];



    }



    

    function appendTokenHolders(address tokenHolder) private {



        if (balanceOf[tokenHolder] == 0) {

          

            accountIndex[accountCount] = tokenHolder;

            accountCount++;

        }



    }



    

    function transfer(address _to, uint256 _value) returns(bool ok) {

        if (_to == 0x0) throw; 

        if (balanceOf[msg.sender] < _value) throw; 

        if (balanceOf[_to] + _value < balanceOf[_to]) throw;

        

        appendTokenHolders(_to);

        balanceOf[msg.sender] -= _value; 

        balanceOf[_to] += _value; 

        Transfer(msg.sender, _to, _value); 

    

        

        return true;

    }

    

    function approve(address _spender, uint256 _value)

    returns(bool success) {

        allowance[msg.sender][_spender] = _value;

        Approval( msg.sender ,_spender, _value);

        return true;

    }



 

    function approveAndCall(address _spender, uint256 _value, bytes _extraData)

    returns(bool success) {

        tokenRecipient spender = tokenRecipient(_spender);

        if (approve(_spender, _value)) {

            spender.receiveApproval(msg.sender, _value, this, _extraData);

            return true;

        }

    }



    function allowance(address _owner, address _spender) constant returns(uint256 remaining) {

        return allowance[_owner][_spender];

    }



 

    function transferFrom(address _from, address _to, uint256 _value) returns(bool success) {

        if (_to == 0x0) throw;  

        if (balanceOf[_from] < _value) throw;  

        if (balanceOf[_to] + _value < balanceOf[_to]) throw;  

        if (_value > allowance[_from][msg.sender]) throw; 

        appendTokenHolders(_to);

        balanceOf[_from] -= _value; 

        balanceOf[_to] += _value; 

        allowance[_from][msg.sender] -= _value;

        Transfer(_from, _to, _value);

       

        return true;

    }

  

    function burn(uint256 _value) returns(bool success) {

        if (balanceOf[msg.sender] < _value) throw; 

        balanceOf[msg.sender] -= _value; 

        totalSupply -= _value; 

        Burn(msg.sender, _value);

        return true;

    }



    function burnFrom(address _from, uint256 _value) returns(bool success) {

    

        if (balanceOf[_from] < _value) throw; 

        if (_value > allowance[_from][msg.sender]) throw; 

        allowance[_from][msg.sender] -= _value; 

        balanceOf[_from] -= _value; 

        totalSupply -= _value; 

        Burn(_from, _value);

        return true;

    }

    

  

 

    

}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.