implementcollective / 10kclub-utils

A collection of utilities for the 10kclub (4-digit ENS names)
MIT License
0 stars 0 forks source link

uint256 to uint8 #1

Open tunnckoCore opened 2 years ago

tunnckoCore commented 2 years ago

heya there. thanks for this.

But, seems like there is tokenIds for 507 17 digits are failing. How did you converted them?

Check this https://github.com/tunnckoCore/10kclub-holders.

For example the 1312 digit is 4336073780340256694386727931527145546437267311618993763831740267529014114136. The ENS contract errors with this tokenId with ownerOf. In Remix, Solidity ^8, this tokenId is 88 uint8, maybe i'm not testing it right.

For 1695 is 88602554346409675703840292925832492911477255986947670916887777741693177672665 and doesn't fail.

Turns out, after few runs it boils down to just 17.. for which the ENS contract returns error, but they can actually be seen on LooksRare (as unlisted).

{

  // 0xFFcC0bD838220240c8b056A484E1b570Ea51aBef
  "1001": "44075751628062706675479954522231874821678107550657036164932206545166956041440",
  "2002": "85255190203075046486621748769751770002131077384381742447572841673982281015038",
  "1986": "109460723494296672996088088197585058969844470726865368766063344985713145360464",
  "1991": "34655829889402281401425335144549959958417050040256004330634158888490209100258",

  // 0xA08CBbF187bb6fD05b0D02783a789f4BfB794662
  "8868": "65748335661802132497640551722701163727513872269538487843819405603776787713420",

  // 0xB7053E2F9c78EC17dcC2D9BA552b4D5d7C706a94
  "1312": "4336073780340256694386727931527145546437267311618993763831740267529014114136",

  // 0xA55156aE5Fe0528E567223070FB48c0CbF87789c
  "1314": "108215978682187926009017230162674740179066671628256207215813956559520134345185",

  // todo
  "1777": "77595441258870635686885705207503648537772992718713980090576461403662134871600",
  "1911": "112955570645698792494622862378020298121650239473932060561091482437459426381856",
  "2022": "10084244962752428487585937661292453332760171656885963994392680045465085444732",
  "2023": "31365486256280391992739206798760087243129665679461426519671295417092341772826",
  "2048": "104173064984596144019110599891854524216558150656366007346707320327580053557799",
  "2332": "99368824274566995135071121181958964359647371344827956115904412567255726310487",
  "4096": "87793017402259721196284791832445893788045396203015500371362073846981154383778",
  "4516": "23774496448762217594371366975537290104428980778510125409333072345447618152821",
  "5577": "106653882373692164656581143533155901376888944144734134581102327028791654489296",
  "9527": "9069682687961583258679658551547689743885106200321066091577824897086902069953"
}

So.. the question still remains, cuz I'm new to Solidity and hate this thing lol; second, ideas why would the contract such error?

The weird thing is it shows that this account has 1..

image https://looksrare.org/accounts/0xA08CBbF187bb6fD05b0D02783a789f4BfB794662

tunnckoCore commented 2 years ago

turns out there are 17 digits that are hard to get who the owner is. At least not automated.

{
  // 0xFFcC0bD838220240c8b056A484E1b570Ea51aBef
  "1001": "44075751628062706675479954522231874821678107550657036164932206545166956041440",
  "2002": "85255190203075046486621748769751770002131077384381742447572841673982281015038",
  "1986": "109460723494296672996088088197585058969844470726865368766063344985713145360464",
  "1991": "34655829889402281401425335144549959958417050040256004330634158888490209100258",

  // 0xA08CBbF187bb6fD05b0D02783a789f4BfB794662
  "8868": "65748335661802132497640551722701163727513872269538487843819405603776787713420",

  // 0xB7053E2F9c78EC17dcC2D9BA552b4D5d7C706a94
  "1312": "4336073780340256694386727931527145546437267311618993763831740267529014114136",

  // 0xA55156aE5Fe0528E567223070FB48c0CbF87789c
  "1314": "108215978682187926009017230162674740179066671628256207215813956559520134345185",

  // 0x3d6f0e8ac4af919ab7cdae34394daa3e5ad9002b
  "1777": "77595441258870635686885705207503648537772992718713980090576461403662134871600",

  // 0xCA9836ea312FB2Ad353C845Aac7b75809a88fbcb
  "1911": "112955570645698792494622862378020298121650239473932060561091482437459426381856",

  // 0x261f2f416e8895f6c51c7442433934d24073891c
  "2022": "10084244962752428487585937661292453332760171656885963994392680045465085444732",
  "2023": "31365486256280391992739206798760087243129665679461426519671295417092341772826",

  // 0xa4c610b5cffc5bc5f15dfaf138fc6e253a707322 (2048.eth as primary)
  "2048": "104173064984596144019110599891854524216558150656366007346707320327580053557799",

  // 0x2fa7ebda013bfd3641e91a1c8cc06b3a877c5bb5
  "2332": "99368824274566995135071121181958964359647371344827956115904412567255726310487",

  // 0xf2a1b6c1a6d3db1e9ae0049a33800808e7fd1d51 (4096.eth as primary)
  "4096": "87793017402259721196284791832445893788045396203015500371362073846981154383778",

  // 0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85
  "4516": "23774496448762217594371366975537290104428980778510125409333072345447618152821",

  // 0x1e32a859d69dde58d03820f8f138c99b688d132f (straybits.eth, 217 ETH value)
  "5577": "106653882373692164656581143533155901376888944144734134581102327028791654489296",

  // 0x32ff3b80c1be99890789fe91e6b5badaaa878b9e (pangdaxi.eth)
  "9527": "9069682687961583258679658551547689743885106200321066091577824897086902069953"
}

They are quite old and for some reason the ENS contract's ownerOf fails to get the owners.

naron-eth commented 2 years ago

Hey sorry for the late response, only seeing this now. We are working on another tool and I'm sure we will run into this problem as well, I'll let you know if we find anything!