github.com/lmittmann/w3@v0.20.0/docs/pages/helper-utils.mdx (about) 1 # Utils 2 3 Static addresses, hashes, bytes or integers can be parsed from (hex-)strings with the following utility functions that panic if the string is not valid. 4 5 ```go 6 addr := w3.A("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045") 7 hash := w3.H("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3") 8 bytes := w3.B("0x27c5342c") 9 amount := w3.I("12.34 ether") 10 ``` 11 12 Use [go-ethereum/common](https://pkg.go.dev/github.com/ethereum/go-ethereum/common) to parse strings that may not be valid instead.