@acurast/cli
Version:
A cli to interact with the Acurast Cloud.
28 lines • 1.32 kB
JavaScript
import { getFeeAnalysis } from '@acurast/sdk/matcher';
import { getSymbolForNetwork } from '../config.js';
/**
* Build a {@link DeploySummary} from the project config the CLI already has in
* scope at deploy time. `ipfsRef` becomes available once the bundle is uploaded
* (the deploy flow primes it from the `Uploaded`/`Prepared` status callback).
*/
export const buildDeploySummary = (config, opts) => {
const fee = getFeeAnalysis(config);
return {
kind: opts.kind,
projectName: config.projectName,
network: config.network,
ipfsRef: opts.ipfsRef,
executionType: config.execution.type,
numberOfExecutions: fee.numberOfExecutions.toNumber(),
numberOfReplicas: fee.numberOfReplicas.toNumber(),
totalRuns: fee.totalRuns.toNumber(),
maxCostPerExecutionCACU: fee.maxCostPerExecutionCACU.toFixed(),
maxTotalCostCACU: fee.maxTotalCostCACU.toFixed(),
symbol: getSymbolForNetwork(config.network),
attestedOnly: config.onlyAttestedDevices ?? false,
mutability: String(config.mutability ?? 'Immutable'),
// KEYS ONLY — values are intentionally excluded so secrets never cross the bridge.
envVarKeys: [...(config.includeEnvironmentVariables ?? [])],
};
};
//# sourceMappingURL=deploySummary.js.map