REPL-only functions
REPL-only functions are used to control environment settings and expected behavior when testing module code in the Pact REPL.
| Function | Description |
|---|---|
| begin‑tx | Begin a new transaction with an optional name. |
| commit‑tx | Commit the current transaction. |
| continue‑pact | Continue a previously-initiated multi-step transaction. |
| env‑chain‑data | Define chain information for transactions in the testing environment. |
| env‑data | Set transaction data for the testing environment |
| env‑enable‑repl‑natives | Control whether REPL native functions are allowed in module code. |
| env‑events | Retrieve any accumulated events. |
| env‑exec‑config | Query or set execution configuration information for the testing environment. |
| env‑gas | Query the current gas state or set it to a specific value. |
| env‑gaslimit | Set the environment gas limit to a specific value. |
| env‑gaslog | Enable gas logging for a block of code. |
| env‑gasmodel | Query or update the current gas model. |
| env‑hash | Set the current transaction hash. |
| env‑keys | Set the transaction signer keys (deprecated). |
| env‑milligas | Query the current gas state in units of one one thousandth of a gas unit. |
| env‑module‑admin | Acquire the module administrative rights for any module loaded in the REPL. |
| env‑namespace‑policy | Install a managed namespace policy. |
| env‑set‑debug‑flag | Set the Pact interpreter debug flags. |
| env‑set‑milligas | Set the current gas state to a specific value in units of one one thousandth of a gas unit. |
| env‑sigs | Set signature keys for signing transactions and granting capabilities. |
| env‑verifiers | Set transaction verifier names and capabilities. |
| expect‑failure | Evaluate an expression and succeed only if the expressions results in an error. |
| expect‑that | Evaluate an expression and succeed if the resulting value passes a predicate function. |
| expect | Evaluate an expression and verify that the result equals an expected value. |
| load | Load and evaluate a specified .pact or .repl file. |
| pact‑state | Inspect state from most recent defpact execution. |
| Convert a value into a string and print it to the REPL output. | |
| rollback‑tx | Roll back the current transaction. |
| sig-keyset | Build a keyset guard from keys present in message signatures. |
| test‑capability | Acquire or install the capability specified. |
| typecheck | Run the Pact static type checker on a module. |