/
constants.go
65 lines (55 loc) · 1.9 KB
/
constants.go
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
package services
var (
// Versions info to be injected on build time
RosettaSDKVersion = "Unknown"
LotusVersion = "Unknown"
GitRevision = "Unknown"
// ServerPort to be injected on build time
RosettaServerPort = "8080"
// Other configs
RetryConnectAttempts = "1000000"
// Network name (read from api in main)
NetworkName = ""
)
const (
// Network
BlockChainName = "Filecoin"
// Currency
CurrencySymbol = "FIL"
CurrencyDecimals = 18
// Operation status
OperationStatusOk = "Ok"
OperationStatusFailed = "Fail"
// Account
LockedBalanceStr = "LockedBalance"
SpendableBalanceStr = "SpendableBalance"
VestingScheduleStr = "VestingSchedule"
LockedFundsKey = "LockedFunds"
VestingStartEpochKey = "StartEpoch"
VestingUnlockDurationKey = "UnlockDuration"
VestingInitialBalanceKey = "InitialBalance"
// Misc
ProxyLoggerName = "rosetta-filecoin-proxy"
)
// Supported operations
var SupportedOperations = map[string]bool{
"Send": true, // Common
"Fee": true, // Common
"Exec": true, // MethodsInit
"SwapSigner": true, // MethodsMultisig
"Propose": true, // MethodsMultisig
"Approve": true, // MethodsMultisig
"Cancel": true, // MethodsMultisig
"AwardBlockReward": true, // MethodsReward
"OnDeferredCronEvent": true, // MethodsMiner
"PreCommitSector": true, // MethodsMiner
"ProveCommitSector": true, // MethodsMiner
"SubmitWindowedPoSt": true, // MethodsMiner
"ApplyRewards": true, // MethodsMiner
"AddBalance": true, // MethodsMarket
"RepayDebt": true, // MethodsMiner
"InvokeContract": true, // MethodsEVM
"InvokeContractDelegate": true, // MethodsEVM
"EVM_CALL": true, // MethodsEVM
"unknown": true, // For all other kinds of transactions
}