Skip to content

Commit

Permalink
Merge pull request #136 from f-o-a-m/purs-0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
iostat authored Sep 16, 2023
2 parents bbb26d4 + 8f70f81 commit 46d99df
Show file tree
Hide file tree
Showing 35 changed files with 1,030 additions and 897 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run test suite

on:
push:
branches:
- '*'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: setup node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: run tests
run: |
npm install
npm run build
25 changes: 25 additions & 0 deletions .github/workflows/tidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Code style and lint

on:
pull_request:
branches:
- master

workflow_dispatch:

jobs:
tidy:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: setup node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: run tidy
run: |
npm install
npm run tidy-check
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.6.1
8 changes: 8 additions & 0 deletions .tidyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"indent": 2,
"operatorsFile": null,
"ribbon": 1,
"typeArrowPlacement": "first",
"unicode": "never",
"width": null
}
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion chanterelle-bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CHNTRL_LOCAL_MAIN="$PURS_OUTPUT/$CHNTRL_MAIN_MODULE";

run_chanterelle() {
CHANTERELLEMAIN_INDEX_JS="$1"; shift
exec node -e "require('$CHANTERELLEMAIN_INDEX_JS').main();" -- "chanterelle" $@
exec node -e "import('$CHANTERELLEMAIN_INDEX_JS').then(chanterelle => chanterelle.main());" -- "chanterelle" $@
}

