Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove bytestring deps #88

Merged
merged 1 commit into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
286 changes: 141 additions & 145 deletions packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -3,159 +3,155 @@ let upstream =
sha256:ca727657c01cc31d0e79c2113b59126b9826f4b56d20a8193be3c725599fb754

let eth-core-deps =
https://raw.githubusercontent.com/f-o-a-m/purescript-eth-core/master/packages.dhall
sha256:af2751772a729d58edf7056805007934e3687b3079f8a02ac514e705aeab8c42
https://raw.githubusercontent.com/f-o-a-m/purescript-eth-core/v10.1.0/packages.dhall
sha256:ca727657c01cc31d0e79c2113b59126b9826f4b56d20a8193be3c725599fb754

let web3-deps =
https://raw.githubusercontent.com/f-o-a-m/purescript-web3/master/packages.dhall
sha256:c1bebe7e4899bd64304a84fea26f9ea635e20897f206ce6fa86bd446715c5ffc
https://raw.githubusercontent.com/f-o-a-m/purescript-web3/v7.2.0/packages.dhall
sha256:2687f2bfcd60b5260d340407c9851e963b440ad520bbc93595f0452f859c9846

let additions =
{ bytestrings = eth-core-deps.bytestrings
, coroutine-transducers = web3-deps.coroutine-transducers
{ coroutine-transducers = web3-deps.coroutine-transducers
, 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"
]
, repo = "https://github.com/natefaubion/purescript-dodo-printer.git"
, version = "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"
]
, repo = "https://github.com/natefaubion/purescript-dodo-printer.git"
, version = "v2.2.1"
}
, eth-core = web3-deps.eth-core
, quotient = eth-core-deps.quotient
, tidy =
{ dependencies =
[ "arrays"
, "dodo-printer"
, "foldable-traversable"
, "lists"
, "maybe"
, "ordered-collections"
, "partial"
, "prelude"
, "language-cst-parser"
, "strings"
, "tuples"
]
, repo = "https://github.com/natefaubion/purescript-tidy.git"
, version = "v0.10.0"
}
{ dependencies =
[ "arrays"
, "dodo-printer"
, "foldable-traversable"
, "lists"
, "maybe"
, "ordered-collections"
, "partial"
, "prelude"
, "language-cst-parser"
, "strings"
, "tuples"
]
, repo = "https://github.com/natefaubion/purescript-tidy.git"
, version = "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"
]
, repo =
"https://github.com/natefaubion/purescript-tidy-codegen.git"
, version = "v4.0.0"
}
, web3 =
{ dependencies =
[ "aff"
, "argonaut"
, "arrays"
, "bifunctors"
, "bytestrings"
, "control"
, "coroutine-transducers"
, "coroutines"
, "effect"
, "either"
, "eth-core"
, "exceptions"
, "foldable-traversable"
, "foreign"
, "foreign-object"
, "fork"
, "gen"
, "heterogeneous"
, "maybe"
, "newtype"
, "parallel"
, "parsing"
, "partial"
, "prelude"
, "profunctor-lenses"
, "record"
, "ring-modules"
, "simple-json"
, "strings"
, "tagged"
, "tailrec"
, "transformers"
, "tuples"
, "typelevel-prelude"
, "unfoldable"
, "unsafe-coerce"
, "variant"
, "identity"
],
repo = "https://github.com/f-o-a-m/purescript-web3.git",
version = "v7.2.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"
]
, repo = "https://github.com/natefaubion/purescript-tidy-codegen.git"
, version = "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"
, "maybe"
, "newtype"
, "parallel"
, "parsing"
, "partial"
, "prelude"
, "profunctor-lenses"
, "record"
, "ring-modules"
, "simple-json"
, "strings"
, "tagged"
, "tailrec"
, "transformers"
, "tuples"
, "typelevel-prelude"
, "unfoldable"
, "unsafe-coerce"
, "variant"
, "identity"
]
, repo = "https://github.com/f-o-a-m/purescript-web3.git"
, version = "v7.2.0"
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/Data/Generator.purs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Data.Newtype (un)
import Data.String (drop, joinWith, take, toLower, toUpper)
import Data.Traversable (all, for, for_)
import Data.Tuple (Tuple(..))
import Network.Ethereum.Core.HexString (fromByteString)
import Network.Ethereum.Core.HexString (fromBuffer)
import Network.Ethereum.Core.Keccak256 (keccak256)
import Network.Ethereum.Web3.Types (HexString, unHex)
import Partial.Unsafe (unsafeCrashWith, unsafePartial)
Expand Down Expand Up @@ -59,7 +59,7 @@ basicToPSType opts a = case a of
bytesN <- TidyM.importFrom "Network.Ethereum.Web3.Solidity" (TidyM.importType "BytesN")
pure $ Gen.typeApp (Gen.typeCtor bytesN) [ Gen.typeInt n ]
SolidityBytesD -> unsafePartial $ maybeWrap opts true $
Gen.typeCtor <$> TidyM.importFrom "Network.Ethereum.Web3.Solidity" (TidyM.importType "ByteString")
Gen.typeCtor <$> TidyM.importFrom "Network.Ethereum.Web3.Solidity" (TidyM.importType "ImmutableBuffer")
tup@(SolidityTuple factors) -> unsafePartial $ maybeWrap opts (noRecordsAtOrBelow $ BasicType tup)
case factors of
[] -> Gen.typeCtor <$> TidyM.importFrom "Network.Ethereum.Web3.Solidity" (TidyM.importType "Tuple0")
Expand Down Expand Up @@ -678,4 +678,4 @@ eventId (SolidityEvent e) =
let
eventArgs = map (\a -> format a) e.inputs
in
fromByteString $ keccak256 $ e.name <> "(" <> joinWith "," eventArgs <> ")"
fromBuffer $ keccak256 $ e.name <> "(" <> joinWith "," eventArgs <> ")"