Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x21D5A14e625d767Ce6b7A167491C2d18e0785fDa
Balance 0 ETH
Nonce 1
Code Size 4209 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

4209 bytes
0x60606040526004361061017f5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610184578063095ea7b31461020e57806318160ddd1461024457806321f7ac0d1461026957806323b872dd1461027c57806327e235e3146102a4578063313ce567146102c35780633a3b955b146102d657806354fd4d50146102e35780635c658165146102f6578063661884631461031b578063706a99fb1461033d57806370a082311461035057806373d002241461036f5780637896cd951461037757806379ba50971461038a57806379c650681461039d5780637ff9b596146103bf5780638da5cb5b146103d2578063931742d31461040157806395d89b4114610414578063a9059cbb14610427578063ac133d3b14610449578063c53abe291461045c578063d4ee1d901461046f578063d73dd62314610482578063dd62ed3e146104a4578063e46f9ecf146104c9578063f2fde38b146104d1578063f5343752146104f0575b600080fd5b341561018f57600080fd5b610197610503565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101d35780820151838201526020016101bb565b50505050905090810190601f1680156102005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561021957600080fd5b610230600160a060020a03600435166024356105a1565b604051901515815260200160405180910390f35b341561024f57600080fd5b61025761060d565b60405190815260200160405180910390f35b341561027457600080fd5b610257610613565b341561028757600080fd5b610230600160a060020a0360043581169060243516604435610619565b34156102af57600080fd5b610257600160a060020a036004351661078a565b34156102ce57600080fd5b61025761079c565b6102e16004356107a2565b005b34156102ee57600080fd5b610197610853565b341561030157600080fd5b610257600160a060020a03600435811690602435166108be565b341561032657600080fd5b610230600160a060020a03600435166024356108db565b341561034857600080fd5b6102306109d5565b341561035b57600080fd5b610257600160a060020a03600435166109e3565b6102e16109fe565b341561038257600080fd5b610257610b72565b341561039557600080fd5b6102e1610b78565b34156103a857600080fd5b6102e1600160a060020a0360043516602435610c05565b34156103ca57600080fd5b610257610c6c565b34156103dd57600080fd5b6103e5610c72565b604051600160a060020a03909116815260200160405180910390f35b341561040c57600080fd5b6103e5610c81565b341561041f57600080fd5b610197610c96565b341561043257600080fd5b610230600160a060020a0360043516602435610d01565b341561045457600080fd5b610257610deb565b341561046757600080fd5b610257610df1565b341561047a57600080fd5b6103e5610df7565b341561048d57600080fd5b610230600160a060020a0360043516602435610e06565b34156104af57600080fd5b610257600160a060020a0360043581169060243516610eaa565b6102e1610ed5565b34156104dc57600080fd5b6102e1600160a060020a0360043516610f87565b34156104fb57600080fd5b610230610fe6565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105995780601f1061056e57610100808354040283529160200191610599565b820191906000526020600020905b81548152906001019060200180831161057c57829003601f168201915b505050505081565b600160a060020a033381166000818152600f6020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60075481565b600d5481565b6000600160a060020a038316151561063057600080fd5b600160a060020a0384166000908152600e60205260409020548290101561065657600080fd5b600160a060020a038085166000908152600f60209081526040808320339094168352929052205482111561068957600080fd5b600160a060020a0384166000908152600e60205260409020546106b2908363ffffffff610fef16565b600160a060020a038086166000908152600e602052604080822093909355908516815220546106e7908363ffffffff61100116565b600160a060020a038085166000908152600e60209081526040808320949094558783168252600f815283822033909316825291909152205461072f908363ffffffff610fef16565b600160a060020a038086166000818152600f6020908152604080832033861684529091529081902093909355908516916000805160206110268339815191529085905190815260200160405180910390a35060019392505050565b600e6020526000908152604090205481565b60055481565b60095460ff16156107b257600080fd5b600c5434146107c057600080fd5b6009805460ff1916600117908190556008829055600160a060020a0362010000909104163480156108fc0290604051600060405180830381858888f19350505050151561080c57600080fd5b7ffe85d1266bd916cff27ead28d4f4e799fd4d7e084b10ec0d251bd28415913e9f3382604051600160a060020a03909216825260208201526040908101905180910390a150565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105995780601f1061056e57610100808354040283529160200191610599565b600f60209081526000928352604080842090915290825290205481565b600160a060020a033381166000908152600f602090815260408083209386168352929052908120548083111561093857600160a060020a033381166000908152600f6020908152604080832093881683529290529081205561096f565b610948818463ffffffff610fef16565b600160a060020a033381166000908152600f60209081526040808320938916835292905220555b600160a060020a033381166000818152600f602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600954610100900460ff1681565b600160a060020a03166000908152600e602052604090205490565b60095460009060ff161515610a1257600080fd5b600854600554600a0a3402811515610a2657fe5b600154600160a060020a03166000908152600e6020526040902054919004915081901015610a5357600080fd5b600160a060020a0333166000908152600e6020526040902054610a7c908263ffffffff61100116565b600160a060020a033381166000908152600e60205260408082209390935560015490911681522054610ab4908263ffffffff610fef16565b60018054600160a060020a039081166000908152600e60205260409081902093909355905416903480156108fc029151600060405180830381858888f193505050501515610b0157600080fd5b600154600160a060020a0333811691166000805160206110268339815191528360405190815260200160405180910390a333600160a060020a03167f03bf997b577b4b96a3678d7b0fe7a083c012b9a26ab46058ab959610ac2c398c8260405190815260200160405180910390a250565b600c5481565b60025433600160a060020a03908116911614610b9357600080fd5b600154600160a060020a0333811691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360018054600160a060020a03331673ffffffffffffffffffffffffffffffffffffffff1991821617909155600280549091169055565b60015433600160a060020a03908116911614610c2057600080fd5b600160a060020a0382166000818152600e602052604080822080548501905560078054850190556000805160206110268339815191529084905190815260200160405180910390a35050565b60085481565b600154600160a060020a031681565b600954620100009004600160a060020a031681565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105995780601f1061056e57610100808354040283529160200191610599565b6000600160a060020a0383161515610d1857600080fd5b600160a060020a0333166000908152600e602052604090205482901015610d3e57600080fd5b600160a060020a0333166000908152600e6020526040902054610d67908363ffffffff610fef16565b600160a060020a033381166000908152600e60205260408082209390935590851681522054610d9c908363ffffffff61100116565b600160a060020a038085166000818152600e602052604090819020939093559133909116906000805160206110268339815191529085905190815260200160405180910390a350600192915050565b600a5481565b600b5481565b600254600160a060020a031681565b600160a060020a033381166000908152600f60209081526040808320938616835292905290812054610e3e908363ffffffff61100116565b600160a060020a033381166000818152600f602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a039182166000908152600f6020908152604080832093909416825291909152205490565b600954610100900460ff1615610eea57600080fd5b600d543414610ef857600080fd5b6009805461ff0019166101001790819055600160a060020a0362010000909104163480156108fc0290604051600060405180830381858888f193505050501515610f4157600080fd5b7ff403a5defe31155e78a3f7b6385e6786f07d20d1910bc8b5601b057265d38aef3334604051600160a060020a03909216825260208201526040908101905180910390a1565b60015433600160a060020a03908116911614610fa257600080fd5b600160a060020a0381161515610fb757600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60095460ff1681565b600082821115610ffb57fe5b50900390565b60008282018381108015906110165750828110155b151561101e57fe5b93925050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820d6c5959d0c45d1be8549b4b36282a2e5c915df8f5f72dfcac7079efcba4dc26a0029

