Contract Overview | Dentacoin
Balance: 1.375369847877530813 Ether
Ether Value: $279.02 (@ $202.87/ETH)
Transactions: 171570 txns
Token Tracker: Dentacoin (Dentacoin)
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xc99f67433019d1da18c311e767faa2b8ec250886at txn 0xaa6bdbc0390d115df6fc8fb6d128692aef9481e696e4df47ee06830f3100f2ba
Token Balance:
 Latest 25 txns From a total of 171570 Transactions

TxHash Age From To Value [TxFee]
0xc82e5137e53b57967328de765c34fe9499d6a023b757e9edf7d2c963a747aa274 mins agoCoinExchange.io  IN   Dentacoin0 Ether0.000439264
0x546be96991e36751e6e53a5c94d2b855f79e60c7281a6ee17f2a77d5a7d71ebf34 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.0009
0x2d4489c96deba1e8376aa04a974439cf51b8fc3421d5e300e9dace5bfacc837743 mins ago0xcba406eb541875ee5c10bbcd55a97874ab6adc29  IN   Dentacoin0 Ether0.000318648
0x235d4b7a02e70aa6f39efd2d31e1df97d31e46c82f2acf9c20b127b0b3dd036144 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00039844
0xceaa07997be4a76403036de066e672dab36a15e80f6bb9a726153ba5e207962445 mins ago0x64c01afde47489608da4385cb4bf99b67fefdf6b  IN   Dentacoin0 Ether0.000500753
0xcc19b1b82354acbae4b95fd8f16ac41de4135ce50329b38197246af1df197a3f46 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0xd220a6c363762b462ee83ad82d11e5c1d26c15f441986ee179f22a01ef446ba553 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0x3ea5fa629af2d812dfc5923a967e5bc5f9c109a107c99ccd77d7b206e432fb1353 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0x915b1eab787b676c216e68d43a508079a9d612ad07bdc7bfee781be833bb90d455 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0x2bced715d5a63185d619ffe1d45d0877c4349f4dd12a2bbbc837154ad3d53ecd55 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0x49a2c49fe7560868a04299092f10c440184ab30656bfa8c0982583d9d833677055 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0x8fb762242cfe50d130df25b87d49b97d32e689354c7b7d6d5eeafcc87277af2856 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0x9cc777880a29c222a5e5262857f66c2ce5cb1b0def3ad7626be0e46b4e27a2be1 hr agoCoinExchange.io  IN   Dentacoin0 Ether0.0004881116
0x778032afa9995d3f6a7aa160984ca89763c64ad8c025a9176798732aaa6656991 hr 3 mins ago0x3890271ff57406c69e7c36a6d3a8f402b2d54f90  IN   Dentacoin0 Ether0.00079816
0x1003c3527c86c414dd7788398bedb6007cc42b09e395c702b0888a4631942a221 hr 7 mins ago0xe506e300d2773d7590cf090c44b767a6a6f3cd00  IN   Dentacoin0 Ether0.0004422232
0x5c4377e79fbb0929d70afe8f4f5dfcc97f141f2e6dd80dc2988acd557bdd9dca1 hr 11 mins agoCoinExchange.io  IN   Dentacoin0 Ether0.0004267848
0x7270917310642e32ec2e6160c4db334bdc9f4e03c072c85186b3ce0b056cbef91 hr 11 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0xa1466b1e4e8d7bbd647c243410bf9ffb151a7ce05f9d7193b9f5a528f112af871 hr 26 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0xde71a30c5c15a6a8c639accfa4964961548bd95493e184b71ce0456ddf662cc41 hr 30 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0x77efafa32fdf9ebe7547969e4ad6f08f081207991a3b5aa6135bc00953a586e71 hr 31 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0x80949cf6b7943a497ceb7d82abfdb4e11364394c7f74651e1f7a00ec07cb956d1 hr 31 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0xc43f9bd5e98dcce7c779be51acd0088759f804262ee37d1d52d8b2155e3e93df1 hr 31 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0xcba8470381e8b04bf338a657412761218575e186f9cab862c10bddafced0de341 hr 31 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0x9e54b61c098de07024403d89b6e6ad8e6eedd0a1b05cd0fa5e44055cdc0374021 hr 31 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
0x4f49321457bd65df2f25425575c4f5b0ef61fae7265cb2d47332979aa203be861 hr 31 mins ago0xfb7442ac247ae842238b3e060cd8a5798c1969e3  IN   Dentacoin0 Ether0.00054844
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click Here To View More View All
ParentTxHash Block Age From To Value
0xde43e20d8b9c9ad61c45a0dbea12204e4d0d015462354508448e926b9428e1e15451102185 days 13 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0xacd138195543fd64fd6d199f8cbe8947e9b0d0558149b2eafd880cfaed77ce0e5451086185 days 13 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x917c371d0a3f619e60e6755dc9cfc1b12ce214be6063560c9689503cd5bd619d5451080185 days 13 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x99bbc21e479e1e19434e55aa0c4056a0255859d765f73a8b9a6adb3160b3d1a15450992185 days 13 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0xa2f9e14ca2efa9efb5d8ff06ebb7a320da2128ee4c9f739257a2a013081796c55450972185 days 14 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x0fe9fa8ddc6fafa5c3b763ddf2dd6c980f47707b72372160c688b97d8c61f8285450886185 days 14 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0xeaa8e29e0667a218974bc4a03b1e18ac753fcad320b8590b3ab477df86c095ef5450868185 days 14 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x8a61beda9b99e825ea3ab4c442348484b756b1a9b09512b4d4c5d36f1900ffc25450840185 days 14 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0xb43802c2d0a7dd248fe90d563c6a6c8dcf24cfa3fba205b4e23bb8e2f971b1345450831185 days 14 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0xb98e129fd773240a0f51adcfb867933e2537cbb1686274b7ecd51527b7b8f44f5450752185 days 14 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x0f6b474c70bb7bf36887b1fe827ae6be1d6dc60094a225f48b012fa991de6fa35450738185 days 14 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x2de01af602d35ad4ecd40836ab56fc6ef29d4eb6f9de7d8875de380639bf5d275450621185 days 15 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x19093b9cc5065007e11baee9bf815bdd0987d350a1c5845094fefba879e588565450610185 days 15 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x6b7a63aa808bcab03eaaf8ef8ad4a481406bed6c361a3b3cfc21ff1b7eb1c3065450511185 days 15 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0xd9c803f9246d13d8d404da6cc2d49d55de4813ca1149a6e63c8480aa28609afd5450465185 days 15 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0xb6315d74760a4a01bf6369bd89528a0361988181a0d7b12cdbac388538d236d95449946185 days 18 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x02451a6796bd3a829ae0ac08866493ddeeabfc80e52d65c75fa68c06cd350cb05449668185 days 19 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x070d7a99b3b429978e52b51c4d86df3d3a04270eacd0c0ac7bafae96be953eba5447737186 days 3 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x9325d518d1378e5450ab4f4e852f15db3f1ccf0780f2b007f5291dec34b4db8a5447447186 days 4 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x95805cf483d6e635ae198badeb773cfcdc185eb18d3d21f5a9d032a7533cddff5446947186 days 6 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x972fcc35fa4ede9c744a24ff13ac8c0e4efa89d4c621c40cc4f3e0f9fe6c22575446914186 days 6 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x70c531fc4e46a267d8f873e003b2cc5859be8d93bd6eb6386646a824f1320fb85446724186 days 7 hrs ago0x1dfabf381d80dd29d43bc347207b30a5c484bbd00x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0x23d5020a4001f32b16a9a9ea2affe7f38129bd50673085802775a16f21cfbc5c5416055191 days 11 hrs ago0x31a240648e2baf4f9f17225987f6f53fceb1699a0x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0xc376dcde2899fd45cfe841aea388074c10c9d211a2ce83b7edea64e48066f5505415957191 days 11 hrs ago0x31a240648e2baf4f9f17225987f6f53fceb1699a0x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
0xc02736c4f368c6c071608432d0870fe73928d78d59f135fb1449fdba60313cc25415748191 days 12 hrs ago0x31a240648e2baf4f9f17225987f6f53fceb1699a0x08d32b0da63e2c3bcf8019c9c5d849d7a9d791e60.000000007777777777 Ether
[ Download CSV Export  ] 
Contract Name: DentacoinToken
Compiler Text: v0.4.8+commit.60cc1668
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.8;



