Skip to content

Instantly share code, notes, and snippets.

@bogdan
Created March 16, 2022 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan/9d7c8ef2aa8b819cd11ba2d8e761617f to your computer and use it in GitHub Desktop.
Save bogdan/9d7c8ef2aa8b819cd11ba2d8e761617f to your computer and use it in GitHub Desktop.
type DomainName = string;
type TokenId = string;
type Options = {
// TODO find a better name
location?: string
}
interface Resolution {
reverseTokenId(address: string, options?: Options): TokenId
reverse(address: string, options?: Options): DomainName
}
// /reverse/:address
//
// { domain: {name, tokenId, location} }
type D = {
name: string,
tokenId: string,
records: Record<string, string>
reverse: boolean,
location 'L1' | 'L2',
}
// L1: a1 => d1
// L2: a1 => d2
// Deposit to L2 Via Transfer
// a1 => 0x28828 (MintableERC721Predicate or Predicate)
// Withdrawl to L1 Via Burn
// a1 => 0x0000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment