2
0
mirror of synced 2025-01-12 09:34:40 +00:00

35 lines
692 B
C#
Raw Normal View History

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
}
[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
}
}