Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xd3Fb5cAbd07c85395667f83D20b080642BdE66C7
Balance 0 ETH
Nonce 1
Code Size 2903 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

2903 bytes
0x6060604052600436106100c45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100c9578063095ea7b31461015357806318160ddd146101895780631e89d545146101ae57806323b872dd1461023d578063313ce5671461026557806340c10f191461028e57806370a08231146102b057806395d89b41146102cf5780639d96be58146102e2578063a9059cbb146102f5578063dd62ed3e14610317578063f2fde38b1461033c575b600080fd5b34156100d457600080fd5b6100dc61035d565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610118578082015183820152602001610100565b50505050905090810190601f1680156101455780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015e57600080fd5b610175600160a060020a03600435166024356103fb565b604051901515815260200160405180910390f35b341561019457600080fd5b61019c6104a1565b60405190815260200160405180910390f35b34156101b957600080fd5b6101756004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506104a795505050505050565b341561024857600080fd5b610175600160a060020a03600435811690602435166044356106cd565b341561027057600080fd5b6102786107fe565b60405160ff909116815260200160405180910390f35b341561029957600080fd5b610175600160a060020a0360043516602435610807565b34156102bb57600080fd5b61019c600160a060020a03600435166108fd565b34156102da57600080fd5b6100dc610918565b34156102ed57600080fd5b61019c610983565b341561030057600080fd5b610175600160a060020a0360043516602435610989565b341561032257600080fd5b61019c600160a060020a0360043581169060243516610a5c565b341561034757600080fd5b61035b600160a060020a0360043516610a87565b005b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103f35780601f106103c8576101008083540402835291602001916103f3565b820191906000526020600020905b8154815290600101906020018083116103d657829003601f168201915b505050505081565b600081158061042d5750600160a060020a03338116600090815260016020908152604080832093871683529290522054155b151561043857600080fd5b600160a060020a03338116600081815260016020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b6000806000808551116104b957600080fd5b60808551106104c757600080fd5b83518551146104d557600080fd5b5060009050805b84518260ff161015610543576000848360ff16815181106104f957fe5b906020019060200201511161050d57600080fd5b610536848360ff168151811061051f57fe5b90602001906020020151829063ffffffff610ae316565b60019092019190506104dc565b600160a060020a03331660009081526002602052604090205481901161056857600080fd5b600160a060020a033316600090815260026020526040902054610591908263ffffffff610af916565b600160a060020a03331660009081526002602052604081209190915591505b84518260ff1610156106c25761061b848360ff16815181106105ce57fe5b9060200190602002015160026000888660ff16815181106105eb57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020549063ffffffff610ae316565b60026000878560ff168151811061062e57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020558460ff83168151811061066157fe5b90602001906020020151600160a060020a031633600160a060020a0316600080516020610b0c833981519152868560ff168151811061069c57fe5b9060200190602002015160405190815260200160405180910390a36001909101906105b0565b506001949350505050565b600160a060020a0380841660008181526001602090815260408083203390951683529381528382205492825260029052918220548390101561070e57600080fd5b8281101561071b57600080fd5b600160a060020a038416600090815260026020526040902054610744908463ffffffff610ae316565b600160a060020a038086166000908152600260205260408082209390935590871681522054610779908463ffffffff610af916565b600160a060020a0386166000908152600260205260409020556107a2818463ffffffff610af916565b600160a060020a0380871660008181526001602090815260408083203386168452909152908190209390935590861691600080516020610b0c8339815191529086905190815260200160405180910390a3506001949350505050565b60065460ff1681565b60035460009033600160a060020a0390811691161461082557600080fd5b6007541561083257600080fd5b600054610845908363ffffffff610ae316565b6000908155600160a060020a038416815260026020526040902054610870908363ffffffff610ae316565b600160a060020a0384166000818152600260205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a282600160a060020a03166000600080516020610b0c8339815191528460405190815260200160405180910390a3506001600781905592915050565b600160a060020a031660009081526002602052604090205490565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103f35780601f106103c8576101008083540402835291602001916103f3565b60075481565b600160a060020a033316600090815260026020526040812054829010156109af57600080fd5b600160a060020a0333166000908152600260205260409020546109d8908363ffffffff610af916565b600160a060020a033381166000908152600260205260408082209390935590851681522054610a0d908363ffffffff610ae316565b600160a060020a038085166000818152600260205260409081902093909355913390911690600080516020610b0c8339815191529085905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60035433600160a060020a03908116911614610aa257600080fd5b600160a060020a0381161515610ab457fe5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082820183811015610af257fe5b9392505050565b600082821115610b0557fe5b509003905600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820430cb35b89d307316c75310fbbea003ea9ce2bcc76ad70137db05e318850c7b60029

Verified Source Code Partial Match

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


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

    function div(uint256 a, uint256 b) internal pure returns (uint256){
        assert(b > 0);
        uint256 c = a / b;
        return c;
    }

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

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


contract ERC20 {
    uint256 public totalSupply;
    function balanceOf(address who) view public returns (uint256);
    function transfer(address to, uint256 value) public returns (bool);
    function allowance(address owner, address spender) view public returns (uint256);
    function transferFrom(address from, address to, uint256 value) public returns (bool);
    function approve(address spender, uint256 value) public returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}


