-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mantle]: Add Mantle EVM-compatible chain (#3417)
- Loading branch information
1 parent
573696f
commit defedb6
Showing
8 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright © 2017-2023 Trust Wallet. | ||
// | ||
// This file is part of Trust. The full Trust copyright notice, including | ||
// terms governing use, modification, and redistribution, is contained in the | ||
// file LICENSE at the root of the source code distribution tree. | ||
// | ||
// This is a GENERATED FILE, changes made here MAY BE LOST. | ||
// Generated one-time (codegen/bin/cointests) | ||
// | ||
|
||
#include "TestUtilities.h" | ||
#include <TrustWalletCore/TWCoinTypeConfiguration.h> | ||
#include <gtest/gtest.h> | ||
|
||
|
||
TEST(TWMantleCoinType, TWCoinType) { | ||
const auto coin = TWCoinTypeMantle; | ||
const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin)); | ||
const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin)); | ||
const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin)); | ||
const auto chainId = WRAPS(TWCoinTypeChainId(coin)); | ||
const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0xfae996ea23f1ff9909ac04d26ae6e52ab600a84163fab9e0e893483c685629dd")); | ||
const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get())); | ||
const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0xA295EEFd401C8BE1457F266d3e73cdD015e5CFbb")); | ||
const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get())); | ||
|
||
assertStringsEqual(id, "mantle"); | ||
assertStringsEqual(name, "Mantle"); | ||
assertStringsEqual(symbol, "MNT"); | ||
ASSERT_EQ(TWCoinTypeConfigurationGetDecimals(coin), 18); | ||
ASSERT_EQ(TWCoinTypeBlockchain(coin), TWBlockchainEthereum); | ||
ASSERT_EQ(TWCoinTypeP2shPrefix(coin), 0x0); | ||
ASSERT_EQ(TWCoinTypeStaticPrefix(coin), 0x0); | ||
assertStringsEqual(chainId, "5000"); | ||
assertStringsEqual(txUrl, "https://explorer.mantle.xyz/tx/0xfae996ea23f1ff9909ac04d26ae6e52ab600a84163fab9e0e893483c685629dd"); | ||
assertStringsEqual(accUrl, "https://explorer.mantle.xyz/address/0xA295EEFd401C8BE1457F266d3e73cdD015e5CFbb"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters