Files
bitburner-src/markdown/bitburner.codingcontract.createdummycontract.md

81 lines
1.2 KiB
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CodingContract](./bitburner.codingcontract.md) &gt; [createDummyContract](./bitburner.codingcontract.createdummycontract.md)
## CodingContract.createDummyContract() method
Generate a dummy contract.
**Signature:**
```typescript
createDummyContract(type: CodingContractName, host?: string): string | null;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
type
</td><td>
[CodingContractName](./bitburner.codingcontractname.md)
</td><td>
Type of contract to generate
</td></tr>
<tr><td>
host
</td><td>
string
</td><td>
_(Optional)_ Hostname/IP of the server containing the contract. Optional. Defaults to the server the calling script is running on.
</td></tr>
</tbody></table>
**Returns:**
string \| null
Filename of the contract.
## Remarks
RAM cost: 2 GB
Generate a dummy contract on the current server with no reward. Used to test various algorithms.
This function will return null and not generate a contract if the randomized contract name is the same as another contract's name.