-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathamoyInfo.ts
More file actions
135 lines (124 loc) · 3.32 KB
/
Copy pathamoyInfo.ts
File metadata and controls
135 lines (124 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
import { EdgeCurrencyInfo, EdgeTokenMap } from 'edge-core-js/types'
import { makeOuterPlugin } from '../../common/innerPlugin'
import { createEvmTokenId, makeMetaTokens } from '../../common/tokenHelpers'
import type { EthereumTools } from '../EthereumTools'
import {
asEthereumInfoPayload,
EthereumFees,
EthereumInfoPayload,
EthereumNetworkInfo
} from '../ethereumTypes'
import {
evmCustomFeeTemplate,
evmCustomTokenTemplate,
evmMemoOptions,
makeEvmDefaultSettings
} from './ethereumCommonInfo'
const builtinTokens: EdgeTokenMap = {}
const networkFees: EthereumFees = {
default: {
baseFee: undefined,
baseFeeMultiplier: undefined,
gasLimit: {
regularTransaction: '21000',
tokenTransaction: '300000',
minGasLimit: '21000'
},
gasPrice: {
lowFee: '30000000001',
standardFeeLow: '36000000000',
standardFeeHigh: '100000000000',
standardFeeLowAmount: '100000000000000000',
standardFeeHighAmount: '10000000000000000000',
highFee: '216000000000',
minGasPrice: '30000000000'
},
minPriorityFee: undefined
}
}
const networkInfo: EthereumNetworkInfo = {
addressQueryLookbackBlocks: 4, // 2 minutes
networkAdapterConfigs: [
{
type: 'rpc',
servers: [
'https://polygon-amoy.blockpi.network/v1/rpc/public',
'https://rpc.ankr.com/polygon_amoy',
'https://polygon-amoy-bor-rpc.publicnode.com',
'https://rpc-amoy.polygon.technology',
'https://polygon-amoy.drpc.org',
'https://api.tatum.io/v3/blockchain/node/polygon-amoy',
'https://lb.drpc.org/ogrpc?network=polygon-amoy&dkey={{drpcApiKey}}'
]
},
{
type: 'evmscan',
gastrackerSupport: true,
servers: ['https://api-amoy.polygonscan.com/v2/api'],
version: 2
}
],
uriNetworks: ['amoy'],
ercTokenStandard: 'ERC20',
chainParams: {
chainId: 80002,
name: 'Amoy Testnet'
},
supportsEIP1559: true,
hdPathCoinType: 966,
pluginMnemonicKeyName: 'amoyMnemonic',
pluginRegularKeyName: 'amoyKey',
evmGasStationUrl: null,
networkFees,
decoyAddressConfig: {
count: 5,
minTransactionCount: 10,
maxTransactionCount: 100
}
}
export const currencyInfo: EdgeCurrencyInfo = {
canReplaceByFee: true,
currencyCode: 'POL',
evmChainId: 80002,
customFeeTemplate: evmCustomFeeTemplate,
customTokenTemplate: evmCustomTokenTemplate,
chainDisplayName: 'Amoy Testnet',
assetDisplayName: 'Amoy Testnet',
memoOptions: evmMemoOptions,
pluginId: 'amoy',
walletType: 'wallet:amoy',
// Explorers:
addressExplorer: 'https://amoy.polygonscan.com/address/%s',
transactionExplorer: 'https://amoy.polygonscan.com/tx/%s',
denominations: [
{
name: 'POL',
multiplier: '1000000000000000000',
symbol: 'POL'
},
{
name: 'mPOL',
multiplier: '1000000000000000',
symbol: 'mPOL'
}
],
usesChangeServer: true,
// Deprecated:
defaultSettings: makeEvmDefaultSettings(networkInfo),
displayName: 'Amoy Testnet',
metaTokens: makeMetaTokens(builtinTokens)
}
export const amoy = makeOuterPlugin<
EthereumNetworkInfo,
EthereumTools,
EthereumInfoPayload
>({
builtinTokens,
currencyInfo,
asInfoPayload: asEthereumInfoPayload,
createTokenId: createEvmTokenId,
networkInfo,
async getInnerPlugin() {
return await import('../EthereumTools')
}
})