CMEP is a 2017 ConsenSys MyAdvancedToken-family token. Source reconstructed to 2 bytes shy of exact bytecode match.
Token Information
Key Facts
Description
CMEP (Cloud Mining Ethereum Project) is a 2017 ERC-20-like token deployed on April 7, 2017. Built on the ConsenSys MyAdvancedToken pattern, simplified to omit mintToken. The source was reconstructed against on-chain bytecode and compiles via soljson v0.4.7 to within 2 bytes of exact match. The remaining 2-byte gap is a DUP3+POP pair wrapped around the exit JUMPDEST in approve() that no source-level variation reaches under any solc v0.4.x build.
Source Verified
Cracked +2 byte DUP3+POP approve epilogue: source has address dummy = _spender; in approve() forcing solc to emit phi convergence at exit. Runtime bytecode matches on-chain byte-for-byte excluding swarm metadata hash.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Spurious Dragon Era
Continued DoS protection. State trie clearing.
Bytecode Overview
Verified Source Available
This contract has verified source code.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
_;
}
function transferOwnership(address newOwner) onlyOwner {
owner = newOwner;
}
}
contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData); }
contract token {
string public standard = "Token 0.1";
string public name;
string public symbol;
uint8 public decimals;
uint256 internal _reserved;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
function token(
uint256 initialSupply,
string tokenName,
uint8 decimalUnits,
string tokenSymbol
) {
balanceOf[msg.sender] = initialSupply;
name = tokenName;
symbol = tokenSymbol;
decimals = decimalUnits;
}
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
}
function approve(address _spender, uint256 _value)
returns (bool success) {
address dummy = _spender;
allowance[msg.sender][dummy] = _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 transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (balanceOf[_from] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
if (_value > allowance[_from][msg.sender]) throw;
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
allowance[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
}
function () {
throw;
}
}
contract MyAdvancedToken is owned, token {
uint256 public sellPrice;
uint256 public buyPrice;
uint256 public totalSupply;
mapping (address => bool) public frozenAccount;
event FrozenFunds(address target, bool frozen);
function MyAdvancedToken(
uint256 initialSupply,
string tokenName,
uint8 decimalUnits,
string tokenSymbol,
address centralMinter
) token (initialSupply, tokenName, decimalUnits, tokenSymbol) {
totalSupply = initialSupply;
if(centralMinter != 0 ) owner = centralMinter;
}
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
if (frozenAccount[msg.sender]) throw;
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (frozenAccount[_from]) throw;
if (balanceOf[_from] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
if (_value > allowance[_from][msg.sender]) throw;
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
allowance[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
}
function freezeAccount(address target, bool freeze) onlyOwner {
frozenAccount[target] = freeze;
FrozenFunds(target, freeze);
}
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner {
sellPrice = newSellPrice;
buyPrice = newBuyPrice;
}
function buy() payable {
uint amount = msg.value / buyPrice;
if (balanceOf[this] < amount) throw;
balanceOf[msg.sender] += amount;
balanceOf[this] -= amount;
Transfer(this, msg.sender, amount);
}
function sell(uint256 amount) {
if (balanceOf[msg.sender] < amount ) throw;
balanceOf[this] += amount;
balanceOf[msg.sender] -= amount;
if (!msg.sender.send(amount * sellPrice)) {
throw;
} else {
Transfer(msg.sender, this, amount);
}
}
}External Links
Related contracts
VegasCoin
Same eraA 2017 ConsenSys MyAdvancedToken โ 777,777,777 VEGAS sold via buy() at 1 wei/token, standard "VegasCoin 2.1".
0x616f02...7050b3January 26, 2017EtherDelta
Same eraThe first major decentralized exchange on Ethereum, deployed February 9, 2017. Used off-chain signed orders with on-chain settlement to enable trustless ERC-20
0x8d12a1...cc6819February 10, 2017Constantine Nicholas: Block Difficulty Index
Same eraA 2017 conceptual token by Constantine Nicholas using block.difficulty as the price variable; bricked post-merge by prevrandao.
0xf22414...91c274February 20, 2017Constantine Nicholas: Block Height Index
Same eraA 2017 conceptual token by Constantine Nicholas using block.number as the price variable; non-standard 6-field Transfer event.
0x3b0ffc...aec1aeFebruary 20, 2017Contract 0x0000ae...74d6eb
Same eraERC-20 token sweeper for exchange deposit addresses. Owner-only sweep of any token balance. Compiled with Solidity 0.4.9.
0x0000ae...74d6ebMarch 17, 2017www.minex3d.com shares
Same eraMinex3D is a 2017 ConsenSys MyAdvancedToken-style mining shares token. Source reconstructed to 2 bytes shy of exact.
0x0370dd...568b0aApril 22, 2017