Skip to content

Commit 5ec3ddd

Browse files
Merge pull request #6912 from BitGo/WIN-7115
[Flow] add statics and configurations
2 parents a147441 + 35b76f9 commit 5ec3ddd

File tree

5 files changed

+66
-0
lines changed

5 files changed

+66
-0
lines changed

modules/sdk-core/src/bitgo/environments.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ const mainnetBase: EnvironmentTemplate = {
257257
baseeth: {
258258
baseUrl: 'https://api.etherscan.io/v2',
259259
},
260+
flow: {
261+
baseUrl: 'https://evm.flowscan.io/api',
262+
},
260263
},
261264
icpNodeUrl: 'https://ic0.app',
262265
worldExplorerBaseUrl: 'https://worldscan.org/',
@@ -382,6 +385,9 @@ const testnetBase: EnvironmentTemplate = {
382385
tbaseeth: {
383386
baseUrl: 'https://api.etherscan.io/v2',
384387
},
388+
flow: {
389+
baseUrl: 'https://evm-testnet.flowscan.io/api',
390+
},
385391
},
386392
stxNodeUrl: 'https://api.testnet.hiro.so',
387393
vetNodeUrl: 'https://rpc-testnet.vechain.energy',

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,42 @@ export const allCoinsAndTokens = [
19611961
POLYX_FEATURES,
19621962
KeyCurve.Ed25519
19631963
),
1964+
account(
1965+
'cf601b71-5ed5-4524-b545-d6d19051781f',
1966+
'flow',
1967+
'Flow',
1968+
Networks.main.flow,
1969+
18,
1970+
UnderlyingAsset.FLOW,
1971+
BaseUnit.ETH,
1972+
[
1973+
...EVM_FEATURES,
1974+
CoinFeature.SHARED_EVM_SIGNING,
1975+
CoinFeature.SHARED_EVM_SDK,
1976+
CoinFeature.EVM_COMPATIBLE_IMS,
1977+
CoinFeature.EVM_COMPATIBLE_UI,
1978+
CoinFeature.EVM_NON_BITGO_RECOVERY,
1979+
CoinFeature.EVM_UNSIGNED_SWEEP_RECOVERY,
1980+
]
1981+
),
1982+
account(
1983+
'29a233d0-6d60-4e1e-8f76-16712fee3bf5',
1984+
'tflow',
1985+
'Testnet Flow',
1986+
Networks.test.flow,
1987+
18,
1988+
UnderlyingAsset.FLOW,
1989+
BaseUnit.ETH,
1990+
[
1991+
...EVM_FEATURES,
1992+
CoinFeature.SHARED_EVM_SIGNING,
1993+
CoinFeature.SHARED_EVM_SDK,
1994+
CoinFeature.EVM_COMPATIBLE_IMS,
1995+
CoinFeature.EVM_COMPATIBLE_UI,
1996+
CoinFeature.EVM_NON_BITGO_RECOVERY,
1997+
CoinFeature.EVM_UNSIGNED_SWEEP_RECOVERY,
1998+
]
1999+
),
19642000
gasTankAccount(
19652001
'98071460-1488-4edd-857f-0899bc5eee4f',
19662002
'vet',

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export enum CoinFamily {
5454
EOS = 'eos',
5555
FETCHAI = 'fetchai',
5656
FIAT = 'fiat',
57+
FLOW = 'flow',
5758
FLR = 'flr',
5859
FLRP = 'flrp',
5960
HASH = 'hash', // Provenance
@@ -525,6 +526,7 @@ export enum UnderlyingAsset {
525526
EUROC = 'euroc',
526527
EURR = 'eurr',
527528
FETCHAI = 'fetchai',
529+
FLOW = 'flow',
528530
FLR = 'flr',
529531
FLRP = 'flrp',
530532
GTC = 'gtc',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,6 +1921,24 @@ class IotaTestnet extends Testnet implements AccountNetwork {
19211921
explorerUrl = 'https://explorer.iota.org/?network=testnet';
19221922
}
19231923

1924+
class Flow extends Mainnet implements EthereumNetwork {
1925+
name = 'Flow';
1926+
family = CoinFamily.FLOW;
1927+
explorerUrl = 'https://evm.flowscan.io/tx/';
1928+
accountExplorerUrl = 'https://evm.flowscan.io/address/';
1929+
chainId = 747;
1930+
nativeCoinOperationHashPrefix = '747';
1931+
}
1932+
1933+
class FlowTestnet extends Testnet implements EthereumNetwork {
1934+
name = 'FlowTestnet';
1935+
family = CoinFamily.FLOW;
1936+
explorerUrl = 'https://evm.flowscan.io/tx/';
1937+
accountExplorerUrl = 'https://evm-testnet.flowscan.io/address/';
1938+
chainId = 545;
1939+
nativeCoinOperationHashPrefix = '545';
1940+
}
1941+
19241942
export const Networks = {
19251943
main: {
19261944
ada: Object.freeze(new Ada()),
@@ -1957,6 +1975,7 @@ export const Networks = {
19571975
ethereumW: Object.freeze(new EthereumW()),
19581976
fiat: Object.freeze(new Fiat()),
19591977
fetchai: Object.freeze(new FetchAi()),
1978+
flow: Object.freeze(new Flow()),
19601979
flr: Object.freeze(new Flare()),
19611980
flrP: Object.freeze(new FlareP()),
19621981
hash: Object.freeze(new Hash()),
@@ -2048,6 +2067,7 @@ export const Networks = {
20482067
eos: Object.freeze(new EosTestnet()),
20492068
fiat: Object.freeze(new FiatTestnet()),
20502069
fetchai: Object.freeze(new FetchAiTestnet()),
2070+
flow: Object.freeze(new FlowTestnet()),
20512071
flr: Object.freeze(new FlareTestnet()),
20522072
flrP: Object.freeze(new FlarePTestnet()),
20532073
mon: Object.freeze(new MonadTestnet()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export const expectedColdFeatures = {
7070
'cronos',
7171
'dot',
7272
'fetchai',
73+
'flow',
7374
'flr',
7475
'hash',
7576
'icp',
@@ -122,6 +123,7 @@ export const expectedColdFeatures = {
122123
'tcronos',
123124
'tdot',
124125
'tfetchai',
126+
'tflow',
125127
'tflr',
126128
'tog',
127129
'tmon',

0 commit comments

Comments
 (0)