Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
testingToken
Compiler Version
v0.4.9-nightly.2017.1.17+commit.6ecb4aa3
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*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 owner;
function testingToken() {
owner = 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)*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)*100)) throw;
balanceOf[_from] -= tokensOfferedOf[_from];
balanceOf[msg.sender] += tokensOfferedOf[_from];
tradeActive[_from] = false;
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"weiWantedOf","outputs":[{"name":"","type":"uint256"}],"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":"owner","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":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"send","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"}]Contract Creation Code
606060405234610000575b60048054600160a060020a03191633600160a060020a03169081179091556000908152602081905260409020620186a090555b5b6103f18061004d6000396000f300606060405236156100725763ffffffff60e060020a6000350416632e64bcf1811461007757806351dfc14d146100a25780636665e0fd146100cd57806370a08231146100fa5780638da5cb5b14610125578063c2c61d011461014e578063d0679d3414610164578063fbb39f6e14610182575b610000565b3461000057610090600160a060020a0360043516610197565b60408051918252519081900360200190f35b3461000057610090600160a060020a03600435166101a9565b60408051918252519081900360200190f35b34610000576100e6600160a060020a03600435166101bb565b604080519115158252519081900360200190f35b3461000057610090600160a060020a03600435166101d0565b60408051918252519081900360200190f35b34610000576101326101e2565b60408051600160a060020a039092168252519081900360200190f35b610162600160a060020a03600435166101f1565b005b3461000057610162600160a060020a03600435166024356102f3565b005b3461000057610162600435602435610385565b005b60016020526000908152604090205481565b60026020526000908152604090205481565b60036020526000908152604090205460ff1681565b60006020819052908152604090205481565b600454600160a060020a031681565b600160a060020a03811660009081526003602052604090205460ff16151561021857610000565b600160a060020a038116600090815260016020526040902054341461023c57610000565b600160a060020a0381166000908152600260209081526040808320549183905290912054101561026b57610000565b604051600160a060020a038216906064348190040280156108fc02916000818181858888f1935050505015156102a057610000565b600160a060020a03818116600081815260026020908152604080832080548484528285208054919091039055543390951683528083208054909501909455918152600390915220805460ff191690555b50565b600160a060020a0333166000908152602081905260409020548190101561031957610000565b600160a060020a038216600090815260208190526040902054818101101561034057610000565b600081101561034e57610000565b600160a060020a033381166000908152602081905260408082208054859003905591841681522080546064808404020190555b5050565b600160a060020a0333166000908152600160208181526040808420869055600282528084208590556003909152909120805460ff191690911790555b50505600a165627a7a7230582044911e66176b1cbb6a0e1753067f6e02d54dbb2d01abbf4d41628832b2e4e5b30029
Deployed Bytecode
0x606060405236156100725763ffffffff60e060020a6000350416632e64bcf1811461007757806351dfc14d146100a25780636665e0fd146100cd57806370a08231146100fa5780638da5cb5b14610125578063c2c61d011461014e578063d0679d3414610164578063fbb39f6e14610182575b610000565b3461000057610090600160a060020a0360043516610197565b60408051918252519081900360200190f35b3461000057610090600160a060020a03600435166101a9565b60408051918252519081900360200190f35b34610000576100e6600160a060020a03600435166101bb565b604080519115158252519081900360200190f35b3461000057610090600160a060020a03600435166101d0565b60408051918252519081900360200190f35b34610000576101326101e2565b60408051600160a060020a039092168252519081900360200190f35b610162600160a060020a03600435166101f1565b005b3461000057610162600160a060020a03600435166024356102f3565b005b3461000057610162600435602435610385565b005b60016020526000908152604090205481565b60026020526000908152604090205481565b60036020526000908152604090205460ff1681565b60006020819052908152604090205481565b600454600160a060020a031681565b600160a060020a03811660009081526003602052604090205460ff16151561021857610000565b600160a060020a038116600090815260016020526040902054341461023c57610000565b600160a060020a0381166000908152600260209081526040808320549183905290912054101561026b57610000565b604051600160a060020a038216906064348190040280156108fc02916000818181858888f1935050505015156102a057610000565b600160a060020a03818116600081815260026020908152604080832080548484528285208054919091039055543390951683528083208054909501909455918152600390915220805460ff191690555b50565b600160a060020a0333166000908152602081905260409020548190101561031957610000565b600160a060020a038216600090815260208190526040902054818101101561034057610000565b600081101561034e57610000565b600160a060020a033381166000908152602081905260408082208054859003905591841681522080546064808404020190555b5050565b600160a060020a0333166000908152600160208181526040808420869055600282528084208590556003909152909120805460ff191690911790555b50505600a165627a7a7230582044911e66176b1cbb6a0e1753067f6e02d54dbb2d01abbf4d41628832b2e4e5b30029
Swarm Source
bzzr://44911e66176b1cbb6a0e1753067f6e02d54dbb2d01abbf4d41628832b2e4e5b3
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.