Skip to content

Commit a1100b0

Browse files
authored
Merge pull request #6225 from BitGo/WIN-5736_apechain_statics
feat(statics): add support apechain (EVM)
2 parents f839d67 + 0ac85c7 commit a1100b0

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',
@@ -383,6 +384,7 @@ export enum UnderlyingAsset {
383384
ADA = 'ada',
384385
ALGO = 'algo',
385386
APE = 'ape',
387+
APECHAIN = 'apechain',
386388
API3 = 'api3',
387389
ARBETH = 'arbeth',
388390
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,
@@ -1172,6 +1173,26 @@ export const coins = CoinMap.fromCoins([
11721173
BaseUnit.ETH,
11731174
COREDAO_FEATURES
11741175
),
1176+
account(
1177+
'd308ba34-557a-43f2-84f3-5775f1f1a779',
1178+
'apechain',
1179+
'Ape Chain',
1180+
Networks.main.apechain,
1181+
18,
1182+
UnderlyingAsset.APECHAIN,
1183+
BaseUnit.ETH,
1184+
APECHAIN_FEATURES
1185+
),
1186+
account(
1187+
'b3610694-f960-4ef4-a714-c3cb9e02f4b6',
1188+
'tapechain',
1189+
'Testnet Ape Chain',
1190+
Networks.test.apechain,
1191+
18,
1192+
UnderlyingAsset.APECHAIN,
1193+
BaseUnit.ETH,
1194+
APECHAIN_FEATURES
1195+
),
11751196
account(
11761197
'0cdd9089-9ca6-41ea-ab2b-20211da4ac06',
11771198
'xdc',

modules/statics/src/networks.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,25 @@ class CoredaoTestnet extends Testnet implements EthereumNetwork {
12371237
forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a';
12381238
forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b';
12391239
}
1240+
1241+
class ApeChain extends Mainnet implements EthereumNetwork {
1242+
name = 'Ape Chain';
1243+
family = CoinFamily.APECHAIN;
1244+
explorerUrl = 'https://apescan.io/tx/';
1245+
accountExplorerUrl = 'https://apescan.io/address/';
1246+
chainId = 33139;
1247+
nativeCoinOperationHashPrefix = '33139';
1248+
}
1249+
1250+
class ApeChainTestnet extends Testnet implements EthereumNetwork {
1251+
name = 'Ape Chain Testnet';
1252+
family = CoinFamily.APECHAIN;
1253+
explorerUrl = 'https://curtis.apescan.io/tx/';
1254+
accountExplorerUrl = 'https://curtis.apescan.io/address/';
1255+
chainId = 33111;
1256+
nativeCoinOperationHashPrefix = '33111';
1257+
}
1258+
12401259
class Xdc extends Mainnet implements EthereumNetwork {
12411260
name = 'XdcChain';
12421261
family = CoinFamily.XDC;
@@ -1461,6 +1480,7 @@ export const Networks = {
14611480
main: {
14621481
ada: Object.freeze(new Ada()),
14631482
algorand: Object.freeze(new Algorand()),
1483+
apechain: Object.freeze(new ApeChain()),
14641484
apt: Object.freeze(new Apt()),
14651485
arbitrum: Object.freeze(new Arbitrum()),
14661486
asi: Object.freeze(new Asi()),
@@ -1539,6 +1559,7 @@ export const Networks = {
15391559
test: {
15401560
ada: Object.freeze(new AdaTestnet()),
15411561
algorand: Object.freeze(new AlgorandTestnet()),
1562+
apechain: Object.freeze(new ApeChainTestnet()),
15421563
apt: Object.freeze(new AptTestnet()),
15431564
arbitrum: Object.freeze(new ArbitrumTestnet()),
15441565
asi: Object.freeze(new AsiTestnet()),

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
'asi',
5960
'atom',
@@ -94,6 +95,7 @@ export const expectedColdFeatures = {
9495
'tada',
9596
'tasi',
9697
'tatom',
98+
'tapechain',
9799
'tapt',
98100
'tbaby',
99101
'tbera',

0 commit comments

Comments
 (0)