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
Address(Ixn) → Address
interaction address
Current fuel level using fuel()
Current fuel level can be retrieved using fuel() → U256
function.
coco EnvIxn
endpoint invoke TS() -> (ts U64):
ts = Env.Timestamp()
endpoint invoke CID() -> (cid String):
cid = Env.ClusterID()
endpoint invoke FL() -> (limit U256):
limit = Ixn.FuelLimit()
endpoint invoke FP() -> (price U256):
price = Ixn.FuelPrice()
endpoint invoke Kind() -> (kind String):
kind = Ixn.Kind()
endpoint invoke Fuel() -> (level U256):
level = fuel()
endpoint invoke IxnHash() -> (addr Address):
addr = Address(Ixn)