-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support vm effector by default, rename cc-collateral-withdraw t…
…o cc-finish (#1042) * feat: support vm effector buy default, rename cc-collateral-withdraw to cc-finish * Apply automatic changes * set allowed binaries to an empty object if it's missing * print deal id * fix * Apply automatic changes --------- Co-authored-by: shamsartem <[email protected]>
- Loading branch information
1 parent
46af000
commit 07c2cd5
Showing
17 changed files
with
296 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Fluence CLI | ||
* Copyright (C) 2024 Fluence DAO | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, version 3. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import { BaseCommand, baseFlags } from "../../baseCommand.js"; | ||
import { collateralWithdraw } from "../../lib/chain/commitment.js"; | ||
import { | ||
CHAIN_FLAGS, | ||
FLT_SYMBOL, | ||
CC_FLAGS, | ||
MAX_CUS_FLAG, | ||
} from "../../lib/const.js"; | ||
import { initCli } from "../../lib/lifeCycle.js"; | ||
|
||
export default class CCFinish extends BaseCommand<typeof CCFinish> { | ||
static override aliases = ["provider:ccf"]; | ||
static override description = `Move resources from deals, withdraw ${FLT_SYMBOL} collateral from capacity commitments, remove compute units from capacity commitments and finish capacity commitments`; | ||
static override flags = { | ||
...baseFlags, | ||
...CC_FLAGS, | ||
...CHAIN_FLAGS, | ||
...MAX_CUS_FLAG, | ||
}; | ||
|
||
async run(): Promise<void> { | ||
const { flags } = await initCli(this, await this.parse(CCFinish)); | ||
await collateralWithdraw(flags); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.