-
Notifications
You must be signed in to change notification settings - Fork 7
/
fvm.go
61 lines (51 loc) · 1.31 KB
/
fvm.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
package ffi
import (
"github.com/filecoin-project/filecoin-ffi/cgo"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/network"
"github.com/ipfs/go-cid"
)
type FVM struct{}
type FVMOpts struct {
FVMVersion uint64
Externs cgo.Externs
Epoch abi.ChainEpoch
Timestamp uint64
ChainID uint64
BaseFee abi.TokenAmount
BaseCircSupply abi.TokenAmount
NetworkVersion network.Version
StateBase cid.Cid
Manifest cid.Cid
Tracing bool
Debug bool
ActorRedirect cid.Cid
}
type ApplyRet struct {
Return []byte
ExitCode uint64
GasUsed int64
MinerPenalty abi.TokenAmount
MinerTip abi.TokenAmount
BaseFeeBurn abi.TokenAmount
OverEstimationBurn abi.TokenAmount
Refund abi.TokenAmount
GasRefund int64
GasBurned int64
ExecTraceBytes []byte
FailureInfo string
EventsRoot *cid.Cid
EventsBytes []byte
}
func CreateFVM(*FVMOpts) (*FVM, error) {
return &FVM{}, nil
}
func (*FVM) ApplyMessage(msgBytes []byte, chainLen uint) (*ApplyRet, error) {
return nil, nil
}
func (*FVM) ApplyImplicitMessage(msgBytes []byte) (*ApplyRet, error) {
return nil, nil
}
func (*FVM) Flush() (cid.Cid, error) {
return cid.Undef, nil
}