Skip to content

Commit 7dac34e

Browse files
drew-bitgoclaude
andcommitted
feat(statics,sdk-core): index 12 new fiat currencies
Add CAD, AUD, HKD, CHF, SEK, NOK, JPY, CNY, NZD, IDR, KRW, ZAR to: - fiatCoins config array in sdk-core (12 entries) - UnderlyingAsset enum (12 entries) - allCoinsAndTokens fiat() entries (24: 12 mainnet + 12 testnet) - ofcCoins ofc/tofc entries (12 mainnet + 12 testnet) JPY and KRW use decimalPlaces=0; all others use 2. 3 testnet OFC entries use ofct:{code} naming (ofct:cad, ofct:aud, ofct:hkd) to avoid collisions with existing ERC20 tokens (TrueCAD, TrueAUD, TrueHKD). FIAT-311 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e9657f1 commit 7dac34e

4 files changed

Lines changed: 270 additions & 0 deletions

File tree

modules/sdk-core/src/coins/fiat.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,23 @@ export class Fiat extends BaseCoin {
9494
*/
9595
export const fiatCoins: FiatCoinConfig[] = [
9696
{ chain: 'fiataed', fullName: 'United Arab Emirates Dirham', baseFactor: 1e2 },
97+
{ chain: 'fiataud', fullName: 'Australian Dollar', baseFactor: 1e2 },
98+
{ chain: 'fiatcad', fullName: 'Canadian Dollar', baseFactor: 1e2 },
99+
{ chain: 'fiatchf', fullName: 'Swiss Franc', baseFactor: 1e2 },
100+
{ chain: 'fiatcny', fullName: 'Chinese Yuan', baseFactor: 1e2 },
97101
{ chain: 'fiateur', fullName: 'European Union Euro', baseFactor: 1e2 },
98102
{ chain: 'fiatgbp', fullName: 'British Pound Sterling', baseFactor: 1e2 },
103+
{ chain: 'fiathkd', fullName: 'Hong Kong Dollar', baseFactor: 1e2 },
104+
{ chain: 'fiatidr', fullName: 'Indonesian Rupiah', baseFactor: 1e2 },
99105
{ chain: 'fiatinr', fullName: 'Indian Rupee', baseFactor: 1e2 },
106+
{ chain: 'fiatjpy', fullName: 'Japanese Yen', baseFactor: 1 },
107+
{ chain: 'fiatkrw', fullName: 'South Korean Won', baseFactor: 1 },
108+
{ chain: 'fiatnok', fullName: 'Norwegian Krone', baseFactor: 1e2 },
109+
{ chain: 'fiatnzd', fullName: 'New Zealand Dollar', baseFactor: 1e2 },
110+
{ chain: 'fiatsek', fullName: 'Swedish Krona', baseFactor: 1e2 },
100111
{ chain: 'fiatsgd', fullName: 'Singapore Dollar', baseFactor: 1e2 },
101112
{ chain: 'fiatusd', fullName: 'USD Dollar', baseFactor: 1e2 },
113+
{ chain: 'fiatzar', fullName: 'South African Rand', baseFactor: 1e2 },
102114
];
103115

104116
/**

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7439,4 +7439,168 @@ export const allCoinsAndTokens = [
74397439
2,
74407440
UnderlyingAsset.SGD
74417441
),
7442+
fiat(
7443+
'41c0f86b-f4ea-4061-895f-feb1bfc93f3c',
7444+
'fiatcad',
7445+
'Canadian Dollar',
7446+
Networks.main.fiat,
7447+
2,
7448+
UnderlyingAsset.CAD
7449+
),
7450+
fiat(
7451+
'5cfd5822-10a5-4bb2-9956-358312bc9331',
7452+
'tfiatcad',
7453+
'Testnet Canadian Dollar',
7454+
Networks.test.fiat,
7455+
2,
7456+
UnderlyingAsset.CAD
7457+
),
7458+
fiat(
7459+
'f8b6cd66-0712-4eb2-aa51-7d5bdd1d580b',
7460+
'fiataud',
7461+
'Australian Dollar',
7462+
Networks.main.fiat,
7463+
2,
7464+
UnderlyingAsset.AUD
7465+
),
7466+
fiat(
7467+
'950d1c1b-867c-4e2a-84ad-18c6f16ec7b9',
7468+
'tfiataud',
7469+
'Testnet Australian Dollar',
7470+
Networks.test.fiat,
7471+
2,
7472+
UnderlyingAsset.AUD
7473+
),
7474+
fiat(
7475+
'2b1be174-96a6-4b28-b575-83c5c1b8adb6',
7476+
'fiathkd',
7477+
'Hong Kong Dollar',
7478+
Networks.main.fiat,
7479+
2,
7480+
UnderlyingAsset.HKD
7481+
),
7482+
fiat(
7483+
'e25c3d93-9ba4-451e-99f2-fc4d1a33b41d',
7484+
'tfiathkd',
7485+
'Testnet Hong Kong Dollar',
7486+
Networks.test.fiat,
7487+
2,
7488+
UnderlyingAsset.HKD
7489+
),
7490+
fiat('772d6bed-3387-4c12-9d91-6df48c3bcdca', 'fiatchf', 'Swiss Franc', Networks.main.fiat, 2, UnderlyingAsset.CHF),
7491+
fiat(
7492+
'49c021e5-02bf-4055-a927-a36f215c4d7d',
7493+
'tfiatchf',
7494+
'Testnet Swiss Franc',
7495+
Networks.test.fiat,
7496+
2,
7497+
UnderlyingAsset.CHF
7498+
),
7499+
fiat('593225d6-5451-493d-95ac-86aca26e219b', 'fiatsek', 'Swedish Krona', Networks.main.fiat, 2, UnderlyingAsset.SEK),
7500+
fiat(
7501+
'57152223-6f41-458f-857d-0550f93ecfea',
7502+
'tfiatsek',
7503+
'Testnet Swedish Krona',
7504+
Networks.test.fiat,
7505+
2,
7506+
UnderlyingAsset.SEK
7507+
),
7508+
fiat(
7509+
'e6f0b44c-ae01-4fd5-bd0b-2533d0567515',
7510+
'fiatnok',
7511+
'Norwegian Krone',
7512+
Networks.main.fiat,
7513+
2,
7514+
UnderlyingAsset.NOK
7515+
),
7516+
fiat(
7517+
'94313f1c-aa50-48de-a837-33489f57cfbe',
7518+
'tfiatnok',
7519+
'Testnet Norwegian Krone',
7520+
Networks.test.fiat,
7521+
2,
7522+
UnderlyingAsset.NOK
7523+
),
7524+
fiat('475f2d64-ed05-46ac-a4b2-0864868cc94a', 'fiatjpy', 'Japanese Yen', Networks.main.fiat, 0, UnderlyingAsset.JPY),
7525+
fiat(
7526+
'323662dd-3e78-4c95-8df1-f65a822cedc0',
7527+
'tfiatjpy',
7528+
'Testnet Japanese Yen',
7529+
Networks.test.fiat,
7530+
0,
7531+
UnderlyingAsset.JPY
7532+
),
7533+
fiat('fd1f1f35-476d-4545-bbb5-e9284bb5081f', 'fiatcny', 'Chinese Yuan', Networks.main.fiat, 2, UnderlyingAsset.CNY),
7534+
fiat(
7535+
'594749b7-753a-4c02-a61c-c8af8b85cd90',
7536+
'tfiatcny',
7537+
'Testnet Chinese Yuan',
7538+
Networks.test.fiat,
7539+
2,
7540+
UnderlyingAsset.CNY
7541+
),
7542+
fiat(
7543+
'5fd4db7f-76b4-4132-a487-f3754a24cc2d',
7544+
'fiatnzd',
7545+
'New Zealand Dollar',
7546+
Networks.main.fiat,
7547+
2,
7548+
UnderlyingAsset.NZD
7549+
),
7550+
fiat(
7551+
'14260efb-d3a9-4f99-969a-132bcedd57ee',
7552+
'tfiatnzd',
7553+
'Testnet New Zealand Dollar',
7554+
Networks.test.fiat,
7555+
2,
7556+
UnderlyingAsset.NZD
7557+
),
7558+
fiat(
7559+
'37a0d713-3b34-431e-9828-bb52e9080cca',
7560+
'fiatidr',
7561+
'Indonesian Rupiah',
7562+
Networks.main.fiat,
7563+
2,
7564+
UnderlyingAsset.IDR
7565+
),
7566+
fiat(
7567+
'88476628-3ca3-4272-9f58-f212379de00d',
7568+
'tfiatidr',
7569+
'Testnet Indonesian Rupiah',
7570+
Networks.test.fiat,
7571+
2,
7572+
UnderlyingAsset.IDR
7573+
),
7574+
fiat(
7575+
'0ca680e0-0a70-4da0-92f4-fab61630b646',
7576+
'fiatkrw',
7577+
'South Korean Won',
7578+
Networks.main.fiat,
7579+
0,
7580+
UnderlyingAsset.KRW
7581+
),
7582+
fiat(
7583+
'41d3b521-59f6-4124-a5d9-959a568eb7f3',
7584+
'tfiatkrw',
7585+
'Testnet South Korean Won',
7586+
Networks.test.fiat,
7587+
0,
7588+
UnderlyingAsset.KRW
7589+
),
7590+
fiat(
7591+
'fc46fdc3-7783-4ebc-a28e-284731972d87',
7592+
'fiatzar',
7593+
'South African Rand',
7594+
Networks.main.fiat,
7595+
2,
7596+
UnderlyingAsset.ZAR
7597+
),
7598+
fiat(
7599+
'ce11127c-e698-41de-b66a-9639fb015f0c',
7600+
'tfiatzar',
7601+
'Testnet South African Rand',
7602+
Networks.test.fiat,
7603+
2,
7604+
UnderlyingAsset.ZAR
7605+
),
74427606
];

modules/statics/src/base.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3787,11 +3787,23 @@ export enum UnderlyingAsset {
37873787

37883788
// fiats
37893789
AED = 'aed',
3790+
AUD = 'aud',
3791+
CAD = 'cad',
3792+
CHF = 'chf',
3793+
CNY = 'cny',
37903794
EUR = 'eur',
37913795
GBP = 'gbp',
3796+
HKD = 'hkd',
3797+
IDR = 'idr',
37923798
INR = 'inr',
3799+
JPY = 'jpy',
3800+
KRW = 'krw',
3801+
NOK = 'nok',
3802+
NZD = 'nzd',
3803+
SEK = 'sek',
37933804
SGD = 'sgd',
37943805
USD = 'usd',
3806+
ZAR = 'zar',
37953807
}
37963808

37973809
/**

modules/statics/src/coins/ofcCoins.ts

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ export const ofcCoins = [
7070
UnderlyingAsset.AED,
7171
CoinKind.FIAT
7272
),
73+
ofc('9b4735da-870e-4e44-b7fa-3cc497fadd54', 'ofccad', 'Canadian Dollar', 2, UnderlyingAsset.CAD, CoinKind.FIAT),
74+
ofc('29a4cd8c-c494-4e9b-888e-9e931222b77a', 'ofcaud', 'Australian Dollar', 2, UnderlyingAsset.AUD, CoinKind.FIAT),
75+
ofc('f9d13abf-dc53-4f02-852e-a5b443795378', 'ofchkd', 'Hong Kong Dollar', 2, UnderlyingAsset.HKD, CoinKind.FIAT),
76+
ofc('afae9933-921b-4461-8d79-146f69def709', 'ofcchf', 'Swiss Franc', 2, UnderlyingAsset.CHF, CoinKind.FIAT),
77+
ofc('a25d6967-75d8-4e28-8e9c-fcb58a145aea', 'ofcsek', 'Swedish Krona', 2, UnderlyingAsset.SEK, CoinKind.FIAT),
78+
ofc('6968423c-befb-42a1-9dbb-629be705fad4', 'ofcnok', 'Norwegian Krone', 2, UnderlyingAsset.NOK, CoinKind.FIAT),
79+
ofc('f4f2c3b2-f9b3-4f4b-9e34-dd4a31e66d36', 'ofcjpy', 'Japanese Yen', 0, UnderlyingAsset.JPY, CoinKind.FIAT),
80+
ofc('f6cbeb79-9483-4d29-b1b1-98e4d09f3e70', 'ofccny', 'Chinese Yuan', 2, UnderlyingAsset.CNY, CoinKind.FIAT),
81+
ofc('7eff0f3d-417c-458a-aba4-71df7bf1bee1', 'ofcnzd', 'New Zealand Dollar', 2, UnderlyingAsset.NZD, CoinKind.FIAT),
82+
ofc('9aa35674-3576-4e4e-ae17-34c656c66306', 'ofcidr', 'Indonesian Rupiah', 2, UnderlyingAsset.IDR, CoinKind.FIAT),
83+
ofc('e3d9cbfc-ec00-4b92-8566-85b9cd3a5194', 'ofckrw', 'South Korean Won', 0, UnderlyingAsset.KRW, CoinKind.FIAT),
84+
ofc('0bdf4c58-dd2e-4f6a-8808-0e38c117eabc', 'ofczar', 'South African Rand', 2, UnderlyingAsset.ZAR, CoinKind.FIAT),
7385
ofc(
7486
'71c2203c-59ba-45ba-9280-ec94b9c4e44f',
7587
'ofcavaxc',
@@ -675,6 +687,76 @@ export const ofcCoins = [
675687
CoinKind.FIAT
676688
),
677689
tofc('874e72f2-dab0-4d99-825c-f94c94cece65', 'ofctinr', 'Test Indian Rupee', 2, UnderlyingAsset.INR, CoinKind.FIAT),
690+
// CAD, AUD, HKD use ofct:{code} naming because ofctcad/ofctaud/ofcthkd
691+
// collide with existing ERC20 tokens (TrueCAD, TrueAUD, TrueHKD)
692+
tofc(
693+
'803bc9a5-02e0-4ab1-9fc8-2d392de06c33',
694+
'ofct:cad',
695+
'Test Canadian Dollar',
696+
2,
697+
UnderlyingAsset.CAD,
698+
CoinKind.FIAT
699+
),
700+
tofc(
701+
'76e0d3ab-3584-4a80-a531-9f54c49a11e8',
702+
'ofct:aud',
703+
'Test Australian Dollar',
704+
2,
705+
UnderlyingAsset.AUD,
706+
CoinKind.FIAT
707+
),
708+
tofc(
709+
'99e784a5-375b-44c2-be8f-7005be74b6d7',
710+
'ofct:hkd',
711+
'Test Hong Kong Dollar',
712+
2,
713+
UnderlyingAsset.HKD,
714+
CoinKind.FIAT
715+
),
716+
tofc('9fa02b74-f030-4bc4-bc4b-6ebd491ff09a', 'ofctchf', 'Test Swiss Franc', 2, UnderlyingAsset.CHF, CoinKind.FIAT),
717+
tofc('3a2e71c3-c9fa-4562-b865-e7c9d6cc2358', 'ofctsek', 'Test Swedish Krona', 2, UnderlyingAsset.SEK, CoinKind.FIAT),
718+
tofc(
719+
'21ec70e5-94a3-4d39-9d6f-793a340ae238',
720+
'ofctnok',
721+
'Test Norwegian Krone',
722+
2,
723+
UnderlyingAsset.NOK,
724+
CoinKind.FIAT
725+
),
726+
tofc('a2bc64e2-6e4d-49da-88a1-762437c43aaa', 'ofctjpy', 'Test Japanese Yen', 0, UnderlyingAsset.JPY, CoinKind.FIAT),
727+
tofc('d6b890a1-8ca6-409a-8c17-0ebef0a20487', 'ofctcny', 'Test Chinese Yuan', 2, UnderlyingAsset.CNY, CoinKind.FIAT),
728+
tofc(
729+
'c530a695-5815-44d6-8614-c3810fc91a83',
730+
'ofctnzd',
731+
'Test New Zealand Dollar',
732+
2,
733+
UnderlyingAsset.NZD,
734+
CoinKind.FIAT
735+
),
736+
tofc(
737+
'45080307-fd0d-43ac-bb74-5453c304e37c',
738+
'ofctidr',
739+
'Test Indonesian Rupiah',
740+
2,
741+
UnderlyingAsset.IDR,
742+
CoinKind.FIAT
743+
),
744+
tofc(
745+
'6c63c80a-889d-4b6b-b6ca-d1e87d18978d',
746+
'ofctkrw',
747+
'Test South Korean Won',
748+
0,
749+
UnderlyingAsset.KRW,
750+
CoinKind.FIAT
751+
),
752+
tofc(
753+
'53b7e168-01b9-4439-8c46-c82267efd494',
754+
'ofctzar',
755+
'Test South African Rand',
756+
2,
757+
UnderlyingAsset.ZAR,
758+
CoinKind.FIAT
759+
),
678760
tofc('e5e9dedb-4d72-4a44-a84c-32f46d275bdc', 'ofctcspr', 'Test Casper', 9, UnderlyingAsset.CSPR, CoinKind.CRYPTO),
679761
tofc('b84e3f27-e521-4093-9616-fc92ba352cd9', 'ofctnear', 'Test Near', 24, UnderlyingAsset.NEAR, CoinKind.CRYPTO),
680762
tofc('457d1c4e-5bf7-442a-90c9-dfd590f30925', 'ofctbtc', 'Test Bitcoin', 8, UnderlyingAsset.BTC, CoinKind.CRYPTO),

0 commit comments

Comments
 (0)