/**
 * Dentacoin extended ERC20 token contract created on February the 14th, 2017 by Dentacoin B.V. in the Netherlands 
 *
 * For terms and conditions visit https://dentacoin.com
 */



contract owned {
    address public owner;

    function owned() {
        owner = msg.sender;
    }

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

    function transferOwnership(address newOwner) onlyOwner {
        if (newOwner == 0x0) throw;
        owner = newOwner;
    }
}




/**
 * Overflow aware uint math functions.
 */
contract SafeMath {
  //internals

  function safeMul(uint a, uint b) internal returns (uint) {
    uint c = a * b;
    assert(a == 0 || 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 && c>=b);
    return c;
  }

  function assert(bool assertion) internal {
    if (!assertion) throw;
  }
}




contract Token {
    /* This is a slight change to the ERC20 base standard.
    function totalSupply() constant returns (uint256 supply);
    is replaced with:
    uint256 public totalSupply;
    This automatically creates a getter function for the totalSupply.
    This is moved to the base contract since public getter functions are not
    currently recognised as an implementation of the matching abstract
    function by the compiler.
    */
    /// total amount of tokens
    uint256 public totalSupply;


    /// @param _owner The address from which the balance will be retrieved
    /// @return The balance
    function balanceOf(address _owner) constant returns (uint256 balance);

    /// @notice send `_value` token to `_to` from `msg.sender`
    /// @param _to The address of the recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transfer(address _to, uint256 _value) returns (bool success);

    /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
    /// @param _from The address of the sender
    /// @param _to The address of the recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success);

    /// @notice `msg.sender` approves `_spender` to spend `_value` tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @param _value The amount of tokens to be approved for transfer
    /// @return Whether the approval was successful or not
    function approve(address _spender, uint256 _value) returns (bool success);

    /// @param _owner The address of the account owning tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @return Amount of remaining tokens allowed to spent
    function allowance(address _owner, address _spender) 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 StandardToken is Token {

    function transfer(address _to, uint256 _value) returns (bool success) {
        //Default assumes totalSupply can't be over max (2^256 - 1).
        //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.
        //Replace the if with this one instead.
        if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
        //if (balances[msg.sender] >= _value && _value > 0) {
            balances[msg.sender] -= _value;
            balances[_to] += _value;
            Transfer(msg.sender, _to, _value);
            return true;
        } else { return false; }
    }

    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        //same as above. Replace this line with the following if you want to protect against wrapping uints.
        if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
        //if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
            balances[_from] -= _value;
            balances[_to] += _value;
            allowed[_from][msg.sender] -= _value;
            Transfer(_from, _to, _value);
            return true;
        } else { return false; }
    }

    function balanceOf(address _owner) constant returns (uint256 balance) {
        return balances[_owner];
    }

    function approve(address _spender, uint256 _value) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

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

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







