Skip to content

Version 0.3.0 is alive

Compare
Choose a tag to compare
@jmhickman jmhickman released this 13 Jun 21:22
· 20 commits to main since this release

It's been awhile. Web3.fs has matured, and I've streamlined a ton of things, renamed functions, etc.

This is a breaking changes release. Function names and signatures have changed.

Largest change is probably the representation of EVM types. Because of how function argument data is actually sent to the EVM, things like 'Uint8' or 'Int176' or whatever are mostly a formality. In the end, the data looks the same as the 256bit version of whatever numeric. As a result, during early development, I chose to simplify the type system in order to just muscle through and get something that worked.

Of course, it's weird for users who expect to be entering a specific size of integer and supply an argument that doesn't match the actual type.
function(address,uint8)
[Address "0x443..."; Uint256 "5"]

Mostly, I didn't want to bloat up the type system with over 200 types, many of which will never be used in the real world. The system I came up with still increases bloat, but at least it's not all types and is mostly comprised of functions. You can dive the history of ABI.fs if you're curious.

I have added functions (with very long names) for importing ABI and bytecode refs from a file. solc and the output of Remix-IDE pasted into a file are supported.

Contract loading and prep/deployment have gained public functions for making the process more terse. See Helpers.fs for those. Additionally, optimisticallyLoadDeployedContract will do exactly what it says, not checking for the error side of the Result and will just crash the application if there was an error.

I added colored terminal printing, as well as organizing how most RPC output is emitted to the console. Should be easier to read and understand at a glance.

Checksum addresses are supported now, and are emitted automatically wherever it matters, which is mostly on contract deploys and a few other places.

The makeEth__ functions are renamed. contractCall, contractTransaction, deployContract, rpcCall.

Many checks have been added to every pipeline. Prepare to see more Web3Errors (unless you're not logging. But you log things, right anon?)

I made an effort to update comments on public functions, as they had drifted from what some functions did rather substantially over time.

I think that's about it. This version has been in use for a couple of months now as I've moved through various Ethereum/solidity coursework and challenges. Ethernaut and DamnVulnerableDeFi have provided many chances to find bugs (so many bugs). The library is in a good place. Not perfect, but it can sustain use from people who understand what's going on.