Skip to content

Commit 0ac85c7

Browse files
committed
feat(statics): add ape chain config
Ticket: WIN-5736
1 parent 097e425 commit 0ac85c7

File tree

6 files changed

+57
-0
lines changed

6 files changed

+57
-0
lines changed

modules/bitgo/test/v2/unit/keychains.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ describe('V2 Keychains', function () {
5757
n.kind === CoinKind.CRYPTO &&
5858
n.asset !== UnderlyingAsset.USD &&
5959
n.asset !== UnderlyingAsset.AVAXP &&
60+
n.asset !== UnderlyingAsset.APECHAIN &&
6061
n.asset !== UnderlyingAsset.DOGE &&
6162
n.asset !== UnderlyingAsset.ETHW &&
6263
n.asset !== UnderlyingAsset.KAVA &&

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export enum CoinKind {
2121
*/
2222
export enum CoinFamily {
2323
ADA = 'ada',
24+
APECHAIN = 'apechain',
2425
ALGO = 'algo',
2526
APT = 'apt',
2627
ARBETH = 'arbeth',
@@ -382,6 +383,7 @@ export enum UnderlyingAsset {
382383
ADA = 'ada',
383384
ALGO = 'algo',
384385
APE = 'ape',
386+
APECHAIN = 'apechain',
385387
API3 = 'api3',
386388
ARBETH = 'arbeth',
387389
BASEETH = 'baseeth',

modules/statics/src/coinFeatures.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,16 @@ export const COREDAO_FEATURES = [
471471
CoinFeature.STAKING,
472472
CoinFeature.EIP1559,
473473
];
474+
export const APECHAIN_FEATURES = [
475+
...ETH_FEATURES,
476+
CoinFeature.TSS,
477+
CoinFeature.TSS_COLD,
478+
CoinFeature.MPCV2,
479+
CoinFeature.EVM_WALLET,
480+
CoinFeature.BULK_TRANSACTION,
481+
CoinFeature.STUCK_TRANSACTION_MANAGEMENT_TSS,
482+
CoinFeature.EIP1559,
483+
];
474484
export const APT_FEATURES = [
475485
...ACCOUNT_COIN_DEFAULT_FEATURES,
476486
CoinFeature.TSS,

modules/statics/src/coins.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ import { nep141Tokens } from './coins/nep141Tokens';
6969
import {
7070
ADA_FEATURES_WITH_FRANKFURT,
7171
ALGO_FEATURES,
72+
APECHAIN_FEATURES,
7273
APT_FEATURES,
7374
ARBETH_FEATURES,
7475
ATOM_FEATURES,
@@ -1152,6 +1153,26 @@ export const coins = CoinMap.fromCoins([
11521153
BaseUnit.ETH,
11531154
COREDAO_FEATURES
11541155
),
1156+
account(
1157+
'd308ba34-557a-43f2-84f3-5775f1f1a779',
1158+
'apechain',
1159+
'Ape Chain',
1160+
Networks.main.apechain,
1161+
18,
1162+
UnderlyingAsset.APECHAIN,
1163+
BaseUnit.ETH,
1164+
APECHAIN_FEATURES
1165+
),
1166+
account(
1167+
'b3610694-f960-4ef4-a714-c3cb9e02f4b6',
1168+
'tapechain',
1169+
'Testnet Ape Chain',
1170+
Networks.test.apechain,
1171+
18,
1172+
UnderlyingAsset.APECHAIN,
1173+
BaseUnit.ETH,
1174+
APECHAIN_FEATURES
1175+
),
11551176
account(
11561177
'0cdd9089-9ca6-41ea-ab2b-20211da4ac06',
11571178
'xdc',

modules/statics/src/networks.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,25 @@ class CoredaoTestnet extends Testnet implements EthereumNetwork {
12251225
forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a';
12261226
forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b';
12271227
}
1228+
1229+
class ApeChain extends Mainnet implements EthereumNetwork {
1230+
name = 'Ape Chain';
1231+
family = CoinFamily.APECHAIN;
1232+
explorerUrl = 'https://apescan.io/tx/';
1233+
accountExplorerUrl = 'https://apescan.io/address/';
1234+
chainId = 33139;
1235+
nativeCoinOperationHashPrefix = '33139';
1236+
}
1237+
1238+
class ApeChainTestnet extends Testnet implements EthereumNetwork {
1239+
name = 'Ape Chain Testnet';
1240+
family = CoinFamily.APECHAIN;
1241+
explorerUrl = 'https://curtis.apescan.io/tx/';
1242+
accountExplorerUrl = 'https://curtis.apescan.io/address/';
1243+
chainId = 33111;
1244+
nativeCoinOperationHashPrefix = '33111';
1245+
}
1246+
12281247
class Xdc extends Mainnet implements EthereumNetwork {
12291248
name = 'XdcChain';
12301249
family = CoinFamily.XDC;
@@ -1449,6 +1468,7 @@ export const Networks = {
14491468
main: {
14501469
ada: Object.freeze(new Ada()),
14511470
algorand: Object.freeze(new Algorand()),
1471+
apechain: Object.freeze(new ApeChain()),
14521472
apt: Object.freeze(new Apt()),
14531473
arbitrum: Object.freeze(new Arbitrum()),
14541474
atom: Object.freeze(new Atom()),
@@ -1526,6 +1546,7 @@ export const Networks = {
15261546
test: {
15271547
ada: Object.freeze(new AdaTestnet()),
15281548
algorand: Object.freeze(new AlgorandTestnet()),
1549+
apechain: Object.freeze(new ApeChainTestnet()),
15291550
apt: Object.freeze(new AptTestnet()),
15301551
arbitrum: Object.freeze(new ArbitrumTestnet()),
15311552
atom: Object.freeze(new AtomTestnet()),

modules/statics/test/unit/fixtures/expectedColdFeatures.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const expectedColdFeatures = {
5454
],
5555
justTSS: [
5656
'ada',
57+
'apechain',
5758
'apt',
5859
'atom',
5960
'baby',
@@ -92,6 +93,7 @@ export const expectedColdFeatures = {
9293
'zeta',
9394
'tada',
9495
'tatom',
96+
'tapechain',
9597
'tapt',
9698
'tbaby',
9799
'tbera',

0 commit comments

Comments
 (0)