|
|
@@ -12,16 +12,19 @@ type Log interface {
|
|
|
Address() []byte
|
|
|
Topics() [][]byte
|
|
|
Data() []byte
|
|
|
+
|
|
|
+ Number() uint64
|
|
|
}
|
|
|
|
|
|
type StateLog struct {
|
|
|
address []byte
|
|
|
topics [][]byte
|
|
|
data []byte
|
|
|
+ number uint64
|
|
|
}
|
|
|
|
|
|
-func NewLog(address []byte, topics [][]byte, data []byte) *StateLog {
|
|
|
- return &StateLog{address, topics, data}
|
|
|
+func NewLog(address []byte, topics [][]byte, data []byte, number uint64) *StateLog {
|
|
|
+ return &StateLog{address, topics, data, number}
|
|
|
}
|
|
|
|
|
|
func (self *StateLog) Address() []byte {
|
|
|
@@ -36,6 +39,10 @@ func (self *StateLog) Data() []byte {
|
|
|
return self.data
|
|
|
}
|
|
|
|
|
|
+func (self *StateLog) Number() uint64 {
|
|
|
+ return self.number
|
|
|
+}
|
|
|
+
|
|
|
func NewLogFromValue(decoder *ethutil.Value) *StateLog {
|
|
|
log := &StateLog{
|
|
|
address: decoder.Get(0).Bytes(),
|