ERC-3643 Permissioned Token Suite (T-REX)

Asset Tokenization

A working ERC-3643 suite built on the official T-REX contracts, deployed through TREXFactory with ONCHAINID identities and signed KYC claims, plus a custom holding-period compliance module. Runs on a local network with 25 passing tests; not audited and not deployed to a public network.

Technology Stack

Solidity 0.8.17HardhatT-REX v4.1.6ONCHAINIDethers v6

Key Features

Architecture

┌─────────────────────────────────────────────┐
│     ERC-3643 Suite (official T-REX v4)      │
├─────────────────────────────────────────────┤
│                                             │
│  ┌──────────────┐    ┌───────────────────┐  │
│  │  Investor    │───▶│  ONCHAINID        │  │
│  │  Wallet      │    │  + signed claim   │  │
│  └──────────────┘    └─────────┬─────────┘  │
│                                │            │
│  ┌──────────────┐    ┌─────────▼─────────┐  │
│  │  Trusted     │───▶│  Identity         │  │
│  │  Issuers     │    │  Registry         │  │
│  └──────────────┘    └─────────┬─────────┘  │
│                                │            │
│  ┌──────────────┐    ┌─────────▼─────────┐  │
│  │  Modular     │◀──▶│  Token            │  │
│  │  Compliance  │    │  (ERC-3643)       │  │
│  └──────────────┘    └───────────────────┘  │
│   Country · Max balance · Holding period    │
└─────────────────────────────────────────────┘

Code Sample

HoldingPeriodModule.sol

/// Custom T-REX compliance module (Blocknetics):
/// no transfers until the holding period has passed.
function moduleCheck(
    address _from,
    address,
    uint256,
    address _compliance
) external view override returns (bool) {
    // Mints run through canTransfer with _from == 0
    if (_from == address(0)) return true;

    uint256 period = _holdingPeriod[_compliance];
    if (period == 0) return true;

    return block.timestamp >=
        _lastReceived[_compliance][_from] + period;
}

Project Metrics

T-REX 4.1.6

Official Contracts

25

Passing Tests

GPL-3.0

Open Source

Related Products

Blocknetics builds automated tools alongside our consulting practice:

Work With Us

This project represents the kind of production-grade blockchain engineering Blocknetics delivers. Whether you need a similar solution or want to extend an existing one, our team is ready.

Discuss Your Project → ← All Projects