ETH Price: $3,416.16 (+3.02%)
Gas: 5.46 Gwei

Token

Davinci coin (DAC)
 

Overview

Max Total Supply

8,800,000,000 DAC

Holders

55,731 (0.00%)

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Blockchain ecosystem for building and deploying decentralized application

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
DACContract

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-06-04
*/

pragma solidity ^0.4.21;

// smart contract for Davinci coin

// ownership contract
contract Owned {
    address public owner;

    event TransferOwnership(address oldaddr, address newaddr);

    modifier onlyOwner() { if (msg.sender != owner) return; _; }

    function Owned() public {
        owner = msg.sender;
    }
    
    function transferOwnership(address _new) onlyOwner public {
        address oldaddr = owner;
        owner = _new;
        emit TransferOwnership(oldaddr, owner);
    }
}

// erc20
contract ERC20Interface {
	uint256 public totalSupply;
	function balanceOf(address _owner) public constant returns (uint256 balance);
	function transfer(address _to, uint256 _value) public returns (bool success);
	function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
	function approve(address _spender, uint256 _value) public returns (bool success);
	function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
	event Transfer(address indexed _from, address indexed _to, uint256 _value);
	event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}

contract DACContract is ERC20Interface, Owned {
	string public constant symbol = "DAC";
	string public constant name = "Davinci coin";
	uint8 public constant decimals = 18;
	uint256 public constant totalSupply = 8800000000000000000000000000;

	bool public stopped;

	mapping (address => int8) public blackList;

	mapping (address => uint256) public balances;
	mapping (address => mapping (address => uint256)) public allowed;


    event Blacklisted(address indexed target);
    event DeleteFromBlacklist(address indexed target);
    event RejectedPaymentToBlacklistedAddr(address indexed from, address indexed to, uint256 value);
    event RejectedPaymentFromBlacklistedAddr(address indexed from, address indexed to, uint256 value);


	modifier notStopped {
        require(!stopped);
        _;
    }

// constructor
	function DACContract() public {
		balances[msg.sender] = totalSupply;
	}
	
// function made for airdrop
	function airdrop(address[] _to, uint256[] _value) onlyOwner notStopped public {
	    for(uint256 i = 0; i < _to.length; i++){
	        if(balances[_to[i]] > 0){
	            continue;
	        }
	        transfer(_to[i], _value[i]);
	    }
	}

// blacklist management
    function blacklisting(address _addr) onlyOwner public {
        blackList[_addr] = 1;
        emit Blacklisted(_addr);
    }
    function deleteFromBlacklist(address _addr) onlyOwner public {
        blackList[_addr] = -1;
        emit DeleteFromBlacklist(_addr);
    }

// stop the contract
	function stop() onlyOwner {
        stopped = true;
    }
    function start() onlyOwner {
        stopped = false;
    }
	
// ERC20 functions
	function balanceOf(address _owner) public constant returns (uint256 balance){
		return balances[_owner];
	}
	function transfer(address _to, uint256 _value) notStopped public returns (bool success){
		require(balances[msg.sender] >= _value);

		if(blackList[msg.sender] > 0){
			emit RejectedPaymentFromBlacklistedAddr(msg.sender, _to, _value);
			return false;
		}
		if(blackList[_to] > 0){
			emit RejectedPaymentToBlacklistedAddr(msg.sender, _to, _value);
			return false;
		}

		balances[msg.sender] -= _value;
		balances[_to] += _value;
		emit Transfer(msg.sender, _to, _value);
		return true;
	}
	function transferFrom(address _from, address _to, uint256 _value) notStopped public returns (bool success){
		require(balances[_from] >= _value
			&& allowed[_from][msg.sender] >= _value);

		if(blackList[_from] > 0){
			emit RejectedPaymentFromBlacklistedAddr(_from, _to, _value);
			return false;
		}
		if(blackList[_to] > 0){
			emit RejectedPaymentToBlacklistedAddr(_from, _to, _value);
			return false;
		}

		balances[_from] -= _value;
		allowed[_from][msg.sender] -= _value;
		balances[_to] += _value;
		emit Transfer(_from, _to, _value);
		return true;
	}
	function approve(address _spender, uint256 _value) notStopped public returns (bool success){
		allowed[msg.sender][_spender] = _value;
		emit Approval(msg.sender, _spender, _value);
		return true;
	}
	function allowance(address _owner, address _spender) public constant returns (uint256 remaining){
		return allowed[_owner][_spender];
	}
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"stop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"blackList","outputs":[{"name":"","type":"int8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address[]"},{"name":"_value","type":"uint256[]"}],"name":"airdrop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stopped","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"}],"name":"blacklisting","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"}],"name":"deleteFromBlacklist","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"start","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"target","type":"address"}],"name":"Blacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"target","type":"address"}],"name":"DeleteFromBlacklist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"RejectedPaymentToBlacklistedAddr","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"RejectedPaymentFromBlacklistedAddr","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldaddr","type":"address"},{"indexed":false,"name":"newaddr","type":"address"}],"name":"TransferOwnership","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"}]

6060604052341561000f57600080fd5b60018054600160a060020a033316600160a060020a0319909116811790915560009081526003602052604090206b1c6f307be4c4687e600000009055610cad8061005a6000396000f3006060604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461011657806307da68f5146101a0578063095ea7b3146101b557806318160ddd146101eb57806323b872dd1461021057806327e235e314610238578063313ce567146102575780634838d165146102805780635c658165146102b857806367243482146102dd57806370a082311461036c57806375f12b211461038b5780638a294c601461039e5780638da5cb5b146103bd5780638de6b343146103ec57806395d89b411461040b578063a9059cbb1461041e578063be9a655514610440578063dd62ed3e14610453578063f2fde38b14610478575b600080fd5b341561012157600080fd5b610129610497565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561016557808201518382015260200161014d565b50505050905090810190601f1680156101925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101ab57600080fd5b6101b36104ce565b005b34156101c057600080fd5b6101d7600160a060020a0360043516602435610510565b604051901515815260200160405180910390f35b34156101f657600080fd5b6101fe610594565b60405190815260200160405180910390f35b341561021b57600080fd5b6101d7600160a060020a03600435811690602435166044356105a4565b341561024357600080fd5b6101fe600160a060020a036004351661078a565b341561026257600080fd5b61026a61079c565b60405160ff909116815260200160405180910390f35b341561028b57600080fd5b61029f600160a060020a03600435166107a1565b604051600091820b90910b815260200160405180910390f35b34156102c357600080fd5b6101fe600160a060020a03600435811690602435166107b5565b34156102e857600080fd5b6101b36004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506107d295505050505050565b341561037757600080fd5b6101fe600160a060020a036004351661089f565b341561039657600080fd5b6101d76108ba565b34156103a957600080fd5b6101b3600160a060020a03600435166108ca565b34156103c857600080fd5b6103d0610939565b604051600160a060020a03909116815260200160405180910390f35b34156103f757600080fd5b6101b3600160a060020a0360043516610948565b341561041657600080fd5b6101296109b6565b341561042957600080fd5b6101d7600160a060020a03600435166024356109ed565b341561044b57600080fd5b6101b3610b7f565b341561045e57600080fd5b6101fe600160a060020a0360043581169060243516610bba565b341561048357600080fd5b6101b3600160a060020a0360043516610be5565b60408051908101604052600c81527f446176696e636920636f696e0000000000000000000000000000000000000000602082015281565b60015433600160a060020a039081169116146104e95761050e565b6001805474ff0000000000000000000000000000000000000000191660a060020a1790555b565b60015460009060a060020a900460ff161561052a57600080fd5b600160a060020a03338116600081815260046020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b6b1c6f307be4c4687e6000000081565b60015460009060a060020a900460ff16156105be57600080fd5b600160a060020a03841660009081526003602052604090205482901080159061060e5750600160a060020a0380851660009081526004602090815260408083203390941683529290522054829010155b151561061957600080fd5b600160a060020a038416600090815260026020526040812054810b810b131561068b5782600160a060020a031684600160a060020a03167f2a04c84c100a93363ee2e1ab7076505a06b5dd417cccc0d6080ec8285e84f79e8460405190815260200160405180910390a3506000610783565b600160a060020a038316600090815260026020526040812054810b810b13156106fd5782600160a060020a031684600160a060020a03167fee75d149bb5e330e03f98b125aaa1efcd5864e4e2d5946f23dc6dd30630d56168460405190815260200160405180910390a3506000610783565b600160a060020a0380851660008181526003602081815260408084208054899003905560048252808420338716855282528084208054899003905594881680845291905290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b9392505050565b60036020526000908152604090205481565b601281565b600260205260009081526040812054900b81565b600460209081526000928352604080842090915290825290205481565b60015460009033600160a060020a039081169116146107f05761089a565b60015460a060020a900460ff161561080757600080fd5b5060005b825181101561089a5760006003600085848151811061082657fe5b90602001906020020151600160a060020a0316600160a060020a0316815260200190815260200160002054111561085c57610892565b61089083828151811061086b57fe5b9060200190602002015183838151811061088157fe5b906020019060200201516109ed565b505b60010161080b565b505050565b600160a060020a031660009081526003602052604090205490565b60015460a060020a900460ff1681565b60015433600160a060020a039081169116146108e557610936565b600160a060020a03811660008181526002602052604090819020805460ff191660011790557fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b855905160405180910390a25b50565b600154600160a060020a031681565b60015433600160a060020a0390811691161461096357610936565b600160a060020a03811660008181526002602052604090819020805460ff191660ff1790557f2e5392b52e98bf05bdf3784aaec667371398a6ea4fb965a2894852471999bca9905160405180910390a250565b60408051908101604052600381527f4441430000000000000000000000000000000000000000000000000000000000602082015281565b60015460009060a060020a900460ff1615610a0757600080fd5b600160a060020a03331660009081526003602052604090205482901015610a2d57600080fd5b600160a060020a033316600090815260026020526040812054810b810b1315610a9f5782600160a060020a031633600160a060020a03167f2a04c84c100a93363ee2e1ab7076505a06b5dd417cccc0d6080ec8285e84f79e8460405190815260200160405180910390a350600061058e565b600160a060020a038316600090815260026020526040812054810b810b1315610b115782600160a060020a031633600160a060020a03167fee75d149bb5e330e03f98b125aaa1efcd5864e4e2d5946f23dc6dd30630d56168460405190815260200160405180910390a350600061058e565b600160a060020a033381166000818152600360205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b60015433600160a060020a03908116911614610b9a5761050e565b6001805474ff000000000000000000000000000000000000000019169055565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b60015460009033600160a060020a03908116911614610c0357610c7d565b5060018054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff1983161792839055908116917f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c91839116604051600160a060020a039283168152911660208201526040908101905180910390a15b50505600a165627a7a72305820f6621c9ddfd5004e725ae52787a6749c85079e2c67fd75716f8f9c2c7542cff50029

