Skip to content

Add IndexOf, EndsWith and StartWith#2927

Closed
shargon wants to merge 6 commits intomasterfrom
str-functions
Closed

Add IndexOf, EndsWith and StartWith#2927
shargon wants to merge 6 commits intomasterfrom
str-functions

Conversation

@shargon
Copy link
Member

@shargon shargon commented Oct 3, 2023

Close #2922

@shargon shargon requested a review from Jim8y October 3, 2023 09:08
@shargon
Copy link
Member Author

shargon commented Oct 3, 2023

@superboyiii could you test the gas cost?

@Jim8y
Copy link
Contributor

Jim8y commented Oct 3, 2023

Hey shargon, thank you for opening this pr, solution better than mine

Co-authored-by: Jimmy <jinghui@wayne.edu>
Jim8y
Jim8y previously approved these changes Oct 3, 2023
Jim8y
Jim8y previously approved these changes Oct 3, 2023
@shargon
Copy link
Member Author

shargon commented Oct 3, 2023

As @roman-khimov said:

there is MemorySearch there. SUBSTR opcode is available as well.

Maybe we should remove IndexOf

@Jim8y
Copy link
Contributor

Jim8y commented Oct 3, 2023

name kinda confusing, but you and @roman-khimov are right.

@shargon
Copy link
Member Author

shargon commented Oct 3, 2023

Now I think that everything can be done with MemorySearch, these methods would only be synonyms of MemorySearch

@shargon
Copy link
Member Author

shargon commented Oct 3, 2023

name kinda confusing, but you and @roman-khimov are right.

Yes, a bit confusing.

@Jim8y
Copy link
Contributor

Jim8y commented Oct 3, 2023

Now I think that everything can be done with MemorySearch, these methods would only be synonyms of MemorySearch

I also see that now. @roman-khimov Roman is obviously right.

@shargon
Copy link
Member Author

shargon commented Oct 3, 2023

@Liaojinghui It should be done in neo-devpack-dotnet, using MemorySearch

@Jim8y
Copy link
Contributor

Jim8y commented Oct 3, 2023

@Liaojinghui It should be done in neo-devpack-dotnet, using MemorySearch

Totally agree. And it will be only related to C#.

@vncoelho
Copy link
Member

vncoelho commented Oct 3, 2023

It can be synonyms of MemorySearch, maybe it is better.

How about the possible attacks in case of future resync, what is the idea? Mark all with hard fork?

@Jim8y
Copy link
Contributor

Jim8y commented Oct 3, 2023

@vncoelho This one will be replaced, new implementation will be in the devpack, and no fork will happen

@vncoelho
Copy link
Member

vncoelho commented Oct 3, 2023

Sure, just take care because of the other PR involving kecak

@shargon
Copy link
Member Author

shargon commented Oct 4, 2023

Closed because neo-project/neo-devpack-dotnet#796

@shargon shargon closed this Oct 4, 2023
@shargon shargon deleted the str-functions branch October 4, 2023 07:20
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.

Add Regular Expressions

3 participants