Verified Source Code Partial Match

Compiler: v0.4.21+commit.dfe3193c EVM: byzantium Optimization: Yes (200 runs)
MultiToken.sol 292 lines
pragma solidity  0.4.21;


library SafeMath {

    function mul(uint a, uint b) internal pure returns(uint) {
        uint c = a * b;
        assert(a == 0 || c / a == b);
        return c;
    }

    function sub(uint a, uint b) internal pure  returns(uint) {
        assert(b <= a);
        return a - b;
    }

    function add(uint a, uint b) internal  pure returns(uint) {
        uint c = a + b;
        assert(c >= a && c >= b);
        return c;
    }
}


contract ERC20 {
    uint public totalSupply;

    function balanceOf(address who) public view returns(uint);

    function allowance(address owner, address spender) public view returns(uint);

    function transfer(address to, uint value) public returns(bool ok);

    function transferFrom(address from, address to, uint value) public returns(bool ok);

    function approve(address spender, uint value) public returns(bool ok);

    event Transfer(address indexed from, address indexed to, uint value);
    event Approval(address indexed owner, address indexed spender, uint value);
}


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address public owner;
    address public newOwner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
    * @dev The Ownable constructor sets the original `owner` of the contract to the sender
    * account.
    */
    function Ownable() public {
        owner = msg.sender;
        newOwner = address(0);
    }

    /**
    * @dev Throws if called by any account other than the owner.
    */
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    /**
    * @dev Allows the current owner to transfer control of the contract to a newOwner.
    * @param _newOwner The address to transfer ownership to.
    */
    function transferOwnership(address _newOwner) public onlyOwner {
        require(address(0) != _newOwner);
        newOwner = _newOwner;
    }

    function acceptOwnership() public {
        require(msg.sender == newOwner);
        emit OwnershipTransferred(owner, msg.sender);
        owner = msg.sender;
        newOwner = address(0);
    }

}


