Skip to content

Commit 35b76f9

Browse files
feat: add statics and configuration for flow
TICKET: WIN-7115 TICKET: WIN-7115
1 parent c20245f commit 35b76f9

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
@@ -258,6 +258,9 @@ const mainnetBase: EnvironmentTemplate = {
258258
baseeth: {
259259
baseUrl: 'https://api.etherscan.io/v2',
260260
},
261+
flow: {
262+
baseUrl: 'https://evm.flowscan.io/api',
263+
},
261264
},
262265
icpNodeUrl: 'https://ic0.app',
263266
worldExplorerBaseUrl: 'https://worldscan.org/',
@@ -383,6 +386,9 @@ const testnetBase: EnvironmentTemplate = {
383386
tbaseeth: {
384387
baseUrl: 'https://api.etherscan.io/v2',
385388
},
389+
flow: {
390+
baseUrl: 'https://evm-testnet.flowscan.io/api',
391+
},
386392
},
387393
stxNodeUrl: 'https://api.testnet.hiro.so',
388394
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
@@ -1909,6 +1909,24 @@ class IotaTestnet extends Testnet implements AccountNetwork {
19091909
explorerUrl = 'https://explorer.iota.org/?network=testnet';
19101910
}
19111911

1912+
class Flow extends Mainnet implements EthereumNetwork {
1913+
name = 'Flow';
1914+
family = CoinFamily.FLOW;
1915+
explorerUrl = 'https://evm.flowscan.io/tx/';
1916+
accountExplorerUrl = 'https://evm.flowscan.io/address/';
1917+
chainId = 747;
1918+
nativeCoinOperationHashPrefix = '747';
1919+
}
1920+
1921+
class FlowTestnet extends Testnet implements EthereumNetwork {
1922+
name = 'FlowTestnet';
1923+
family = CoinFamily.FLOW;
1924+
explorerUrl = 'https://evm.flowscan.io/tx/';
1925+
accountExplorerUrl = 'https://evm-testnet.flowscan.io/address/';
1926+
chainId = 545;
1927+
nativeCoinOperationHashPrefix = '545';
1928+
}
1929+
19121930
export const Networks = {
19131931
main: {
19141932
ada: Object.freeze(new Ada()),
@@ -1945,6 +1963,7 @@ export const Networks = {
19451963
ethereumW: Object.freeze(new EthereumW()),
19461964
fiat: Object.freeze(new Fiat()),
19471965
fetchai: Object.freeze(new FetchAi()),
1966+
flow: Object.freeze(new Flow()),
19481967
flr: Object.freeze(new Flare()),
19491968
flrP: Object.freeze(new FlareP()),
19501969
hash: Object.freeze(new Hash()),
@@ -2036,6 +2055,7 @@ export const Networks = {
20362055
eos: Object.freeze(new EosTestnet()),
20372056
fiat: Object.freeze(new FiatTestnet()),
20382057
fetchai: Object.freeze(new FetchAiTestnet()),
2058+
flow: Object.freeze(new FlowTestnet()),
20392059
flr: Object.freeze(new FlareTestnet()),
20402060
flrP: Object.freeze(new FlarePTestnet()),
20412061
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)