CONTRACTS: Generate test contracts on executing host by default. Add support for optional parameter to specify the server. (#2417)

This commit is contained in:
Paul Setzer
2025-12-16 19:23:59 -05:00
committed by GitHub
parent e7768824ba
commit 968c0c2a8c
7 changed files with 47 additions and 14 deletions

View File

@@ -4057,14 +4057,15 @@ export interface CodingContract {
* @remarks
* RAM cost: 2 GB
*
* Generate a dummy contract on the home computer with no reward. Used to test various algorithms.
* 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.
*
* @param type - Type of contract to generate
* @param host - Hostname/IP of the server containing the contract. Optional. Defaults to the server the calling script is running on.
* @returns Filename of the contract.
*/
createDummyContract(type: CodingContractName): string | null;
createDummyContract(type: CodingContractName, host?: string): string | null;
/**
* List all contract types.