// The  Exchange token
contract MultiToken is ERC20, Ownable {

    using SafeMath for uint;
    // Public variables of the token
    string public name;
    string public symbol;
    uint public decimals; // How many decimals to show.
    string public version;
    uint public totalSupply;
    uint public tokenPrice;
    bool public exchangeEnabled;
    bool public codeExportEnabled;
    address public commissionAddress;           // address to deposit commissions
    uint public deploymentCost;                 // cost of deployment with exchange feature
    uint public tokenOnlyDeploymentCost;        // cost of deployment with basic ERC20 feature
    uint public exchangeEnableCost;             // cost of upgrading existing ERC20 to exchange feature
    uint public codeExportCost;                 // cost of exporting the code

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

    // The Token constructor
    function MultiToken(
        uint _initialSupply,
        string _tokenName,
        uint _decimalUnits,
        string _tokenSymbol,
        string _version,
        uint _tokenPrice
                        ) public
    {

        totalSupply = _initialSupply * (10**_decimalUnits);
        name = _tokenName;          // Set the name for display purposes
        symbol = _tokenSymbol;      // Set the symbol for display purposes
        decimals = _decimalUnits;   // Amount of decimals for display purposes
        version = _version;         // Version of token
        tokenPrice = _tokenPrice;   // Token price in ETH

        balances[owner] = totalSupply;

        deploymentCost = 25e17;
        tokenOnlyDeploymentCost = 15e17;
        exchangeEnableCost = 15e17;
        codeExportCost = 1e19;

        codeExportEnabled = true;
        exchangeEnabled = true;

        // if (deploymentCost + codeExportCost == msg.value) {
        //     codeExportEnabled = true;
        //     exchangeEnabled = true;
        // }else if (tokenOnlyDeploymentCost + codeExportCost == msg.value)
        //     codeExportEnabled = true;
        // else if (deploymentCost == msg.value)
        //     exchangeEnabled = true;
        // else if (tokenOnlyDeploymentCost == msg.value)
        //     exchangeEnabled = false;
        // else {
        //     revert();  // fail if wrong amount sent.
        // }
        commissionAddress = 0x80eFc17CcDC8fE6A625cc4eD1fdaf71fD81A2C99;
        // commissionAddress.transfer(msg.value);
    }

    event TransferSold(address indexed to, uint value);
    event TokenExchangeEnabled(address caller, uint exchangeCost);
    event TokenExportEnabled(address caller, uint enableCost);

    // @noice To be called by parent contract to enable exchange functionality
    // @param _tokenPrice {uint} costo of token in ETH
    // @return true {bool} if successful
    function enableExchange(uint _tokenPrice) public payable {

        require(!exchangeEnabled);
        require(exchangeEnableCost == msg.value);
        exchangeEnabled = true;
        tokenPrice = _tokenPrice;
        commissionAddress.transfer(msg.value);
        emit TokenExchangeEnabled(msg.sender, _tokenPrice);
    }

        // @notice to enable code export functionality
    function enableCodeExport() public payable {

        require(!codeExportEnabled);
        require(codeExportCost == msg.value);
        codeExportEnabled = true;
        commissionAddress.transfer(msg.value);
        emit TokenExportEnabled(msg.sender, msg.value);
    }

    // @notice It will send tokens to sender based on the token price
    function swapTokens() public payable {

        require(exchangeEnabled);
        uint tokensToSend;
        tokensToSend = (msg.value * (10**decimals)) / tokenPrice;
        require(balances[owner] >= tokensToSend);
        balances[msg.sender] = balances[msg.sender].add(tokensToSend);
        balances[owner] = balances[owner].sub(tokensToSend);
        owner.transfer(msg.value);
        emit Transfer(owner, msg.sender, tokensToSend);
        emit TransferSold(msg.sender, tokensToSend);
    }


    // @notice will be able to mint tokens in the future
    // @param _target {address} address to which new tokens will be assigned
    // @parm _mintedAmount {uint256} amouont of tokens to mint
    function mintToken(address _target, uint256 _mintedAmount) public onlyOwner() {

        balances[_target] += _mintedAmount;
        totalSupply += _mintedAmount;
        emit Transfer(0, _target, _mintedAmount);
    }

    // @notice transfer tokens to given address
    // @param _to {address} address or recipient
    // @param _value {uint} amount to transfer
    // @return  {bool} true if successful
    function transfer(address _to, uint _value) public returns(bool) {

        require(_to != address(0));
        require(balances[msg.sender] >= _value);
        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        emit Transfer(msg.sender, _to, _value);
        return true;
    }

    // @notice transfer tokens from given address to another address
    // @param _from {address} from whom tokens are transferred
    // @param _to {address} to whom tokens are transferred
    // @param _value {uint} amount of tokens to transfer
    // @return  {bool} true if successful
    function transferFrom(address _from, address _to, uint256 _value) public  returns(bool success) {

        require(_to != address(0));
        require(balances[_from] >= _value); // Check if the sender has enough
        require(_value <= allowed[_from][msg.sender]); // Check if allowed is greater or equal
        balances[_from] = balances[_from].sub(_value); // Subtract from the sender
        balances[_to] = balances[_to].add(_value); // Add the same to the recipient
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); // adjust allowed
        emit Transfer(_from, _to, _value);
        return true;
    }

    // @notice to query balance of account
    // @return _owner {address} address of user to query balance
    function balanceOf(address _owner) public view returns(uint balance) {
        return balances[_owner];
    }

    /**
    * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
    *
    * Beware that changing an allowance with this method brings the risk that someone may use both the old
    * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
    * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
    * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    * @param _spender The address which will spend the funds.
    * @param _value The amount of tokens to be spent.
    */
    function approve(address _spender, uint _value) public returns(bool) {
        allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    // @notice to query of allowance of one user to the other
    // @param _owner {address} of the owner of the account
    // @param _spender {address} of the spender of the account
    // @return remaining {uint} amount of remaining allowance
    function allowance(address _owner, address _spender) public view returns(uint remaining) {
        return allowed[_owner][_spender];
    }

    /**
    * approve should be called when allowed[_spender] == 0. To increment
    * allowed value is better to use this function to avoid 2 calls (and wait until
    * the first transaction is mined)
    * From MonolithDAO Token.sol
    */
    function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
        allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
        emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

    function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
        uint oldValue = allowed[msg.sender][_spender];
        if (_subtractedValue > oldValue) {
            allowed[msg.sender][_spender] = 0;
        } else {
            allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
        }
        emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

}

