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

dev: update by coderabbit #73

Merged
merged 16 commits into from
Nov 29, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update generate_function_hash script
  • Loading branch information
peaceandwhisky committed Nov 7, 2024
commit 6880902ed638b6f3ebbf9ee12254ba71e914b481
7 changes: 6 additions & 1 deletion scripts/utils/generate_function_hash/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ import (

func main() {
if len(os.Args) < 2 {
fmt.Println("Usage: go run main.go <argument>")
fmt.Fprintln(os.Stderr, "Usage: go run main.go <function_signature>")
fmt.Fprintln(os.Stderr, "Example: go run main.go \"transfer(address,uint256)\"")
os.Exit(1)
}

argument := os.Args[1]
if len(argument) == 0 {
fmt.Fprintln(os.Stderr, "Error: Empty input string")
os.Exit(1)
}

hash := keccak256(argument)
fmt.Printf("0x%s\n", hash)
Expand Down