-
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.
feat(merlin): Add support for Merlin EVM chain (#3752)
- Loading branch information
1 parent
c4ffde3
commit adb20c0
Showing
9 changed files
with
67 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
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,29 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// Copyright © 2017 Trust Wallet. | ||
|
||
#include "TestUtilities.h" | ||
#include <TrustWalletCore/TWCoinTypeConfiguration.h> | ||
#include <gtest/gtest.h> | ||
|
||
TEST(TWMerlinCoinType, TWCoinType) { | ||
const auto coin = TWCoinTypeMerlin; | ||
const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin)); | ||
const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin)); | ||
const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin)); | ||
const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0xca6f2891959b669237738dd0bc2c1051d966778c9de90b94165032ce58364212")); | ||
const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get())); | ||
const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0xf7e017b3f61bD3410A3b03D7DAD7699FD6780584")); | ||
const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get())); | ||
|
||
assertStringsEqual(id, "merlin"); | ||
assertStringsEqual(name, "Merlin"); | ||
assertStringsEqual(symbol, "ETH"); | ||
ASSERT_EQ(TWCoinTypeConfigurationGetDecimals(coin), 18); | ||
ASSERT_EQ(TWCoinTypeBlockchain(coin), TWBlockchainEthereum); | ||
ASSERT_EQ(TWCoinTypeP2pkhPrefix(coin), 0); | ||
ASSERT_EQ(TWCoinTypeP2shPrefix(coin), 0); | ||
ASSERT_EQ(TWCoinTypeStaticPrefix(coin), 0); | ||
assertStringsEqual(txUrl, "https://scan.merlinchain.io/tx/0xca6f2891959b669237738dd0bc2c1051d966778c9de90b94165032ce58364212"); | ||
assertStringsEqual(accUrl, "https://scan.merlinchain.io/address/0xf7e017b3f61bD3410A3b03D7DAD7699FD6780584"); | ||
} |
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