/* Dentacoin Contract */
contract DentacoinToken is owned, SafeMath, StandardToken {
    string public name = "Dentacoin";                                       // Set the name for display purposes
    string public symbol = "٨";                                             // Set the symbol for display purposes
    address public DentacoinAddress = this;                                 // Address of the Dentacoin token
    uint8 public decimals = 0;                                              // Amount of decimals for display purposes
    uint256 public totalSupply = 8000000000000;                             // Set total supply of Dentacoins (eight trillion)
    uint256 public buyPriceEth = 1 finney;                                  // Buy price for Dentacoins
    uint256 public sellPriceEth = 1 finney;                                 // Sell price for Dentacoins
    uint256 public gasForDCN = 5 finney;                                    // Eth from contract against DCN to pay tx (10 times sellPriceEth)
    uint256 public DCNForGas = 10;                                          // DCN to contract against eth to pay tx
    uint256 public gasReserve = 1 ether;                                    // Eth amount that remains in the contract for gas and can't be sold
    uint256 public minBalanceForAccounts = 10 finney;                       // Minimal eth balance of sender and recipient
    bool public directTradeAllowed = false;                                 // Halt trading DCN by sending to the contract directly


/* Initializes contract with initial supply tokens to the creator of the contract */
    function DentacoinToken() {
        balances[msg.sender] = totalSupply;                                 // Give the creator all tokens
    }


/* Constructor parameters */
    function setEtherPrices(uint256 newBuyPriceEth, uint256 newSellPriceEth) onlyOwner {
        buyPriceEth = newBuyPriceEth;                                       // Set prices to buy and sell DCN
        sellPriceEth = newSellPriceEth;
    }
    function setGasForDCN(uint newGasAmountInWei) onlyOwner {
        gasForDCN = newGasAmountInWei;
    }
    function setDCNForGas(uint newDCNAmount) onlyOwner {
        DCNForGas = newDCNAmount;
    }
    function setGasReserve(uint newGasReserveInWei) onlyOwner {
        gasReserve = newGasReserveInWei;
    }
    function setMinBalance(uint minimumBalanceInWei) onlyOwner {
        minBalanceForAccounts = minimumBalanceInWei;
    }


/* Halts or unhalts direct trades without the sell/buy functions below */
    function haltDirectTrade() onlyOwner {
        directTradeAllowed = false;
    }
    function unhaltDirectTrade() onlyOwner {
        directTradeAllowed = true;
    }


/* Transfer function extended by check of eth balances and pay transaction costs with DCN if not enough eth */
    function transfer(address _to, uint256 _value) returns (bool success) {
        if (_value < DCNForGas) throw;                                      // Prevents drain and spam
        if (msg.sender != owner && _to == DentacoinAddress && directTradeAllowed) {
            sellDentacoinsAgainstEther(_value);                             // Trade Dentacoins against eth by sending to the token contract
            return true;
        }

        if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {               // Check if sender has enough and for overflows
            balances[msg.sender] = safeSub(balances[msg.sender], _value);   // Subtract DCN from the sender

            if (msg.sender.balance >= minBalanceForAccounts && _to.balance >= minBalanceForAccounts) {    // Check if sender can pay gas and if recipient could
                balances[_to] = safeAdd(balances[_to], _value);             // Add the same amount of DCN to the recipient
                Transfer(msg.sender, _to, _value);                          // Notify anyone listening that this transfer took place
                return true;
            } else {
                balances[this] = safeAdd(balances[this], DCNForGas);        // Pay DCNForGas to the contract
                balances[_to] = safeAdd(balances[_to], safeSub(_value, DCNForGas));  // Recipient balance -DCNForGas
                Transfer(msg.sender, _to, safeSub(_value, DCNForGas));      // Notify anyone listening that this transfer took place

                if(msg.sender.balance < minBalanceForAccounts) {
                    if(!msg.sender.send(gasForDCN)) throw;                  // Send eth to sender
                  }
                if(_to.balance < minBalanceForAccounts) {
                    if(!_to.send(gasForDCN)) throw;                         // Send eth to recipient
                }
            }
        } else { throw; }
    }


/* User buys Dentacoins and pays in Ether */
    function buyDentacoinsAgainstEther() payable returns (uint amount) {
        if (buyPriceEth == 0 || msg.value < buyPriceEth) throw;             // Avoid dividing 0, sending small amounts and spam
        amount = msg.value / buyPriceEth;                                   // Calculate the amount of Dentacoins
        if (balances[this] < amount) throw;                                 // Check if it has enough to sell
        balances[msg.sender] = safeAdd(balances[msg.sender], amount);       // Add the amount to buyer's balance
        balances[this] = safeSub(balances[this], amount);                   // Subtract amount from Dentacoin balance
        Transfer(this, msg.sender, amount);                                 // Execute an event reflecting the change
        return amount;
    }


/* User sells Dentacoins and gets Ether */
    function sellDentacoinsAgainstEther(uint256 amount) returns (uint revenue) {
        if (sellPriceEth == 0 || amount < DCNForGas) throw;                 // Avoid selling and spam
        if (balances[msg.sender] < amount) throw;                           // Check if the sender has enough to sell
        revenue = safeMul(amount, sellPriceEth);                            // Revenue = eth that will be send to the user
        if (safeSub(this.balance, revenue) < gasReserve) throw;             // Keep min amount of eth in contract to provide gas for transactions
        if (!msg.sender.send(revenue)) {                                    // Send ether to the seller. It's important
            throw;                                                          // To do this last to avoid recursion attacks
        } else {
            balances[this] = safeAdd(balances[this], amount);               // Add the amount to Dentacoin balance
            balances[msg.sender] = safeSub(balances[msg.sender], amount);   // Subtract the amount from seller's balance
            Transfer(this, msg.sender, revenue);                            // Execute an event reflecting on the change
            return revenue;                                                 // End function and returns
        }
    }


/* refund to owner */
    function refundToOwner (uint256 amountOfEth, uint256 dcn) onlyOwner {
        uint256 eth = safeMul(amountOfEth, 1 ether);
        if (!msg.sender.send(eth)) {                                        // Send ether to the owner. It's important
            throw;                                                          // To do this last to avoid recursion attacks
        } else {
            Transfer(this, msg.sender, eth);                                // Execute an event reflecting on the change
        }
        if (balances[this] < dcn) throw;                                    // Check if it has enough to sell
        balances[msg.sender] = safeAdd(balances[msg.sender], dcn);          // Add the amount to buyer's balance
        balances[this] = safeSub(balances[this], dcn);                      // Subtract amount from seller's balance
        Transfer(this, msg.sender, dcn);                                    // Execute an event reflecting the change
    }


/* This unnamed function is called whenever someone tries to send ether to it and possibly sells Dentacoins */
    function() payable {
        if (msg.sender != owner) {
            if (!directTradeAllowed) throw;
            buyDentacoinsAgainstEther();                                    // Allow direct trades by sending eth to the contract
        }
    }
}

