diff --git a/android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/CoinAddressDerivationTests.kt b/android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/CoinAddressDerivationTests.kt index 782a759600f..7c7638952f9 100644 --- a/android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/CoinAddressDerivationTests.kt +++ b/android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/CoinAddressDerivationTests.kt @@ -42,7 +42,7 @@ class CoinAddressDerivationTests { CALLISTO -> assertEquals("0x3E6FFC80745E6669135a76F4A7ce6BCF02436e04", address) DASH -> assertEquals("XqHiz8EXYbTAtBEYs4pWTHh7ipEDQcNQeT", address) DIGIBYTE -> assertEquals("dgb1qtjgmerfqwdffyf8ghcrkgy52cghsqptynmyswu", address) - ETHEREUM, SMARTCHAIN, POLYGON, OPTIMISM, ZKSYNC, ARBITRUM, ECOCHAIN, AVALANCHECCHAIN, XDAI, + ETHEREUM, SMARTCHAIN, POLYGON, OPTIMISM, ZKSYNC, ARBITRUM, ARBITRUMNOVA, ECOCHAIN, AVALANCHECCHAIN, XDAI, FANTOM, CELO, CRONOSCHAIN, SMARTBITCOINCASH, KUCOINCOMMUNITYCHAIN, BOBA, METIS, AURORA, EVMOS, MOONRIVER, MOONBEAM, KAVAEVM, KLAYTN, METER, OKXCHAIN, POLYGONZKEVM, SCROLL, CONFLUXESPACE, ACALAEVM, OPBNB, NEON, BASE, LINEA -> assertEquals("0x8f348F300873Fd5DA36950B2aC75a26584584feE", address) diff --git a/docs/registry.md b/docs/registry.md index 2433a727aba..caddd560b35 100644 --- a/docs/registry.md +++ b/docs/registry.md @@ -122,6 +122,7 @@ This list is generated from [./registry.json](../registry.json) | 10008217 | Klaytn | KLAY | | | | 10009000 | Avalanche C-Chain | AVAX | | | | 10009001 | Evmos | EVMOS | | | +| 10042170 | Arbitrum Nova | ETH | | | | 10042221 | Arbitrum | ETH | | | | 11000118 | Sommelier | SOMM | | | | 12000118 | Fetch AI | FET | | | diff --git a/include/TrustWalletCore/TWCoinType.h b/include/TrustWalletCore/TWCoinType.h index cb193e05e3e..b55693dec26 100644 --- a/include/TrustWalletCore/TWCoinType.h +++ b/include/TrustWalletCore/TWCoinType.h @@ -172,6 +172,7 @@ enum TWCoinType { TWCoinTypeNeon = 245022934, TWCoinTypeBase = 8453, TWCoinTypeSei = 19000118, + TWCoinTypeArbitrumNova = 10042170, TWCoinTypeLinea = 59144, }; diff --git a/registry.json b/registry.json index 713d9d9dc1e..448b7c4fc3e 100644 --- a/registry.json +++ b/registry.json @@ -3258,6 +3258,37 @@ "documentation": "https://docs.arbitrum.io/" } }, + { + "id": "arbitrumnova", + "name": "Arbitrum Nova", + "coinId": 10042170, + "slip44": 60, + "symbol": "ETH", + "decimals": 18, + "blockchain": "Ethereum", + "derivation": [ + { + "path": "m/44'/60'/0'/0/0" + } + ], + "curve": "secp256k1", + "publicKeyType": "secp256k1Extended", + "chainId": "42170", + "addressHasher": "keccak256", + "explorer": { + "url": "https://nova.arbiscan.io", + "txPath": "/tx/", + "accountPath": "/address/", + "sampleTx": "0xfdfee13848c2d21813c82c53afc9925f31770564c3117477960a81055702c1be", + "sampleAccount": "0x0d0707963952f2fba59dd06f2b425ace40b492fe" + }, + "info": { + "url": "https://nova.arbitrum.io", + "source": "https://github.com/OffchainLabs/arbitrum", + "rpc": "https://nova.arbitrum.io/rpc", + "documentation": "https://docs.arbitrum.io/" + } + }, { "id": "heco", "name": "ECO Chain", diff --git a/samples/kmp/shared/build.gradle.kts b/samples/kmp/shared/build.gradle.kts index ad36436bcaf..fa64d9e8028 100644 --- a/samples/kmp/shared/build.gradle.kts +++ b/samples/kmp/shared/build.gradle.kts @@ -35,7 +35,7 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - implementation("com.trustwallet:wallet-core-kotlin:3.2.11") + implementation("com.trustwallet:wallet-core-kotlin:3.2.12") } } val commonTest by getting { diff --git a/swift/Tests/CoinAddressDerivationTests.swift b/swift/Tests/CoinAddressDerivationTests.swift index aefeb29d090..6ca2b3ed810 100644 --- a/swift/Tests/CoinAddressDerivationTests.swift +++ b/swift/Tests/CoinAddressDerivationTests.swift @@ -87,6 +87,7 @@ class CoinAddressDerivationTests: XCTestCase { .polygonzkEVM, .scroll, .arbitrum, + .arbitrumNova, .ecochain, .avalancheCChain, .xdai, diff --git a/tests/chains/ArbitrumNova/TWCoinTypeTests.cpp b/tests/chains/ArbitrumNova/TWCoinTypeTests.cpp new file mode 100644 index 00000000000..6c852405d43 --- /dev/null +++ b/tests/chains/ArbitrumNova/TWCoinTypeTests.cpp @@ -0,0 +1,37 @@ +// 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. +// +// This is a GENERATED FILE, changes made here MAY BE LOST. +// Generated one-time (codegen/bin/cointests) +// + +#include "TestUtilities.h" +#include +#include + + +TEST(TWArbitrumNovaCoinType, TWCoinType) { + const auto coin = TWCoinTypeArbitrumNova; + const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin)); + const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin)); + const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin)); + const auto chainId = WRAPS(TWCoinTypeChainId(coin)); + const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0xfdfee13848c2d21813c82c53afc9925f31770564c3117477960a81055702c1be")); + const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get())); + const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0x0d0707963952f2fba59dd06f2b425ace40b492fe")); + const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get())); + + assertStringsEqual(id, "arbitrumnova"); + assertStringsEqual(name, "Arbitrum Nova"); + 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, "42170"); + assertStringsEqual(txUrl, "https://nova.arbiscan.io/tx/0xfdfee13848c2d21813c82c53afc9925f31770564c3117477960a81055702c1be"); + assertStringsEqual(accUrl, "https://nova.arbiscan.io/address/0x0d0707963952f2fba59dd06f2b425ace40b492fe"); +} diff --git a/tests/common/CoinAddressDerivationTests.cpp b/tests/common/CoinAddressDerivationTests.cpp index 9862c74b57c..e9d870b4e70 100644 --- a/tests/common/CoinAddressDerivationTests.cpp +++ b/tests/common/CoinAddressDerivationTests.cpp @@ -39,6 +39,7 @@ TEST(Coin, DeriveAddress) { // ... clones: case TWCoinTypeAcalaEVM: case TWCoinTypeArbitrum: + case TWCoinTypeArbitrumNova: case TWCoinTypeAurora: case TWCoinTypeAvalancheCChain: case TWCoinTypeBoba: