From 5b369345d3a43ad8db1d5d03b1476554e9cf3531 Mon Sep 17 00:00:00 2001 From: martyall Date: Mon, 20 Jan 2025 13:22:02 -0800 Subject: [PATCH] fix example --- example/.gitignore | 1 + example/bootstrap.dhall | 7 - example/build-contracts/spago.yaml | 8 + example/package.json | 13 +- example/packages.dhall | 1 - example/spago.dhall | 24 - example/spago.lock | 2286 +++++++++++++++++++++++ example/spago.yaml | 273 +++ example/src/Bootstrap.purs | 1 - example/test/Main.purs | 27 +- example/test/SimplePaidStorageSpec.purs | 158 +- spago.lock | 184 +- spago.yaml | 2 +- 13 files changed, 2810 insertions(+), 175 deletions(-) delete mode 100644 example/bootstrap.dhall create mode 100644 example/build-contracts/spago.yaml delete mode 100644 example/packages.dhall delete mode 100644 example/spago.dhall create mode 100644 example/spago.lock create mode 100644 example/spago.yaml delete mode 100644 example/src/Bootstrap.purs diff --git a/example/.gitignore b/example/.gitignore index 844a669..b7dcabc 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -10,3 +10,4 @@ /.spago src/Contract build +.spec-results diff --git a/example/bootstrap.dhall b/example/bootstrap.dhall deleted file mode 100644 index c47f9b5..0000000 --- a/example/bootstrap.dhall +++ /dev/null @@ -1,7 +0,0 @@ -{ name = "web3-tests" -, dependencies = - [ "chanterelle" - ] -, packages = ./packages.dhall -, sources = [ "src/Bootstrap.purs" ] -} diff --git a/example/build-contracts/spago.yaml b/example/build-contracts/spago.yaml new file mode 100644 index 0000000..7b2dec0 --- /dev/null +++ b/example/build-contracts/spago.yaml @@ -0,0 +1,8 @@ +package: + dependencies: + - chanterelle + name: build-contracts + run: + main: ChanterelleMain + execArgs: + - "build" diff --git a/example/package.json b/example/package.json index 4e5198d..91d63f6 100644 --- a/example/package.json +++ b/example/package.json @@ -4,28 +4,27 @@ "description": "Chanterell demo project", "license": "ISC", "scripts": { - "postinstall": "spago -x bootstrap.dhall build", - "chanterelle-build": "spago -x bootstrap.dhall run -m ChanterelleMain --node-args=\"build\"", + "postinstall": "spago build", + "chanterelle-build": "spago run -p build-contracts", "build": "spago build", "test": "spago test", - "deploy": "spago run", + "deploy": "spago run -p deploy", "tidy": "purs-tidy format-in-place \"src/**/*.purs\" \"test/**/*.purs\"", "tidy-check": "purs-tidy check \"src/**/*.purs\" \"test/**/*.purs\"" }, "dependencies": { "ethjs-provider-http": "^0.1.6", - "keccak": "^1.0.2", + "keccak": "^3.0.0", "rlp": "^2.0.0", - "secp256k1": "^3.0.1" + "secp256k1": "^5.0.0" }, "devDependencies": { - "mkdirp": "^0.5.1", "openzeppelin-contracts": "^4.0.0", "purescript": "^0.15.8", "purescript-psa": "^0.8.2", "purs-tidy": "^0.10.0", "solc": "^0.8", - "spago": "^0.21.0" + "spago": "next" } } diff --git a/example/packages.dhall b/example/packages.dhall deleted file mode 100644 index ab64970..0000000 --- a/example/packages.dhall +++ /dev/null @@ -1 +0,0 @@ -../packages.dhall with chanterelle = ../spago.dhall as Location diff --git a/example/spago.dhall b/example/spago.dhall deleted file mode 100644 index 9594c28..0000000 --- a/example/spago.dhall +++ /dev/null @@ -1,24 +0,0 @@ -{ name = "web3-tests" -, dependencies = - [ "aff" - , "arrays" - , "chanterelle" - , "effect" - , "either" - , "eth-core" - , "maybe" - , "newtype" - , "parallel" - , "partial" - , "prelude" - , "profunctor-lenses" - , "spec" - , "tagged" - , "transformers" - , "tuples" - , "web3" - , "identity" - ] -, packages = ./packages.dhall -, sources = [ "src/**/*.purs", "test/**/*.purs" ] -} diff --git a/example/spago.lock b/example/spago.lock new file mode 100644 index 0000000..287d2d3 --- /dev/null +++ b/example/spago.lock @@ -0,0 +1,2286 @@ +{ + "workspace": { + "packages": { + "build-contracts": { + "path": "build-contracts", + "core": { + "dependencies": [ + "chanterelle" + ], + "build_plan": [ + "aff", + "ansi", + "argonaut", + "argonaut-codecs", + "argonaut-core", + "argonaut-traversals", + "arraybuffer-types", + "arrays", + "avar", + "bifunctors", + "catenable-lists", + "chanterelle", + "console", + "const", + "contravariant", + "control", + "coroutine-transducers", + "coroutines", + "datetime", + "distributive", + "dodo-printer", + "effect", + "either", + "enums", + "eth-core", + "exceptions", + "exists", + "exitcodes", + "filterable", + "fixed-points", + "foldable-traversable", + "foreign", + "foreign-object", + "fork", + "free", + "freet", + "functions", + "functors", + "gen", + "heterogeneous", + "identity", + "integers", + "invariant", + "js-bigints", + "js-date", + "language-cst-parser", + "lazy", + "lists", + "maybe", + "minibench", + "newtype", + "node-buffer", + "node-child-process", + "node-event-emitter", + "node-fs", + "node-os", + "node-path", + "node-process", + "node-streams", + "nonempty", + "now", + "nullable", + "numbers", + "open-memoize", + "optparse", + "ordered-collections", + "orders", + "parallel", + "parsing", + "partial", + "posix-types", + "prelude", + "profunctor", + "profunctor-lenses", + "psci-support", + "record", + "refs", + "ring-modules", + "safe-coerce", + "simple-json", + "solc", + "st", + "string-parsers", + "strings", + "tagged", + "tailrec", + "tidy", + "tidy-codegen", + "transformers", + "tuples", + "type-equality", + "typelevel-prelude", + "unfoldable", + "unicode", + "unsafe-coerce", + "validation", + "variant", + "web3", + "web3-generator" + ] + }, + "test": { + "dependencies": [], + "build_plan": [] + } + }, + "deploy": { + "path": "./", + "core": { + "dependencies": [ + { + "aff": ">=7.1.0 <8.0.0" + }, + { + "arrays": ">=7.3.0 <8.0.0" + }, + { + "chanterelle": "*" + }, + { + "effect": ">=4.0.0 <5.0.0" + }, + { + "either": ">=6.1.0 <7.0.0" + }, + { + "eth-core": "*" + }, + { + "identity": ">=6.0.0 <7.0.0" + }, + { + "maybe": ">=6.0.0 <7.0.0" + }, + { + "newtype": ">=5.0.0 <6.0.0" + }, + { + "parallel": ">=6.0.0 <7.0.0" + }, + { + "partial": ">=4.0.0 <5.0.0" + }, + { + "prelude": ">=6.0.1 <7.0.0" + }, + { + "profunctor-lenses": ">=8.0.0 <9.0.0" + }, + { + "spec": ">=8.1.1 <9.0.0" + }, + { + "tagged": ">=4.0.2 <5.0.0" + }, + { + "transformers": ">=6.1.0 <7.0.0" + }, + { + "tuples": ">=7.0.0 <8.0.0" + }, + { + "web3": "*" + } + ], + "build_plan": [ + "aff", + "ansi", + "argonaut", + "argonaut-codecs", + "argonaut-core", + "argonaut-traversals", + "arraybuffer-types", + "arrays", + "avar", + "bifunctors", + "catenable-lists", + "chanterelle", + "console", + "const", + "contravariant", + "control", + "coroutine-transducers", + "coroutines", + "datetime", + "distributive", + "dodo-printer", + "effect", + "either", + "enums", + "eth-core", + "exceptions", + "exists", + "exitcodes", + "filterable", + "fixed-points", + "foldable-traversable", + "foreign", + "foreign-object", + "fork", + "free", + "freet", + "functions", + "functors", + "gen", + "heterogeneous", + "identity", + "integers", + "invariant", + "js-bigints", + "js-date", + "language-cst-parser", + "lazy", + "lists", + "maybe", + "minibench", + "mmorph", + "newtype", + "node-buffer", + "node-child-process", + "node-event-emitter", + "node-fs", + "node-os", + "node-path", + "node-process", + "node-streams", + "nonempty", + "now", + "nullable", + "numbers", + "open-memoize", + "optparse", + "ordered-collections", + "orders", + "parallel", + "parsing", + "partial", + "pipes", + "posix-types", + "prelude", + "profunctor", + "profunctor-lenses", + "psci-support", + "record", + "refs", + "ring-modules", + "safe-coerce", + "simple-json", + "solc", + "spec", + "st", + "string-parsers", + "strings", + "tagged", + "tailrec", + "tidy", + "tidy-codegen", + "transformers", + "tuples", + "type-equality", + "typelevel-prelude", + "unfoldable", + "unicode", + "unsafe-coerce", + "validation", + "variant", + "web3", + "web3-generator" + ] + }, + "test": { + "dependencies": [ + "spec", + "spec-node" + ], + "build_plan": [ + "aff", + "ansi", + "argonaut-codecs", + "argonaut-core", + "arraybuffer-types", + "arrays", + "avar", + "bifunctors", + "catenable-lists", + "console", + "const", + "contravariant", + "control", + "datetime", + "distributive", + "effect", + "either", + "enums", + "exceptions", + "exists", + "exitcodes", + "foldable-traversable", + "foreign", + "foreign-object", + "fork", + "free", + "functions", + "functors", + "gen", + "identity", + "integers", + "invariant", + "js-date", + "lazy", + "lists", + "maybe", + "mmorph", + "newtype", + "node-buffer", + "node-event-emitter", + "node-fs", + "node-path", + "node-process", + "node-streams", + "nonempty", + "now", + "nullable", + "numbers", + "open-memoize", + "optparse", + "ordered-collections", + "orders", + "parallel", + "partial", + "pipes", + "posix-types", + "prelude", + "profunctor", + "record", + "refs", + "safe-coerce", + "spec", + "spec-node", + "st", + "strings", + "tailrec", + "transformers", + "tuples", + "type-equality", + "typelevel-prelude", + "unfoldable", + "unsafe-coerce" + ] + } + } + }, + "extra_packages": { + "chanterelle": { + "path": ".." + }, + "coroutine-transducers": { + "git": "https://github.com/martyall/purescript-coroutine-transducers", + "ref": "v1.0.0", + "dependencies": [ + "aff", + "console", + "coroutines", + "effect", + "either", + "foldable-traversable", + "freet", + "functors", + "maybe", + "newtype", + "parallel", + "prelude", + "psci-support", + "tailrec", + "transformers", + "tuples" + ] + }, + "dodo-printer": { + "git": "https://github.com/natefaubion/purescript-dodo-printer.git", + "ref": "v2.2.1", + "dependencies": [ + "aff", + "ansi", + "arrays", + "avar", + "console", + "control", + "effect", + "either", + "exceptions", + "foldable-traversable", + "integers", + "lists", + "maybe", + "minibench", + "newtype", + "node-buffer", + "node-child-process", + "node-path", + "node-process", + "node-streams", + "parallel", + "partial", + "posix-types", + "prelude", + "safe-coerce", + "strings", + "tuples" + ] + }, + "eth-core": { + "git": "https://github.com/f-o-a-m/purescript-eth-core", + "ref": "3db27d22f738498a1e4263f537cd25279fc88088", + "dependencies": [ + "argonaut", + "arrays", + "effect", + "either", + "foldable-traversable", + "foreign", + "functions", + "gen", + "integers", + "js-bigints", + "lists", + "maybe", + "newtype", + "node-buffer", + "nonempty", + "ordered-collections", + "partial", + "prelude", + "simple-json", + "strings", + "unfoldable", + "unsafe-coerce" + ] + }, + "solc": { + "git": "https://github.com/f-o-a-m/purescript-solc.git", + "ref": "5c50e62b27208bea6a6c13c52b743ac5e665b489", + "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" + ] + }, + "tidy": { + "git": "https://github.com/natefaubion/purescript-tidy.git", + "ref": "v0.10.0", + "dependencies": [ + "arrays", + "dodo-printer", + "foldable-traversable", + "language-cst-parser", + "lists", + "maybe", + "ordered-collections", + "partial", + "prelude", + "strings", + "tuples" + ] + }, + "tidy-codegen": { + "git": "https://github.com/natefaubion/purescript-tidy-codegen.git", + "ref": "v4.0.0", + "dependencies": [ + "aff", + "ansi", + "arrays", + "avar", + "bifunctors", + "console", + "control", + "dodo-printer", + "effect", + "either", + "enums", + "exceptions", + "filterable", + "foldable-traversable", + "free", + "identity", + "integers", + "language-cst-parser", + "lazy", + "lists", + "maybe", + "newtype", + "node-buffer", + "node-child-process", + "node-path", + "node-process", + "node-streams", + "ordered-collections", + "parallel", + "partial", + "posix-types", + "prelude", + "record", + "safe-coerce", + "st", + "strings", + "tidy", + "transformers", + "tuples", + "type-equality", + "unicode" + ] + }, + "web3": { + "git": "https://github.com/f-o-a-m/purescript-web3.git", + "ref": "bd87cd18adb863cfccdfe5ff263a129c02f1c8c2", + "dependencies": [ + "aff", + "argonaut", + "arrays", + "bifunctors", + "control", + "coroutine-transducers", + "coroutines", + "effect", + "either", + "eth-core", + "exceptions", + "foldable-traversable", + "foreign", + "foreign-object", + "fork", + "gen", + "heterogeneous", + "identity", + "maybe", + "newtype", + "parallel", + "parsing", + "partial", + "prelude", + "profunctor-lenses", + "record", + "ring-modules", + "simple-json", + "strings", + "tagged", + "tailrec", + "transformers", + "tuples", + "typelevel-prelude", + "unfoldable", + "unsafe-coerce", + "variant" + ] + }, + "web3-generator": { + "git": "https://github.com/f-o-a-m/purescript-web3-generator.git", + "ref": "12ddba3d0694f86d1cf274856e5c42c7d8f87a3a", + "dependencies": [ + "aff", + "ansi", + "argonaut", + "argonaut-codecs", + "argonaut-core", + "argonaut-traversals", + "arrays", + "bifunctors", + "console", + "control", + "effect", + "either", + "eth-core", + "exceptions", + "fixed-points", + "foldable-traversable", + "identity", + "integers", + "language-cst-parser", + "lists", + "maybe", + "newtype", + "node-buffer", + "node-fs", + "node-path", + "node-process", + "optparse", + "ordered-collections", + "partial", + "prelude", + "profunctor-lenses", + "string-parsers", + "strings", + "tidy-codegen", + "transformers", + "tuples", + "web3" + ] + } + } + }, + "packages": { + "aff": { + "type": "registry", + "version": "7.1.0", + "integrity": "sha256-7hOC6uQO9XBAI5FD8F33ChLjFAiZVfd4BJMqlMh7TNU=", + "dependencies": [ + "arrays", + "bifunctors", + "control", + "datetime", + "effect", + "either", + "exceptions", + "foldable-traversable", + "functions", + "maybe", + "newtype", + "parallel", + "prelude", + "refs", + "tailrec", + "transformers", + "unsafe-coerce" + ] + }, + "ansi": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-ZMB6HD+q9CXvn9fRCmJ8dvuDrOVHcjombL3oNOerVnE=", + "dependencies": [ + "foldable-traversable", + "lists", + "strings" + ] + }, + "argonaut": { + "type": "registry", + "version": "9.0.0", + "integrity": "sha256-9sHzkzcFkaMUa9+3FjIybJDYnHtY4Jp4zHOJ84qPTXo=", + "dependencies": [ + "argonaut-codecs", + "argonaut-core", + "argonaut-traversals" + ] + }, + "argonaut-codecs": { + "type": "registry", + "version": "9.1.0", + "integrity": "sha256-N6efXByUeg848ompEqJfVvZuZPfdRYDGlTDFn0G0Oh8=", + "dependencies": [ + "argonaut-core", + "arrays", + "effect", + "foreign-object", + "identity", + "integers", + "maybe", + "nonempty", + "ordered-collections", + "prelude", + "record" + ] + }, + "argonaut-core": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-RC82GfAjItydxrO24cdX373KHVZiLqybu19b5X8u7B4=", + "dependencies": [ + "arrays", + "control", + "either", + "foreign-object", + "functions", + "gen", + "maybe", + "nonempty", + "prelude", + "strings", + "tailrec" + ] + }, + "argonaut-traversals": { + "type": "registry", + "version": "10.0.0", + "integrity": "sha256-9nSfqR70rjiNWVVsCoK+jrm9dmyZTx89IKNYO6uNUIk=", + "dependencies": [ + "argonaut-codecs", + "argonaut-core", + "profunctor-lenses" + ] + }, + "arraybuffer-types": { + "type": "registry", + "version": "3.0.2", + "integrity": "sha256-mQKokysYVkooS4uXbO+yovmV/s8b138Ws3zQvOwIHRA=", + "dependencies": [] + }, + "arrays": { + "type": "registry", + "version": "7.3.0", + "integrity": "sha256-tmcklBlc/muUtUfr9RapdCPwnlQeB3aSrC4dK85gQlc=", + "dependencies": [ + "bifunctors", + "control", + "foldable-traversable", + "functions", + "maybe", + "nonempty", + "partial", + "prelude", + "safe-coerce", + "st", + "tailrec", + "tuples", + "unfoldable", + "unsafe-coerce" + ] + }, + "avar": { + "type": "registry", + "version": "5.0.0", + "integrity": "sha256-e7hf0x4hEpcygXP0LtvfvAQ49Bbj2aWtZT3gqM///0A=", + "dependencies": [ + "aff", + "effect", + "either", + "exceptions", + "functions", + "maybe" + ] + }, + "bifunctors": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-/gZwC9YhNxZNQpnHa5BIYerCGM2jeX9ukZiEvYxm5Nw=", + "dependencies": [ + "const", + "either", + "newtype", + "prelude", + "tuples" + ] + }, + "catenable-lists": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-76vYENhwF4BWTBsjeLuErCH2jqVT4M3R1HX+4RwSftA=", + "dependencies": [ + "control", + "foldable-traversable", + "lists", + "maybe", + "prelude", + "tuples", + "unfoldable" + ] + }, + "chanterelle": { + "type": "local", + "path": "..", + "dependencies": [ + "aff", + "ansi", + "argonaut", + "argonaut-core", + "argonaut-traversals", + "arrays", + "avar", + "bifunctors", + "console", + "control", + "datetime", + "effect", + "either", + "eth-core", + "exceptions", + "foldable-traversable", + "foreign-object", + "functors", + "identity", + "integers", + "js-date", + "maybe", + "newtype", + "node-buffer", + "node-fs", + "node-path", + "node-process", + "now", + "optparse", + "ordered-collections", + "parallel", + "partial", + "prelude", + "profunctor-lenses", + "record", + "refs", + "simple-json", + "solc", + "strings", + "transformers", + "tuples", + "unfoldable", + "validation", + "web3", + "web3-generator" + ] + }, + "console": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-CxmAzjgyuGDmt9FZW51VhV6rBPwR6o0YeKUzA9rSzcM=", + "dependencies": [ + "effect", + "prelude" + ] + }, + "const": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-tNrxDW8D8H4jdHE2HiPzpLy08zkzJMmGHdRqt5BQuTc=", + "dependencies": [ + "invariant", + "newtype", + "prelude" + ] + }, + "contravariant": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-TP+ooAp3vvmdjfQsQJSichF5B4BPDHp3wAJoWchip6c=", + "dependencies": [ + "const", + "either", + "newtype", + "prelude", + "tuples" + ] + }, + "control": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-sH7Pg9E96JCPF9PIA6oQ8+BjTyO/BH1ZuE/bOcyj4Jk=", + "dependencies": [ + "newtype", + "prelude" + ] + }, + "coroutine-transducers": { + "type": "git", + "url": "https://github.com/martyall/purescript-coroutine-transducers", + "rev": "31ec5c4d6e8e0f0384173cdc0b291446af90e80f", + "dependencies": [ + "aff", + "console", + "coroutines", + "effect", + "either", + "foldable-traversable", + "freet", + "functors", + "maybe", + "newtype", + "parallel", + "prelude", + "psci-support", + "tailrec", + "transformers", + "tuples" + ] + }, + "coroutines": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-w0ftoTTR6fIkCgQctMzeTJdbY2lenEiklt0TRZeCqY8=", + "dependencies": [ + "freet", + "parallel", + "profunctor" + ] + }, + "datetime": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-g/5X5BBegQWLpI9IWD+sY6mcaYpzzlW5lz5NBzaMtyI=", + "dependencies": [ + "bifunctors", + "control", + "either", + "enums", + "foldable-traversable", + "functions", + "gen", + "integers", + "lists", + "maybe", + "newtype", + "numbers", + "ordered-collections", + "partial", + "prelude", + "tuples" + ] + }, + "distributive": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-HTDdmEnzigMl+02SJB88j+gAXDx9VKsbvR4MJGDPbOQ=", + "dependencies": [ + "identity", + "newtype", + "prelude", + "tuples", + "type-equality" + ] + }, + "dodo-printer": { + "type": "git", + "url": "https://github.com/natefaubion/purescript-dodo-printer.git", + "rev": "831c5c963a57ca4bfd62f96335267d7d0785851d", + "dependencies": [ + "aff", + "ansi", + "arrays", + "avar", + "console", + "control", + "effect", + "either", + "exceptions", + "foldable-traversable", + "integers", + "lists", + "maybe", + "minibench", + "newtype", + "node-buffer", + "node-child-process", + "node-path", + "node-process", + "node-streams", + "parallel", + "partial", + "posix-types", + "prelude", + "safe-coerce", + "strings", + "tuples" + ] + }, + "effect": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-eBtZu+HZcMa5HilvI6kaDyVX3ji8p0W9MGKy2K4T6+M=", + "dependencies": [ + "prelude" + ] + }, + "either": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-6hgTPisnMWVwQivOu2PKYcH8uqjEOOqDyaDQVUchTpY=", + "dependencies": [ + "control", + "invariant", + "maybe", + "prelude" + ] + }, + "enums": { + "type": "registry", + "version": "6.0.1", + "integrity": "sha256-HWaD73JFLorc4A6trKIRUeDMdzE+GpkJaEOM1nTNkC8=", + "dependencies": [ + "control", + "either", + "gen", + "maybe", + "newtype", + "nonempty", + "partial", + "prelude", + "tuples", + "unfoldable" + ] + }, + "eth-core": { + "type": "git", + "url": "https://github.com/f-o-a-m/purescript-eth-core", + "rev": "3db27d22f738498a1e4263f537cd25279fc88088", + "dependencies": [ + "argonaut", + "arrays", + "effect", + "either", + "foldable-traversable", + "foreign", + "functions", + "gen", + "integers", + "js-bigints", + "lists", + "maybe", + "newtype", + "node-buffer", + "nonempty", + "ordered-collections", + "partial", + "prelude", + "simple-json", + "strings", + "unfoldable", + "unsafe-coerce" + ] + }, + "exceptions": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-K0T89IHtF3vBY7eSAO7eDOqSb2J9kZGAcDN5+IKsF8E=", + "dependencies": [ + "effect", + "either", + "maybe", + "prelude" + ] + }, + "exists": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-A0JQHpTfo1dNOj9U5/Fd3xndlRSE0g2IQWOGor2yXn8=", + "dependencies": [ + "unsafe-coerce" + ] + }, + "exitcodes": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-4wxViTbyOoyKJ/WaRGI6+hZmgMKI5Miv16lSwefiLSM=", + "dependencies": [ + "enums" + ] + }, + "filterable": { + "type": "registry", + "version": "5.0.0", + "integrity": "sha256-cCojJHRnTmpY1j1kegI4CFwghdQ2Fm/8dzM8IlC+lng=", + "dependencies": [ + "arrays", + "either", + "foldable-traversable", + "identity", + "lists", + "ordered-collections" + ] + }, + "fixed-points": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-hTl5fzeG4mzAOFzEzAeNH7kJvJgYCH7x3v2NdX9pOE4=", + "dependencies": [ + "exists", + "newtype", + "prelude", + "transformers" + ] + }, + "foldable-traversable": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-fLeqRYM4jUrZD5H4WqcwUgzU7XfYkzO4zhgtNc3jcWM=", + "dependencies": [ + "bifunctors", + "const", + "control", + "either", + "functors", + "identity", + "maybe", + "newtype", + "orders", + "prelude", + "tuples" + ] + }, + "foreign": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-1ORiqoS3HW+qfwSZAppHPWy4/6AQysxZ2t29jcdUMNA=", + "dependencies": [ + "either", + "functions", + "identity", + "integers", + "lists", + "maybe", + "prelude", + "strings", + "transformers" + ] + }, + "foreign-object": { + "type": "registry", + "version": "4.1.0", + "integrity": "sha256-q24okj6mT+yGHYQ+ei/pYPj5ih6sTbu7eDv/WU56JVo=", + "dependencies": [ + "arrays", + "foldable-traversable", + "functions", + "gen", + "lists", + "maybe", + "prelude", + "st", + "tailrec", + "tuples", + "typelevel-prelude", + "unfoldable" + ] + }, + "fork": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-X7u0SuCvFbLbzuNEKLBNuWjmcroqMqit4xEzpQwAP7E=", + "dependencies": [ + "aff" + ] + }, + "free": { + "type": "registry", + "version": "7.1.0", + "integrity": "sha256-JAumgEsGSzJCNLD8AaFvuX7CpqS5yruCngi6yI7+V5k=", + "dependencies": [ + "catenable-lists", + "control", + "distributive", + "either", + "exists", + "foldable-traversable", + "invariant", + "lazy", + "maybe", + "prelude", + "tailrec", + "transformers", + "tuples", + "unsafe-coerce" + ] + }, + "freet": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-zkL6wU4ZPq8xz1kGFxoliWqyhBksepMJTyA68VEBaJo=", + "dependencies": [ + "aff", + "bifunctors", + "effect", + "either", + "exists", + "free", + "prelude", + "tailrec", + "transformers", + "tuples" + ] + }, + "functions": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-adMyJNEnhGde2unHHAP79gPtlNjNqzgLB8arEOn9hLI=", + "dependencies": [ + "prelude" + ] + }, + "functors": { + "type": "registry", + "version": "5.0.0", + "integrity": "sha256-zfPWWYisbD84MqwpJSZFlvM6v86McM68ob8p9s27ywU=", + "dependencies": [ + "bifunctors", + "const", + "contravariant", + "control", + "distributive", + "either", + "invariant", + "maybe", + "newtype", + "prelude", + "profunctor", + "tuples", + "unsafe-coerce" + ] + }, + "gen": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-f7yzAXWwr+xnaqEOcvyO3ezKdoes8+WXWdXIHDBCAPI=", + "dependencies": [ + "either", + "foldable-traversable", + "identity", + "maybe", + "newtype", + "nonempty", + "prelude", + "tailrec", + "tuples", + "unfoldable" + ] + }, + "heterogeneous": { + "type": "registry", + "version": "0.6.0", + "integrity": "sha256-cfNYSK6yYmjTrkzk95Otpv6TUUkeBreexwqG/tBvUyg=", + "dependencies": [ + "either", + "functors", + "prelude", + "record", + "tuples", + "variant" + ] + }, + "identity": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-4wY0XZbAksjY6UAg99WkuKyJlQlWAfTi2ssadH0wVMY=", + "dependencies": [ + "control", + "invariant", + "newtype", + "prelude" + ] + }, + "integers": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-sf+sK26R1hzwl3NhXR7WAu9zCDjQnfoXwcyGoseX158=", + "dependencies": [ + "maybe", + "numbers", + "prelude" + ] + }, + "invariant": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-RGWWyYrz0Hs1KjPDA+87Kia67ZFBhfJ5lMGOMCEFoLo=", + "dependencies": [ + "control", + "prelude" + ] + }, + "js-bigints": { + "type": "registry", + "version": "2.2.1", + "integrity": "sha256-hKWZo9NxtsAaHmNXr6B8GY4c0olQbYLXPVGWm4TF2Ss=", + "dependencies": [ + "integers", + "maybe", + "prelude" + ] + }, + "js-date": { + "type": "registry", + "version": "8.0.0", + "integrity": "sha256-6TVF4DWg5JL+jRAsoMssYw8rgOVALMUHT1CuNZt8NRo=", + "dependencies": [ + "datetime", + "effect", + "exceptions", + "foreign", + "integers", + "now" + ] + }, + "language-cst-parser": { + "type": "registry", + "version": "0.14.1", + "integrity": "sha256-LJzh1ZTaKjcrHx95ZfO2La3w6Xb/IZQT3m2Nuj4n1dM=", + "dependencies": [ + "arrays", + "const", + "control", + "effect", + "either", + "enums", + "foldable-traversable", + "free", + "functions", + "functors", + "identity", + "integers", + "lazy", + "lists", + "maybe", + "newtype", + "numbers", + "ordered-collections", + "partial", + "prelude", + "st", + "strings", + "transformers", + "tuples", + "typelevel-prelude", + "unfoldable", + "unsafe-coerce" + ] + }, + "lazy": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-lMsfFOnlqfe4KzRRiW8ot5ge6HtcU3Eyh2XkXcP5IgU=", + "dependencies": [ + "control", + "foldable-traversable", + "invariant", + "prelude" + ] + }, + "lists": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-EKF15qYqucuXP2lT/xPxhqy58f0FFT6KHdIB/yBOayI=", + "dependencies": [ + "bifunctors", + "control", + "foldable-traversable", + "lazy", + "maybe", + "newtype", + "nonempty", + "partial", + "prelude", + "tailrec", + "tuples", + "unfoldable" + ] + }, + "maybe": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-5cCIb0wPwbat2PRkQhUeZO0jcAmf8jCt2qE0wbC3v2Q=", + "dependencies": [ + "control", + "invariant", + "newtype", + "prelude" + ] + }, + "minibench": { + "type": "registry", + "version": "4.0.1", + "integrity": "sha256-7jyxcklZI49q/otYvMV4f9YnJwEqQ3Me5buhDwAOydw=", + "dependencies": [ + "console", + "effect", + "integers", + "numbers", + "partial", + "prelude", + "refs" + ] + }, + "mmorph": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-urZlZNNqGeQFe5D/ClHlR8QgGBNHTMFPtJ5S5IpflTQ=", + "dependencies": [ + "free", + "functors", + "transformers" + ] + }, + "newtype": { + "type": "registry", + "version": "5.0.0", + "integrity": "sha256-gdrQu8oGe9eZE6L3wOI8ql/igOg+zEGB5ITh2g+uttw=", + "dependencies": [ + "prelude", + "safe-coerce" + ] + }, + "node-buffer": { + "type": "registry", + "version": "9.0.0", + "integrity": "sha256-PWE2DJ5ruBLCmeA/fUiuySEFmUJ/VuRfyrnCuVZBlu4=", + "dependencies": [ + "arraybuffer-types", + "effect", + "maybe", + "nullable", + "st", + "unsafe-coerce" + ] + }, + "node-child-process": { + "type": "registry", + "version": "11.1.0", + "integrity": "sha256-vioMNgk8p+CGwlb6T3I3TIir27el85Yg4satLE/I89w=", + "dependencies": [ + "exceptions", + "foreign", + "foreign-object", + "functions", + "node-event-emitter", + "node-fs", + "node-os", + "node-streams", + "nullable", + "posix-types", + "unsafe-coerce" + ] + }, + "node-event-emitter": { + "type": "registry", + "version": "3.0.0", + "integrity": "sha256-Qw0MjsT4xRH2j2i4K8JmRjcMKnH5z1Cw39t00q4LE4w=", + "dependencies": [ + "effect", + "either", + "functions", + "maybe", + "nullable", + "prelude", + "unsafe-coerce" + ] + }, + "node-fs": { + "type": "registry", + "version": "9.2.0", + "integrity": "sha256-Sg0vkXycEzkEerX6hLccz21Ygd9w1+QSk1thotRZPGI=", + "dependencies": [ + "datetime", + "effect", + "either", + "enums", + "exceptions", + "functions", + "integers", + "js-date", + "maybe", + "node-buffer", + "node-path", + "node-streams", + "nullable", + "partial", + "prelude", + "strings", + "unsafe-coerce" + ] + }, + "node-os": { + "type": "registry", + "version": "5.1.0", + "integrity": "sha256-K3gcu9AXanN1+qtk1900+Fi+CuO0s3/H/RMNRNgIzso=", + "dependencies": [ + "arrays", + "bifunctors", + "console", + "control", + "datetime", + "effect", + "either", + "exceptions", + "foldable-traversable", + "foreign", + "foreign-object", + "functions", + "maybe", + "node-buffer", + "nullable", + "partial", + "posix-types", + "prelude", + "unsafe-coerce" + ] + }, + "node-path": { + "type": "registry", + "version": "5.0.1", + "integrity": "sha256-ePOElFamHkffhwJcS0Ozq4A14rflnkasFU6X2B8/yXs=", + "dependencies": [ + "effect" + ] + }, + "node-process": { + "type": "registry", + "version": "11.2.0", + "integrity": "sha256-+2MQDYChjGbVbapCyJtuWYwD41jk+BntF/kcOTKBMVs=", + "dependencies": [ + "effect", + "foreign", + "foreign-object", + "maybe", + "node-event-emitter", + "node-streams", + "posix-types", + "prelude", + "unsafe-coerce" + ] + }, + "node-streams": { + "type": "registry", + "version": "9.0.0", + "integrity": "sha256-2n6dq7YWleTDmD1Kur/ul7Cn08IvWrScgPf+0PgX2TQ=", + "dependencies": [ + "aff", + "effect", + "either", + "exceptions", + "node-buffer", + "node-event-emitter", + "nullable", + "prelude" + ] + }, + "nonempty": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-54ablJZUHGvvlTJzi3oXyPCuvY6zsrWJuH/dMJ/MFLs=", + "dependencies": [ + "control", + "foldable-traversable", + "maybe", + "prelude", + "tuples", + "unfoldable" + ] + }, + "now": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-xZ7x37ZMREfs6GCDw/h+FaKHV/3sPWmtqBZRGTxybQY=", + "dependencies": [ + "datetime", + "effect" + ] + }, + "nullable": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-yiGBVl3AD+Guy4kNWWeN+zl1gCiJK+oeIFtZtPCw4+o=", + "dependencies": [ + "effect", + "functions", + "maybe" + ] + }, + "numbers": { + "type": "registry", + "version": "9.0.1", + "integrity": "sha256-/9M6aeMDBdB4cwYDeJvLFprAHZ49EbtKQLIJsneXLIk=", + "dependencies": [ + "functions", + "maybe" + ] + }, + "open-memoize": { + "type": "registry", + "version": "6.2.0", + "integrity": "sha256-p1m7wF3aHQ80yUvqMs20OTMl496WS6YpKlmI2Nkg9j0=", + "dependencies": [ + "either", + "integers", + "lazy", + "lists", + "maybe", + "partial", + "prelude", + "strings", + "tuples" + ] + }, + "optparse": { + "type": "registry", + "version": "5.0.1", + "integrity": "sha256-cEzEkNW4q0gZlXl4z0zn+H2vs6l2UAp7NPHCsois73k=", + "dependencies": [ + "aff", + "arrays", + "bifunctors", + "console", + "control", + "effect", + "either", + "enums", + "exists", + "exitcodes", + "foldable-traversable", + "free", + "gen", + "integers", + "lazy", + "lists", + "maybe", + "newtype", + "node-buffer", + "node-process", + "node-streams", + "nonempty", + "numbers", + "open-memoize", + "partial", + "prelude", + "strings", + "tailrec", + "transformers", + "tuples" + ] + }, + "ordered-collections": { + "type": "registry", + "version": "3.2.0", + "integrity": "sha256-o9jqsj5rpJmMdoe/zyufWHFjYYFTTsJpgcuCnqCO6PM=", + "dependencies": [ + "arrays", + "foldable-traversable", + "gen", + "lists", + "maybe", + "partial", + "prelude", + "st", + "tailrec", + "tuples", + "unfoldable" + ] + }, + "orders": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-nBA0g3/ai0euH8q9pSbGqk53W2q6agm/dECZTHcoink=", + "dependencies": [ + "newtype", + "prelude" + ] + }, + "parallel": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-VJbkGD0rAKX+NUEeBJbYJ78bEKaZbgow+QwQEfPB6ko=", + "dependencies": [ + "control", + "effect", + "either", + "foldable-traversable", + "functors", + "maybe", + "newtype", + "prelude", + "profunctor", + "refs", + "transformers" + ] + }, + "parsing": { + "type": "registry", + "version": "10.2.0", + "integrity": "sha256-ZDIdMFAKkst57x6BVa1aUWJnS8smoZnXsZ339Aq1mPA=", + "dependencies": [ + "arrays", + "control", + "effect", + "either", + "enums", + "foldable-traversable", + "functions", + "identity", + "integers", + "lazy", + "lists", + "maybe", + "newtype", + "nullable", + "numbers", + "partial", + "prelude", + "st", + "strings", + "tailrec", + "transformers", + "tuples", + "unfoldable", + "unicode", + "unsafe-coerce" + ] + }, + "partial": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-fwXerld6Xw1VkReh8yeQsdtLVrjfGiVuC5bA1Wyo/J4=", + "dependencies": [] + }, + "pipes": { + "type": "registry", + "version": "8.0.0", + "integrity": "sha256-kvfqGM4cPA/wCcBHbp5psouFw5dZGvku2462x7ZBwSY=", + "dependencies": [ + "aff", + "lists", + "mmorph", + "prelude", + "tailrec", + "transformers", + "tuples" + ] + }, + "posix-types": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-ZfFz8RR1lee/o/Prccyeut3Q+9tYd08mlR72sIh6GzA=", + "dependencies": [ + "maybe", + "prelude" + ] + }, + "prelude": { + "type": "registry", + "version": "6.0.1", + "integrity": "sha256-o8p6SLYmVPqzXZhQFd2hGAWEwBoXl1swxLG/scpJ0V0=", + "dependencies": [] + }, + "profunctor": { + "type": "registry", + "version": "6.0.1", + "integrity": "sha256-E58hSYdJvF2Qjf9dnWLPlJKh2Z2fLfFLkQoYi16vsFk=", + "dependencies": [ + "control", + "distributive", + "either", + "exists", + "invariant", + "newtype", + "prelude", + "tuples" + ] + }, + "profunctor-lenses": { + "type": "registry", + "version": "8.0.0", + "integrity": "sha256-K7f29rHRHgVSb2Y/PaSKtfYPriP6n87BJNO7EhsZHas=", + "dependencies": [ + "arrays", + "bifunctors", + "const", + "control", + "distributive", + "either", + "foldable-traversable", + "foreign-object", + "functors", + "identity", + "lists", + "maybe", + "newtype", + "ordered-collections", + "partial", + "prelude", + "profunctor", + "record", + "transformers", + "tuples" + ] + }, + "psci-support": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-C6ql4P9TEP06hft/1Z5QumPA4yARR4VIxDdhmL1EO+Y=", + "dependencies": [ + "console", + "effect", + "prelude" + ] + }, + "record": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-Za5U85bTRJEfGK5Sk4hM41oXy84YQI0I8TL3WUn1Qzg=", + "dependencies": [ + "functions", + "prelude", + "unsafe-coerce" + ] + }, + "refs": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-Vgwne7jIbD3ZMoLNNETLT8Litw6lIYo3MfYNdtYWj9s=", + "dependencies": [ + "effect", + "prelude" + ] + }, + "ring-modules": { + "type": "registry", + "version": "5.0.1", + "integrity": "sha256-hfPAsrqmUTB0aJvjho1pf6Y+9Hl3rf9m+tm1sUbMijA=", + "dependencies": [ + "prelude" + ] + }, + "safe-coerce": { + "type": "registry", + "version": "2.0.0", + "integrity": "sha256-a1ibQkiUcbODbLE/WAq7Ttbbh9ex+x33VCQ7GngKudU=", + "dependencies": [ + "unsafe-coerce" + ] + }, + "simple-json": { + "type": "registry", + "version": "9.0.0", + "integrity": "sha256-K3RJaThqsszTd+TEklzZmAdDqvIHWgXIfKqlsoykU1c=", + "dependencies": [ + "arrays", + "exceptions", + "foreign", + "foreign-object", + "nullable", + "prelude", + "record", + "typelevel-prelude", + "variant" + ] + }, + "solc": { + "type": "git", + "url": "https://github.com/f-o-a-m/purescript-solc.git", + "rev": "5c50e62b27208bea6a6c13c52b743ac5e665b489", + "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" + ] + }, + "spec": { + "type": "registry", + "version": "8.1.1", + "integrity": "sha256-EM7UfQIaSgiw13LJ4ZASkfYmmRDKIlec3nYbGKFqGhk=", + "dependencies": [ + "aff", + "ansi", + "arrays", + "avar", + "bifunctors", + "control", + "datetime", + "effect", + "either", + "exceptions", + "foldable-traversable", + "fork", + "identity", + "integers", + "lists", + "maybe", + "newtype", + "now", + "ordered-collections", + "parallel", + "pipes", + "prelude", + "refs", + "strings", + "tailrec", + "transformers", + "tuples" + ] + }, + "spec-node": { + "type": "registry", + "version": "0.0.3", + "integrity": "sha256-Bjzg6l4uOfMN/FV0SKuT1Mm8eMP9sloLGVcY/0MeMnI=", + "dependencies": [ + "aff", + "argonaut-codecs", + "argonaut-core", + "arrays", + "control", + "datetime", + "effect", + "either", + "foldable-traversable", + "identity", + "integers", + "maybe", + "newtype", + "node-buffer", + "node-fs", + "node-process", + "now", + "numbers", + "optparse", + "ordered-collections", + "partial", + "prelude", + "spec", + "strings", + "tuples" + ] + }, + "st": { + "type": "registry", + "version": "6.2.0", + "integrity": "sha256-z9X0WsOUlPwNx9GlCC+YccCyz8MejC8Wb0C4+9fiBRY=", + "dependencies": [ + "partial", + "prelude", + "tailrec", + "unsafe-coerce" + ] + }, + "string-parsers": { + "type": "registry", + "version": "8.0.0", + "integrity": "sha256-9ATYh0S54ERoR+uhkCM59wBRvW/6zv6geHJ0TmcI644=", + "dependencies": [ + "arrays", + "bifunctors", + "control", + "either", + "foldable-traversable", + "lists", + "maybe", + "prelude", + "strings", + "tailrec" + ] + }, + "strings": { + "type": "registry", + "version": "6.0.1", + "integrity": "sha256-WssD3DbX4OPzxSdjvRMX0yvc9+pS7n5gyPv5I2Trb7k=", + "dependencies": [ + "arrays", + "control", + "either", + "enums", + "foldable-traversable", + "gen", + "integers", + "maybe", + "newtype", + "nonempty", + "partial", + "prelude", + "tailrec", + "tuples", + "unfoldable", + "unsafe-coerce" + ] + }, + "tagged": { + "type": "registry", + "version": "4.0.2", + "integrity": "sha256-d9+C67aqaxj0q1mSnM+0dhOKt9w8xfGpCw2C0gQLAo0=", + "dependencies": [ + "control", + "foldable-traversable", + "identity", + "invariant", + "newtype", + "prelude", + "profunctor" + ] + }, + "tailrec": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-Xx19ECVDRrDWpz9D2GxQHHV89vd61dnXxQm0IcYQHGk=", + "dependencies": [ + "bifunctors", + "effect", + "either", + "identity", + "maybe", + "partial", + "prelude", + "refs" + ] + }, + "tidy": { + "type": "git", + "url": "https://github.com/natefaubion/purescript-tidy.git", + "rev": "42db77a3d9b0985021d970404195ca8bb2857ee0", + "dependencies": [ + "arrays", + "dodo-printer", + "foldable-traversable", + "language-cst-parser", + "lists", + "maybe", + "ordered-collections", + "partial", + "prelude", + "strings", + "tuples" + ] + }, + "tidy-codegen": { + "type": "git", + "url": "https://github.com/natefaubion/purescript-tidy-codegen.git", + "rev": "a6ed54719e28338a621a311219a3bf4e33abe289", + "dependencies": [ + "aff", + "ansi", + "arrays", + "avar", + "bifunctors", + "console", + "control", + "dodo-printer", + "effect", + "either", + "enums", + "exceptions", + "filterable", + "foldable-traversable", + "free", + "identity", + "integers", + "language-cst-parser", + "lazy", + "lists", + "maybe", + "newtype", + "node-buffer", + "node-child-process", + "node-path", + "node-process", + "node-streams", + "ordered-collections", + "parallel", + "partial", + "posix-types", + "prelude", + "record", + "safe-coerce", + "st", + "strings", + "tidy", + "transformers", + "tuples", + "type-equality", + "unicode" + ] + }, + "transformers": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-3Bm+Z6tsC/paG888XkywDngJ2JMos+JfOhRlkVfb7gI=", + "dependencies": [ + "control", + "distributive", + "effect", + "either", + "exceptions", + "foldable-traversable", + "identity", + "lazy", + "maybe", + "newtype", + "prelude", + "st", + "tailrec", + "tuples", + "unfoldable" + ] + }, + "tuples": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-1rXgTomes9105BjgXqIw0FL6Fz1lqqUTLWOumhWec1M=", + "dependencies": [ + "control", + "invariant", + "prelude" + ] + }, + "type-equality": { + "type": "registry", + "version": "4.0.1", + "integrity": "sha256-Hs9D6Y71zFi/b+qu5NSbuadUQXe5iv5iWx0226vOHUw=", + "dependencies": [] + }, + "typelevel-prelude": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-uFF2ph+vHcQpfPuPf2a3ukJDFmLhApmkpTMviHIWgJM=", + "dependencies": [ + "prelude", + "type-equality" + ] + }, + "unfoldable": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-JtikvJdktRap7vr/K4ITlxUX1QexpnqBq0G/InLr6eg=", + "dependencies": [ + "foldable-traversable", + "maybe", + "partial", + "prelude", + "tuples" + ] + }, + "unicode": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-QJnTVZpmihEAUiMeYrfkusVoziJWp2hJsgi9bMQLue8=", + "dependencies": [ + "foldable-traversable", + "maybe", + "strings" + ] + }, + "unsafe-coerce": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-IqIYW4Vkevn8sI+6aUwRGvd87tVL36BBeOr0cGAE7t0=", + "dependencies": [] + }, + "validation": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-kfFailaIW4spGxbRk4261z/RGT0Sb7Dx5f3qihy0MTw=", + "dependencies": [ + "bifunctors", + "control", + "either", + "foldable-traversable", + "newtype", + "prelude" + ] + }, + "variant": { + "type": "registry", + "version": "8.0.0", + "integrity": "sha256-SR//zQDg2dnbB8ZHslcxieUkCeNlbMToapvmh9onTtw=", + "dependencies": [ + "enums", + "lists", + "maybe", + "partial", + "prelude", + "record", + "tuples", + "unsafe-coerce" + ] + }, + "web3": { + "type": "git", + "url": "https://github.com/f-o-a-m/purescript-web3.git", + "rev": "bd87cd18adb863cfccdfe5ff263a129c02f1c8c2", + "dependencies": [ + "aff", + "argonaut", + "arrays", + "bifunctors", + "control", + "coroutine-transducers", + "coroutines", + "effect", + "either", + "eth-core", + "exceptions", + "foldable-traversable", + "foreign", + "foreign-object", + "fork", + "gen", + "heterogeneous", + "identity", + "maybe", + "newtype", + "parallel", + "parsing", + "partial", + "prelude", + "profunctor-lenses", + "record", + "ring-modules", + "simple-json", + "strings", + "tagged", + "tailrec", + "transformers", + "tuples", + "typelevel-prelude", + "unfoldable", + "unsafe-coerce", + "variant" + ] + }, + "web3-generator": { + "type": "git", + "url": "https://github.com/f-o-a-m/purescript-web3-generator.git", + "rev": "12ddba3d0694f86d1cf274856e5c42c7d8f87a3a", + "dependencies": [ + "aff", + "ansi", + "argonaut", + "argonaut-codecs", + "argonaut-core", + "argonaut-traversals", + "arrays", + "bifunctors", + "console", + "control", + "effect", + "either", + "eth-core", + "exceptions", + "fixed-points", + "foldable-traversable", + "identity", + "integers", + "language-cst-parser", + "lists", + "maybe", + "newtype", + "node-buffer", + "node-fs", + "node-path", + "node-process", + "optparse", + "ordered-collections", + "partial", + "prelude", + "profunctor-lenses", + "string-parsers", + "strings", + "tidy-codegen", + "transformers", + "tuples", + "web3" + ] + } + } +} diff --git a/example/spago.yaml b/example/spago.yaml new file mode 100644 index 0000000..56fa8d1 --- /dev/null +++ b/example/spago.yaml @@ -0,0 +1,273 @@ +package: + dependencies: + - aff: ">=7.1.0 <8.0.0" + - arrays: ">=7.3.0 <8.0.0" + - chanterelle: "*" + - effect: ">=4.0.0 <5.0.0" + - either: ">=6.1.0 <7.0.0" + - eth-core: "*" + - identity: ">=6.0.0 <7.0.0" + - maybe: ">=6.0.0 <7.0.0" + - newtype: ">=5.0.0 <6.0.0" + - parallel: ">=6.0.0 <7.0.0" + - partial: ">=4.0.0 <5.0.0" + - prelude: ">=6.0.1 <7.0.0" + - profunctor-lenses: ">=8.0.0 <9.0.0" + - spec: ">=8.1.1 <9.0.0" + - tagged: ">=4.0.2 <5.0.0" + - transformers: ">=6.1.0 <7.0.0" + - tuples: ">=7.0.0 <8.0.0" + - web3: "*" + name: deploy + test: + main: Test.Main + dependencies: + - spec + - spec-node +workspace: + extraPackages: + chanterelle: + path: .. + coroutine-transducers: + dependencies: + - aff + - console + - coroutines + - effect + - either + - foldable-traversable + - freet + - functors + - maybe + - newtype + - parallel + - prelude + - psci-support + - tailrec + - transformers + - tuples + git: https://github.com/martyall/purescript-coroutine-transducers + ref: v1.0.0 + dodo-printer: + dependencies: + - aff + - ansi + - arrays + - avar + - console + - control + - effect + - either + - exceptions + - foldable-traversable + - integers + - lists + - maybe + - minibench + - newtype + - node-buffer + - node-child-process + - node-path + - node-process + - node-streams + - parallel + - partial + - posix-types + - prelude + - safe-coerce + - strings + - tuples + git: https://github.com/natefaubion/purescript-dodo-printer.git + ref: v2.2.1 + eth-core: + dependencies: + - argonaut + - arrays + - effect + - either + - foldable-traversable + - foreign + - functions + - gen + - integers + - js-bigints + - lists + - maybe + - newtype + - node-buffer + - nonempty + - ordered-collections + - partial + - prelude + - simple-json + - strings + - unfoldable + - unsafe-coerce + git: https://github.com/f-o-a-m/purescript-eth-core + ref: 3db27d22f738498a1e4263f537cd25279fc88088 + 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 + git: https://github.com/f-o-a-m/purescript-solc.git + ref: 5c50e62b27208bea6a6c13c52b743ac5e665b489 + tidy: + dependencies: + - arrays + - dodo-printer + - foldable-traversable + - language-cst-parser + - lists + - maybe + - ordered-collections + - partial + - prelude + - strings + - tuples + git: https://github.com/natefaubion/purescript-tidy.git + ref: v0.10.0 + tidy-codegen: + dependencies: + - aff + - ansi + - arrays + - avar + - bifunctors + - console + - control + - dodo-printer + - effect + - either + - enums + - exceptions + - filterable + - foldable-traversable + - free + - identity + - integers + - language-cst-parser + - lazy + - lists + - maybe + - newtype + - node-buffer + - node-child-process + - node-path + - node-process + - node-streams + - ordered-collections + - parallel + - partial + - posix-types + - prelude + - record + - safe-coerce + - st + - strings + - tidy + - transformers + - tuples + - type-equality + - unicode + git: https://github.com/natefaubion/purescript-tidy-codegen.git + ref: v4.0.0 + web3: + dependencies: + - aff + - argonaut + - arrays + - bifunctors + - control + - coroutine-transducers + - coroutines + - effect + - either + - eth-core + - exceptions + - foldable-traversable + - foreign + - foreign-object + - fork + - gen + - heterogeneous + - identity + - maybe + - newtype + - parallel + - parsing + - partial + - prelude + - profunctor-lenses + - record + - ring-modules + - simple-json + - strings + - tagged + - tailrec + - transformers + - tuples + - typelevel-prelude + - unfoldable + - unsafe-coerce + - variant + git: https://github.com/f-o-a-m/purescript-web3.git + ref: bd87cd18adb863cfccdfe5ff263a129c02f1c8c2 + web3-generator: + dependencies: + - aff + - ansi + - argonaut + - argonaut-codecs + - argonaut-core + - argonaut-traversals + - arrays + - bifunctors + - console + - control + - effect + - either + - eth-core + - exceptions + - fixed-points + - foldable-traversable + - identity + - integers + - language-cst-parser + - lists + - maybe + - newtype + - node-buffer + - node-fs + - node-path + - node-process + - optparse + - ordered-collections + - partial + - prelude + - profunctor-lenses + - string-parsers + - strings + - tidy-codegen + - transformers + - tuples + - web3 + git: https://github.com/f-o-a-m/purescript-web3-generator.git + ref: 12ddba3d0694f86d1cf274856e5c42c7d8f87a3a diff --git a/example/src/Bootstrap.purs b/example/src/Bootstrap.purs deleted file mode 100644 index defa42d..0000000 --- a/example/src/Bootstrap.purs +++ /dev/null @@ -1 +0,0 @@ -module Bootstrap where diff --git a/example/test/Main.purs b/example/test/Main.purs index 160babe..fef85e5 100644 --- a/example/test/Main.purs +++ b/example/test/Main.purs @@ -6,17 +6,28 @@ import Chanterelle.Test (buildTestConfig) import Data.Maybe (Maybe(..)) import Deploy (deployContracts) import Effect (Effect) -import Effect.Aff (Milliseconds(..), launchAff_) +import Effect.Aff (Aff, Milliseconds(..)) +import Test.Spec (beforeAll) import Test.SimplePaidStorageSpec as SimplePaidStorageSpec import Test.Spec.Reporter (consoleReporter) -import Test.Spec.Runner (defaultConfig, runSpecT) +import Test.Spec.Runner.Node (runSpecAndExitProcess') +import Test.Spec.Runner.Node.Config (defaultConfig) main :: Effect Unit -main = do - launchAff_ do - testCfg <- buildTestConfig nodeUrl 60 deployContracts - void $ join $ runSpecT specCfg [ consoleReporter ] do - SimplePaidStorageSpec.spec testCfg +main = + let + cfg = + { defaultConfig: defaultConfig { timeout = Just (Milliseconds $ 120.0 * 1000.0) } + , parseCLIOptions: false + } + in + runSpecAndExitProcess' @Aff cfg [ consoleReporter ] do + beforeAll + ( do + testCfg <- buildTestConfig nodeUrl 60 deployContracts + void $ SimplePaidStorageSpec.distributeTokens testCfg + pure testCfg + ) $ + SimplePaidStorageSpec.spec where - specCfg = defaultConfig { timeout = Just (Milliseconds $ 120.0 * 1000.0) } nodeUrl = "http://localhost:8545" diff --git a/example/test/SimplePaidStorageSpec.purs b/example/test/SimplePaidStorageSpec.purs index f362207..b3cc428 100644 --- a/example/test/SimplePaidStorageSpec.purs +++ b/example/test/SimplePaidStorageSpec.purs @@ -19,97 +19,97 @@ import Effect.Aff (Aff) import Network.Ethereum.Web3 (Address, ChainCursor(..), Web3Error, _from, _to, defaultTransactionOptions, fromInt, runWeb3, unUIntN) import Partial.Unsafe (unsafeCrashWith, unsafePartial) import Test.Common (DeploySpecConfig, unsafeToUInt) -import Test.Spec (SpecT, beforeAll_, describe, it) +import Test.Spec (SpecT, beforeWith, before, describe, it) import Test.Spec.Assertions (shouldEqual) import Type.Proxy (Proxy(..)) spec :: forall r - . DeploySpecConfig - ( token :: Address - , tokenOwner :: Address - , simplePaidStorage :: Address - , simplePaidStorageOwner :: Address - | r + . SpecT + Aff + ( DeploySpecConfig + ( token :: Address + , tokenOwner :: Address + , simplePaidStorage :: Address + , simplePaidStorageOwner :: Address + | r + ) ) - -> SpecT Aff Unit Aff Unit -spec testCfg = - beforeAll_ (void $ distributeTokens testCfg) $ do - describe "SimplePaidStorage" do - - it "Each user can approve the token contract for transfering" - $ flip parTraverse_ testCfg.accounts - $ \account -> do - let - v = unsafeToUInt (Proxy @256) one - txOpts = defaultTransactionOptions - # _from ?~ account - # _to ?~ testCfg.token - tx = Token.approve txOpts { spender: testCfg.simplePaidStorage, amount: v } - Tuple _ (Token.Approval { spender, value }) <- assertWeb3 testCfg.provider $ - takeEvent (Proxy @Token.Approval) testCfg.token tx - -- check that the event indicates the SimplePaidStorageContract has an allowance - spender `shouldEqual` testCfg.simplePaidStorage - -- that allowance should be the value we set - value `shouldEqual` v + Aff + Unit +spec = do + it "Each user can approve the token contract for transfering" \testCfg -> + flip parTraverse_ testCfg.accounts \account -> do + let + v = unsafeToUInt (Proxy @256) one + txOpts = defaultTransactionOptions + # _from ?~ account + # _to ?~ testCfg.token + tx = Token.approve txOpts { spender: testCfg.simplePaidStorage, amount: v } + Tuple _ (Token.Approval { spender, value }) <- assertWeb3 testCfg.provider $ + takeEvent (Proxy @Token.Approval) testCfg.token tx + -- check that the event indicates the SimplePaidStorageContract has an allowance + spender `shouldEqual` testCfg.simplePaidStorage + -- that allowance should be the value we set + value `shouldEqual` v - it "Each user can set the count" - $ flip parTraverse_ (zip testCfg.accounts (1 .. length testCfg.accounts)) - $ \(Tuple account i) -> do - let - n = unsafeToUInt (Proxy @256) (fromInt i) - txOpts = defaultTransactionOptions - # _from ?~ account - # _to ?~ testCfg.simplePaidStorage - tx = SPS.updateCount txOpts { _newCount: n } + it "Each user can set the count" \testCfg -> + flip parTraverse_ (zip testCfg.accounts (1 .. length testCfg.accounts)) + $ \(Tuple account i) -> do + let + n = unsafeToUInt (Proxy @256) (fromInt i) + txOpts = defaultTransactionOptions + # _from ?~ account + # _to ?~ testCfg.simplePaidStorage + tx = SPS.updateCount txOpts { _newCount: n } - Tuple _ { countUpdated, transfer } <- assertWeb3 testCfg.provider $ - takeEvents tx - { countUpdated: Tuple (Proxy @SPS.CountUpdated) testCfg.simplePaidStorage - , transfer: Tuple (Proxy @Token.Transfer) testCfg.token - } - let SPS.CountUpdated { newCount } = unsafePartial $ Array.head countUpdated - -- check that the new count is the one we submitted - newCount `shouldEqual` n - let Token.Transfer { to, from, value } = unsafePartial $ fromJust $ un First transfer - from `shouldEqual` account - to `shouldEqual` testCfg.simplePaidStorage - unUIntN value `shouldEqual` one + Tuple _ { countUpdated, transfer } <- assertWeb3 testCfg.provider $ + takeEvents tx + { countUpdated: Tuple (Proxy @SPS.CountUpdated) testCfg.simplePaidStorage + , transfer: Tuple (Proxy @Token.Transfer) testCfg.token + } + let SPS.CountUpdated { newCount } = unsafePartial $ Array.head countUpdated + -- check that the new count is the one we submitted + newCount `shouldEqual` n + let Token.Transfer { to, from, value } = unsafePartial $ fromJust $ un First transfer + from `shouldEqual` account + to `shouldEqual` testCfg.simplePaidStorage + unUIntN value `shouldEqual` one - it "The owner of the SimplePaidStorage can collect the tokens" $ do - let - fetchBalances = do - let tokenTxOpts = defaultTransactionOptions # _to ?~ testCfg.token - eRes <- assertWeb3 testCfg.provider $ runExceptT do - ownerBalance <- ExceptT $ Token.balanceOf tokenTxOpts Latest { account: testCfg.simplePaidStorageOwner } - contractBalance <- ExceptT $ Token.balanceOf tokenTxOpts Latest { account: testCfg.simplePaidStorage } - pure $ { ownerBalance, contractBalance } - case eRes of - Left e -> unsafeCrashWith $ "Failed to query balances " <> show e - Right res -> pure res - -- fetch the balances before withdrawing from the contract - { contractBalance, ownerBalance } <- fetchBalances + it "The owner of the SimplePaidStorage can collect the tokens" \testCfg -> do + let + fetchBalances = do + let tokenTxOpts = defaultTransactionOptions # _to ?~ testCfg.token + eRes <- assertWeb3 testCfg.provider $ runExceptT do + ownerBalance <- ExceptT $ Token.balanceOf tokenTxOpts Latest { account: testCfg.simplePaidStorageOwner } + contractBalance <- ExceptT $ Token.balanceOf tokenTxOpts Latest { account: testCfg.simplePaidStorage } + pure $ { ownerBalance, contractBalance } + case eRes of + Left e -> unsafeCrashWith $ "Failed to query balances " <> show e + Right res -> pure res + -- fetch the balances before withdrawing from the contract + { contractBalance, ownerBalance } <- fetchBalances + let + fetchTokens = let - fetchTokens = - let - txOpts = defaultTransactionOptions - # _from ?~ testCfg.simplePaidStorageOwner - # _to ?~ testCfg.simplePaidStorage - in - SPS.withdrawTokens txOpts { amount: contractBalance } - -- withdraw tokens and wait for event confirmation - Tuple _ (Token.Transfer { to, from, value }) <- assertWeb3 testCfg.provider $ - takeEvent (Proxy @Token.Transfer) testCfg.token fetchTokens + txOpts = defaultTransactionOptions + # _from ?~ testCfg.simplePaidStorageOwner + # _to ?~ testCfg.simplePaidStorage + in + SPS.withdrawTokens txOpts { amount: contractBalance } + -- withdraw tokens and wait for event confirmation + Tuple _ (Token.Transfer { to, from, value }) <- assertWeb3 testCfg.provider $ + takeEvent (Proxy @Token.Transfer) testCfg.token fetchTokens - from `shouldEqual` testCfg.simplePaidStorage - to `shouldEqual` testCfg.simplePaidStorageOwner - let n = unUIntN value - n `shouldEqual` unUIntN contractBalance + from `shouldEqual` testCfg.simplePaidStorage + to `shouldEqual` testCfg.simplePaidStorageOwner + let n = unUIntN value + n `shouldEqual` unUIntN contractBalance - -- check that tokens are not created or destroyed (accounting for fees) - { contractBalance: newContractBalance, ownerBalance: newOwnerBalance } <- fetchBalances - unUIntN newContractBalance `shouldEqual` zero - unUIntN newOwnerBalance `shouldEqual` (unUIntN ownerBalance + unUIntN contractBalance) + -- check that tokens are not created or destroyed (accounting for fees) + { contractBalance: newContractBalance, ownerBalance: newOwnerBalance } <- fetchBalances + unUIntN newContractBalance `shouldEqual` zero + unUIntN newOwnerBalance `shouldEqual` (unUIntN ownerBalance + unUIntN contractBalance) distributeTokens :: forall r diff --git a/spago.lock b/spago.lock index 1e4b3f4..df6de66 100644 --- a/spago.lock +++ b/spago.lock @@ -5,51 +5,141 @@ "path": "./", "core": { "dependencies": [ - "aff", - "ansi", - "argonaut", - "argonaut-core", - "argonaut-traversals", - "arrays", - "avar", - "bifunctors", - "console", - "control", - "datetime", - "effect", - "either", - "eth-core", - "exceptions", - "foldable-traversable", - "foreign-object", - "functors", - "identity", - "integers", - "js-date", - "maybe", - "newtype", - "node-buffer", - "node-fs", - "node-path", - "node-process", - "now", - "optparse", - "ordered-collections", - "parallel", - "partial", - "prelude", - "profunctor-lenses", - "record", - "refs", - "simple-json", - "solc", - "strings", - "transformers", - "tuples", - "unfoldable", - "validation", - "web3", - "web3-generator" + { + "aff": ">=7.1.0 <8.0.0" + }, + { + "ansi": ">=7.0.0 <8.0.0" + }, + { + "argonaut": ">=9.0.0 <10.0.0" + }, + { + "argonaut-core": ">=7.0.0 <8.0.0" + }, + { + "argonaut-traversals": ">=10.0.0 <11.0.0" + }, + { + "arrays": ">=7.3.0 <8.0.0" + }, + { + "avar": ">=5.0.0 <6.0.0" + }, + { + "bifunctors": ">=6.0.0 <7.0.0" + }, + { + "console": ">=6.1.0 <7.0.0" + }, + { + "control": ">=6.0.0 <7.0.0" + }, + { + "datetime": ">=6.1.0 <7.0.0" + }, + { + "effect": ">=4.0.0 <5.0.0" + }, + { + "either": ">=6.1.0 <7.0.0" + }, + { + "eth-core": "*" + }, + { + "exceptions": ">=6.1.0 <7.0.0" + }, + { + "foldable-traversable": ">=6.0.0 <7.0.0" + }, + { + "foreign-object": ">=4.1.0 <5.0.0" + }, + { + "functors": ">=5.0.0 <6.0.0" + }, + { + "identity": ">=6.0.0 <7.0.0" + }, + { + "integers": ">=6.0.0 <7.0.0" + }, + { + "js-date": ">=8.0.0 <9.0.0" + }, + { + "maybe": ">=6.0.0 <7.0.0" + }, + { + "newtype": ">=5.0.0 <6.0.0" + }, + { + "node-buffer": ">=9.0.0 <10.0.0" + }, + { + "node-fs": ">=9.2.0 <10.0.0" + }, + { + "node-path": ">=5.0.1 <6.0.0" + }, + { + "node-process": ">=11.2.0 <12.0.0" + }, + { + "now": ">=6.0.0 <7.0.0" + }, + { + "optparse": ">=5.0.1 <6.0.0" + }, + { + "ordered-collections": ">=3.2.0 <4.0.0" + }, + { + "parallel": ">=6.0.0 <7.0.0" + }, + { + "partial": ">=4.0.0 <5.0.0" + }, + { + "prelude": ">=6.0.1 <7.0.0" + }, + { + "profunctor-lenses": ">=8.0.0 <9.0.0" + }, + { + "record": ">=4.0.0 <5.0.0" + }, + { + "refs": ">=6.0.0 <7.0.0" + }, + { + "simple-json": ">=9.0.0 <10.0.0" + }, + { + "solc": "*" + }, + { + "strings": ">=6.0.1 <7.0.0" + }, + { + "transformers": ">=6.1.0 <7.0.0" + }, + { + "tuples": ">=7.0.0 <8.0.0" + }, + { + "unfoldable": ">=6.0.0 <7.0.0" + }, + { + "validation": ">=6.0.0 <7.0.0" + }, + { + "web3": "*" + }, + { + "web3-generator": "*" + } ], "build_plan": [ "aff", @@ -244,7 +334,7 @@ }, "solc": { "git": "https://github.com/f-o-a-m/purescript-solc.git", - "ref": "v4.2.0", + "ref": "5c50e62b27208bea6a6c13c52b743ac5e665b489", "dependencies": [ "aff", "argonaut", @@ -1575,7 +1665,7 @@ "solc": { "type": "git", "url": "https://github.com/f-o-a-m/purescript-solc.git", - "rev": "d7a2d53be0e0913bf08ea040d8dcbcd3a4fb5d01", + "rev": "5c50e62b27208bea6a6c13c52b743ac5e665b489", "dependencies": [ "aff", "argonaut", diff --git a/spago.yaml b/spago.yaml index 4cbac63..679ddfc 100644 --- a/spago.yaml +++ b/spago.yaml @@ -148,7 +148,7 @@ workspace: - transformers - tuples git: https://github.com/f-o-a-m/purescript-solc.git - ref: v4.2.0 + ref: 5c50e62b27208bea6a6c13c52b743ac5e665b489 tidy: dependencies: - arrays