Renamed to team-toast/elm-ethereum. That is where the repository lives now. It has not been published as a package under the new name.
Versions published as burnable-tech/elm-ethereum still install under that name. 3 versions of 3 come from the new location (see their notes).
Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/team-toast/elm-ethereum.
What we checked: The repo moved to github.com/team-toast/elm-ethereum. Rebuilt with git archive from commit e79bdd0efe57 of https://github.com/team-toast/elm-ethereum (zip prefix burnable-tech-elm-ethereum-e941bde/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 01059137ad1764d5dd33de9f23e5d647595ca709.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/burnable-tech/elm-ethereum/zipball/1.0.2/
String/Type Conversion and Application Helpers
Convert an Address to a String
Convert an Address to a string conforming to the EIP-55 checksum.
Note: This lowercases all the characters inside the Address and runs it through the checksum algorithm.
Check if given string is a valid address.
Note: Works on mixed case strings, with or without the 0x.
Check if given string is a valid checksum address.
Safely convert a string into Hex.
Convert a Hex into a string.
Check if given string is valid Hex
Convert Given Hex into ASCII. Will fail if Hex is an uneven length.
Convert Given Hex into UTF8. Will fail if Hex is an uneven length.
Append two Hex's together.
hexAppend (Hex 0x12) (Hex 0x34) == Hex 0x1234Concatenate a list of Hex's
hexConcat [ Hex 0x12, Hex 0x34, Hex 0x56 ] == Hex 0x 00123456Safely convert a string to a TxHash.
Convert a given TxHash to a string.
Check if given string is a valid TxHash.
i.e. Hex and 64 characters long.
Safely convert a given string to a BlockHash.
Convert a given BlockHash to a string.
Check if given string is a valid BlockHash.
i.e. Hex and 64 characters long.
Convert a contract function name to it's 4-byte function signature.
Utils.functionSig "transfer(address,uint256)" == Hex "a9059cbb"Hash a given string into it's SHA3/Keccak256 form.
Checks if a given string is valid hex and 64 chars long.
Same as ethereum_keccak_256 from this library.
User beware!! These are sidestepping the power of Elm, and it's static types.
Undoubtedly convenient for baking values, like contract addresses, into your source code.
All values coming from the outside world, like user input or server responses, should use the safe functions.
Config for a retry task
Retry a given Task till it succeeds, or runs out of time.
The below will wait for 5 minutes until giving up, and polls every 5 seconds.
pollForMinedTx : HttpProvider -> TxHash -> Task Http.Error TxReceipt
pollForMinedTx ethNode txHash =
Eth.getTxReceipt ethNode txHash
|> retry { attempts = 60, sleep = 5 }Useful for decoding past a result straight into a Msg. Comes in handy with Eth.Sentry.Event values.
transferDecoder : Value -> Msg
transferDecoder =
valueToMsg Transfer Error transferEventDecoder
type Msg
= Transfer (Event Transfer)
| Error String
Safely convert a string into an address.
All lowercase or uppercase strings, shaped like addresses, will result in
Ok. Mixed case strings will returnErrif the EIP-55 checksum is invalid.