Open moreal opened 2 years ago
In short idea, it can be easily resolved by receiving URL format (e.g. https://9cscan.com/tx/<TX-ID>
).
It uses Message
interface to render some message to SlackMessage
.
And there are types implemented Message
RefundEvent
: When refund occured while NCG -> WNCG.UnwrappedEvent
: When WNCG -> NCG successUnwrappingFailureEvent
: When WNCG -> NCG failedWrappedEvent
: When NCG -> WNCG successWrappingFailureEvent
: When NCG -> WNCG successWrappingRetryIgnoreEvent
: When ignores a transaction that was already executed.For example, UnwrappedEvent
rendered like the below screenshot:
UnwrappedEvent
's constructor is:
constructor(
explorerUrl: string,
etherscanUrl: string,
sender: Address,
recipient: Address,
amount: string,
nineChroniclesTxId: TxId,
ethereumTransactionHash: string
) {
And the UnwrappedEvent
concats explorerUrl
and nineChroniclesTxId
by calling WrappingEvent.toExplorerUrl
. But the UnwrappingFailureEvent
concats them manually. Yes, it's an issue about abstraction and refactoring 😞
I think it can be solved by applying template(?).
As steps:
EXPLORER_ROOT_URL
to EXPLORER_URL_TEMPLATE
and require format like https://explorer.libplanet.io/9c-internal/transaction/?<id>
. For ETHERSCAN_ROOT_URL
case, it should be like https://ropsten.etherscan.io/tx/<id>
.<id>
string with the txid
instead of calling combineUrl
and toExplorerurl
.yarn test:bridge
and the snapshot testings may fail. Update them with yarn test:bridge -- -u
and commit changes with them.
Currently, it has used
https://explorer.libplanet.io/<NETWORK>/transaction/?<TX-ID>
as 9c tx link. And, since November 11, 2021, the 9cscan has appeared officially. It provides chain data like transactions, blocks with very fast speed and useful features. It seems better to use the 9cscan. But, maybe we are not using it in the internal testing cluster yet. After checking it, it may be replaced easily.