/* JJG */

    Contract ABI  
[{"constant":true,"inputs":[],"name":"sellPriceEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"buyDentacoinsAgainstEther","outputs":[{"name":"amount","type":"uint256"}],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newGasReserveInWei","type":"uint256"}],"name":"setGasReserve","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"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,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newDCNAmount","type":"uint256"}],"name":"setDCNForGas","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"directTradeAllowed","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"minBalanceForAccounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newBuyPriceEth","type":"uint256"},{"name":"newSellPriceEth","type":"uint256"}],"name":"setEtherPrices","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"buyPriceEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"amountOfEth","type":"uint256"},{"name":"dcn","type":"uint256"}],"name":"refundToOwner","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newGasAmountInWei","type":"uint256"}],"name":"setGasForDCN","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"sellDentacoinsAgainstEther","outputs":[{"name":"revenue","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"haltDirectTrade","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"DentacoinAddress","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"DCNForGas","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"gasForDCN","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"minimumBalanceInWei","type":"uint256"}],"name":"setMinBalance","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"unhaltDirectTrade","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"gasReserve","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"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"}]

  Contract Creation Code Switch To Opcodes View
60a0604052600960608190527f44656e7461636f696e000000000000000000000000000000000000000000000060809081526004805460008290527f44656e7461636f696e0000000000000000000000000000000000000000000012825590927f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b602060026001851615610100026000190190941693909304601f0192909204820192909190620000db565b82800160010185558215620000db579182015b82811115620000db578251825591602001919060010190620000be565b5b50620000ff9291505b80821115620000fb5760008155600101620000e5565b5090565b50506040805180820190915260028082527fd9a800000000000000000000000000000000000000000000000000000000000060209283019081526005805460008290528251600460ff1990911617825590937f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db060018316156101000260001901909216849004601f010481019291620001c3565b82800160010185558215620001c3579182015b82811115620001c3578251825591602001919060010190620001a6565b5b50620001e79291505b80821115620000fb5760008155600101620000e5565b5090565b505060068054600160a060020a03191630600160a060020a03161760a060020a60ff0219169055650746a528800060075566038d7ea4c6800060088190556009556611c37937e08000600a908155600b55670de0b6b3a7640000600c55662386f26fc10000600d55600e805460ff191690553462000000575b5b60008054600160a060020a03191633600160a060020a03161790555b600754600160a060020a0333166000908152600260205260409020555b5b6111de80620002ab6000396000f300606060405236156101595763ffffffff60e060020a600035041663015129a1811461019357806302500824146101b257806306fdde03146101cc578063095ea7b3146102595780630d5260e71461028957806318160ddd1461029b57806323b872dd146102ba578063313ce567146102f05780633fdccd8d1461031357806341713a371461032557806347f1d8d7146103465780634b6a3334146103655780635639bb3c1461037a5780635ff456cb146103995780635ff4ae32146103ae57806370a08231146103c057806384c14b25146103eb578063892242271461040d5780638da5cb5b1461041c57806395d89b4114610445578063a9059cbb146104d2578063b04247e914610502578063b42b14c41461052b578063c72be8381461054a578063c91d956c14610569578063dd62ed3e1461057b578063ea43b79f146105ac578063eea7570e146105bb578063f2fde38b146105da575b6101915b60005433600160a060020a0390811691161461018e57600e5460ff16151561018457610000565b61018c6105f5565b505b5b565b005b34610000576101a06106e7565b60408051918252519081900360200190f35b6101a06105f5565b60408051918252519081900360200190f35b34610000576101d96106ed565b60408051602080825283518183015283519192839290830191850190808383821561021f575b80518252602083111561021f57601f1990920191602091820191016101ff565b505050905090810190601f16801561024b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3461000057610275600160a060020a036004351660243561077b565b604080519115158252519081900360200190f35b34610000576101916004356107e6565b005b34610000576101a061080b565b60408051918252519081900360200190f35b3461000057610275600160a060020a0360043581169060243516604435610811565b604080519115158252519081900360200190f35b34610000576102fd61090e565b6040805160ff9092168252519081900360200190f35b346100005761019160043561092f565b005b3461000057610275610954565b604080519115158252519081900360200190f35b34610000576101a061095d565b60408051918252519081900360200190f35b3461000057610191600435602435610963565b005b34610000576101a061098e565b60408051918252519081900360200190f35b3461000057610191600435602435610994565b005b3461000057610191600435610af7565b005b34610000576101a0600160a060020a0360043516610b1c565b60408051918252519081900360200190f35b34610000576101a0600435610b3b565b60408051918252519081900360200190f35b3461000057610191610c83565b005b3461000057610429610cac565b60408051600160a060020a039092168252519081900360200190f35b34610000576101d9610cbb565b60408051602080825283518183015283519192839290830191850190808383821561021f575b80518252602083111561021f57601f1990920191602091820191016101ff565b505050905090810190601f16801561024b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3461000057610275600160a060020a0360043516602435610d49565b604080519115158252519081900360200190f35b3461000057610429611019565b60408051600160a060020a039092168252519081900360200190f35b34610000576101a0611028565b60408051918252519081900360200190f35b34610000576101a061102e565b60408051918252519081900360200190f35b3461000057610191600435611034565b005b34610000576101a0600160a060020a0360043581169060243516611059565b60408051918252519081900360200190f35b3461000057610191611086565b005b34610000576101a06110b2565b60408051918252519081900360200190f35b3461000057610191600160a060020a03600435166110b8565b005b600060085460001480610609575060085434105b1561061357610000565b60085434811561000057600160a060020a03301660009081526002602052604090205491900491508190101561064857610000565b600160a060020a03331660009081526002602052604090205461066b9082611115565b600160a060020a0333811660009081526002602052604080822093909355309091168152205461069b908261113d565b600160a060020a03308116600081815260026020908152604091829020949094558051858152905133909316939192600080516020611193833981519152929181900390910190a35b90565b60095481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107735780601f1061074857610100808354040283529160200191610773565b820191906000526020600020905b81548152906001019060200180831161075657829003601f168201915b505050505081565b600160a060020a03338116600081815260036020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60005433600160a060020a0390811691161461080157610000565b600c8190555b5b50565b60075481565b600160a060020a0383166000908152600260205260408120548290108015906108615750600160a060020a0380851660009081526003602090815260408083203390941683529290522054829010155b80156108865750600160a060020a038316600090815260026020526040902054828101115b1561090257600160a060020a03808516600081815260026020908152604080832080548890039055878516808452818420805489019055848452600383528184203390961684529482529182902080548790039055815186815291516000805160206111938339815191529281900390910190a3506001610906565b5060005b5b9392505050565b60065474010000000000000000000000000000000000000000900460ff1681565b60005433600160a060020a0390811691161461094a57610000565b600b8190555b5b50565b600e5460ff1681565b600d5481565b60005433600160a060020a0390811691161461097e57610000565b600882905560098190555b5b5050565b60085481565b6000805433600160a060020a039081169116146109b057610000565b6109c283670de0b6b3a7640000611156565b604051909150600160a060020a0333169082156108fc029083906000818181858888f1935050505015156109f557610000565b33600160a060020a031630600160a060020a0316600080516020611193833981519152836040518082815260200191505060405180910390a35b600160a060020a03301660009081526002602052604090205482901015610a5557610000565b600160a060020a033316600090815260026020526040902054610a789083611115565b600160a060020a03338116600090815260026020526040808220939093553090911681522054610aa8908361113d565b600160a060020a03308116600081815260026020908152604091829020949094558051868152905133909316939192600080516020611193833981519152929181900390910190a35b5b505050565b60005433600160a060020a03908116911614610b1257610000565b600a8190555b5b50565b600160a060020a0381166000908152600260205260409020545b919050565b600060095460001480610b4f5750600b5482105b15610b5957610000565b600160a060020a03331660009081526002602052604090205482901015610b7f57610000565b610b8b82600954611156565b9050600c54610ba430600160a060020a0316318361113d565b1015610baf57610000565b604051600160a060020a0333169082156108fc029083906000818181858888f193505050501515610bdf57610000565b600160a060020a033016600090815260026020526040902054610c029083611115565b600160a060020a03308116600090815260026020526040808220939093553390911681522054610c32908361113d565b600160a060020a0333811660008181526002602090815260409182902094909455805185815290519193309093169260008051602061119383398151915292918290030190a3610b36565b5b919050565b60005433600160a060020a03908116911614610c9e57610000565b600e805460ff191690555b5b565b600054600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107735780601f1061074857610100808354040283529160200191610773565b820191906000526020600020905b81548152906001019060200180831161075657829003601f168201915b505050505081565b6000600b54821015610d5a57610000565b60005433600160a060020a03908116911614801590610d865750600654600160a060020a038481169116145b8015610d945750600e5460ff165b15610dac57610da282610b3b565b50600190506107e0565b600160a060020a033316600090815260026020526040902054829010801590610dee5750600160a060020a038316600090815260026020526040902054828101115b1561100d57600160a060020a033316600090815260026020526040902054610e16908361113d565b600160a060020a033316600081815260026020526040902091909155600d54903110801590610e515750600d5483600160a060020a03163110155b15610ec757600160a060020a038316600090815260026020526040902054610e799083611115565b600160a060020a0380851660008181526002602090815260409182902094909455805186815290519193339093169260008051602061119383398151915292918290030190a35060016107e0565b600160a060020a033016600090815260026020526040902054600b54610eed9190611115565b600160a060020a033081166000908152600260205260408082209390935590851681522054600b54610f2a9190610f2590859061113d565b611115565b600160a060020a03808516600081815260026020526040902092909255600b54339091169060008051602061119383398151915290610f6a90869061113d565b60408051918252519081900360200190a3600d5433600160a060020a0316311015610fc057600a54604051600160a060020a0333169180156108fc02916000818181858888f193505050501515610fc057610000565b5b600d5483600160a060020a031631101561100657600a54604051600160a060020a0385169180156108fc02916000818181858888f19350505050151561100657610000565b5b5b6107e0565b610000565b5b92915050565b600654600160a060020a031681565b600b5481565b600a5481565b60005433600160a060020a0390811691161461104f57610000565b600d8190555b5b50565b600160a060020a038083166000908152600360209081526040808320938516835292905220545b92915050565b60005433600160a060020a039081169116146110a157610000565b600e805460ff191660011790555b5b565b600c5481565b60005433600160a060020a039081169116146110d357610000565b600160a060020a03811615156110e857610000565b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600082820161113284821080159061112d5750838210155b611182565b8091505b5092915050565b600061114b83831115611182565b508082035b92915050565b600082820261113284158061112d575083858381156100005704145b611182565b8091505b5092915050565b80151561018c57610000565b5b505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820dd908e47570658e19355d4d9d91ee9d6351055f8f5e70c8a58e1831de5274da20029

   Swarm Source:
bzzr://dd908e47570658e19355d4d9d91ee9d6351055f8f5e70c8a58e1831de5274da2

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.