Read Contract

allowance 0xdd62ed3e → uint256
allowed 0x5c658165 → uint256
balanceOf 0x70a08231 → uint256
balances 0x27e235e3 → uint256
codeExportCost 0x21f7ac0d → uint256
codeExportEnabled 0x706a99fb → bool
commissionAddress 0x931742d3 → address
decimals 0x313ce567 → uint256
deploymentCost 0xac133d3b → uint256
exchangeEnableCost 0x7896cd95 → uint256
exchangeEnabled 0xf5343752 → bool
name 0x06fdde03 → string
newOwner 0xd4ee1d90 → address
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
tokenOnlyDeploymentCost 0xc53abe29 → uint256
tokenPrice 0x7ff9b596 → uint256
totalSupply 0x18160ddd → uint256
version 0x54fd4d50 → string

Write Contract 11 functions

These functions modify contract state and require a wallet transaction to execute.

acceptOwnership 0x79ba5097
No parameters
approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
decreaseApproval 0x66188463
address _spender
uint256 _subtractedValue
returns: bool
enableCodeExport 0xe46f9ecf
No parameters
enableExchange 0x3a3b955b
uint256 _tokenPrice
increaseApproval 0xd73dd623
address _spender
uint256 _addedValue
returns: bool
mintToken 0x79c65068
address _target
uint256 _mintedAmount
swapTokens 0x73d00224
No parameters
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferOwnership 0xf2fde38b
address _newOwner

Recent Transactions

No transactions found for this address