All Projects → cmditch → Elm Ethereum

cmditch / Elm Ethereum

Licence: bsd-3-clause
dApps in Elm

Programming Languages

elm
856 projects

Projects that are alternatives of or similar to Elm Ethereum

Blockchainbooks.github.io
Blockchain Books
Stars: ✭ 139 (+7.75%)
Mutual labels:  ethereum, web3, web3js
Starter Kit
An OpenZeppelin starter kit containing React, OpenZeppelin SDK & OpenZeppelin Contracts.
Stars: ✭ 101 (-21.71%)
Mutual labels:  ethereum, web3, web3js
Web3 Vs Ethers
A basic cheatsheet of Web3.js vs Ethers (along w/ example apps!)
Stars: ✭ 103 (-20.16%)
Mutual labels:  ethereum, web3, web3js
Web3 By Example
Node.js with Web3 javascript examples for getting basic information (transactions, balances, network stats, and tokens) from the Ethereum blockchain.
Stars: ✭ 156 (+20.93%)
Mutual labels:  ethereum, web3, web3js
Web3x
Ethereum TypeScript Client Library - for perfect types and tiny builds.
Stars: ✭ 197 (+52.71%)
Mutual labels:  ethereum, web3, web3js
React Ethereum Dapp Example
A starter boilerplate for an Ethereum dapp using web3.js v1.0, truffle, react, and parity
Stars: ✭ 384 (+197.67%)
Mutual labels:  ethereum, web3, web3js
Web3swift
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions.
Stars: ✭ 237 (+83.72%)
Mutual labels:  ethereum, web3, web3js
Eth Crypto
Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity
Stars: ✭ 420 (+225.58%)
Mutual labels:  ethereum, web3, web3js
Cljs Web3
Clojurescript API for Ethereum Web3 API
Stars: ✭ 84 (-34.88%)
Mutual labels:  ethereum, web3
Dapp
Censorship resistant democracies.
Stars: ✭ 1,326 (+927.91%)
Mutual labels:  ethereum, web3
Hs Web3
Web3 API for Haskell.
Stars: ✭ 127 (-1.55%)
Mutual labels:  ethereum, web3
Connect
(Aragon 1) Seamlessly integrate DAO functionality into web and node.js apps.
Stars: ✭ 81 (-37.21%)
Mutual labels:  ethereum, web3
Trust Wallet Ios
📱 Trust - Ethereum Wallet and Web3 DApp Browser for iOS
Stars: ✭ 1,228 (+851.94%)
Mutual labels:  ethereum, web3
Myetherapi
An API by MyEtherWallet. ETH / Ropsten / JSON RPC / Web3
Stars: ✭ 95 (-26.36%)
Mutual labels:  ethereum, web3
Marketprotocol
Ethereum based derivatives trading protocol creating digital tokens for any asset
Stars: ✭ 78 (-39.53%)
Mutual labels:  ethereum, web3
Web3studio Bootleg
The Shared Royalty Non-Fungible Token (a.k.a Bootleg) is an open source project started by the ConsenSys Web3Studio team. The purpose of the Shared Royalty Non-Fungible Token (SRNFT) is to make any royalty business model, from the oil and gas industry to entertainment, easy to manage with the Ethereum blockchain .
Stars: ✭ 65 (-49.61%)
Mutual labels:  ethereum, web3js
Awesome Web3
🚀 A curated list of tools, libs and resources to help you build awesome dapps
Stars: ✭ 104 (-19.38%)
Mutual labels:  ethereum, web3
Truffle Assertions
🛠 Assertions and utilities for testing Ethereum smart contracts with Truffle unit tests
Stars: ✭ 109 (-15.5%)
Mutual labels:  ethereum, web3
Cyb Archeology
🌎 Personal immortal robot for the The Great Web
Stars: ✭ 117 (-9.3%)
Mutual labels:  ethereum, web3
Ipfs Mini
A super tiny module for querying IPFS that works in the browser and node.
Stars: ✭ 115 (-10.85%)
Mutual labels:  ethereum, web3

elm-ethereum elm-ethereum

Examples:
Simple starter example
Complex example SPA Dapp

Cool Feature: See here how you can easily track the block depth of transactions after they've been mined.


This library allows you to interact with the Ethereum blockchain much like purescript-web3, ethers.js, or web3.js. You can hook into web wallets like MetaMask and send transactions, as well as perform read-only operations on smart contracts.

See why elm?

Setup

  • Setup and define your node endpoint.
    import Eth
    import Eth.Types exposing (..)


    type alias Model =
        { ethNode : HttpProvider }

    init =
        { ethNode = "https://mainnet.infura.com/" }

It's good to keep the node url in your model. This way it can be kept in sync with MetaMask. Example code of this "sync" pattern to come.

Examples

  • Simple - Look at the blockchain

    Get an account balance at a specific block height.

    getMyBalanceInHistory : Int -> Task Http.Error BigInt
    getMyBalanceInHistory blockNum =
        Eth.getBalanceAtBlock model.ethNode myAddress (BlockNum blockNum)
  • Advanced - Chain tasks together

    Get all newly created contract addresses in the latest block. In a few lines of code.

    findNewestContracts : Task String (List Address)
    findNewestContracts =
        Eth.getBlockNumber model.ethNode
            |> Task.andThen (Eth.getBlock model.ethNode)
            |> Task.andThen
                (\block ->
                    block.transactions
                        |> List.map (Eth.getTxReceipt model.ethNode)
                        |> Task.sequence
                )
            |> Task.map (MaybeExtra.values << List.map .contractAddress)
            |> Task.mapError prettifyHttpError

This is an example of Railway Oriented Programming. A great video by Scott Wlaschin.

Why Elm

I'd sum up the experience of programming in Elm with two words: Fearless Refactoring

This is by no means the only pleasantry the fine tree has to offer.

Elm's claim to fame is zero runtime exceptions. It's compiler and static types are your best friends. Both from an error catching standpoint, but just as importantly, from a domain modeling standpoint.

Union Types allow you to fully leverage the compiler when modeling your business domain. See BlockId or NetworkId for instance.

Union types also allow you to hide implementation details by implementing "opaque types". An Address is just a string under the hood, but you can never directly touch that string.

Why else

  • Simplicity and cohesion
    Javascript                    Elm
    ---------------------------------
    npm/yarn                 built in
    Webpack                  built in
    React                    built in
    Redux                    built in
    Typescript/Flow          built in
    Immutable.JS             built in
  • Phenomenal tooling and resources

    Time traveling debugger - Import/Export history. QA like a champ.
    elm-format - Adds up to hours of tedius "work" saved.
    elm-reactor - Nice dev server.
    elm-test - Fuzz testing == legit.
    elm-benchmark - Clone this package and give it a whirl.
    Elm Package and Docs - Pleasant and consistent. Enforced semantic versioning.

  • Strong static types

    Find errors fast with readable compiler messages.
    Less millions of dollars lost from typos.

  • No null or undefined

    Never miss a potential problem.

  • Purely functional

    Leads to decoupled and easily refactorable code.

  • Great Community

    Thoughtful, responsive, intelligent, and kind.
    Great Slack and Discourse.

Contributing

Pull requests and issues are greatly appreciated!
If you think there's a better way to implement parts of this library, I'd love to hear your feedback.

Feed the tree some ether

🌳Ξ🌳Ξ🌳

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].