|
1 | 1 | import { spawnSync } from "node:child_process"; |
2 | 2 | import path from "node:path"; |
3 | | -import { contract, Keypair, rpc } from "../../../src/index.js"; |
| 3 | +import { contract, Keypair, rpc } from "../../../lib/esm/index.js"; |
4 | 4 |
|
5 | 5 | /* |
6 | 6 | * Run a Bash command, returning stdout, stderr, and status code. |
@@ -110,10 +110,12 @@ const installContract = async ( |
110 | 110 | const internalKeypair = keypair ?? (await generateFundedKeypair()); |
111 | 111 |
|
112 | 112 | let wasmHash = contracts[name].hash; |
| 113 | + console.log("in installContract, wasmHash:", wasmHash); |
113 | 114 | if (!wasmHash) { |
114 | 115 | wasmHash = run( |
115 | 116 | `${stellar} contract upload --wasm ${contracts[name].path}`, |
116 | 117 | ).stdout; |
| 118 | + console.log("wasm hash didn't exist, so uploaded and got:", wasmHash); |
117 | 119 | } |
118 | 120 | return { keypair: internalKeypair, wasmHash }; |
119 | 121 | }; |
@@ -143,7 +145,7 @@ const clientFor = async ( |
143 | 145 | const { wasmHash } = await installContract(name, { |
144 | 146 | keypair: internalKeypair, |
145 | 147 | }); |
146 | | - |
| 148 | + console.log(`wasmHash for ${name}: ${wasmHash} <========`); |
147 | 149 | const deploy = await contract.Client.deploy( |
148 | 150 | (contracts[name] as any).constructorArgs ?? null, |
149 | 151 | { |
|
0 commit comments