ETH Price: $3,306.87 (-3.42%)

Contract

0x9c794584B2f482653937B529647924606446E7F4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Send30435652017-01-22 14:55:473210 days ago1485096947IN
0x9c794584...06446E7F4
0 ETH0.000819341
Extract Wei30336282017-01-20 23:29:213212 days ago1484954961IN
0x9c794584...06446E7F4
0 ETH0.0012245441
Extract Wei30336182017-01-20 23:25:493212 days ago1484954749IN
0x9c794584...06446E7F4
0 ETH0.0012219241
Transfer Ownersh...30335892017-01-20 23:19:063212 days ago1484954346IN
0x9c794584...06446E7F4
0 ETH0.0011806341
Transfer Ownersh...30332512017-01-20 22:03:523212 days ago1484949832IN
0x9c794584...06446E7F4
0 ETH0.0011806341
Transfer Ownersh...30332302017-01-20 21:58:543212 days ago1484949534IN
0x9c794584...06446E7F4
0 ETH0.0011927341
Agree To Trade30332122017-01-20 21:56:153212 days ago1484949375IN
0x9c794584...06446E7F4
0.1 ETH0.0022464741
Offer Trade30332072017-01-20 21:54:073212 days ago1484949247IN
0x9c794584...06446E7F4
0 ETH0.0034007841
Set Taxes30331802017-01-20 21:47:083212 days ago1484948828IN
0x9c794584...06446E7F4
0 ETH0.0013257741

Latest 3 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer30336282017-01-20 23:29:213212 days ago1484954961
0x9c794584...06446E7F4
0.003 ETH
Transfer30336182017-01-20 23:25:493212 days ago1484954749
0x9c794584...06446E7F4
0.002 ETH
Transfer30332122017-01-20 21:56:153212 days ago1484949375
0x9c794584...06446E7F4
0.095 ETH
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
testingToken

Compiler Version
v0.4.8+commit.60cc1668

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-01-20
*/

pragma solidity ^0.4.8;

contract testingToken {
	mapping (address => uint256) public balanceOf;
	mapping (address => uint256) public weiWantedOf;
	mapping (address => uint256) public tokensOfferedOf;
	mapping (address => bool) public tradeActive;
	address public bank;
	uint256 public ethTaxRate = 10;
	uint256 public tokenTaxRate = 5;
	function testingToken() {
		bank = msg.sender;
		balanceOf[msg.sender] = 100000;
	}
	
	function send(address _to, uint256 _value) { //give tokens to someone
		if (balanceOf[msg.sender]<_value) throw;
		if (balanceOf[_to]+_value<balanceOf[_to]) throw;
		if (_value<0) throw;
		balanceOf[msg.sender] -= _value;
		balanceOf[_to] += (_value*(100-tokenTaxRate))/100;
	}
	
	function offerTrade(uint256 _weiWanted, uint256 _tokensOffered) { //offer the amt of ether you want and the amt of tokens youd give
	    weiWantedOf[msg.sender] = _weiWanted;
	    tokensOfferedOf[msg.sender] = _tokensOffered;
	    tradeActive[msg.sender] = true;
	}
	function agreeToTrade(address _from) payable { //choose a trade to agree to and execute it
	    if (!tradeActive[_from]) throw;
	    if (weiWantedOf[_from]!=msg.value) throw;
	    if (balanceOf[_from]<tokensOfferedOf[_from]) throw;
	    if (!_from.send((msg.value*(100-ethTaxRate))/100)) throw;
	    balanceOf[_from] -= tokensOfferedOf[_from];
	    balanceOf[msg.sender] += (tokensOfferedOf[_from]*(100-tokenTaxRate))/100;
		balanceOf[bank] += (tokensOfferedOf[_from]*tokenTaxRate)/100;
		tradeActive[_from] = false;
	}
	
	modifier bankOnly {
		if (msg.sender != bank) throw;
		_;
	}
	
	function setTaxes(uint256 _ethTaxRate, uint256 _tokenTaxRate) bankOnly { //the bank can change the tax rates
		ethTaxRate = _ethTaxRate;
		tokenTaxRate = _tokenTaxRate;
	}
	function extractWei(uint256 _wei) bankOnly { //withdraw money from the contract
		if (!msg.sender.send(_wei)) throw;
	}
	function transferOwnership(address _bank) bankOnly { //change owner
		bank = _bank;
	}
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"weiWantedOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_wei","type":"uint256"}],"name":"extractWei","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"tokensOfferedOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"tradeActive","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"bank","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"}],"name":"agreeToTrade","outputs":[],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"_ethTaxRate","type":"uint256"},{"name":"_tokenTaxRate","type":"uint256"}],"name":"setTaxes","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"send","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ethTaxRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenTaxRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_bank","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_weiWanted","type":"uint256"},{"name":"_tokensOffered","type":"uint256"}],"name":"offerTrade","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"}]

