Skip to content

Commit

Permalink
feat(deploy-contract): deploygen does codegen only (WIP)
Browse files Browse the repository at this point in the history
currently fails:

```
$ ./scripts/deploy-contract.js --deploygen src/sell-concert-tickets.js
(Error#1)
Error#1: ENOENT: no such file or directory, open 'src/auto-deploy.template.js'

  at async generateDeployArtifact (file:///home/connolly/projects/dapp-agoric-basics/contract/scripts/deploy-contract.js:70:20)
  at async main (file:///home/connolly/projects/dapp-agoric-basics/contract/scripts/deploy-contract.js:130:7)
```
  • Loading branch information
dckc committed Sep 5, 2024
1 parent 45a17ce commit fff889a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions contract/scripts/deploy-contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const options = {
service: { type: 'string', default: 'agd' },
workdir: { type: 'string', default: '/workspace/contract' },
deploy: { type: 'string', multiple: true },
deploygen: { type: 'string', multiple: true },
};
/**
* @typedef {{
Expand All @@ -27,6 +28,7 @@ const options = {
* service: string,
* workdir: string,
* deploy: string[],
* deploygen?: string[],
* }} DeployOptions
*/

Expand Down Expand Up @@ -120,6 +122,15 @@ const main = async (bundleDir = 'bundles') => {

const stem = path => basename(path).replace(/\..*/, '');

if (flags.deploygen) {
for (const contractEntry of flags.deploygen) {
const name = stem(contractEntry);
const generatedCoreEval = `bundles/deploy-${name}-entry.js`;
// TODO: fix
await generateDeployArtifact(generatedCoreEval, name, fsp);
}
}

// deploy in one step
if (flags.deploy) {
for await (const contractEntry of flags.deploy) {
Expand Down

0 comments on commit fff889a

Please sign in to comment.