From 257e2e5e5affb81d4a4f28ebb4dec970c76ad1ec Mon Sep 17 00:00:00 2001 From: Martin Allen <31280145+martyall@users.noreply.github.com> Date: Thu, 18 Apr 2024 22:15:38 -0700 Subject: [PATCH] decrease deps size (#174) * decrease deps size * bump base package set * upgrade node deps --- package.json | 4 +- packages.dhall | 70 ++++++++++++++++--- spago.dhall | 1 - src/Network/Ethereum/Web3/Solidity/Event.purs | 3 +- src/Network/Ethereum/Web3/Types/Types.purs | 3 +- 5 files changed, 66 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index ed12303..4ad4996 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,9 @@ }, "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": { "purescript": "^0.15.8", diff --git a/packages.dhall b/packages.dhall index 555eee6..ccd144e 100644 --- a/packages.dhall +++ b/packages.dhall @@ -1,12 +1,66 @@ let upstream = - https://raw.githubusercontent.com/f-o-a-m/package-sets/09b71674a327f7601276846c1afb537342bb57ff/purs-0.15.7-web3.dhall - sha256:7e32f0c65a7b5d334ee98d7fda1d7d3a557b6b478421f545694bd8e1cd4d16ac - with eth-core.version = "v10.0.0" - with js-bigints.version = "v2.2.1" + https://github.com/purescript/package-sets/releases/download/psc-0.15.15-20240416/packages.dhall + sha256:ca727657c01cc31d0e79c2113b59126b9826f4b56d20a8193be3c725599fb754 +let eth-core-deps = + https://raw.githubusercontent.com/f-o-a-m/purescript-eth-core/master/packages.dhall + sha256:af2751772a729d58edf7056805007934e3687b3079f8a02ac514e705aeab8c42 -let overrides = {=} +let additions = + { bytestrings = eth-core-deps.bytestrings + , coroutine-transducers = + { dependencies = [ + "console", + "either", + "foldable-traversable", + "freet", + "functors", + "newtype", + "parallel", + "prelude", + "tailrec", + "transformers", + "tuples", + "aff", + "coroutines", + "effect", + "maybe", + "psci-support" + ] + , repo = "https://github.com/martyall/purescript-coroutine-transducers" + , version = "v1.0.0" + } + , eth-core = + { dependencies = + [ "argonaut" + , "arrays" + , "bytestrings" + , "effect" + , "either" + , "foldable-traversable" + , "foreign" + , "functions" + , "gen" + , "integers" + , "js-bigints" + , "lists" + , "maybe" + , "newtype" + , "node-buffer" + , "nonempty" + , "ordered-collections" + , "partial" + , "prelude" + , "quotient" + , "simple-json" + , "strings" + , "unfoldable" + , "unsafe-coerce" + ] + , repo = "https://github.com/f-o-a-m/purescript-eth-core" + , version = "v10.1.0" + } + , quotient = eth-core-deps.quotient + } -let additions = {=} - -in upstream // overrides // additions +in upstream // additions diff --git a/spago.dhall b/spago.dhall index f32abf9..38a12cd 100644 --- a/spago.dhall +++ b/spago.dhall @@ -10,7 +10,6 @@ , "coroutines" , "effect" , "either" - , "errors" , "eth-core" , "exceptions" , "foldable-traversable" diff --git a/src/Network/Ethereum/Web3/Solidity/Event.purs b/src/Network/Ethereum/Web3/Solidity/Event.purs index b32ed8c..6eeb69d 100644 --- a/src/Network/Ethereum/Web3/Solidity/Event.purs +++ b/src/Network/Ethereum/Web3/Solidity/Event.purs @@ -11,11 +11,10 @@ module Network.Ethereum.Web3.Solidity.Event import Prelude -import Control.Error.Util (note) import Control.Monad.Error.Class (throwError) import Data.Array (uncons) import Data.Bifunctor (lmap) -import Data.Either (Either(..)) +import Data.Either (Either(..), note) import Data.Generic.Rep (class Generic, Argument(..), Constructor(..), NoArguments(..), Product(..), to) import Data.Maybe (Maybe(..)) import Data.Newtype (class Newtype, wrap) diff --git a/src/Network/Ethereum/Web3/Types/Types.purs b/src/Network/Ethereum/Web3/Types/Types.purs index 6e6aa10..aa28fac 100644 --- a/src/Network/Ethereum/Web3/Types/Types.purs +++ b/src/Network/Ethereum/Web3/Types/Types.purs @@ -45,7 +45,6 @@ import Prelude import Control.Alt (class Alt) import Control.Alternative (class Alternative, class Plus, (<|>)) -import Control.Error.Util (hush) import Control.Monad.Error.Class (class MonadError, class MonadThrow, catchError) import Control.Monad.Except (runExcept) import Control.Monad.Fork.Class (class MonadBracket, class MonadFork, class MonadKill, bracket, fork, join, kill, suspend, uninterruptible, never) as MFork @@ -53,7 +52,7 @@ import Control.Monad.Reader (class MonadAsk, class MonadReader, ReaderT, ask, li import Control.Monad.Rec.Class (class MonadRec) import Control.Parallel.Class (class Parallel, parallel, sequential) import Data.Argonaut as A -import Data.Either (Either(..)) +import Data.Either (Either(..), hush) import Data.Generic.Rep (class Generic) import Data.Lens.Lens (Lens', Lens, lens) import Data.Maybe (Maybe(..), maybe)