/// <summary> /// Asserts <paramref name="instance"/> was successful. /// </summary> /// <param name="instance">The <see cref="EtherscanResponseMessage"/> to assert.</param> /// <exception cref="EtherscanApiException">Thrown if <paramref name="instance"/> failed.</exception> public static void AssertCallSuccess(this EtherscanResponseMessage instance) { Guard.NotNull(instance, nameof(instance)); if (instance.Status != 0) { throw new EtherscanApiException(instance); } }
public EtherscanApiException(EtherscanResponseMessage message) : base(message.Message) { }