using System.Text.RegularExpressions; namespace MoralisUnity.Sdk.Utilities { /// /// Provides runtime validators /// public static class Validators { /// /// Imperfect check to validate a Web3Address format /// From https://www.oodlestechnologies.com/blogs/validating-ethereum-address/ /// /// /// public static bool IsValidWeb3AddressFormat(string address) { Regex regex = new Regex("^0x[0-9a-f]{40}$"); return regex.Match(address).Success; } } }