package tezos-protocol-012-Psithaca
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-012-Psithaca.raw/Tezos_raw_protocol_012_Psithaca/Contract_storage/index.html
Module Tezos_raw_protocol_012_Psithaca.Contract_storageSource
type Tezos_protocol_environment_012_Psithaca.Error_monad.error += | Balance_too_low of Contract_repr.contract * Tez_repr.t * Tez_repr.t| Counter_in_the_past of Contract_repr.contract * Tezos_protocol_environment_012_Psithaca.Z.t * Tezos_protocol_environment_012_Psithaca.Z.t| Counter_in_the_future of Contract_repr.contract * Tezos_protocol_environment_012_Psithaca.Z.t * Tezos_protocol_environment_012_Psithaca.Z.t| Non_existing_contract of Contract_repr.contract| Empty_implicit_contract of Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t| Empty_implicit_delegated_contract of Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t| Inconsistent_public_key of Tezos_protocol_environment_012_Psithaca.Signature.Public_key.t * Tezos_protocol_environment_012_Psithaca.Signature.Public_key.t| Failure of string
val allocated :
Raw_context.t ->
Contract_repr.t ->
bool Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tallocated ctxt contract returns true if and only if the contract is stored in Storage.Contract.Balance.
val exists :
Raw_context.t ->
Contract_repr.t ->
bool Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.texists ctxt contract returns true if and only if either the contract is originated or it is (implicit and) "allocated".
val must_exist :
Raw_context.t ->
Contract_repr.t ->
unit Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tmust_exist ctxt contract fails with the Non_existing_contract error if exists ctxt contract returns false. Even though this function is gas-free, it is always called in a context where some gas consumption is guaranteed whenever necessary. The first context is that of a transfer operation, and in that case the base cost of a manager operation (Micheclson_v1_gas.Cost_of.manager_operation) is consumed. The second context is that of an activation operation, and in that case no gas needs to be consumed since that operation is not a manager operation.
val must_be_allocated :
Raw_context.t ->
Contract_repr.t ->
unit Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tmust_be_allocated ctxt contract fails when the contract is not allocated. It fails with Non_existing_contract if the contract is originated, and it fails with Empty_implicit_contract if the contract is implicit.
val list :
Raw_context.t ->
Contract_repr.t list Tezos_protocol_environment_012_Psithaca.Lwt.tval get_balance_carbonated :
Raw_context.t ->
Contract_repr.t ->
(Raw_context.t * Tez_repr.t)
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval get_script_code :
Raw_context.t ->
Contract_repr.t ->
(Raw_context.t * Script_repr.lazy_expr option)
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval update_script_storage :
Raw_context.t ->
Contract_repr.t ->
Script_repr.expr ->
Lazy_storage_diff.diffs option ->
Raw_context.t Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval credit_only_call_from_token :
Raw_context.t ->
Contract_repr.t ->
Tez_repr.t ->
Raw_context.t Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval spend_only_call_from_token :
Raw_context.t ->
Contract_repr.t ->
Tez_repr.t ->
Raw_context.t Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval raw_originate :
Raw_context.t ->
prepaid_bootstrap_storage:bool ->
Contract_repr.t ->
script:(Script_repr.t * Lazy_storage_diff.diffs option) ->
Raw_context.t Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.traw_originate ctxt ~prepaid_bootstrap_storage contract ~script originates the contract parameter. The storage space allocated by this origination is considered to be free of charge or to have been already paid for by the user, if and only if prepaid_bootstrap_storage is true. In particular, the amount of space allocated by this origination will be part of the consumed space to pay for returned by the next call to Fees_storage.record_paid_storage_space ctxt contract, if and only if prepaid_bootstrap_storage is false.
val fresh_contract_from_current_nonce :
Raw_context.t ->
(Raw_context.t * Contract_repr.t)
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresultval originated_from_current_nonce :
since:Raw_context.t ->
until:Raw_context.t ->
Contract_repr.t list
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval set_paid_storage_space_and_return_fees_to_pay :
Raw_context.t ->
Contract_repr.t ->
Tezos_protocol_environment_012_Psithaca.Z.t ->
(Tezos_protocol_environment_012_Psithaca.Z.t * Raw_context.t)
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tval increase_balance_only_call_from_token :
Raw_context.t ->
Contract_repr.t ->
Tez_repr.t ->
Raw_context.t Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tIncreases the balance of a contract. Calling this function directly may break important invariants. Consider calling credit instead.
val decrease_balance_only_call_from_token :
Raw_context.t ->
Contract_repr.t ->
Tez_repr.t ->
Raw_context.t Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tDecreases the balance of a contract. Calling this function directly may break important invariants. Consider calling spend instead.