Skip to content

Commit 1382e3c

Browse files
feat(Celestia): Add support for Celestia mainnet (#3528)
1 parent 72c67be commit 1382e3c

File tree

2 files changed

+27
-25
lines changed

2 files changed

+27
-25
lines changed

registry.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@
11741174
"symbol": "TIA",
11751175
"decimals": 6,
11761176
"blockchain": "Cosmos",
1177-
"chainId": "mocha-4",
1177+
"chainId": "celestia",
11781178
"derivation": [
11791179
{
11801180
"path": "m/44'/118'/0'/0/0"
@@ -1185,11 +1185,11 @@
11851185
"hrp": "celestia",
11861186
"addressHasher": "sha256ripemd",
11871187
"explorer": {
1188-
"url": "https://www.mintscan.io/tia",
1188+
"url": "https://www.mintscan.io/celestia",
11891189
"txPath": "/txs/",
11901190
"accountPath": "/account/",
1191-
"sampleTx": "943B1A59EB724A1258CF167834A83558DE5A31E8C1E31FCBCBB99404222E5FBF",
1192-
"sampleAccount": "celestia142j9u5eaduzd7faumygud6ruhdwme98qpwmfv7"
1191+
"sampleTx": "FF370C65D8D67B8236F9D3A8D2B1256337C60C1965092CADD1FA970288FCE99B",
1192+
"sampleAccount": "celestia1tt4tv4jrs4twdtzwywxd8u65duxgk8y73wvfu2"
11931193
},
11941194
"info": {
11951195
"url": "https://celestia.org/",

tests/chains/Cosmos/Tia/TWCoinTypeTests.cpp

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,27 @@
1313
#include <gtest/gtest.h>
1414

1515
namespace TW::Cosmos::tests {
16-
TEST(TWTiaCoinType, TWCoinType) {
17-
const auto coin = TWCoinTypeTia;
18-
const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin));
19-
const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin));
20-
const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin));
21-
const auto chainId = WRAPS(TWCoinTypeChainId(coin));
22-
const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("943B1A59EB724A1258CF167834A83558DE5A31E8C1E31FCBCBB99404222E5FBF"));
23-
const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get()));
24-
const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("celestia142j9u5eaduzd7faumygud6ruhdwme98qpwmfv7"));
25-
const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get()));
26-
assertStringsEqual(id, "tia");
27-
assertStringsEqual(name, "Celestia");
28-
assertStringsEqual(symbol, "TIA");
29-
ASSERT_EQ(TWCoinTypeConfigurationGetDecimals(coin), 6);
30-
ASSERT_EQ(TWCoinTypeBlockchain(coin), TWBlockchainCosmos);
31-
ASSERT_EQ(TWCoinTypeP2shPrefix(coin), 0x0);
32-
ASSERT_EQ(TWCoinTypeStaticPrefix(coin), 0x0);
33-
assertStringsEqual(chainId, "mocha-4");
34-
assertStringsEqual(txUrl, "https://www.mintscan.io/tia/txs/943B1A59EB724A1258CF167834A83558DE5A31E8C1E31FCBCBB99404222E5FBF");
35-
assertStringsEqual(accUrl, "https://www.mintscan.io/tia/account/celestia142j9u5eaduzd7faumygud6ruhdwme98qpwmfv7");
36-
}
16+
17+
TEST(TWTiaCoinType, TWCoinType) {
18+
const auto coin = TWCoinTypeTia;
19+
const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin));
20+
const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin));
21+
const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin));
22+
const auto chainId = WRAPS(TWCoinTypeChainId(coin));
23+
const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("FF370C65D8D67B8236F9D3A8D2B1256337C60C1965092CADD1FA970288FCE99B"));
24+
const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get()));
25+
const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("celestia1tt4tv4jrs4twdtzwywxd8u65duxgk8y73wvfu2"));
26+
const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get()));
27+
assertStringsEqual(id, "tia");
28+
assertStringsEqual(name, "Celestia");
29+
assertStringsEqual(symbol, "TIA");
30+
ASSERT_EQ(TWCoinTypeConfigurationGetDecimals(coin), 6);
31+
ASSERT_EQ(TWCoinTypeBlockchain(coin), TWBlockchainCosmos);
32+
ASSERT_EQ(TWCoinTypeP2shPrefix(coin), 0x0);
33+
ASSERT_EQ(TWCoinTypeStaticPrefix(coin), 0x0);
34+
assertStringsEqual(chainId, "celestia");
35+
assertStringsEqual(txUrl, "https://www.mintscan.io/celestia/txs/FF370C65D8D67B8236F9D3A8D2B1256337C60C1965092CADD1FA970288FCE99B");
36+
assertStringsEqual(accUrl, "https://www.mintscan.io/celestia/account/celestia1tt4tv4jrs4twdtzwywxd8u65duxgk8y73wvfu2");
3737
}
38+
39+
} // namespace TW::Cosmos::tests

0 commit comments

Comments
 (0)