Skip to content

Commit 52f6941

Browse files
committed
Makes testnet block explorer link format configurable in discordbot
1 parent 7456f5c commit 52f6941

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Tools/BiblioTech/Commands/MintCommand.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ private bool ShouldSendEth(IGethNode gethNode, EthAddress addr)
9898

9999
private string FormatTransactionLink(string transaction)
100100
{
101-
TODO! this needs to be configurable when we switch to devnet.
102-
103-
var url = $"https://explorer.testnet.codex.storage/tx/{transaction}";
101+
var url = Program.Config.TransactionLinkFormat.Replace("<ID>", transaction);
104102
return $"- [View on block explorer](<{url}>){Environment.NewLine}Transaction ID - `{transaction}`";
105103
}
106104
}

Tools/BiblioTech/Configuration.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ public class Configuration
4444
[Uniform("codex-endpoint-auth", "cea", "CODEXENDPOINTAUTH", false, "Codex endpoint basic auth. Colon separated username and password. (default: empty, no auth used.)")]
4545
public string CodexEndpointAuth { get; set; } = "";
4646

47+
[Uniform("transaction-link-format", "tlf", "TRANSACTIONLINKFORMAT", false, "Format of links to transactions on the blockchain. Use '<ID>' to inject the transaction ID into this string. (default 'https://explorer.testnet.codex.storage/tx/<ID>')")]
48+
public string TransactionLinkFormat { get; set; } = "https://explorer.testnet.codex.storage/tx/<ID>";
49+
4750
#region Role Rewards
4851

4952
/// <summary>

0 commit comments

Comments
 (0)