CryptoBlades / cryptoblades

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use getListingSlice to import all entries from the market on startup

seiyria opened this issue · comments

getListingSlice(IERC721 _tokenAddress, uint256 start, uint256 length)
returns (uint256 returnedCount, uint256[] memory ids, address[] memory sellers, uint256[] memory prices)

this would let us sync with the blockchain on startup, then run clean-sold later to clean that up.

Well.. I should of looked here before finishing working on this. But will still commit and add a pr since it is already done.

Took a bit longer as testing with it last night it was clear it was going to take too long. I added a multicall script and mongodb bulk upserts. Takes less then 15mins on my node and computer now.

you can use @OPPandaDeFi's solutions. it's better, i tested it