contract Ownable {
    address  owner;

    function Ownable() public{
        owner = msg.sender;
    }

    /**
     * @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) onlyOwner public{
        assert(newOwner != address(0));
        owner = newOwner;
    }
}


contract StandardToken is ERC20 {
    using SafeMath for uint256;
    mapping (address => mapping (address => uint256)) allowed;
    mapping(address => uint256) balances;

    /**
     * @dev transfer token for a specified address
     * @param _to The address to transfer to.
     * @param _value The amount to be transferred.
     */
    function transfer(address _to, uint256 _value) public returns (bool){
        // require(0 < _value); -- REMOVED AS REQUESTED BY AUDIT
        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;
    }

    /**
     * @dev Gets the balance of the specified address.
     * @param _owner The address to query the balance of. 
     * @return An uint256 representing the amount owned by the passed address.
     */
    function balanceOf(address _owner) view public returns (uint256 balance){
        return balances[_owner];
    }

    /**
     * @dev Transfer tokens from one address to another
     * @param _from address The address which you want to send tokens from
     * @param _to address The address which you want to transfer to
     * @param _value uint256 the amout of tokens to be transfered
     */
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool){
        uint256 _allowance = allowed[_from][msg.sender];
        require (balances[_from] >= _value);
        require (_allowance >= _value);
        // require (_value > 0); // NOTE: Removed due to audit demand (transfer of 0 should be authorized)
        // require ( balances[_to] + _value > balances[_to]);
        // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
        // require (_value <= _allowance);
        balances[_to] = balances[_to].add(_value);
        balances[_from] = balances[_from].sub(_value);
        allowed[_from][msg.sender] = _allowance.sub(_value);
        emit Transfer(_from, _to, _value);
        return true;
    }

    /**
     * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
     * @param _spender The address which will spend the funds.
     * @param _value The amount of tokens to be spent.
     */
    function approve(address _spender, uint256 _value) public returns (bool){
        // To change the approve amount you first have to reduce the addresses`
        // allowance to zero by calling `approve(_spender, 0)` if it is not
        // already 0 to mitigate the race condition described here:
        // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
        require((_value == 0) || (allowed[msg.sender][_spender] == 0));
        allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    /**
     * @dev Function to check the amount of tokens that an owner allowed to a spender.
     * @param _owner address The address which owns the funds.
     * @param _spender address The address which will spend the funds.
     * @return A uint256 specifing the amount of tokens still available for the spender.
     */
    function allowance(address _owner, address _spender) view public returns (uint256 remaining){
        return allowed[_owner][_spender];
    }
}


contract  Ammbr is StandardToken, Ownable {
    string public name = '';
    string public symbol = '';
    uint8 public  decimals = 0;
    uint256 public maxMintBlock = 0;

    event Mint(address indexed to, uint256 amount);

    /**
     * @dev Function to mint tokens
     * @param _to The address that will recieve the minted tokens.
     * @param _amount The amount of tokens to mint.
     * @return A boolean that indicates if the operation was successful.
     */
    function mint(address _to, uint256 _amount) onlyOwner  public returns (bool){
        require(maxMintBlock == 0);
        totalSupply = totalSupply.add(_amount);
        balances[_to] = balances[_to].add(_amount);
        emit Mint(_to, _amount);
        emit Transfer(0,  _to, _amount); // ADDED AS REQUESTED BY AUDIT
        maxMintBlock = 1;
        return true;
    }

    /**
     * @dev Function is used to perform a multi-transfer operation. This could play a significant role in the Ammbr Mesh Routing protocol.
     *  
     * Mechanics:
     * Sends tokens from Sender to destinations[0..n] the amount tokens[0..n]. Both arrays
     * must have the same size, and must have a greater-than-zero length. Max array size is 127.
     * 
     * IMPORTANT: ANTIPATTERN
     * This function performs a loop over arrays. Unless executed in a controlled environment,
     * it has the potential of failing due to gas running out. This is not dangerous, yet care
     * must be taken to prevent quality being affected.
     * 
     * @param destinations An array of destinations we would be sending tokens to
     * @param tokens An array of tokens, sent to destinations (index is used for destination->token match)
     */
    function multiTransfer(address[] destinations, uint256[] tokens) public returns (bool success){
        // Two variables must match in length, and must contain elements
        // Plus, a maximum of 127 transfers are supported
        require(destinations.length > 0);
        require(destinations.length < 128);
        require(destinations.length == tokens.length);
        // Check total requested balance
        uint8 i = 0;
        uint256 totalTokensToTransfer = 0;
        for (i = 0; i < destinations.length; i++){
            require(tokens[i] > 0);            
            // Prevent Integer-Overflow by using Safe-Math
            totalTokensToTransfer = totalTokensToTransfer.add(tokens[i]);
        }
        // Do we have enough tokens in hand?
        // Note: Although we are testing this here, the .sub() function of 
        //       SafeMath would fail if the operation produces a negative result
        require (balances[msg.sender] > totalTokensToTransfer);        
        // We have enough tokens, execute the transfer
        balances[msg.sender] = balances[msg.sender].sub(totalTokensToTransfer);
        for (i = 0; i < destinations.length; i++){
            // Add the token to the intended destination
            balances[destinations[i]] = balances[destinations[i]].add(tokens[i]);
            // Call the event...
            emit Transfer(msg.sender, destinations[i], tokens[i]);
        }
        return true;
    }

    function Ammbr(string _name , string _symbol , uint8 _decimals) public{
        name = _name;
        symbol = _symbol;
        decimals = _decimals;
    }
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
maxMintBlock 0x9d96be58 → uint256
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 6 functions

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

approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
mint 0x40c10f19
address _to
uint256 _amount
returns: bool
multiTransfer 0x1e89d545
address[] destinations
uint256[] tokens
returns: bool
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