-
Notifications
You must be signed in to change notification settings - Fork 4
/
context.go
41 lines (36 loc) · 973 Bytes
/
context.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
package types
import (
"github.com/filecoin-project/go-state-types/abi"
)
type SendFlags = uint64
const ReadonlyFlag = 0b00000001
type NetworkContext struct {
// The current epoch.
Epoch abi.ChainEpoch
// The current time (seconds since the unix epoch).
Timestamp uint64
// The current base-fee.
BaseFee abi.TokenAmount
// The Chain ID of the network.
ChainId uint64
// The network version.
NetworkVersion uint32
}
type MessageContext struct {
// The current call's origin actor ID.
Origin abi.ActorID
// The nonce from the explicit message.
Nonce uint64
// The caller's actor ID.
Caller abi.ActorID
// The receiver's actor ID (i.e. ourselves).
Receiver abi.ActorID
// The method number from the message.
MethodNumber abi.MethodNum
// The value that was received.
ValueReceived abi.TokenAmount
// The current gas premium
GasPremium abi.TokenAmount
// Flags pertaining to the currently executing actor's invocation context.
Flags SendFlags
}