-
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(zkLink): Add zkLink Nova Mainnet EVM chain (#3881)
- Loading branch information
1 parent
55ca3e5
commit a85c7d4
Showing
9 changed files
with
68 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(TWZkLinkNovaCoinType, TWCoinType) { | ||
const auto coin = TWCoinTypeZkLinkNova; | ||
const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin)); | ||
const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin)); | ||
const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin)); | ||
const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0xeb5eb8710369c89115a83f3e744c15c9d388030cfce2fd3a653dbd18f2947400")); | ||
const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get())); | ||
const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0xF95115BaD9a4585B3C5e2bfB50579f17163A45aA")); | ||
const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get())); | ||
|
||
assertStringsEqual(id, "zklinknova"); | ||
assertStringsEqual(name, "zkLink Nova Mainnet"); | ||
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://explorer.zklink.io/tx/0xeb5eb8710369c89115a83f3e744c15c9d388030cfce2fd3a653dbd18f2947400"); | ||
assertStringsEqual(accUrl, "https://explorer.zklink.io/address/0xF95115BaD9a4585B3C5e2bfB50579f17163A45aA"); | ||
} |
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
a85c7d4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a85c7d401f0d814eabbc72577a4b24b9ff2dda41