ENS Normalization Research


Compress 3406 emoji sequences (11K codepoints, 40KB raw) into 359 storage slots (11KB payload) state machine to enable the following API:

function read(uint24[] memory cps, uint256 pos) view returns (uint256 len) {
	// returns number of codepoints necessary 
	// to consume a valid emoji codepoint
	// according to ENS normalization rules
  1. Acquire ens-normalize-hr.json from @adraffy/ens-normalize.js
  2. Run compress.js to build rules
  3. Run check.js to validate rules
  4. Run payload.js to create compressed payload
  5. Deploy EmojiParser.sol
  6. Call upload() with data in payload-chunks.json


Compress modified IDNA 2003 table (150K codepoints) with combining marks and composed characters disallowed.


View Github