aboutsummaryrefslogtreecommitdiffstats
path: root/vm/environment.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-04 19:35:23 +0800
committerobscuren <geffobscura@gmail.com>2014-12-04 19:35:23 +0800
commit3043b233ea4df9b630638d75f3589b94653ccfa9 (patch)
tree8e426de17ebd46bcbd830abb78af58dd4035206c /vm/environment.go
parentbff5999efaaa0aa7a2b6518b58d489ad4be9e4ff (diff)
downloadgo-tangerine-3043b233ea4df9b630638d75f3589b94653ccfa9.tar.gz
go-tangerine-3043b233ea4df9b630638d75f3589b94653ccfa9.tar.zst
go-tangerine-3043b233ea4df9b630638d75f3589b94653ccfa9.zip
Log is now interface
Diffstat (limited to 'vm/environment.go')
-rw-r--r--vm/environment.go24
1 files changed, 23 insertions, 1 deletions
diff --git a/vm/environment.go b/vm/environment.go
index 9e129b6ee..d77fb1419 100644
--- a/vm/environment.go
+++ b/vm/environment.go
@@ -20,7 +20,7 @@ type Environment interface {
BlockHash() []byte
GasLimit() *big.Int
Transfer(from, to Account, amount *big.Int) error
- AddLog(*state.Log)
+ AddLog(state.Log)
Depth() int
SetDepth(i int)
@@ -52,3 +52,25 @@ func Transfer(from, to Account, amount *big.Int) error {
return nil
}
+
+type Log struct {
+ address []byte
+ topics [][]byte
+ data []byte
+}
+
+func (self *Log) Address() []byte {
+ return self.address
+}
+
+func (self *Log) Topics() [][]byte {
+ return self.topics
+}
+
+func (self *Log) Data() []byte {
+ return self.data
+}
+
+func (self *Log) RlpData() interface{} {
+ return []interface{}{self.address, ethutil.ByteSliceToInterface(self.topics), self.data}
+}