-
Notifications
You must be signed in to change notification settings - Fork 12
/
keys.go
55 lines (45 loc) · 1.57 KB
/
keys.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
package crosschain
import (
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/functionx/fx-core/v6/contract"
fxtypes "github.com/functionx/fx-core/v6/types"
)
const (
FIP20CrossChainGas = 40_000 // 80000 - 160000
CrossChainGas = 40_000 // 70000 - 155000
CancelSendToExternalGas = 30_000 // 70000 - 126000
IncreaseBridgeFeeGas = 40_000 // 70000 - 140000
BridgeCoinAmountFeeGas = 10_000 // 9000
FIP20CrossChainMethodName = "fip20CrossChain"
CrossChainMethodName = "crossChain"
CancelSendToExternalMethodName = "cancelSendToExternal"
IncreaseBridgeFeeMethodName = "increaseBridgeFee"
BridgeCoinAmountMethodName = "bridgeCoinAmount"
CrossChainEventName = "CrossChain"
CancelSendToExternalEventName = "CancelSendToExternal"
IncreaseBridgeFeeEventName = "IncreaseBridgeFee"
)
const (
// EventTypeRelayTransferCrossChain
// Deprecated
EventTypeRelayTransferCrossChain = "relay_transfer_cross_chain"
// EventTypeCrossChain new cross chain event type
EventTypeCrossChain = "cross_chain"
AttributeKeyDenom = "coin"
AttributeKeyTokenAddress = "token_address"
AttributeKeyFrom = "from"
AttributeKeyRecipient = "recipient"
AttributeKeyTarget = "target"
AttributeKeyMemo = "memo"
)
var (
crossChainAddress = common.HexToAddress(fxtypes.CrossChainAddress)
crossChainABI = fxtypes.MustABIJson(contract.ICrossChainMetaData.ABI)
)
func GetAddress() common.Address {
return crossChainAddress
}
func GetABI() abi.ABI {
return crossChainABI
}