Skip to content

catalyst-network/catalyst-identity-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Catalyst identity contracts (EVM)

Standalone, deployable EVM contract suite that provides NEAR-style human-readable identities and Catalyst pubkey (32-byte) association, designed for Catalyst wallets/nodes that can only read raw EVM storage:

  • catalyst_getCode(address20)
  • catalyst_getStorageAt(address20, slot32)
  • catalyst_sendRawTransaction(CTX2 protocol tx)

No eth_call, no log/indexer requirements.

Contracts

  • CatalystNameService (CNS): hierarchical names → on-chain “record” (owner + target pubkey32 + expiry + metadata).
  • CatalystAttestations (optional): simple vouch/weight signals for a CNS nodehash.
  • CatalystKeyRegistry (optional): multiple Catalyst pubkeys per CNS nodehash (roles + optional expiry).

Core design constraints

  • Catalyst identity key: 32-byte pubkey in text form (0x + 64 hex chars).
  • Catalyst EVM msg.sender: derived as the last 20 bytes of the Catalyst pubkey32:
    • evm_addr = pubkey32[12..32]
  • Write auth model: every mutating function takes caller_pk32 and enforces:
    • address(uint160(uint256(caller_pk32))) == msg.sender
    • and (where relevant) caller_pk32 == owner_pk32[node]

Foundry

Install Foundry (on your machine):

curl -L https://foundry.paradigm.xyz | bash
foundryup

Run tests:

forge test -vvv

Deploy (Foundry script)

The deployment script writes deployments/<chainId>.json containing deployed addresses and mapping slot numbers.

Example:

export PRIVATE_KEY=...
export CNS_FEE_RECIPIENT=0x0000000000000000000000000000000000000FEE
export CNS_ROOT_ANNUAL_FEE_WEI=1000000000000000000
export CNS_SUB_ANNUAL_FEE_WEI=500000000000000000

forge script script/Deploy.s.sol:Deploy --rpc-url $RPC_URL --broadcast -vvv

Docs

  • docs/namehash.md
  • docs/storage-layout.md
  • docs/wallet-integration.md

About

On-chain identity system to simplify working with accounts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors