|
| 1 | +// Copyright © 2017-2023 Trust Wallet. |
| 2 | +// |
| 3 | +// This file is part of Trust. The full Trust copyright notice, including |
| 4 | +// terms governing use, modification, and redistribution, is contained in the |
| 5 | +// file LICENSE at the root of the source code distribution tree. |
| 6 | +// |
| 7 | +// This is a GENERATED FILE, changes made here MAY BE LOST. |
| 8 | +// Generated one-time (codegen/bin/cointests) |
| 9 | +// |
| 10 | + |
| 11 | +#include "TestUtilities.h" |
| 12 | +#include <TrustWalletCore/TWCoinTypeConfiguration.h> |
| 13 | +#include <gtest/gtest.h> |
| 14 | + |
| 15 | + |
| 16 | +TEST(TWMantleCoinType, TWCoinType) { |
| 17 | + const auto coin = TWCoinTypeMantle; |
| 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("0xfae996ea23f1ff9909ac04d26ae6e52ab600a84163fab9e0e893483c685629dd")); |
| 23 | + const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get())); |
| 24 | + const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0xA295EEFd401C8BE1457F266d3e73cdD015e5CFbb")); |
| 25 | + const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get())); |
| 26 | + |
| 27 | + assertStringsEqual(id, "mantle"); |
| 28 | + assertStringsEqual(name, "Mantle"); |
| 29 | + assertStringsEqual(symbol, "MNT"); |
| 30 | + ASSERT_EQ(TWCoinTypeConfigurationGetDecimals(coin), 18); |
| 31 | + ASSERT_EQ(TWCoinTypeBlockchain(coin), TWBlockchainEthereum); |
| 32 | + ASSERT_EQ(TWCoinTypeP2shPrefix(coin), 0x0); |
| 33 | + ASSERT_EQ(TWCoinTypeStaticPrefix(coin), 0x0); |
| 34 | + assertStringsEqual(chainId, "5000"); |
| 35 | + assertStringsEqual(txUrl, "https://explorer.mantle.xyz/tx/0xfae996ea23f1ff9909ac04d26ae6e52ab600a84163fab9e0e893483c685629dd"); |
| 36 | + assertStringsEqual(accUrl, "https://explorer.mantle.xyz/address/0xA295EEFd401C8BE1457F266d3e73cdD015e5CFbb"); |
| 37 | +} |
0 commit comments