(id)
| 61 | } |
| 62 | |
| 63 | activate(id) { |
| 64 | const c = this.get(id); |
| 65 | if (!c) throw new Error(`contract not found: ${id}`); |
| 66 | if (c.status === STATUSES.DRAFT) { |
| 67 | c.status = STATUSES.ACTIVE; |
| 68 | this.save(c); |
| 69 | } |
| 70 | fs.mkdirSync(contractsDir(this.cwd), { recursive: true }); |
| 71 | writeAtomic(activeFile(this.cwd), id); |
| 72 | this._log(c.id, 'activate', {}); |
| 73 | } |
| 74 | |
| 75 | deactivate() { |
| 76 | const p = activeFile(this.cwd); |
nothing calls this directly
no test coverage detected