Skip to content

Commit f4af4ae

Browse files
authored
Merge pull request #5028 from BitGo/WIN-3649_oas_token_statics
feat(statics): add oas coin config
2 parents 33b5fe8 + 07045f8 commit f4af4ae

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ describe('V2 Keychains', function () {
7575
n.asset !== UnderlyingAsset.ARBETH && // TODO(WIN-692): remove this once coin-specific module for arbeth is added
7676
n.asset !== UnderlyingAsset.OPETH && // TODO(WIN-692): remove this once coin-specific module for opeth is added
7777
n.asset !== UnderlyingAsset.ZKETH && // TODO(WIN-1427): remove this once coin-specific module for zketh is added
78+
n.asset !== UnderlyingAsset.OAS && // TODO(WIN-3696): remove this once coin-specific module for oas is added
7879
n.asset !== UnderlyingAsset.RUNE &&
7980
coinFamilyValues.includes(n.name)
8081
);

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export enum CoinFamily {
5656
LTC = 'ltc',
5757
POLYGON = 'polygon',
5858
NEAR = 'near',
59+
OAS = 'oas',
5960
OFC = 'ofc',
6061
OPETH = 'opeth',
6162
OSMO = 'osmo',
@@ -352,6 +353,7 @@ export enum UnderlyingAsset {
352353
LNBTC = 'lnbtc',
353354
LTC = 'ltc',
354355
NEAR = 'near',
356+
OAS = 'oas',
355357
OPETH = 'opeth',
356358
OSMO = 'osmo',
357359
POLYGON = 'polygon',

modules/statics/src/coins.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,13 @@ const BERA_FEATURES = [
344344
CoinFeature.USES_NON_PACKED_ENCODING_FOR_TXDATA,
345345
CoinFeature.BULK_TRANSACTION,
346346
];
347+
const OAS_FEATURES = [
348+
...ETH_FEATURES,
349+
CoinFeature.MULTISIG_COLD,
350+
CoinFeature.EVM_WALLET,
351+
CoinFeature.USES_NON_PACKED_ENCODING_FOR_TXDATA,
352+
CoinFeature.BULK_TRANSACTION,
353+
];
347354
const ETH_FEATURES_WITH_FRANKFURT = [...ETH_FEATURES, CoinFeature.CUSTODY_BITGO_FRANKFURT];
348355
const ZETA_FEATURES = [...COSMOS_SIDECHAIN_FEATURES, CoinFeature.CUSTODY_BITGO_SINGAPORE];
349356
const ZETA_EVM_FEATURES = [...AccountCoin.DEFAULT_FEATURES, CoinFeature.CUSTODY_BITGO_SINGAPORE];
@@ -1226,6 +1233,26 @@ export const coins = CoinMap.fromCoins([
12261233
BaseUnit.ETH,
12271234
BERA_FEATURES
12281235
),
1236+
account(
1237+
'7482e3f1-5bf8-45a6-9d98-69e0506602d2',
1238+
'oas',
1239+
'oaschain',
1240+
Networks.main.oas,
1241+
18,
1242+
UnderlyingAsset.OAS,
1243+
BaseUnit.ETH,
1244+
OAS_FEATURES
1245+
),
1246+
account(
1247+
'b5316b57-8aa3-4f0b-9736-96b7838dbde8',
1248+
'toas',
1249+
'Testnet oaschain',
1250+
Networks.test.oas,
1251+
18,
1252+
UnderlyingAsset.OAS,
1253+
BaseUnit.ETH,
1254+
OAS_FEATURES
1255+
),
12291256
erc20CompatibleAccountCoin(
12301257
'bfae821b-cf3a-4190-b1a8-a54af51d730e',
12311258
'celo',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,24 @@ class BerachainTestnet extends Testnet implements EthereumNetwork {
10561056
batcherContractAddress = '0xf499549720116c3dEA867D4fC279C43aCA172712';
10571057
}
10581058

1059+
class Oas extends Mainnet implements EthereumNetwork {
1060+
name = 'Oaschain';
1061+
family = CoinFamily.OAS;
1062+
explorerUrl = 'https://explorer.oasys.games/tx/';
1063+
accountExplorerUrl = 'https://explorer.oasys.games/address/';
1064+
chainId = 248;
1065+
nativeCoinOperationHashPrefix = '248';
1066+
}
1067+
1068+
class OasTestnet extends Testnet implements EthereumNetwork {
1069+
name = 'OaschainTestnet';
1070+
family = CoinFamily.OAS;
1071+
explorerUrl = 'https://scan.sandverse.oasys.games/tx/';
1072+
accountExplorerUrl = 'https://scan.sandverse.oasys.games/address/';
1073+
chainId = 20197;
1074+
nativeCoinOperationHashPrefix = '20197';
1075+
}
1076+
10591077
class BaseChainTestnet extends Testnet implements EthereumNetwork {
10601078
name = 'BaseChainTestnet';
10611079
family = CoinFamily.BASEETH;
@@ -1121,6 +1139,7 @@ export const Networks = {
11211139
lnbtc: Object.freeze(new LightningBitcoin()),
11221140
litecoin: Object.freeze(new Litecoin()),
11231141
polygon: Object.freeze(new Polygon()),
1142+
oas: Object.freeze(new Oas()),
11241143
ofc: Object.freeze(new Ofc()),
11251144
optimism: Object.freeze(new Optimism()),
11261145
osmo: Object.freeze(new Osmo()),
@@ -1181,6 +1200,7 @@ export const Networks = {
11811200
lnbtc: Object.freeze(new LightningBitcoinTestnet()),
11821201
litecoin: Object.freeze(new LitecoinTestnet()),
11831202
polygon: Object.freeze(new PolygonTestnet()),
1203+
oas: Object.freeze(new OasTestnet()),
11841204
ofc: Object.freeze(new OfcTestnet()),
11851205
optimism: Object.freeze(new OptimismTestnet()),
11861206
osmo: Object.freeze(new OsmoTestnet()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const expectedColdFeatures = {
1919
'etc',
2020
'hbar',
2121
'ltc',
22+
'oas',
2223
'opeth',
2324
'rbtc',
2425
'stx',
@@ -42,6 +43,7 @@ export const expectedColdFeatures = {
4243
'tetc',
4344
'thbar',
4445
'tltc',
46+
'toas',
4547
'topeth',
4648
'trbtc',
4749
'trx',

0 commit comments

Comments
 (0)