BUGFIX: Coding contracts may have duplicate names (#2399)

This commit is contained in:
imcute_aaaa
2025-11-27 16:59:11 +09:00
committed by GitHub
parent 329fdc50fb
commit 77fe36db89
5 changed files with 125 additions and 20 deletions

View File

@@ -9,7 +9,7 @@ Generate a dummy contract.
**Signature:**
```typescript
createDummyContract(type: CodingContractName): string;
createDummyContract(type: CodingContractName): string | null;
```
## Parameters
@@ -50,7 +50,7 @@ Type of contract to generate
**Returns:**
string
string \| null
Filename of the contract.
@@ -60,3 +60,5 @@ RAM cost: 2 GB
Generate a dummy contract on the home computer 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.