-
Notifications
You must be signed in to change notification settings - Fork 0
/
attestation.pb.go
119 lines (103 loc) · 4.02 KB
/
attestation.pb.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
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
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: gravity/v1/attestation.proto
package types
import (
fmt "fmt"
sdk "github.com/ci123chain/ci123chain/pkg/abci/types"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// ClaimType is the cosmos type of an event from the counterpart chain that can
// be handled
type ClaimType int32
const (
CLAIM_TYPE_UNSPECIFIED ClaimType = 0
CLAIM_TYPE_DEPOSIT ClaimType = 1
CLAIM_TYPE_DEPOSIT721 ClaimType = 2
CLAIM_TYPE_WITHDRAW ClaimType = 3
CLAIM_TYPE_ERC20_DEPLOYED ClaimType = 4
CLAIM_TYPE_ERC721_DEPLOYED ClaimType = 5
CLAIM_TYPE_LOGIC_CALL_EXECUTED ClaimType = 6
CLAIM_TYPE_VALSET_CONFIRM_NONCE ClaimType = 7
)
var ClaimType_name = map[int32]string{
0: "CLAIM_TYPE_UNSPECIFIED",
1: "CLAIM_TYPE_DEPOSIT",
2: "CLAIM_TYPE_DEPOSIT721",
3: "CLAIM_TYPE_WITHDRAW",
4: "CLAIM_TYPE_ERC20_DEPLOYED",
5: "CLAIM_TYPE_ERC721_DEPLOYED",
6: "CLAIM_TYPE_LOGIC_CALL_EXECUTED",
7: "CLAIM_TYPE_VALSET_CONFIRM_NONCE",
}
var ClaimType_value = map[string]int32{
"CLAIM_TYPE_UNSPECIFIED": 0,
"CLAIM_TYPE_DEPOSIT": 1,
"CLAIM_TYPE_DEPOSIT721": 2,
"CLAIM_TYPE_WITHDRAW": 3,
"CLAIM_TYPE_ERC20_DEPLOYED": 4,
"CLAIM_TYPE_ERC721_DEPLOYED": 5,
"CLAIM_TYPE_LOGIC_CALL_EXECUTED": 6,
"CLAIM_TYPE_VALSET_CONFIRM_NONCE": 7,
}
func (x ClaimType) String() string {
return proto.EnumName(ClaimType_name, int32(x))
}
// Attestation is an aggregate of `claims` that eventually becomes `observed` by
// all orchestrators
// EVENT_NONCE:
// EventNonce a nonce provided by the gravity contract that is unique per event fired
// These event nonces must be relayed in order. This is a correctness issue,
// if relaying out of order transaction replay attacks become possible
// OBSERVED:
// Observed indicates that >67% of validators have attested to the event,
// and that the event should be executed by the gravity state machine
//
// The actual content of the claims is passed in with the transaction making the claim
// and then passed through the call stack alongside the attestation while it is processed
// the key in which the attestation is stored is keyed on the exact details of the claim
// but there is no reason to store those exact details becuause the next message sender
// will kindly provide you with them.
type Attestation struct {
Observed bool `protobuf:"varint,1,opt,name=observed,proto3" json:"observed,omitempty"`
Votes []string `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"`
Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
Claim EthereumClaim `protobuf:"bytes,4,opt,name=claim,proto3" json:"claim"`
}
func (m *Attestation) GetVotes() []string {
if m != nil {
return m.Votes
}
return nil
}
func (m *Attestation) GetHeight() uint64 {
if m != nil {
return m.Height
}
return 0
}
func (m *Attestation) GetClaim() EthereumClaim {
if m != nil {
return m.Claim
}
return nil
}
// ERC20Token unique identifier for an Ethereum ERC20 token.
// CONTRACT:
// The contract address on ETH of the token, this could be a Cosmos
// originated token, if so it will be the ERC20 address of the representation
// (note: developers should look up the token symbol using the address on ETH to display for UI)
type ERC20Token struct {
Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"`
Amount sdk.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}