packagecontractsimport("fmt""github.com/ethereum/go-ethereum/common""github.com/urfave/cli/v2")// parseAddress will parse a [common.Address] from a [cli.Context] and return// an error if the configured address is not correct.funcparseAddress(ctx*cli.Context,namestring)(common.Address,error){value:=ctx.String(name)ifvalue==""{returncommon.Address{},nil}if!common.IsHexAddress(value){returncommon.Address{},fmt.Errorf("invalid address: %s",value)}returncommon.HexToAddress(value),nil}