| 17 | /* eslint-enable @typescript-eslint/indent */ |
| 18 | |
| 19 | const createVirtualMachine = (vmTarget: VmTarget): VM => { |
| 20 | switch (vmTarget) { |
| 21 | case 'BCH_2023_05': |
| 22 | return createVirtualMachineBch2023(); |
| 23 | case 'BCH_2025_05': |
| 24 | return createVirtualMachineBch2025(); |
| 25 | case 'BCH_2026_05': |
| 26 | return createVirtualMachineBch2026(); |
| 27 | case 'BCH_SPEC': |
| 28 | // TODO: This typecast is shitty, but it's hard to fix |
| 29 | return createVirtualMachineBchSpec() as unknown as VM; |
| 30 | default: |
| 31 | throw new Error(`Debugging is not supported for the ${vmTarget} virtual machine.`); |
| 32 | } |
| 33 | }; |
| 34 | |
| 35 | // debugs the template, optionally logging the execution data |
| 36 | export const debugTemplate = (template: WalletTemplate, artifacts: Artifact[]): DebugResults => { |