From 6a93cb809d822c5c626a4d2b05210171d902fc58 Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Tue, 31 Oct 2023 18:03:36 +0800 Subject: [PATCH] Update scroll chainId (#3514) --- docs/registry.md | 2 +- include/TrustWalletCore/TWCoinType.h | 2 +- registry.json | 8 ++++---- tests/chains/Scroll/TWAnySignerTests.cpp | 4 ++-- tests/chains/Scroll/TWCoinTypeTests.cpp | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/registry.md b/docs/registry.md index d569da1d826..57cff87373f 100644 --- a/docs/registry.md +++ b/docs/registry.md @@ -98,7 +98,7 @@ This list is generated from [./registry.json](../registry.json) | 52752 | Celo | CELO | | | | 59144 | Linea | ETH | | | | 105105 | Stratis | STRAX | | | -| 534353 | Scroll | ETH | | | +| 534352 | Scroll | ETH | | | | 5718350 | Wanchain | WAN | | | | 5741564 | Waves | WAVES | | | | 10000025 | Cronos Chain | CRO | | | diff --git a/include/TrustWalletCore/TWCoinType.h b/include/TrustWalletCore/TWCoinType.h index 1b75255e921..e993c7f1680 100644 --- a/include/TrustWalletCore/TWCoinType.h +++ b/include/TrustWalletCore/TWCoinType.h @@ -162,7 +162,7 @@ enum TWCoinType { TWCoinTypePersistence = 16000118, TWCoinTypeAkash = 17000118, TWCoinTypeNoble = 18000118, - TWCoinTypeScroll = 534353, + TWCoinTypeScroll = 534352, TWCoinTypeRootstock = 137, TWCoinTypeThetaFuel = 361, TWCoinTypeConfluxeSpace = 1030, diff --git a/registry.json b/registry.json index 6117b5d844e..0487d8b03e6 100644 --- a/registry.json +++ b/registry.json @@ -3258,7 +3258,7 @@ "id": "scroll", "name": "Scroll", "displayName": "Scroll", - "coinId": 534353, + "coinId": 534352, "slip44": 60, "symbol": "ETH", "decimals": 18, @@ -3270,14 +3270,14 @@ ], "curve": "secp256k1", "publicKeyType": "secp256k1Extended", - "chainId": "534353", + "chainId": "534352", "addressHasher": "keccak256", "explorer": { "url": "https://scrollscan.com", "txPath": "/tx/", "accountPath": "/address/", - "sampleTx": "0xee9196d6840c8d31626324d91c886d20e65711c2026c559133fb23741d3b2f9d", - "sampleAccount": "0xFE993660cd35d68D94b6Eba29F4D928d979cd65B" + "sampleTx": "0xa2062a4530b194a438bb9f9e87cdce59f70775a52e8336892364445847c43ca2", + "sampleAccount": "0xf9062b8a30e0d7722960e305049fa50b86ba6253" }, "info": { "url": "https://scroll.io", diff --git a/tests/chains/Scroll/TWAnySignerTests.cpp b/tests/chains/Scroll/TWAnySignerTests.cpp index 8d712b8f39d..8d00ce21d66 100644 --- a/tests/chains/Scroll/TWAnySignerTests.cpp +++ b/tests/chains/Scroll/TWAnySignerTests.cpp @@ -18,7 +18,7 @@ namespace TW::Scroll::tests { /// https://blockscout.scroll.io/tx/0x5a7ba291e0490079bddda54ca5592e5990d6b0eb49f8d239202941e3f63d32bc TEST(TWAnySignerScroll, Sign) { Ethereum::Proto::SigningInput input; - auto chainId = store(uint256_t(534353)); + auto chainId = store(uint256_t(534352)); auto nonce = store(uint256_t(1)); auto gasPrice = store(uint256_t(1000000)); auto gasLimit = store(uint256_t(200000)); @@ -35,7 +35,7 @@ TEST(TWAnySignerScroll, Sign) { auto amount = store(uint256_t(200000000000000)); transfer.set_amount(amount.data(), amount.size()); - std::string expected = "f86c01830f424083030d4094a6bc5ee0b1e904dd0773c5555d2f6833fe937a6886b5e620f480008083104ec6a0a30f1e29c3d1447d7f7f76c7112af3fb86eb3cb7cc536c932e720cd9813ae274a048ffcadba06d3645829d74fa1cf28744111cfc35893761239fa6b510c84c396e"; + std::string expected = "f86c01830f424083030d4094a6bc5ee0b1e904dd0773c5555d2f6833fe937a6886b5e620f480008083104ec3a0c43ee3d34f7758e05e2f54df227eb7780ad97d06e91e03ef6a3c91d4bea6e42fa07d075f20776f7f485faca6f057110fd2745a5cdd6cf121682ef7791619a03ade"; // sign test Ethereum::Proto::SigningOutput output; diff --git a/tests/chains/Scroll/TWCoinTypeTests.cpp b/tests/chains/Scroll/TWCoinTypeTests.cpp index 0d9ca7f3907..fe07ff53096 100644 --- a/tests/chains/Scroll/TWCoinTypeTests.cpp +++ b/tests/chains/Scroll/TWCoinTypeTests.cpp @@ -19,9 +19,9 @@ TEST(TWScrollCoinType, TWCoinType) { const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin)); const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin)); const auto chainId = WRAPS(TWCoinTypeChainId(coin)); - const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0xee9196d6840c8d31626324d91c886d20e65711c2026c559133fb23741d3b2f9d")); + const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0xa2062a4530b194a438bb9f9e87cdce59f70775a52e8336892364445847c43ca2")); const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get())); - const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0xFE993660cd35d68D94b6Eba29F4D928d979cd65B")); + const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0xf9062b8a30e0d7722960e305049fa50b86ba6253")); const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get())); assertStringsEqual(id, "scroll"); @@ -31,7 +31,7 @@ TEST(TWScrollCoinType, TWCoinType) { ASSERT_EQ(TWCoinTypeBlockchain(coin), TWBlockchainEthereum); ASSERT_EQ(TWCoinTypeP2shPrefix(coin), 0x0); ASSERT_EQ(TWCoinTypeStaticPrefix(coin), 0x0); - assertStringsEqual(chainId, "534353"); - assertStringsEqual(txUrl, "https://scrollscan.com/tx/0xee9196d6840c8d31626324d91c886d20e65711c2026c559133fb23741d3b2f9d"); - assertStringsEqual(accUrl, "https://scrollscan.com/address/0xFE993660cd35d68D94b6Eba29F4D928d979cd65B"); + assertStringsEqual(chainId, "534352"); + assertStringsEqual(txUrl, "https://scrollscan.com/tx/0xa2062a4530b194a438bb9f9e87cdce59f70775a52e8336892364445847c43ca2"); + assertStringsEqual(accUrl, "https://scrollscan.com/address/0xf9062b8a30e0d7722960e305049fa50b86ba6253"); }