Environment
Env
object allows retrieval of runtime environment information. The following methods are supported:
Timestamp() -> I64
ClusterID() -> String
Interaction
The data about the current interaction is available through Ixn
object. The following methods are supported:
FuelLimit() -> U256
fuel limit for the current interaction
FuelPrice() -> U256
fuel price for the current interaction
Kind() -> String
interaction kind
Current fuel level using fuel()
Current fuel level can be retrieved using fuel() → U256
function.
coco EnvIxn
endpoint invokable TS() -> (ts I64):
ts = Env.Timestamp()
endpoint invokable CID() -> (cid String):
cid = Env.ClusterID()
endpoint invokable FL() -> (limit U256):
limit = Ixn.FuelLimit()
endpoint invokable FP() -> (price U256):
price = Ixn.FuelPrice()
endpoint invokable Kind() -> (kind String):
kind = Ixn.Kind()
endpoint invokable Fuel() -> (level U256):
level = fuel()