6060604052600a600555600560065534610000575b60048054600160a060020a03191633600160a060020a03169081179091556000908152602081905260409020620186a090555b5b6105ba806100576000396000f300606060405236156100a95763ffffffff60e060020a6000350416632e64bcf181146100ae578063444da951146100d957806351dfc14d146100eb5780636665e0fd1461011657806370a082311461014357806376cdb03b1461016e578063c2c61d0114610197578063c647b20e146101ad578063d0679d34146101c2578063e67e3d56146101e0578063e742db66146101ff578063f2fde38b1461021e578063fbb39f6e14610239575b610000565b34610000576100c7600160a060020a036004351661024e565b60408051918252519081900360200190f35b34610000576100e9600435610260565b005b34610000576100c7600160a060020a03600435166102b0565b60408051918252519081900360200190f35b346100005761012f600160a060020a03600435166102c2565b604080519115158252519081900360200190f35b34610000576100c7600160a060020a03600435166102d7565b60408051918252519081900360200190f35b346100005761017b6102e9565b60408051600160a060020a039092168252519081900360200190f35b6100e9600160a060020a03600435166102f8565b005b34610000576100e9600435602435610432565b005b34610000576100e9600160a060020a036004351660243561045d565b005b34610000576100c76104fa565b60408051918252519081900360200190f35b34610000576100c7610500565b60408051918252519081900360200190f35b34610000576100e9600160a060020a0360043516610506565b005b34610000576100e960043560243561054e565b005b60016020526000908152604090205481565b60045433600160a060020a0390811691161461027b57610000565b604051600160a060020a0333169082156108fc029083906000818181858888f1935050505015156102ab57610000565b5b5b50565b60026020526000908152604090205481565b60036020526000908152604090205460ff1681565b60006020819052908152604090205481565b600454600160a060020a031681565b600160a060020a03811660009081526003602052604090205460ff16151561031f57610000565b600160a060020a038116600090815260016020526040902054341461034357610000565b600160a060020a0381166000908152600260209081526040808320549183905290912054101561037257610000565b80600160a060020a03166108fc60646005546064033402811561000057604051919004801590920291906000818181858888f1935050505015156103b557610000565b600160a060020a03818116600081815260026020908152604080832080548484528285208054919091039055600680548254338916875284872080546064938403909202839004909101905590549154600454909716855282852080549790920204909501909455918152600390915220805460ff191690555b50565b60045433600160a060020a0390811691161461044d57610000565b600582905560068190555b5b5050565b600160a060020a0333166000908152602081905260409020548190101561048357610000565b600160a060020a03821660009081526020819052604090205481810110156104aa57610000565b60008110156104b857610000565b600160a060020a0333811660009081526020819052604080822080548590039055600654928516825290208054606492830384029290920490910190555b5050565b60055481565b60065481565b60045433600160a060020a0390811691161461052157610000565b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600160a060020a0333166000908152600160208181526040808420869055600282528084208590556003909152909120805460ff191690911790555b50505600a165627a7a7230582028fc2f81e8ec588d4af45fb15d09096857bcdb807e5b1b4f3c15e40f56f39bed0029

Deployed Bytecode

0x606060405236156100a95763ffffffff60e060020a6000350416632e64bcf181146100ae578063444da951146100d957806351dfc14d146100eb5780636665e0fd1461011657806370a082311461014357806376cdb03b1461016e578063c2c61d0114610197578063c647b20e146101ad578063d0679d34146101c2578063e67e3d56146101e0578063e742db66146101ff578063f2fde38b1461021e578063fbb39f6e14610239575b610000565b34610000576100c7600160a060020a036004351661024e565b60408051918252519081900360200190f35b34610000576100e9600435610260565b005b34610000576100c7600160a060020a03600435166102b0565b60408051918252519081900360200190f35b346100005761012f600160a060020a03600435166102c2565b604080519115158252519081900360200190f35b34610000576100c7600160a060020a03600435166102d7565b60408051918252519081900360200190f35b346100005761017b6102e9565b60408051600160a060020a039092168252519081900360200190f35b6100e9600160a060020a03600435166102f8565b005b34610000576100e9600435602435610432565b005b34610000576100e9600160a060020a036004351660243561045d565b005b34610000576100c76104fa565b60408051918252519081900360200190f35b34610000576100c7610500565b60408051918252519081900360200190f35b34610000576100e9600160a060020a0360043516610506565b005b34610000576100e960043560243561054e565b005b60016020526000908152604090205481565b60045433600160a060020a0390811691161461027b57610000565b604051600160a060020a0333169082156108fc029083906000818181858888f1935050505015156102ab57610000565b5b5b50565b60026020526000908152604090205481565b60036020526000908152604090205460ff1681565b60006020819052908152604090205481565b600454600160a060020a031681565b600160a060020a03811660009081526003602052604090205460ff16151561031f57610000565b600160a060020a038116600090815260016020526040902054341461034357610000565b600160a060020a0381166000908152600260209081526040808320549183905290912054101561037257610000565b80600160a060020a03166108fc60646005546064033402811561000057604051919004801590920291906000818181858888f1935050505015156103b557610000565b600160a060020a03818116600081815260026020908152604080832080548484528285208054919091039055600680548254338916875284872080546064938403909202839004909101905590549154600454909716855282852080549790920204909501909455918152600390915220805460ff191690555b50565b60045433600160a060020a0390811691161461044d57610000565b600582905560068190555b5b5050565b600160a060020a0333166000908152602081905260409020548190101561048357610000565b600160a060020a03821660009081526020819052604090205481810110156104aa57610000565b60008110156104b857610000565b600160a060020a0333811660009081526020819052604080822080548590039055600654928516825290208054606492830384029290920490910190555b5050565b60055481565b60065481565b60045433600160a060020a0390811691161461052157610000565b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600160a060020a0333166000908152600160208181526040808420869055600282528084208590556003909152909120805460ff191690911790555b50505600a165627a7a7230582028fc2f81e8ec588d4af45fb15d09096857bcdb807e5b1b4f3c15e40f56f39bed0029

Swarm Source

bzzr://28fc2f81e8ec588d4af45fb15d09096857bcdb807e5b1b4f3c15e40f56f39bed

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.