Nipol/bean-contracts

O(1)ize ERC721Enumerable.

Opened this issue · 1 comments

Nipol commented

for now, implementation is consumed by O(n) when searching for balanceOf. Fortunately, this function usually runs read-only in the off-chain area.

However, for some contracts, this is often read as on-chain, and copying an stack array to a local memory variable consumes a lot of gas.