HeliosLang / compiler

Helios is a DSL for writing Cardano smart contracts. This library lets you compile Helios scripts and build Cardano transactions.
https://www.hyperion-bt.org/helios-book
BSD 3-Clause "New" or "Revised" License
142 stars 31 forks source link

Allow adding multiple reference script witnesses via Tx::addRefInputs #100

Closed inimrod closed 1 year ago

inimrod commented 1 year ago

Before this, we could only add refScript witnesses contained in ref inputs one by one, via Tx::addRefInput because Tx::addRefInputs didn't actually act on the refScripts contained in the refInputs passed to it.

christianschmitz commented 1 year ago

Could you run npm run build, and commit the files that that command changes as well?

inimrod commented 1 year ago

I'm getting the following error when trying to build. Could be something to do with the nodejs version I'm using? What version do you use for this project? I'll try it.

$ npm run build

> @hyperionbt/helios@0.15.10 prebuild
> node ./src/index.js && npx tsc --outFile ./helios-internal.d.ts && node ./utils/strip-internal.js && npx tsc --noEmit --target es2020 ./helios.d.ts

TypeError: Cannot read properties of null (reading '1')
    at buildIndex (file:///C:/Users/nimro/Documents/GitHub/helios/src/index.js:183:17)
    at processFile (file:///C:/Users/nimro/Documents/GitHub/helios/src/index.js:229:26)
    at file:///C:/Users/nimro/Documents/GitHub/helios/src/index.js:283:25
    at Array.forEach (<anonymous>)
    at main (file:///C:/Users/nimro/Documents/GitHub/helios/src/index.js:280:8)
    at file:///C:/Users/nimro/Documents/GitHub/helios/src/index.js:302:1
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
file:///C:/Users/nimro/Documents/GitHub/helios/src/index.js:241
                throw new Error("unable to build index for " + fname);
                      ^

Error: unable to build index for config.js
    at processFile (file:///C:/Users/nimro/Documents/GitHub/helios/src/index.js:241:9)
    at file:///C:/Users/nimro/Documents/GitHub/helios/src/index.js:283:25
    at Array.forEach (<anonymous>)
    at main (file:///C:/Users/nimro/Documents/GitHub/helios/src/index.js:280:8)
    at file:///C:/Users/nimro/Documents/GitHub/helios/src/index.js:302:1
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

Node.js v18.17.1
inimrod commented 1 year ago

Done.. It was just a windows issue. Seems that the regex RE_SECTION_TITLE doesn't work on windows. Tried on ubuntu and build went well.