Skip to content
Verified contractExactMIT

SieveToken

Address0x0137ccbc7e699d011fe3c01502ddb4b39bcc780e
Balance

0 ETH

 

Transactions

5

 

Compiler

solc 0.8.28

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.28+commit.7893614a
Language
solidity
Optimization
Yes, 200 runs
EVM version
cancun
Via IR
yes
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,322,802
Creation transaction
0x6780e2b9eb…b18c7dd841

SieveToken.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;

// Links: https://sievequantum.xyz | https://x.com/sieve_quantum
//
// CERTIFICATE OF CALIBRATION  No. SV-01
// SIEVE ($SIEVE), the unit of account of the SIEVE pool
//
// Instrument
//   A plain ERC-20: name "SIEVE", symbol "SIEVE", 18 decimals. The constructor mints the whole fixed
//   supply to HOOK and nothing ever mints or burns again. No owner, no tax, no blacklist, no pause,
//   no permit. An allowance of type(uint256).max is never decreased.
//
// Reference standard
//   EIP-20. totalSupply = 1,000,000,000 x 10^18 = 1e27 token wei, all held by HOOK at deployment.
//   HOOK is the SieveHook (No. SV-02); its open() requires HOOK() == itself and a balance of 1e27.
//
// Measured value (hardhat 2.29.1 mainnet fork, prague, sim_sieve.js, 2026-11-01)
//   totalSupply and balanceOf(HOOK) read 1e27 after deployment; HOOK() reads the hook. Every balance
//   move emits one Transfer: open() logs Transfer(hook, PoolManager, 1e27 - 2,073), a router buy, a
//   sell, transfer() and transferFrom() one each. Runtime 1,124 bytes.
//
// Uncertainty
//   None in the arithmetic: balances move by exact integers. Transfers to address(0) revert.
//   Tokens sent to this contract's own address are lost; nothing recovers them.
//
// Traceability
//   SIEVE_SPEC.md section 10 (name, supply); CONTRACTS.md SV-01. Deployed after the hook.

contract SieveToken {
    string public constant name = "SIEVE";
    string public constant symbol = "SIEVE";
    uint8 public constant decimals = 18;
    uint256 public constant totalSupply = 1_000_000_000e18;

    address public immutable HOOK;

    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;

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

    error ZeroAddress();
    error InsufficientBalance();
    error InsufficientAllowance();

    constructor(address hook) {
        if (hook == address(0)) revert ZeroAddress();
        HOOK = hook;
        balanceOf[hook] = totalSupply;
        emit Transfer(address(0), hook, totalSupply);
    }

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

    function transfer(address to, uint256 value) external returns (bool) {
        _move(msg.sender, to, value);
        return true;
    }

    function transferFrom(address from, address to, uint256 value) external returns (bool) {
        uint256 a = allowance[from][msg.sender];
        if (a != type(uint256).max) {
            if (a < value) revert InsufficientAllowance();
            unchecked {
                allowance[from][msg.sender] = a - value;
            }
        }
        _move(from, to, value);
        return true;
    }

    function _move(address from, address to, uint256 value) private {
        if (to == address(0)) revert ZeroAddress();
        uint256 b = balanceOf[from];
        if (b < value) revert InsufficientBalance();
        unchecked {
            balanceOf[from] = b - value;
            balanceOf[to] += value;
        }
        emit Transfer(from, to, value);
    }
}
Compiler settingsShow
{
  "viaIR": true,
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "cancun",
  "remappings": [
    "@uniswap/v4-core/=v4/v4-core/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.