global_install_available() {
Expand Down
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
{
"name": "chanterelle",
"version": "5.1.3",
"version": "7.0.0",
"description": "A more functional truffle",
"license": "ISC",
"scripts": {
"global-postinstall-root": "spago install",
"global-postinstall-non-root": "spago install",
"build": "spago build",
"docs": "cd docs; make html;",
"postinstall": "echo 'If you are installing chanterelle to use globally, you likely want to run `chanterelle global-postinstall`.'"
"postinstall": "echo 'If you are installing chanterelle to use globally, you likely want to run `chanterelle global-postinstall`.'",
"tidy": "purs-tidy format-in-place \"src/**/*.purs\" \"test/**/*.purs\"",
"tidy-check": "purs-tidy check \"src/**/*.purs\" \"test/**/*.purs\""
},
"dependencies": {
"purescript": "^0.14.2",
"purescript": "^0.15.8",
"purescript-psa": "^0.8.2",
"bn.js": "^4.11.0",
"spago": "^0.21.0",
"ethjs-provider-http": "^0.1.6",
"mkdirp": "^0.5.1",
"keccak": "^1.0.2",
"secp256k1": "^3.0.1",
"rlp": "^2.0.0",
"solc": "^0.6",
"spago": "^0.20.3"
"solc": "^0.8"
},
"devDependencies": {
"purs-tidy": "^0.10.0"
},
"bin": {
"chanterelle": "chanterelle-bin.sh"
Expand Down
208 changes: 79 additions & 129 deletions packages.dhall
Original file line number Diff line number Diff line change
@@ -1,136 +1,86 @@
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.14.2-20210629/packages.dhall sha256:534c490bb73cae75adb5a39871142fd8db5c2d74c90509797a80b8bb0d5c3f7b
https://raw.githubusercontent.com/f-o-a-m/package-sets/b3ecf8e8e4e1a35ba97fcb7e9f2858d14ee6a912/purs-0.15.7-web3.dhall
sha256:ce57fd949b7cd331d7c61ff45283e35983dd5797b3f17616dd69f8bc06f54784

let overrides = {=}

let additions =
{ web3 =
{ dependencies =
[ "aff"
, "avar"
, "console"
, "coroutines"
, "coroutine-transducers"
, "debug"
, "effect"
, "errors"
, "eth-core"
, "foreign"
, "foreign-generic"
, "fork"
, "free"
, "heterogeneous"
, "identity"
, "parsing"
, "partial"
, "profunctor-lenses"
, "psci-support"
, "tagged"
, "transformers"
, "typelevel-prelude"
, "variant"
]
, repo = "https://github.com/f-o-a-m/purescript-web3"
, version = "v4.0.0"
}
, web3-generator =
{ dependencies =
[ "ansi"
, "argonaut"
, "console"
, "effect"
, "errors"
, "eth-core"
, "fixed-points"
, "mkdirp"
, "node-fs-aff"
, "ordered-collections"
, "prelude"
, "psci-support"
, "record-extra"
, "string-parsers"
, "web3"
, "yargs"
]
, repo = "https://github.com/f-o-a-m/purescript-web3-generator"
, version = "v4.0.0"
}
, eth-core =
{ dependencies =
[ "argonaut"
, "bytestrings"
, "console"
, "debug"
, "effect"
, "foreign-generic"
, "ordered-collections"
, "parsing"
, "prelude"
, "psci-support"
, "ring-modules"
, "simple-json"
]
, repo =
"https://github.com/f-o-a-m/purescript-eth-core.git"
, version =
"v7.0.0"
}
, coroutine-transducers =
{ dependencies =
[ "aff"
, "coroutines"
, "effect"
, "maybe"
, "psci-support"
]
, repo =
"https://github.com/blinky3713/purescript-coroutine-transducers"
, version =
"v1.0.0"
}
, solc =
{ dependencies =
[ "aff"
, "argonaut"
, "console"
, "effect"
, "node-path"
, "prelude"
, "psci-support"
, "web3"
]
, repo =
"https://github.com/f-o-a-m/purescript-solc"
, version =
"v3.0.0"
}
, mkdirp =
{ dependencies =
[ "console"
, "effect"
, "either"
, "exceptions"
, "functions"
, "node-fs"
, "nullable"
, "prelude"
, "psci-support"
]
, repo =
"https://github.com/f-o-a-m/purescript-mkdirp"
, version =
"v1.0.0"
}
, tagged =
{ dependencies =
[ "identity"
, "profunctor"
]
, repo =
"https://github.com/kejace/purescript-tagged"
, version =
"v0.14"
}
}
{ solc =
{ dependencies =
[ "aff"
, "argonaut"
, "argonaut-codecs"
, "arrays"
, "bifunctors"
, "control"
, "effect"
, "either"
, "eth-core"
, "foldable-traversable"
, "foreign-object"
, "functions"
, "integers"
, "maybe"
, "newtype"
, "node-path"
, "prelude"
, "strings"
, "transformers"
, "tuples"
]
, repo =
"https://github.com/f-o-a-m/purescript-solc.git"
, version =
"d6e4f3be2f249d9a464bf9bbb6ca247bc24a759e"
}
, web3-generator =
{ dependencies =
[ "aff"
, "ansi"
, "argonaut"
, "argonaut-codecs"
, "argonaut-core"
, "argonaut-traversals"
, "arrays"
, "bifunctors"
, "console"
, "control"
, "effect"
, "either"
, "errors"
, "eth-core"
, "exceptions"
, "fixed-points"
, "foldable-traversable"
, "identity"
, "integers"
, "lists"
, "maybe"
, "language-cst-parser"
, "tidy-codegen"
, "mkdirp"
, "newtype"
, "node-buffer"
, "node-fs"
, "node-fs-aff"
, "node-path"
, "node-process"
, "ordered-collections"
, "optparse"
, "partial"
, "prelude"
, "profunctor-lenses"
, "string-parsers"
, "strings"
, "transformers"
, "tuples"
, "web3"
]
, repo =
"https://github.com/f-o-a-m/purescript-web3-generator.git"
, version =
"2c96bbe2fd0a3af4236406e3c0b118ec21250027"
}
}

in upstream // overrides // additions
3 changes: 1 addition & 2 deletions spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ You can edit this file as you like.
, "exceptions"
, "foldable-traversable"
, "foreign-object"
, "functions"
, "functors"
, "identity"
, "integers"
, "logging"
, "maybe"
, "mkdirp"
, "newtype"
, "node-buffer"
, "node-fs"
Expand All @@ -39,7 +39,6 @@ You can edit this file as you like.
, "partial"
, "prelude"
, "profunctor-lenses"
, "psci-support"
, "record"
, "refs"
, "solc"
Expand Down
Loading

0 comments on commit 46d99df

Please sign in to comment.