/
events.go
50 lines (43 loc) · 1.69 KB
/
events.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
// Copyright 2022 Evmos Foundation
// This file is part of the Evmos Network packages.
//
// Evmos is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The Evmos packages are distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the Evmos packages. If not, see https://github.com/evmos/evmos/blob/main/LICENSE
package types
import (
"math/big"
"github.com/ethereum/go-ethereum/common"
)
// erc20 events
const (
EventTypeTokenLock = "token_lock"
EventTypeTokenUnlock = "token_unlock"
EventTypeMint = "mint"
EventTypeConvertCoin = "convert_coin"
EventTypeConvertERC20 = "convert_erc20"
EventTypeBurn = "burn"
EventTypeRegisterCoin = "register_coin"
EventTypeRegisterERC20 = "register_erc20"
EventTypeToggleTokenConversion = "toggle_token_conversion" // #nosec
AttributeKeyCosmosCoin = "cosmos_coin"
AttributeKeyERC20Token = "erc20_token" // #nosec
AttributeKeyReceiver = "receiver"
// ERC20EventTransfer defines the transfer event for ERC20
ERC20EventTransfer = "Transfer"
)
// LogTransfer Event type for Transfer(address from, address to, uint256 value)
type LogTransfer struct {
From common.Address
To common.Address
Tokens *big.Int
}