Skip to content

Commit

Permalink
Update scroll chainId (#3514)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzq0826 authored Oct 31, 2023
1 parent b391586 commit 6a93cb8
Show file tree
Hide file tree
Showing 5 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 @@ -98,7 +98,7 @@ This list is generated from [./registry.json](../registry.json)
| 52752 | Celo | CELO | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/celo/info/logo.png" width="32" /> | <https://celo.org> |
| 59144 | Linea | ETH | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/linea/info/logo.png" width="32" /> | <https://linea.build> |
| 105105 | Stratis | STRAX | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/stratis/info/logo.png" width="32" /> | <https://www.stratisplatform.com/> |
| 534353 | Scroll | ETH | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/scroll/info/logo.png" width="32" /> | <https://scroll.io> |
| 534352 | Scroll | ETH | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/scroll/info/logo.png" width="32" /> | <https://scroll.io> |
| 5718350 | Wanchain | WAN | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/wanchain/info/logo.png" width="32" /> | <https://wanchain.org> |
| 5741564 | Waves | WAVES | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/waves/info/logo.png" width="32" /> | <https://wavesplatform.com> |
| 10000025 | Cronos Chain | CRO | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/cronos/info/logo.png" width="32" /> | <https://cronos.org> |
Expand Down
2 changes: 1 addition & 1 deletion include/TrustWalletCore/TWCoinType.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ enum TWCoinType {
TWCoinTypePersistence = 16000118,
TWCoinTypeAkash = 17000118,
TWCoinTypeNoble = 18000118,
TWCoinTypeScroll = 534353,
TWCoinTypeScroll = 534352,
TWCoinTypeRootstock = 137,
TWCoinTypeThetaFuel = 361,
TWCoinTypeConfluxeSpace = 1030,
Expand Down
8 changes: 4 additions & 4 deletions registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -3258,7 +3258,7 @@
"id": "scroll",
"name": "Scroll",
"displayName": "Scroll",
"coinId": 534353,
"coinId": 534352,
"slip44": 60,
"symbol": "ETH",
"decimals": 18,
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions tests/chains/Scroll/TWAnySignerTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions tests/chains/Scroll/TWCoinTypeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
}

0 comments on commit 6a93cb8

Please sign in to comment.