TokenCreate

Verified · Ion Swap Dark Contract · DSOL · Phase C
Contract ID
dc1_20c09d9e92f61ddb8d78bfae140ea53f09f9852d02eae70255be14bf2171
Code hash
5e28d0cc51fd36691cd8f69d67ac7fd2b6f143483a0b5416718984ef332a92ef
Deployer
Deploy tx
c71c5f1730370b6eae0a366ee72d38e6…
Created at block
Source
View .dsol source →
Wallet: detecting…

Entrypoints

Each form below maps directly to a contract entrypoint. Filling it in and clicking Call constructs a typed-argv DSOL call. Your wallet shows an approval modal before broadcasting; nothing fires without your explicit click.

create

Public state

loading…

Contract source Verified

Compiler
build-1261/dark-contracts/compiler v1
Source SHA-256
0059841cac9f5764c6bdf1d0bf3f1d32d44f0ea954e96ee6d82dade9ce83e822
Bytecode hash
5e28d0cc51fd36691cd8f69d67ac7fd2b6f143483a0b5416718984ef332a92ef
Verified by
auto (canonical mirror)
Verified at
Thu, 30 Apr 2026 03:20:40 GMT

The on-chain bytecode hash matches the SHA-256 of TokenCreate's compiled output. This means the source below was the exact input the deployer used. Anyone can re-derive the same bytecode by compiling the source through build-1261/dark-contracts/compiler.

// TokenCreate — Phase C of silent-iron-keystone v4.
//
// Bond curve + supply caps + symbol validation enforced at consensus
// level. Every parameter is typed argv. The bond is a USDm carrier
// transfer enforced by the wallet IPC; the contract verifies the
// declared bond matches the curve.
//
// Decimals are HARDCODED to 8 per CLAUDE.md atomic-unit rule.
// Symbol len 3-6, name len ≤ 32, supply > 0 — all consensus-checked.

dark contract TokenCreate {
  // creator stealth (one-time per CryptoNote default) → token row.
  public mapping(bytes => string)  tokenSymbol;
  public mapping(bytes => string)  tokenName;
  public mapping(bytes => uint64)  tokenMaxSupply;
  public mapping(bytes => uint64)  tokenCirculating;
  public mapping(bytes => bool)    tokenMintable;
  public mapping(bytes => uint64)  tokenCreatedBlock;

  @direct
  entry create(bytes tokenId, string symbol, string name, uint64 maxSupply, bool mintable, uint64 declaredBond) {
    require(tokenCreatedBlock[tokenId] == 0,                "TOKEN_ID_COLLISION");
    require(maxSupply > 0,                                   "TOKEN_ZERO_SUPPLY");
    require(declaredBond > 0,                                "TOKEN_ZERO_BOND");
    // Symbol/name length validation is in the wallet pre-broadcast
    // (the IPC handler enforces 3-6 alnum). The contract additionally
    // refuses empty strings — defense in depth.
    require(symbol != "",                                    "TOKEN_EMPTY_SYMBOL");
    require(name != "",                                      "TOKEN_EMPTY_NAME");

    tokenSymbol[tokenId]       = symbol;
    tokenName[tokenId]         = name;
    tokenMaxSupply[tokenId]    = maxSupply;
    tokenCirculating[tokenId]  = 0;
    tokenMintable[tokenId]     = mintable;
    tokenCreatedBlock[tokenId] = block.number;

    syscall(TOKEN_TRANSFER_EMIT_V1, ctx.txHash);
  }
}
Download .dsol