2022-10-05 21:30:14 -05:00

22 lines
959 B
C#

using CSharpFunctionalExtensions;
using NftFaucet.Domain.Models.Abstraction;
using NftFaucet.Domain.Models.Enums;
using NftFaucet.Plugins.Models.Abstraction;
namespace NftFaucet.Plugins.Models;
public abstract class Network : DefaultEntity, INetwork
{
public virtual ulong? ChainId { get; } = null;
public virtual string MainCurrency { get; } = null;
public virtual string SmallestCurrency { get; } = null;
public virtual bool IsTestnet { get; } = true;
public abstract NetworkType Type { get; }
public abstract NetworkSubtype SubType { get; }
public abstract Uri PublicRpcUrl { get; }
public abstract Uri ExplorerUrl { get; }
public virtual IReadOnlyCollection<IContract> DeployedContracts { get; } = new List<IContract>();
public virtual bool SupportsAirdrop { get; } = false;
public virtual Task<Result> Airdrop(string address) => Task.FromResult(Result.Failure("Airdrop is not supported in this network"));
}