Skip to content
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

intents: DelayedEncode type no longer requires data.Func argument #156

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions intents/intent_data_transaction_delayed_abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ func getMethodFromAbi(abi string, method string) (string, []string, error) {
// ie. transferFrom(address,address,uint256)
//

// Handle the case for already encoded method abi
if strings.Contains(abi, "(") && strings.Contains(abi, ")") && strings.HasPrefix(abi, method) {
// Handle the case for already encoded method abi.
// NOTE: we do not need the know the `method` argument here.
abi = strings.TrimSpace(abi)
if len(abi) > 0 && strings.Contains(abi, "(") && abi[len(abi)-1] == ')' {
// NOTE: even though the ethcoder function is `ParseEventDef`, designed for event type parsing
// the abi format for a single function structure is the same, so it works. Perhaps we will rename
// `ParseEventDef` in the future, or just add another method with a different name.
Expand Down
Loading