@caatinga/core 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/dist/artifact.schema-D4r8dyYK.d.cts +185 -0
- package/dist/artifact.schema-D4r8dyYK.d.ts +185 -0
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/index.cjs +202 -154
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +202 -154
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -121,9 +121,7 @@ function formatCause(cause) {
|
|
|
121
121
|
|
|
122
122
|
// src/version.ts
|
|
123
123
|
import { createRequire } from "module";
|
|
124
|
-
var require2 = createRequire(
|
|
125
|
-
typeof __filename === "string" ? __filename : import.meta.url
|
|
126
|
-
);
|
|
124
|
+
var require2 = createRequire(typeof __filename === "string" ? __filename : import.meta.url);
|
|
127
125
|
var CAATINGA_CORE_VERSION = require2("../package.json").version;
|
|
128
126
|
|
|
129
127
|
// src/config/config.schema.ts
|
|
@@ -770,12 +768,7 @@ function matchesWellKnownNetwork(name, config) {
|
|
|
770
768
|
return known.rpcUrl === config.rpcUrl && known.networkPassphrase === config.networkPassphrase;
|
|
771
769
|
}
|
|
772
770
|
function buildRpcNetworkArgs(config) {
|
|
773
|
-
return [
|
|
774
|
-
"--rpc-url",
|
|
775
|
-
config.rpcUrl,
|
|
776
|
-
"--network-passphrase",
|
|
777
|
-
config.networkPassphrase
|
|
778
|
-
];
|
|
771
|
+
return ["--rpc-url", config.rpcUrl, "--network-passphrase", config.networkPassphrase];
|
|
779
772
|
}
|
|
780
773
|
function buildStellarNetworkArgsFromConfig(config) {
|
|
781
774
|
for (const [name, known] of Object.entries(WELL_KNOWN_NETWORKS)) {
|
|
@@ -829,19 +822,23 @@ async function fetchCreateContractSalt(horizonUrl, transactionHash, fetchImpl =
|
|
|
829
822
|
}
|
|
830
823
|
async function resolveContractIdFromDeploySalt(options) {
|
|
831
824
|
const saltHex = decimalSaltToHex(options.salt);
|
|
832
|
-
const result = await runCommand(
|
|
833
|
-
"
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
825
|
+
const result = await runCommand(
|
|
826
|
+
"stellar",
|
|
827
|
+
[
|
|
828
|
+
"contract",
|
|
829
|
+
"id",
|
|
830
|
+
"wasm",
|
|
831
|
+
"--salt",
|
|
832
|
+
saltHex,
|
|
833
|
+
"--source-account",
|
|
834
|
+
options.source,
|
|
835
|
+
...buildStellarNetworkArgsFromConfig(options.network)
|
|
836
|
+
],
|
|
837
|
+
{
|
|
838
|
+
cwd: options.cwd,
|
|
839
|
+
skipStellarVersionCheck: true
|
|
840
|
+
}
|
|
841
|
+
);
|
|
845
842
|
return parseContractId(result.all || `${result.stdout}
|
|
846
843
|
${result.stderr}`);
|
|
847
844
|
}
|
|
@@ -989,8 +986,12 @@ function buildAlternateWasmCandidates(configuredWasmPath, options) {
|
|
|
989
986
|
addCandidate(path8.join(cargoTargetDir, LEGACY_RUST_WASM_TARGET, "release", fileName));
|
|
990
987
|
}
|
|
991
988
|
if (options?.sourcePath) {
|
|
992
|
-
addCandidate(
|
|
993
|
-
|
|
989
|
+
addCandidate(
|
|
990
|
+
path8.join(options.sourcePath, "target", CURRENT_RUST_WASM_TARGET, "release", fileName)
|
|
991
|
+
);
|
|
992
|
+
addCandidate(
|
|
993
|
+
path8.join(options.sourcePath, "target", LEGACY_RUST_WASM_TARGET, "release", fileName)
|
|
994
|
+
);
|
|
994
995
|
}
|
|
995
996
|
return candidates;
|
|
996
997
|
}
|
|
@@ -1405,17 +1406,21 @@ function toSkippedContract(name, contractId, network) {
|
|
|
1405
1406
|
// src/contracts/verify-dependency-contract.ts
|
|
1406
1407
|
async function verifyDependencyContract(options) {
|
|
1407
1408
|
try {
|
|
1408
|
-
await runCommand(
|
|
1409
|
-
"
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1409
|
+
await runCommand(
|
|
1410
|
+
"stellar",
|
|
1411
|
+
[
|
|
1412
|
+
"contract",
|
|
1413
|
+
"info",
|
|
1414
|
+
"interface",
|
|
1415
|
+
"--contract-id",
|
|
1416
|
+
options.contractId,
|
|
1417
|
+
...buildStellarNetworkArgs(options.network)
|
|
1418
|
+
],
|
|
1419
|
+
{
|
|
1420
|
+
cwd: options.cwd,
|
|
1421
|
+
failureCode: CaatingaErrorCode.DEPENDENCY_CONTRACT_NOT_FOUND
|
|
1422
|
+
}
|
|
1423
|
+
);
|
|
1419
1424
|
} catch (error) {
|
|
1420
1425
|
if (error instanceof CaatingaError && error.code === CaatingaErrorCode.DEPENDENCY_CONTRACT_NOT_FOUND) {
|
|
1421
1426
|
throw new CaatingaError(
|
|
@@ -1477,9 +1482,7 @@ async function deployContractGraph(options) {
|
|
|
1477
1482
|
network: network.name
|
|
1478
1483
|
});
|
|
1479
1484
|
if (existing?.contractId && !options.force) {
|
|
1480
|
-
skippedContracts.push(
|
|
1481
|
-
toSkippedContract(contractName, existing.contractId, network.name)
|
|
1482
|
-
);
|
|
1485
|
+
skippedContracts.push(toSkippedContract(contractName, existing.contractId, network.name));
|
|
1483
1486
|
continue;
|
|
1484
1487
|
}
|
|
1485
1488
|
const result = await deployContract({
|
|
@@ -1500,9 +1503,7 @@ async function deployContractGraph(options) {
|
|
|
1500
1503
|
});
|
|
1501
1504
|
}
|
|
1502
1505
|
if (result.skipped) {
|
|
1503
|
-
skippedContracts.push(
|
|
1504
|
-
toSkippedContract(contractName, result.contractId, network.name)
|
|
1505
|
-
);
|
|
1506
|
+
skippedContracts.push(toSkippedContract(contractName, result.contractId, network.name));
|
|
1506
1507
|
} else {
|
|
1507
1508
|
deployedContracts.push({ name: contractName, contractId: result.contractId });
|
|
1508
1509
|
}
|
|
@@ -1563,22 +1564,26 @@ async function generateBindings(options) {
|
|
|
1563
1564
|
}
|
|
1564
1565
|
const outputDir = path10.resolve(cwd, options.config.frontend.bindingsOutput, options.contractName);
|
|
1565
1566
|
await mkdir2(outputDir, { recursive: true });
|
|
1566
|
-
const result = await runCommand(
|
|
1567
|
-
"
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1567
|
+
const result = await runCommand(
|
|
1568
|
+
"npx",
|
|
1569
|
+
[
|
|
1570
|
+
"--yes",
|
|
1571
|
+
"@stellar/stellar-sdk",
|
|
1572
|
+
"generate",
|
|
1573
|
+
"--contract-id",
|
|
1574
|
+
contractArtifact.contractId,
|
|
1575
|
+
"--output-dir",
|
|
1576
|
+
outputDir,
|
|
1577
|
+
"--contract-name",
|
|
1578
|
+
options.contractName,
|
|
1579
|
+
"--overwrite",
|
|
1580
|
+
...buildGenerateNetworkArgs(network)
|
|
1581
|
+
],
|
|
1582
|
+
{
|
|
1583
|
+
cwd,
|
|
1584
|
+
failureCode: CaatingaErrorCode.BINDINGS_FAILED
|
|
1585
|
+
}
|
|
1586
|
+
);
|
|
1582
1587
|
const legacyStubRemoved = await removeLegacyBindingStub(
|
|
1583
1588
|
cwd,
|
|
1584
1589
|
options.config.frontend.bindingsOutput,
|
|
@@ -1690,21 +1695,25 @@ async function invokeContract(options) {
|
|
|
1690
1695
|
await checkBinary("stellar", "Install Stellar CLI before running caatinga invoke.");
|
|
1691
1696
|
let result;
|
|
1692
1697
|
try {
|
|
1693
|
-
result = await runCommand(
|
|
1694
|
-
"
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1698
|
+
result = await runCommand(
|
|
1699
|
+
"stellar",
|
|
1700
|
+
[
|
|
1701
|
+
"contract",
|
|
1702
|
+
"invoke",
|
|
1703
|
+
"--id",
|
|
1704
|
+
contractArtifact.contractId,
|
|
1705
|
+
"--source-account",
|
|
1706
|
+
source,
|
|
1707
|
+
...buildStellarNetworkArgs(network),
|
|
1708
|
+
"--",
|
|
1709
|
+
target.method,
|
|
1710
|
+
...options.args ?? []
|
|
1711
|
+
],
|
|
1712
|
+
{
|
|
1713
|
+
cwd,
|
|
1714
|
+
failureCode: CaatingaErrorCode.INVOKE_FAILED
|
|
1715
|
+
}
|
|
1716
|
+
);
|
|
1708
1717
|
} catch (error) {
|
|
1709
1718
|
if (error instanceof CaatingaError && error.code === CaatingaErrorCode.INVOKE_FAILED && isReadCallFailure(error)) {
|
|
1710
1719
|
throw new CaatingaError(
|
|
@@ -1849,12 +1858,7 @@ function formatTemplateCompatibilityHint(issue) {
|
|
|
1849
1858
|
}
|
|
1850
1859
|
|
|
1851
1860
|
// src/templates/create-project-from-template.ts
|
|
1852
|
-
var TEMPLATE_COPY_EXCLUDED_DIRS = /* @__PURE__ */ new Set([
|
|
1853
|
-
"target",
|
|
1854
|
-
"test_snapshots",
|
|
1855
|
-
"node_modules",
|
|
1856
|
-
".git"
|
|
1857
|
-
]);
|
|
1861
|
+
var TEMPLATE_COPY_EXCLUDED_DIRS = /* @__PURE__ */ new Set(["target", "test_snapshots", "node_modules", ".git"]);
|
|
1858
1862
|
async function createProjectFromTemplate(options) {
|
|
1859
1863
|
const targetDir = path11.resolve(options.targetDir);
|
|
1860
1864
|
const templateDir = path11.resolve(options.templateDir);
|
|
@@ -1888,7 +1892,10 @@ async function ensureArtifacts(targetDir, projectName) {
|
|
|
1888
1892
|
await writeArtifacts({ ...artifacts, project: projectName }, targetDir);
|
|
1889
1893
|
} catch (error) {
|
|
1890
1894
|
if (error instanceof CaatingaError && error.code === CaatingaErrorCode.ARTIFACT_NOT_FOUND) {
|
|
1891
|
-
await writeArtifacts(
|
|
1895
|
+
await writeArtifacts(
|
|
1896
|
+
createInitialArtifacts(projectName, { networks: ["testnet"] }),
|
|
1897
|
+
targetDir
|
|
1898
|
+
);
|
|
1892
1899
|
return;
|
|
1893
1900
|
}
|
|
1894
1901
|
throw error;
|
|
@@ -1931,19 +1938,21 @@ async function readTemplateManifest(templateDir) {
|
|
|
1931
1938
|
}
|
|
1932
1939
|
async function replaceTemplateVariables(dir, projectName) {
|
|
1933
1940
|
const entries = await readdir3(dir);
|
|
1934
|
-
await Promise.all(
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1941
|
+
await Promise.all(
|
|
1942
|
+
entries.map(async (entry) => {
|
|
1943
|
+
const entryPath = path11.join(dir, entry);
|
|
1944
|
+
const entryStat = await stat2(entryPath);
|
|
1945
|
+
if (entryStat.isDirectory()) {
|
|
1946
|
+
await replaceTemplateVariables(entryPath, projectName);
|
|
1947
|
+
return;
|
|
1948
|
+
}
|
|
1949
|
+
if (!isTextTemplateFile(entryPath)) {
|
|
1950
|
+
return;
|
|
1951
|
+
}
|
|
1952
|
+
const content = await readFile4(entryPath, "utf8");
|
|
1953
|
+
await writeFile3(entryPath, content.replaceAll("__PROJECT_NAME__", projectName), "utf8");
|
|
1954
|
+
})
|
|
1955
|
+
);
|
|
1947
1956
|
}
|
|
1948
1957
|
function shouldCopyTemplateEntry(templateDir, source, userFilter) {
|
|
1949
1958
|
const relativePath = path11.relative(templateDir, source);
|
|
@@ -1957,16 +1966,9 @@ function shouldCopyTemplateEntry(templateDir, source, userFilter) {
|
|
|
1957
1966
|
return !relativePath.split(path11.sep).some((segment) => TEMPLATE_COPY_EXCLUDED_DIRS.has(segment));
|
|
1958
1967
|
}
|
|
1959
1968
|
function isTextTemplateFile(filePath) {
|
|
1960
|
-
return [
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
".rs",
|
|
1964
|
-
".toml",
|
|
1965
|
-
".ts",
|
|
1966
|
-
".tsx",
|
|
1967
|
-
".css",
|
|
1968
|
-
".html"
|
|
1969
|
-
].includes(path11.extname(filePath));
|
|
1969
|
+
return [".json", ".md", ".rs", ".toml", ".ts", ".tsx", ".css", ".html"].includes(
|
|
1970
|
+
path11.extname(filePath)
|
|
1971
|
+
);
|
|
1970
1972
|
}
|
|
1971
1973
|
|
|
1972
1974
|
// src/scaffold/create-zk-project.ts
|
|
@@ -2015,23 +2017,27 @@ export default defineConfig({
|
|
|
2015
2017
|
`;
|
|
2016
2018
|
}
|
|
2017
2019
|
function packageJsonSource(projectName) {
|
|
2018
|
-
return `${JSON.stringify(
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2020
|
+
return `${JSON.stringify(
|
|
2021
|
+
{
|
|
2022
|
+
name: projectName,
|
|
2023
|
+
version: "0.1.0",
|
|
2024
|
+
private: true,
|
|
2025
|
+
type: "module",
|
|
2026
|
+
scripts: {
|
|
2027
|
+
"zk:build": "caatinga zk build main",
|
|
2028
|
+
"zk:prove": "caatinga zk prove main",
|
|
2029
|
+
build: "caatinga build verifier",
|
|
2030
|
+
deploy: "caatinga deploy verifier --network testnet --source ${CAATINGA_SOURCE:-alice}",
|
|
2031
|
+
doctor: "caatinga doctor --network testnet"
|
|
2032
|
+
},
|
|
2033
|
+
devDependencies: {
|
|
2034
|
+
"@caatinga/cli": `^${CAATINGA_CORE_VERSION}`,
|
|
2035
|
+
"@caatinga/core": `^${CAATINGA_CORE_VERSION}`
|
|
2036
|
+
}
|
|
2029
2037
|
},
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
}
|
|
2034
|
-
}, null, 2)}
|
|
2038
|
+
null,
|
|
2039
|
+
2
|
|
2040
|
+
)}
|
|
2035
2041
|
`;
|
|
2036
2042
|
}
|
|
2037
2043
|
function readmeSource(projectName) {
|
|
@@ -2059,10 +2065,22 @@ async function createZkProject(options) {
|
|
|
2059
2065
|
await mkdir4(targetDir, { recursive: true });
|
|
2060
2066
|
if (projectFiles) {
|
|
2061
2067
|
await Promise.all([
|
|
2062
|
-
writeFile4(path12.join(targetDir, "caatinga.config.ts"), configSource(options.projectName), {
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2068
|
+
writeFile4(path12.join(targetDir, "caatinga.config.ts"), configSource(options.projectName), {
|
|
2069
|
+
encoding: "utf8",
|
|
2070
|
+
flag: force ? "w" : "wx"
|
|
2071
|
+
}),
|
|
2072
|
+
writeFile4(path12.join(targetDir, "package.json"), packageJsonSource(options.projectName), {
|
|
2073
|
+
encoding: "utf8",
|
|
2074
|
+
flag: force ? "w" : "wx"
|
|
2075
|
+
}),
|
|
2076
|
+
writeFile4(path12.join(targetDir, ".gitignore"), "node_modules\n.artifacts\ntarget\n", {
|
|
2077
|
+
encoding: "utf8",
|
|
2078
|
+
flag: force ? "w" : "wx"
|
|
2079
|
+
}),
|
|
2080
|
+
writeFile4(path12.join(targetDir, "README.md"), readmeSource(options.projectName), {
|
|
2081
|
+
encoding: "utf8",
|
|
2082
|
+
flag: force ? "w" : "wx"
|
|
2083
|
+
})
|
|
2066
2084
|
]);
|
|
2067
2085
|
}
|
|
2068
2086
|
await mkdir4(path12.join(targetDir, "contracts"), { recursive: true });
|
|
@@ -2071,13 +2089,20 @@ async function createZkProject(options) {
|
|
|
2071
2089
|
force,
|
|
2072
2090
|
errorOnExist: !force
|
|
2073
2091
|
});
|
|
2074
|
-
await cp2(
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2092
|
+
await cp2(
|
|
2093
|
+
path12.join(scaffoldRoot(), "zk-verifier"),
|
|
2094
|
+
path12.join(targetDir, "contracts", "verifier"),
|
|
2095
|
+
{
|
|
2096
|
+
recursive: true,
|
|
2097
|
+
force,
|
|
2098
|
+
errorOnExist: !force
|
|
2099
|
+
}
|
|
2100
|
+
);
|
|
2079
2101
|
if (projectFiles) {
|
|
2080
|
-
await writeArtifacts(
|
|
2102
|
+
await writeArtifacts(
|
|
2103
|
+
createInitialArtifacts(options.projectName, { networks: ["testnet"] }),
|
|
2104
|
+
targetDir
|
|
2105
|
+
);
|
|
2081
2106
|
}
|
|
2082
2107
|
return { targetDir };
|
|
2083
2108
|
}
|
|
@@ -2118,23 +2143,27 @@ export default defineConfig({
|
|
|
2118
2143
|
`;
|
|
2119
2144
|
}
|
|
2120
2145
|
function packageJsonSource2(projectName) {
|
|
2121
|
-
return `${JSON.stringify(
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2146
|
+
return `${JSON.stringify(
|
|
2147
|
+
{
|
|
2148
|
+
name: projectName,
|
|
2149
|
+
version: "0.1.0",
|
|
2150
|
+
private: true,
|
|
2151
|
+
type: "module",
|
|
2152
|
+
scripts: {
|
|
2153
|
+
build: "caatinga build app",
|
|
2154
|
+
deploy: "caatinga deploy app --network testnet --source ${CAATINGA_SOURCE:-alice}",
|
|
2155
|
+
doctor: "caatinga doctor --network testnet",
|
|
2156
|
+
"read:hello": "caatinga read app.hello --network testnet --source ${CAATINGA_SOURCE:-alice}",
|
|
2157
|
+
"read:version": "caatinga read app.version --network testnet --source ${CAATINGA_SOURCE:-alice}"
|
|
2158
|
+
},
|
|
2159
|
+
devDependencies: {
|
|
2160
|
+
"@caatinga/cli": `^${CAATINGA_CORE_VERSION}`,
|
|
2161
|
+
"@caatinga/core": `^${CAATINGA_CORE_VERSION}`
|
|
2162
|
+
}
|
|
2132
2163
|
},
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
}
|
|
2137
|
-
}, null, 2)}
|
|
2164
|
+
null,
|
|
2165
|
+
2
|
|
2166
|
+
)}
|
|
2138
2167
|
`;
|
|
2139
2168
|
}
|
|
2140
2169
|
function readmeSource2(projectName) {
|
|
@@ -2170,18 +2199,37 @@ async function createMinimalProject(options) {
|
|
|
2170
2199
|
const force = options.force ?? false;
|
|
2171
2200
|
await mkdir5(targetDir, { recursive: true });
|
|
2172
2201
|
await Promise.all([
|
|
2173
|
-
writeFile5(path13.join(targetDir, "caatinga.config.ts"), configSource2(options.projectName), {
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2202
|
+
writeFile5(path13.join(targetDir, "caatinga.config.ts"), configSource2(options.projectName), {
|
|
2203
|
+
encoding: "utf8",
|
|
2204
|
+
flag: force ? "w" : "wx"
|
|
2205
|
+
}),
|
|
2206
|
+
writeFile5(path13.join(targetDir, "package.json"), packageJsonSource2(options.projectName), {
|
|
2207
|
+
encoding: "utf8",
|
|
2208
|
+
flag: force ? "w" : "wx"
|
|
2209
|
+
}),
|
|
2210
|
+
writeFile5(path13.join(targetDir, ".gitignore"), "node_modules\n.artifacts\ntarget\n", {
|
|
2211
|
+
encoding: "utf8",
|
|
2212
|
+
flag: force ? "w" : "wx"
|
|
2213
|
+
}),
|
|
2214
|
+
writeFile5(path13.join(targetDir, "README.md"), readmeSource2(options.projectName), {
|
|
2215
|
+
encoding: "utf8",
|
|
2216
|
+
flag: force ? "w" : "wx"
|
|
2217
|
+
})
|
|
2177
2218
|
]);
|
|
2178
2219
|
await mkdir5(path13.join(targetDir, "contracts"), { recursive: true });
|
|
2179
|
-
await cp3(
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2220
|
+
await cp3(
|
|
2221
|
+
path13.join(scaffoldRoot2(), "soroban-contract-stub"),
|
|
2222
|
+
path13.join(targetDir, "contracts", "app"),
|
|
2223
|
+
{
|
|
2224
|
+
recursive: true,
|
|
2225
|
+
force,
|
|
2226
|
+
errorOnExist: !force
|
|
2227
|
+
}
|
|
2228
|
+
);
|
|
2229
|
+
await writeArtifacts(
|
|
2230
|
+
createInitialArtifacts(options.projectName, { networks: ["testnet"] }),
|
|
2231
|
+
targetDir
|
|
2232
|
+
);
|
|
2185
2233
|
return { targetDir };
|
|
2186
2234
|
}
|
|
2187
2235
|
|