Skip to content

Commit 9d8d70e

Browse files
nayandas190yashvanthbl137-crypto
authored andcommitted
Merge pull request #8165 from BitGo/cecho-133
fix(tempo): update tip-20 tokens to use 6 decimals
2 parents 9504c46 + 3eeb32b commit 9d8d70e

8 files changed

Lines changed: 49 additions & 17 deletions

File tree

modules/sdk-coin-tempo/src/tempo.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ export class Tempo extends AbstractEthLikeNewCoins {
4242
return 'Tempo';
4343
}
4444

45-
/**
46-
* Get the base factor (1 TEMPO = 1e18 wei, like Ethereum)
47-
*/
45+
/** @inheritdoc */
4846
getBaseFactor(): number {
49-
return 1e18;
47+
return 1e6;
5048
}
5149

5250
/**

modules/sdk-coin-tempo/test/unit/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('Tempo Coin', function () {
4040
it('should return the correct coin name', function () {
4141
basecoin.getChain().should.equal('tempo');
4242
basecoin.getFullName().should.equal('Tempo');
43-
basecoin.getBaseFactor().should.equal(1e18);
43+
basecoin.getBaseFactor().should.equal(1e6);
4444
});
4545

4646
describe('Address Validation', function () {
@@ -162,7 +162,7 @@ describe('Tempo Coin', function () {
162162
it('should return the correct testnet coin name', function () {
163163
testnetBasecoin.getChain().should.equal('ttempo');
164164
testnetBasecoin.getFullName().should.equal('Testnet Tempo');
165-
testnetBasecoin.getBaseFactor().should.equal(1e18);
165+
testnetBasecoin.getBaseFactor().should.equal(1e6);
166166
});
167167

168168
it('should validate address with memoId on testnet', function () {

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2873,7 +2873,7 @@ export const allCoinsAndTokens = [
28732873
'tempo',
28742874
'Tempo',
28752875
Networks.main.tempo,
2876-
18,
2876+
6,
28772877
UnderlyingAsset.TEMPO,
28782878
BaseUnit.ETH,
28792879
TEMPO_FEATURES
@@ -2883,7 +2883,7 @@ export const allCoinsAndTokens = [
28832883
'ttempo',
28842884
'Tempo Testnet',
28852885
Networks.test.tempo,
2886-
18,
2886+
6,
28872887
UnderlyingAsset.TEMPO,
28882888
BaseUnit.ETH,
28892889
TEMPO_FEATURES
@@ -2893,7 +2893,7 @@ export const allCoinsAndTokens = [
28932893
'e1872fd8-14ee-4dc9-bc5e-fd52552d9c60',
28942894
'ttempo:pathusd',
28952895
'Testnet pathUSD',
2896-
18,
2896+
6,
28972897
'0x20c0000000000000000000000000000000000000',
28982898
UnderlyingAsset['ttempo:pathusd'],
28992899
TEMPO_FEATURES
@@ -2902,7 +2902,7 @@ export const allCoinsAndTokens = [
29022902
'3c67eaa8-f073-4e1a-9d3a-c6756a31bef0',
29032903
'ttempo:alphausd',
29042904
'Testnet AlphaUSD',
2905-
18,
2905+
6,
29062906
'0x20c0000000000000000000000000000000000001',
29072907
UnderlyingAsset['ttempo:alphausd'],
29082908
TEMPO_FEATURES
@@ -2911,7 +2911,7 @@ export const allCoinsAndTokens = [
29112911
'da6d27bd-ed3b-4b59-b574-6e013e5eb55d',
29122912
'ttempo:betausd',
29132913
'Testnet BetaUSD',
2914-
18,
2914+
6,
29152915
'0x20c0000000000000000000000000000000000002',
29162916
UnderlyingAsset['ttempo:betausd'],
29172917
TEMPO_FEATURES
@@ -2920,7 +2920,7 @@ export const allCoinsAndTokens = [
29202920
'58cbb592-446e-4753-8c2a-c89f662135ba',
29212921
'ttempo:thetausd',
29222922
'Testnet ThetaUSD',
2923-
18,
2923+
6,
29242924
'0x20c0000000000000000000000000000000000003',
29252925
UnderlyingAsset['ttempo:thetausd'],
29262926
TEMPO_FEATURES
@@ -3201,6 +3201,15 @@ export const allCoinsAndTokens = [
32013201
UnderlyingAsset['seievm:usd0'],
32023202
Networks.main.seievm
32033203
),
3204+
erc20Token(
3205+
'b30c2605-0a9e-448e-8ea3-8df103e20384',
3206+
'seievm:wsei',
3207+
'Wrapped SEI',
3208+
18,
3209+
'0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7',
3210+
UnderlyingAsset['seievm:wsei'],
3211+
Networks.main.seievm
3212+
),
32043213
erc20Token(
32053214
'0ad7a932-bccf-4f37-a201-69ae3571bfa7',
32063215
'lineaeth:linea',

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2907,6 +2907,7 @@ export enum UnderlyingAsset {
29072907
'tpolygon:usdc' = 'tpolygon:usdc',
29082908
'tpolygon:testcopm' = 'tpolygon:testcopm',
29092909
'tpolygon:BitGoTest' = 'tpolygon:BitGoTest',
2910+
'tpolygon:copr3' = 'tpolygon:copr3',
29102911

29112912
// generic NFTs
29122913
'terc721:polygontoken' = 'terc721:polygontoken',
@@ -3018,6 +3019,7 @@ export enum UnderlyingAsset {
30183019
'seievm:weth' = 'seievm:weth',
30193020
'seievm:wbtc' = 'seievm:wbtc',
30203021
'seievm:usd0' = 'seievm:usd0',
3022+
'seievm:wsei' = 'seievm:wsei',
30213023

30223024
//Linea mainnet tokens
30233025
'lineaeth:linea' = 'lineaeth:linea',

modules/statics/src/coins/erc20Coins.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10964,7 +10964,7 @@ export const erc20Coins = [
1096410964
'eth:usdm1',
1096510965
'USDM1',
1096610966
18,
10967-
'0xab3cfc7cf0720b75c41b4db078b4ddb338f562e7',
10967+
'0x90a1717e0dabe37693f79afe43ae236dc3b65957',
1096810968
UnderlyingAsset['eth:usdm1'],
1096910969
[...ACCOUNT_COIN_DEFAULT_FEATURES, CoinFeature.STABLECOIN]
1097010970
),

modules/statics/src/coins/ofcCoins.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3619,6 +3619,13 @@ export const ofcCoins = [
36193619
6,
36203620
UnderlyingAsset['polygon:txusd']
36213621
),
3622+
tofcPolygonErc20(
3623+
'a3f4e3a3-332e-4634-ac56-715c96d29d07',
3624+
'ofctpolygon:copr3',
3625+
'Test COPR3',
3626+
18,
3627+
UnderlyingAsset['tpolygon:copr3']
3628+
),
36223629

36233630
ofcAlgoToken(
36243631
'fec37305-8fb8-4c23-b42c-b4696d579eb9',
@@ -4048,28 +4055,28 @@ export const ofcCoins = [
40484055
'7912e76e-5a5c-4f1b-86e9-1fc2a51f5a98',
40494056
'ofcttempo:pathusd',
40504057
'Testnet pathUSD',
4051-
18,
4058+
6,
40524059
UnderlyingAsset['ttempo:pathusd']
40534060
),
40544061
tofcTempoToken(
40554062
'349f887a-e764-4640-9ba1-2e29e02d5d65',
40564063
'ofcttempo:alphausd',
40574064
'Testnet AlphaUSD',
4058-
18,
4065+
6,
40594066
UnderlyingAsset['ttempo:alphausd']
40604067
),
40614068
tofcTempoToken(
40624069
'dc2b6c3d-b7a4-4940-bee3-32defbeff3bf',
40634070
'ofcttempo:betausd',
40644071
'Testnet BetaUSD',
4065-
18,
4072+
6,
40664073
UnderlyingAsset['ttempo:betausd']
40674074
),
40684075
tofcTempoToken(
40694076
'490a65b6-e01f-4fae-9aa5-7528d1848075',
40704077
'ofcttempo:thetausd',
40714078
'Testnet ThetaUSD',
4072-
18,
4079+
6,
40734080
UnderlyingAsset['ttempo:thetausd']
40744081
),
40754082
];

modules/statics/src/coins/ofcErc20Coins.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5585,6 +5585,13 @@ export const tOfcErc20Coins = [
55855585
true,
55865586
'tmorpheth'
55875587
),
5588+
ofcerc20(
5589+
'3ea8b443-c2a7-4a3c-8b58-1a8a36aa4da8',
5590+
'ofcseievm:wsei',
5591+
'Wrapped SEI',
5592+
18,
5593+
underlyingAssetForSymbol('seievm:wsei')
5594+
),
55885595
tofcerc20(
55895596
'8c64311b-e288-4dd4-8f9f-25dad3418837',
55905597
'ofctmorpheth:usd1',

modules/statics/src/coins/polygonTokens.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,15 @@ export const polygonTokens = [
11611161
UnderlyingAsset['tpolygon:testcopm'],
11621162
POLYGON_TOKEN_FEATURES
11631163
),
1164+
tpolygonErc20(
1165+
'4563b882-fda0-4e5e-a1a5-608448f04384',
1166+
'tpolygon:copr3',
1167+
'Test COPR3',
1168+
18,
1169+
'0xb9200ddb57ef5c59fa0ef055668271aec2549588',
1170+
UnderlyingAsset['tpolygon:copr3'],
1171+
POLYGON_TOKEN_FEATURES
1172+
),
11641173
tpolygonErc20(
11651174
'9da1d62e-2220-4974-a9d9-191c34dfda4e',
11661175
'tpolygon:link',

0 commit comments

Comments
 (0)