2023-09-19 11:51:59 +02:00
|
|
|
|
namespace GethPlugin
|
|
|
|
|
{
|
|
|
|
|
public interface IHasEthAddress
|
|
|
|
|
{
|
2023-09-20 10:13:29 +02:00
|
|
|
|
EthAddress EthAddress { get; }
|
2023-09-19 11:51:59 +02:00
|
|
|
|
}
|
|
|
|
|
|
2024-03-26 15:35:26 +01:00
|
|
|
|
[Serializable]
|
2023-09-20 10:13:29 +02:00
|
|
|
|
public class EthAddress
|
2023-09-19 11:51:59 +02:00
|
|
|
|
{
|
|
|
|
|
public EthAddress(string address)
|
|
|
|
|
{
|
2023-12-20 15:56:03 +01:00
|
|
|
|
Address = address.ToLowerInvariant();
|
2023-09-19 11:51:59 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Address { get; }
|
2023-10-22 10:10:52 +02:00
|
|
|
|
|
2023-12-20 11:34:23 +01:00
|
|
|
|
public override bool Equals(object? obj)
|
|
|
|
|
{
|
|
|
|
|
return obj is EthAddress address &&
|
|
|
|
|
Address == address.Address;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
{
|
|
|
|
|
return HashCode.Combine(Address);
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-22 10:10:52 +02:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return Address;
|
|
|
|
|
}
|
2023-09-19 11:51:59 +02:00
|
|
|
|
}
|
|
|
|
|
}
|