Skip to content

feat: ERC-7858 and some optimize #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open

feat: ERC-7858 and some optimize #61

wants to merge 60 commits into from

Conversation

MASDXI
Copy link
Collaborator

@MASDXI MASDXI commented Jan 12, 2025

focus on NFT and refactor the sorted list to way more efficient

@MASDXI MASDXI self-assigned this Jan 12, 2025
@MASDXI MASDXI changed the title follow: ERC-7858 feat: ERC-7858 and some optimize Jan 13, 2025
@MASDXI
Copy link
Collaborator Author

MASDXI commented Feb 20, 2025

@ADISAKBOONMARK @parametprame check this then i will develop a test for it.

@ADISAKBOONMARK
Copy link
Collaborator

@ADISAKBOONMARK @parametprame check this then i will develop a test for it.

I will check it today.

adding logic to the functio that inheritance form the IERC7858
@MASDXI
Copy link
Collaborator Author

MASDXI commented Mar 3, 2025

almost done

Comment on lines +50 to 53
function insert(List storage self, uint256 index, bool check) internal {
if (check) {
if (!contains(self, index)) return;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be contains(self, index) ?

Comment on lines +51 to +52
if (check) {
if (!contains(self, index)) return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add a check flag into remove() and shrink()?

@MASDXI
Copy link
Collaborator Author

MASDXI commented Mar 5, 2025

I found some bug on ERC-7858Epoch when calling unexpiredBalanceOf and unexpiredBalanceOfAtEpoch scenario to reproduce the token endTime equal to the current pointer (timestamp/blockheight) it runs out of gas

@parametprame @ADISAKBOONMARK

Comment on lines 27 to 29
function insert(uint256 index) public {
list.insert(index, false);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be?

   function insert(uint256 index) public {
        list.insert(index, true);
    }

   function insertLazy(uint256 index) public {
        list.insert(index, false);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants