Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CoinAddressDerivationTests {
FANTOM, CELO, CRONOSCHAIN, SMARTBITCOINCASH, KUCOINCOMMUNITYCHAIN, BOBA, METIS,
AURORA, EVMOS, MOONRIVER, MOONBEAM, KAVAEVM, KAIA, METER, OKXCHAIN, POLYGONZKEVM, SCROLL,
CONFLUXESPACE, ACALAEVM, OPBNB, NEON, BASE, LINEA, GREENFIELD, MANTLE, ZENEON, MANTAPACIFIC,
ZETAEVM, MERLIN, LIGHTLINK, BLAST, BOUNCEBIT, ZKLINKNOVA, SONIC, PLASMA, MONAD,
ZETAEVM, MERLIN, LIGHTLINK, BLAST, BOUNCEBIT, ZKLINKNOVA, SONIC, PLASMA, MONAD, WARDENPROTOCOL,
-> assertEquals("0x8f348F300873Fd5DA36950B2aC75a26584584feE", address)

RONIN -> assertEquals("ronin:8f348F300873Fd5DA36950B2aC75a26584584feE", address)
Expand Down
1 change: 1 addition & 0 deletions docs/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ This list is generated from [./registry.json](../registry.json)
| 6060 | GoChain | GO | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/gochain/info/logo.png" width="32" /> | <https://gochain.io> |
| 7332 | Zen EON | ZEN | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/zeneon/info/logo.png" width="32" /> | <https://eon.horizen.io> |
| 8453 | Base | ETH | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/base/info/logo.png" width="32" /> | <https://base.mirror.xyz/> |
| 8765 | Warden Protocol | WARD | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/wardenprotocol/info/logo.png" width="32" /> | <https://wardenprotocol.org/> |
| 8964 | NULS | NULS | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/nuls/info/logo.png" width="32" /> | <https://nuls.io> |
| 9745 | Plasma Mainnet | XPL | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/plasma/info/logo.png" width="32" /> | <https://plasma.to> |
| 10143 | Monad | MON | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/monad/info/logo.png" width="32" /> | <https://www.monad.xyz> |
Expand Down
1 change: 1 addition & 0 deletions include/TrustWalletCore/TWCoinType.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ enum TWCoinType {
TWCoinTypePolymesh = 595,
TWCoinTypePlasma = 9745,
TWCoinTypeMonad = 10143,
TWCoinTypeWardenProtocol = 10008765,
// end_of_tw_coin_type_marker_do_not_modify
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CoinAddressDerivationTests {
Fantom, Celo, CronosChain, SmartBitcoinCash, KuCoinCommunityChain, Boba, Metis,
Aurora, Evmos, Moonriver, Moonbeam, KavaEvm, Kaia, Meter, OKXChain, PolygonzkEVM, Scroll,
ConfluxeSpace, AcalaEVM, OpBNB, Neon, Base, Linea, Greenfield, Mantle, ZenEON, MantaPacific,
ZetaEVM, Merlin, Lightlink, Blast, BounceBit, ZkLinkNova, Sonic, Plasma, Monad,
ZetaEVM, Merlin, Lightlink, Blast, BounceBit, ZkLinkNova, Sonic, Plasma, Monad, WardenProtocol,
-> "0x8f348F300873Fd5DA36950B2aC75a26584584feE"

Ronin -> "ronin:8f348F300873Fd5DA36950B2aC75a26584584feE"
Expand Down
30 changes: 30 additions & 0 deletions registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -4940,5 +4940,35 @@
"rpc": "https://rpc.monad.xyz",
"documentation": "https://docs.monad.xyz"
}
},
{
"id": "wardenprotocol",
"name": "Warden Protocol",
"displayName": "Warden Protocol",
"coinId": 10008765,
"symbol": "WARD",
"decimals": 18,
"blockchain": "Ethereum",
"derivation": [
{
"path": "m/44'/60'/0'/0/0"
}
],
"curve": "secp256k1",
"publicKeyType": "secp256k1Extended",
"chainId": "8765",
"addressHasher": "keccak256",
"explorer": {
"url": "https://explorer.wardenprotocol.org",
"txPath": "/tx/",
"accountPath": "/address/",
"sampleTx": "0x90aaaaf8379eecc479ac8679a1430e7fb53d2e64749c4bc9132371d4e1ea98f2",
"sampleAccount": "0xDc3D9d2f5fC5bEb330c7135b2c38f354c18656f0"
},
"info": {
"url": "https://www.wardenprotocol.org",
"rpc": "https://evm.wardenprotocol.org",
"documentation": "https://docs.wardenprotocol.org"
}
}
]
1 change: 1 addition & 0 deletions rust/tw_tests/tests/coin_address_derivation_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ fn test_coin_address_derivation() {
| CoinType::Sonic
| CoinType::Plasma
| CoinType::Monad
| CoinType::WardenProtocol
// end_of_evm_address_derivation_tests_marker_do_not_modify
=> "0xAc1ec44E4f0ca7D172B7803f6836De87Fb72b309",
CoinType::Bitcoin => "bc1qten42eesehw0ktddcp0fws7d3ycsqez3f7d5yt",
Expand Down
3 changes: 2 additions & 1 deletion swift/Tests/CoinAddressDerivationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ class CoinAddressDerivationTests: XCTestCase {
.zkLinkNova,
.sonic,
.plasma,
.monad:
.monad,
.wardenProtocol:
let expectedResult = "0x8f348F300873Fd5DA36950B2aC75a26584584feE"
assertCoinDerivation(coin, expectedResult, derivedAddress, address)
case .ronin:
Expand Down
29 changes: 29 additions & 0 deletions tests/chains/WardenProtocol/TWCoinTypeTests.cpp
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(TWWardenProtocolCoinType, TWCoinType) {
const auto coin = TWCoinTypeWardenProtocol;
const auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(coin));
const auto id = WRAPS(TWCoinTypeConfigurationGetID(coin));
const auto name = WRAPS(TWCoinTypeConfigurationGetName(coin));
const auto txId = WRAPS(TWStringCreateWithUTF8Bytes("0x90aaaaf8379eecc479ac8679a1430e7fb53d2e64749c4bc9132371d4e1ea98f2"));
const auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(coin, txId.get()));
const auto accId = WRAPS(TWStringCreateWithUTF8Bytes("0xDc3D9d2f5fC5bEb330c7135b2c38f354c18656f0"));
const auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(coin, accId.get()));

assertStringsEqual(id, "wardenprotocol");
assertStringsEqual(name, "Warden Protocol");
assertStringsEqual(symbol, "WARD");
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.wardenprotocol.org/tx/0x90aaaaf8379eecc479ac8679a1430e7fb53d2e64749c4bc9132371d4e1ea98f2");
assertStringsEqual(accUrl, "https://explorer.wardenprotocol.org/address/0xDc3D9d2f5fC5bEb330c7135b2c38f354c18656f0");
}
1 change: 1 addition & 0 deletions tests/common/CoinAddressDerivationTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ TEST(Coin, DeriveAddress) {
case TWCoinTypeSonic:
case TWCoinTypePlasma:
case TWCoinTypeMonad:
case TWCoinTypeWardenProtocol:
// end_of_evm_address_derivation_tests_marker_do_not_modify
EXPECT_EQ(address, "0x9d8A62f656a8d1615C1294fd71e9CFb3E4855A4F");
break;
Expand Down