-
Notifications
You must be signed in to change notification settings - Fork 139
/
CurrencyPermissionException.cs
47 lines (44 loc) · 1.82 KB
/
CurrencyPermissionException.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using Libplanet.Assets;
namespace Libplanet.Action
{
/// <summary>
/// The exception that is thrown when a <see cref="TransactionSigner"/> has no rights
/// to mint a <see cref="Currency"/> or burn assets of a <see cref="Currency"/>.
/// </summary>
/// <seealso cref="IAccountStateDelta.MintAsset"/>
/// <seealso cref="IAccountStateDelta.BurnAsset"/>
[Serializable]
public sealed class CurrencyPermissionException : Exception
{
/// <summary>
/// Creates a new <see cref="CurrencyPermissionException"/> object.
/// </summary>
/// <param name="message">Specifies a <see cref="Exception.Message"/>.</param>
/// <param name="transactionSigner"> The address of the account who tried to mint or burn
/// assets of a <paramref name="currency"/>. Corresponds to
/// the <see cref="TransactionSigner"/> property.</param>
/// <param name="currency"> The <see cref="Assets.Currency"/> to be tried to be minted
/// or burned by the <paramref name="transactionSigner"/>. Corresponds to
/// the <see cref="Currency"/> property.</param>
public CurrencyPermissionException(
string? message,
Address transactionSigner,
Currency currency
)
: base(message)
{
TransactionSigner = transactionSigner;
Currency = currency;
}
/// <summary>
/// The address of the account who tried to mint or burn assets of a <see cref="Currency"/>.
/// </summary>
public Address TransactionSigner { get; }
/// <summary>
/// The <see cref="Assets.Currency"/> to be tried to be minted or burned by
/// the <see cref="TransactionSigner"/>.
/// </summary>
public Currency Currency { get; }
}
}