This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package domain | |
type Name struct { | |
value string | |
} | |
func NewName(name string) (Name, error) { | |
if len(name) < 3 || len(name) > 100 { | |
return Name{}, fmt.Errorf("%w: name length must be less than 3 and gather than 100", ErrInvalidNameLength) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package utils | |
import ( | |
"bytes" | |
"context" | |
"crypto/ecdsa" | |
"github.com/ethereum/go-ethereum/accounts/abi" | |
"github.com/ethereum/go-ethereum/common/hexutil" | |
"github.com/ethereum/go-ethereum/rpc" | |
"math/big" |