-
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(Manta): Add support for Manta Pacific Mainnet (#3617)
* feat(manta): Add support for Manta Pacific Mainnet * feat(manta): Fix iOS, Android, Kotlin tests * feat(manta): Fix some tests, codegen-v2
- Loading branch information
1 parent
374da80
commit 949b0c3
Showing
11 changed files
with
74 additions
and
4 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
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,31 @@ | ||
// 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. | ||
|
||
#include "TestUtilities.h" | ||
#include <TrustWalletCore/TWCoinTypeConfiguration.h> | ||
#include <gtest/gtest.h> | ||
|
||
TEST(TWMantaPacificCoinType, TWCoinType) { | ||
const auto coin = TWCoinTypeMantaPacific; | ||
const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin)); | ||
const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin)); | ||
const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin)); | ||
const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0x2bbd5d85b0ed05d1416e30ce1197a6f0c27d10ce02593a2719e2baf486d2e8c2")); | ||
const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get())); | ||
const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0xF122a1aC569a36a5Cf6d0F828A22254c8A9afF84")); | ||
const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get())); | ||
|
||
assertStringsEqual(id, "manta"); | ||
assertStringsEqual(name, "Manta Pacific"); | ||
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://pacific-explorer.manta.network/tx/0x2bbd5d85b0ed05d1416e30ce1197a6f0c27d10ce02593a2719e2baf486d2e8c2"); | ||
assertStringsEqual(accUrl, "https://pacific-explorer.manta.network/address/0xF122a1aC569a36a5Cf6d0F828A22254c8A9afF84"); | ||
} |
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