Deployed Bytecode

0x6060604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461011657806307da68f5146101a0578063095ea7b3146101b557806318160ddd146101eb57806323b872dd1461021057806327e235e314610238578063313ce567146102575780634838d165146102805780635c658165146102b857806367243482146102dd57806370a082311461036c57806375f12b211461038b5780638a294c601461039e5780638da5cb5b146103bd5780638de6b343146103ec57806395d89b411461040b578063a9059cbb1461041e578063be9a655514610440578063dd62ed3e14610453578063f2fde38b14610478575b600080fd5b341561012157600080fd5b610129610497565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561016557808201518382015260200161014d565b50505050905090810190601f1680156101925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101ab57600080fd5b6101b36104ce565b005b34156101c057600080fd5b6101d7600160a060020a0360043516602435610510565b604051901515815260200160405180910390f35b34156101f657600080fd5b6101fe610594565b60405190815260200160405180910390f35b341561021b57600080fd5b6101d7600160a060020a03600435811690602435166044356105a4565b341561024357600080fd5b6101fe600160a060020a036004351661078a565b341561026257600080fd5b61026a61079c565b60405160ff909116815260200160405180910390f35b341561028b57600080fd5b61029f600160a060020a03600435166107a1565b604051600091820b90910b815260200160405180910390f35b34156102c357600080fd5b6101fe600160a060020a03600435811690602435166107b5565b34156102e857600080fd5b6101b36004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506107d295505050505050565b341561037757600080fd5b6101fe600160a060020a036004351661089f565b341561039657600080fd5b6101d76108ba565b34156103a957600080fd5b6101b3600160a060020a03600435166108ca565b34156103c857600080fd5b6103d0610939565b604051600160a060020a03909116815260200160405180910390f35b34156103f757600080fd5b6101b3600160a060020a0360043516610948565b341561041657600080fd5b6101296109b6565b341561042957600080fd5b6101d7600160a060020a03600435166024356109ed565b341561044b57600080fd5b6101b3610b7f565b341561045e57600080fd5b6101fe600160a060020a0360043581169060243516610bba565b341561048357600080fd5b6101b3600160a060020a0360043516610be5565b60408051908101604052600c81527f446176696e636920636f696e0000000000000000000000000000000000000000602082015281565b60015433600160a060020a039081169116146104e95761050e565b6001805474ff0000000000000000000000000000000000000000191660a060020a1790555b565b60015460009060a060020a900460ff161561052a57600080fd5b600160a060020a03338116600081815260046020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b6b1c6f307be4c4687e6000000081565b60015460009060a060020a900460ff16156105be57600080fd5b600160a060020a03841660009081526003602052604090205482901080159061060e5750600160a060020a0380851660009081526004602090815260408083203390941683529290522054829010155b151561061957600080fd5b600160a060020a038416600090815260026020526040812054810b810b131561068b5782600160a060020a031684600160a060020a03167f2a04c84c100a93363ee2e1ab7076505a06b5dd417cccc0d6080ec8285e84f79e8460405190815260200160405180910390a3506000610783565b600160a060020a038316600090815260026020526040812054810b810b13156106fd5782600160a060020a031684600160a060020a03167fee75d149bb5e330e03f98b125aaa1efcd5864e4e2d5946f23dc6dd30630d56168460405190815260200160405180910390a3506000610783565b600160a060020a0380851660008181526003602081815260408084208054899003905560048252808420338716855282528084208054899003905594881680845291905290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b9392505050565b60036020526000908152604090205481565b601281565b600260205260009081526040812054900b81565b600460209081526000928352604080842090915290825290205481565b60015460009033600160a060020a039081169116146107f05761089a565b60015460a060020a900460ff161561080757600080fd5b5060005b825181101561089a5760006003600085848151811061082657fe5b90602001906020020151600160a060020a0316600160a060020a0316815260200190815260200160002054111561085c57610892565b61089083828151811061086b57fe5b9060200190602002015183838151811061088157fe5b906020019060200201516109ed565b505b60010161080b565b505050565b600160a060020a031660009081526003602052604090205490565b60015460a060020a900460ff1681565b60015433600160a060020a039081169116146108e557610936565b600160a060020a03811660008181526002602052604090819020805460ff191660011790557fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b855905160405180910390a25b50565b600154600160a060020a031681565b60015433600160a060020a0390811691161461096357610936565b600160a060020a03811660008181526002602052604090819020805460ff191660ff1790557f2e5392b52e98bf05bdf3784aaec667371398a6ea4fb965a2894852471999bca9905160405180910390a250565b60408051908101604052600381527f4441430000000000000000000000000000000000000000000000000000000000602082015281565b60015460009060a060020a900460ff1615610a0757600080fd5b600160a060020a03331660009081526003602052604090205482901015610a2d57600080fd5b600160a060020a033316600090815260026020526040812054810b810b1315610a9f5782600160a060020a031633600160a060020a03167f2a04c84c100a93363ee2e1ab7076505a06b5dd417cccc0d6080ec8285e84f79e8460405190815260200160405180910390a350600061058e565b600160a060020a038316600090815260026020526040812054810b810b1315610b115782600160a060020a031633600160a060020a03167fee75d149bb5e330e03f98b125aaa1efcd5864e4e2d5946f23dc6dd30630d56168460405190815260200160405180910390a350600061058e565b600160a060020a033381166000818152600360205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b60015433600160a060020a03908116911614610b9a5761050e565b6001805474ff000000000000000000000000000000000000000019169055565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b60015460009033600160a060020a03908116911614610c0357610c7d565b5060018054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff1983161792839055908116917f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c91839116604051600160a060020a039283168152911660208201526040908101905180910390a15b50505600a165627a7a72305820f6621c9ddfd5004e725ae52787a6749c85079e2c67fd75716f8f9c2c7542cff50029

Swarm Source

bzzr://f6621c9ddfd5004e725ae52787a6749c85079e2c67fd75716f8f9c2c7542cff5
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.