forked from bandprotocol/go-owasm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
51 lines (38 loc) · 809 Bytes
/
main.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
package main
import (
"fmt"
)
type Env struct{}
func (e *Env) GetCalldata() []byte {
return []byte("switza")
}
func (e *Env) SetReturnData(data []byte) {
fmt.Println("set", string(data))
}
func (e *Env) GetAskCount() int64 {
return 10000
}
func (e *Env) GetMinCount() int64 {
return 20000
}
func (e *Env) GetPrepareTime() int64 {
return 1623403856
}
func (e *Env) GetExecuteTime() int64 {
return 1623403868
}
func (e *Env) GetAnsCount() int64 {
return 30000
}
func (e *Env) AskExternalData(eid int64, did int64, data []byte) {
fmt.Println("asked", eid, did, string(data))
}
func (e *Env) GetExternalDataStatus(eid int64, vid int64) int64 {
return 42
}
func (e *Env) GetExternalData(eid int64, vid int64) []byte {
return []byte("switez")
}
func main() {
fmt.Println("Hello, World!")
}