Ethereum JSON-RPC multi-transport client. Rust implementation of web3 library

Overview

web3

Ethereum JSON-RPC multi-transport client. Rust implementation of Web3.js library.

Build Status Crates.io

Documentation: crates.io

Usage

First, add this to your Cargo.toml:

[dependencies]
web3 = "0.17.0"

Example

#[tokio::main]
async fn main() -> web3::Result<()> {
    let transport = web3::transports::Http::new("http://localhost:8545")?;
    let web3 = web3::Web3::new(transport);

    println!("Calling accounts.");
    let mut accounts = web3.eth().accounts().await?;
    println!("Accounts: {:?}", accounts);
    accounts.push("00a329c0648769a73afac7f9381e08fb43dbea72".parse().unwrap());

    println!("Calling balance.");
    for account in accounts {
        let balance = web3.eth().balance(account, None).await?;
        println!("Balance of {:?}: {}", account, balance);
    }

    Ok(())
}

If you want to deploy smart contracts you have written you can do something like this (make sure you have the solidity compiler installed):

solc -o build --bin --abi contracts/*.sol

The solidity compiler is generating the binary and abi code for the smart contracts in a directory called contracts and is being output to a directory called build.

For more see examples folder.

Futures migration

  • Get rid of parking_lot (replace with async-aware locks if really needed).
  • Consider getting rid of Unpin requirements. (#361)
  • WebSockets: TLS support (#360)
  • WebSockets: Reconnecting & Pings
  • Consider using tokio instead of async-std for ws.rs transport (issue with test).
  • Restore IPC Transport

General

  • More flexible API (accept Into)
  • Contract calls (ABI encoding; debris/ethabi)
  • Batch Requests

Transports

  • HTTP transport
  • IPC transport
  • WebSockets transport

Types

  • Types for U256,H256,Address(H160)
  • Index type (numeric, encoded to hex)
  • Transaction type (Transaction from Parity)
  • Transaction receipt type (TransactionReceipt from Parity)
  • Block type (RichBlock from Parity)
  • Work type (Work from Parity)
  • Syncing type (SyncStats from Parity)

APIs

  • Eth: eth_*
  • Eth filters: eth_*
  • Eth pubsub: eth_*
  • net_*
  • web3_*
  • personal_*
  • traces_*

Parity-specific APIs

  • Parity read-only: parity_*

  • Parity accounts: parity_* (partially implemented)

  • Parity set: parity_*

  • signer_*

  • Own APIs (Extendable)

let web3 = Web3::new(transport);
web3.api::<CustomNamespace>().custom_method().wait().unwrap()

Installation on Windows

Currently, Windows does not support IPC, which is enabled in the library by default. To compile, you need to disable the IPC feature:

web3 = { version = "0.17.0", default-features = false, features = ["http"] }

Avoiding OpenSSL dependency

On Linux, native-tls is implemented using OpenSSL. To avoid that dependency for HTTPS use the corresponding feature.

web3 = { version = "0.17.0", default-features = false, features = ["http-rustls-tls"] }

Cargo Features

The library supports following features:

  • http - Enables HTTP transport (requires tokio runtime, because of hyper).
  • http-tls - Enables TLS support via reqwest/default-tls for HTTP transport (implies http; default).
  • http-native-tls - Enables TLS support via reqwest/native-tls for HTTP transport (implies http).
  • http-rustls-tls - Enables TLS support via reqwest/rustls-tls for HTTP transport (implies http).
  • ws-tokio - Enables WS transport using tokio runtime.
  • ws-tls-tokio - Enables TLS support for WS transport (implies ws-tokio; default).
  • ws-async-std - Enables WS transport using async-std runtime.
  • ws-tls-async-std - Enables TLS support for WS transport (implies ws-async-std).
  • ipc-tokio - Enables IPC transport using tokio runtime (default).
  • signing - Enable account namespace and local-signing support (default).
  • eip-1193 - Enable EIP-1193 support.
  • wasm - Compile for WASM (make sure to disable default features).
  • arbitrary_precision - Enable arbitrary_precision in serde_json.
Comments
  • ABIencoderV2/tuple support

    ABIencoderV2/tuple support

    I believe the error I am running into is around abi encoder V2 and contracts that use it.

    thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error(SerdeJson(Error("Error(InvalidName(\"tuple\"), State { next_error: None, backtrace: InternalBacktrace })", line: 1, column: 267)), State { next_error: None, backtrace: InternalBacktrace })', src/libcore/result.rs:999:5
    

    Happy to try to help, but I am brand new to the library.

    opened by brockelmore 14
  • Rust Client Returns

    Rust Client Returns "Abi error: Invalid data"

    I'm building a Rust client to interact with a smart contract on Ethereum. The contract works, but there seems to be an issue with the client.

    I am building from this example: https://github.com/tomusdrw/rust-web3/blob/master/examples/contract.rs

    The contract has been deployed to Ganache and prepared via truffle console to the proper state. Running the client script should print a value of 100 (or the Wei equivalent). Instead, I get this:

    Abi error: Invalid data.

    Here is the relevant portion of the ABI:

    // --snip--
      {
        "inputs": [],
        "name": "balance",
        "outputs": [
          {
            "internalType": "uint256",
            "name": "",
            "type": "uint256"
          }
        ],
        "stateMutability": "view",
        "type": "function"
      },
    // --snip--
    

    The entire ABI is here: https://gist.github.com/creese/5e50fac5ce680636bf969088fa4dd798

    Here is the code:

    // --snip--
    #[tokio::main]
    async fn get_balance(
        args: BalanceArgs,
        config_overrides: Option<Vec<(String, String)>>,
    ) -> Result<String, Box<dyn Error>> {
    
        let http = web3::transports::Http::new("http://127.0.0.1:7545")?;
        let web3 = web3::Web3::new(http);
    
        let from: Address = config_overrides
            .unwrap()
            .iter()
            .filter(|x| x.0 == "from")
            .collect::<Vec<_>>()[0]
            .1
            .parse()?;
    
        let to: Address = args.address.parse()?;
    
        let contract = Contract::from_json(
            web3.eth(),
            to,
            include_bytes!("../../target/contracts/abi/contract.abi"),
        )?;
    
        let result =
            contract.query("balance", (from,), None, Options::default(), None);
        let balance: U256 = result.await?;
    
        // The code never reaches here.
    
        Ok(balance.as_u32().to_string())
    }
    // --snip--
    

    The error appears to be generated at or after the await. Do you have any suggestions as to what might be happening or the best way to troubleshoot?

    opened by creese 13
  • Use reqwest as client library for WASM browser support

    Use reqwest as client library for WASM browser support

    Having a quick glance to the dependencies I see you depend on hyper directly, would it be a big effort to use reqwest instead? is one of the most used http clients this days and provides a nicer API, on top of that they already went through the effort of making it work with web assembly which seems like a major effort that this project doesn't look very motivated to take. Reqwest would act as the abstraction layer that makes the switch from a hyper backend to browser fetch at compile time.
    Nicer http api plus wasm support, sounds like a nice deal right?

    enhancement help wanted 
    opened by olanod 13
  • Put original Solidity/other code in examples

    Put original Solidity/other code in examples

    Trying out the deployment of a contract, and everything is going smoothly except for the format of the bytecode/solidity contracts are supposed to be in. I'm getting many 'invalid data' and JSON parse errors for a simple 'greeter' contract.

    I think it would help to include original solidity code, and maybe even a quick snippet with the process of compiling the solidity code to ABI + JSON with official solc compiler.

    opened by insipx 10
  • Need help fetching past and new events from a contract while also checking sync status

    Need help fetching past and new events from a contract while also checking sync status

    I am trying to subscribe to events on the uniswap contracts, but am having some trouble getting any logs.

    If I were using pyweb3, I would want something like https://www.reddit.com/r/UniSwap/comments/atddo2/effective_way_to_get_all_uniswap_exchange/ehp8w1z/

    from web3.auto import w3
    
    abi = [{"name": "NewExchange", "inputs": [{"type": "address", "name": "token", "indexed": True}, {"type": "address", "name": "exchange", "indexed": True}], "anonymous": False, "type": "event"}]
    
    uniswap = w3.eth.contract('0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95', abi=abi)
    events = uniswap.events.NewExchange.createFilter(fromBlock=6627917).get_all_entries()
    token_exchange = {e.args.token: e.args.exchange for e in events}
    
    for token, exchange in token_exchange.items():
        print(token, exchange)
    

    Except instead of printing, I want to subscribe to the events of that Exchange.

    I am able to get the pubsub example working, so I know my web3 connection is correct.

    I will push the code I have up to GitHub soon, but wanted to get this issue made now in case there is something simple I'm missing. Right now, my rust code prints the current block number and then prints my filter, but it never prints anything else.

    7376907
    factory_filter: Filter {
        from_block: Some(
            Number(
                6627917
            )
        ),
        to_block: None,
        address: Some(
            ValueOrArray(
                [
                    0xc0a47dfe034b400b47bdad5fecda2621de6c4d95
                ]
            )
        ),
        topics: Some(
            [
                Some(
                    ValueOrArray(
                        [
                            0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9
                        ]
                    )
                )
            ]
        ),
        limit: None
    }
    

    I've tried with and without setting the topic to keccack256("NewExchange(address,address)")

    Should I be using create_logs_filter or subscribe_logs or something else? Any suggestions, or do I need a more complete example?

    opened by WyseNynja 9
  • Migrate from tokio_core

    Migrate from tokio_core

    any plans to migrate to tokio from tokio_core in the near-future? I haven't looked through the entire codebase yet, but it seems as if it may be a sizeable undertaking

    refactor 
    opened by insipx 9
  • add http-rustls feature

    add http-rustls feature

    The existing http-tls feature enables TLS support via hyper-tls which in turn pulls in OpenSSL on Linux via native-tls. OpenSSL is written in C and has a long history of vulnerabilities caused by memory corruption.

    The new http-rustls feature allows to choose a TLS implementation that is written in Rust.

    Depends on #454 being merged first. I'll rebase once that happens.

    opened by toxeus 8
  • What's the best way to make `execute()`s `params` dynamic?

    What's the best way to make `execute()`s `params` dynamic?

    This is probably more of a Rust language question than related to this library, but I'm having a hard time finding a solution to this...

    For example calling

    .execute(bytecode, U256::from(100), accounts[0]).unwrap()
    

    Works fine when the Smart Contract in the bytecode only expects one constructor argument. If it, let's say, expects 2 arguments, this call needs to be changed to sth. like this (the single value turns into a tuple of size 2):

    .execute(bytecode, (U256::from(100), U256::from(200)), accounts[0]).unwrap()
    

    This can be done with #n amount of arguments as long as it's no more than 16 (as far as I understand).

    However, what if I don't know the number of arguments at compile time? I'd like to call execute() for several bytecodes and the constructor args I only now at runtime.

    Is there a way to do this?

    opened by PascalPrecht 8
  • Dropping EventLoopHandle after running a request causes the program to hang.

    Dropping EventLoopHandle after running a request causes the program to hang.

    Dropping EventLoopHandle before dropping Web3<T> causes a hang if at least one request has been issued. Example code:

    extern crate web3;
    
    use web3::futures::Future;
    
    fn main() {
      let (eloop, http) = web3::transports::Http::new("http://localhost:8545").unwrap();
      let web3 = web3::Web3::new(http);
      let _accounts = web3.eth().accounts().wait().unwrap();
    
      drop(eloop);
    }
    

    This became an issue when I created a struct that owned both EventLoopHandle and Web3<T>. If my struct fields were in the wrong order, the program would hang when attempting to drop my struct. If I switched the order of the fields, the program would run to completion.

    bug 
    opened by abrodersen 8
  • Cannot connect to client: Transport(

    Cannot connect to client: Transport("SendError(\"...\")")

    With the simple example below I get an error like Transport("SendError(\"...\")"). It worked in the beginning but then stopped working. Any idea what could cause that?

    extern crate web3;
    
    use web3::futures::Future;
    
    fn main() {
        let (_, transport) = web3::transports::Http::new("http://localhost:8545").unwrap();
        let web3 = web3::Web3::new(transport);
        let accounts = web3.eth().accounts().wait().unwrap();
    
        println!("Accounts: {:#?}", accounts);
    
    thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Transport("SendError(\"...\")")', src/libcore/result.rs:906:4
    stack backtrace:
       0:        0x10ed1fee3 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h311e4a395df9fc90
       1:        0x10ed1c410 - std::sys_common::backtrace::_print::hebb60342f79f20b6
       2:        0x10ed21ce3 - std::panicking::default_hook::{{closure}}::h09124cef4c2cbbd0
       3:        0x10ed219e2 - std::panicking::default_hook::hfa171ff8edf516fa
       4:        0x10ed221f2 - std::panicking::rust_panic_with_hook::h3c41fb7cc19bbec2
       5:        0x10ed220d4 - std::panicking::begin_panic::he2991ed22bf2bf67
       6:        0x10ed21fa2 - std::panicking::begin_panic_fmt::hfd4bc5f2019d8a77
       7:        0x10ed21f0a - rust_begin_unwind
       8:        0x10ed58ec3 - core::panicking::panic_fmt::hae6752e5f963f9a5
       9:        0x10eaccb49 - core::result::unwrap_failed::h229ca956bb43bfce
      10:        0x10eacbb8b - <core::result::Result<T, E>>::unwrap::h317bd1e8f61b9bdc
      11:        0x10ead42d7 - raiden_rs::main::h50693c2b3a30536b
      12:        0x10ed2d66c - __rust_maybe_catch_panic
      13:        0x10ed226f8 - std::rt::lang_start::heab07b9c4d3b2654
      14:        0x10ead4434 - main
    
    opened by palango 8
  • Example of sending a transaction on actual Eth network (eg via Infura)

    Example of sending a transaction on actual Eth network (eg via Infura)

    I've managed to successfully send a transaction on ganache using send_trandaction(). However, the same method panics when trying to do it on actual Ethereum via Infura. Which makes sense I guess since at no point did I use the private key or sign the transaction.

    From this thread I gather I need to use the raw transaction method instead. I also found this crate to sign transactions. But so far I'm struggling to pull the lego pieces together - nor can I find examples in the docs (my bad if they're there and I missed them).

    Could someone provide an example of how to send an actual eth transaction, or at the very least describe the order of methods I need to call?

    opened by ilmoi 7
  • Update ethereum-types requirement from 0.13.0 to 0.14.0

    Update ethereum-types requirement from 0.13.0 to 0.14.0

    Updates the requirements on ethereum-types to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Ownership transfer

    Ownership transfer

    Hi all!

    Long story short, for the last year, I have not been doing a great job maintaining this repository (honestly, it's even longer :)). I'm seeing though that the library is still useful for many, and there is a great community around it, so I'm very happy to transfer the ownership of the repository to a better maintainer(s).

    Opening this issue to call for maintainers.

    Perhaps https://github.com/rust-ethereum would be interested in taking it under it's wings? CC @vorot93 @kirk-baird @gelfand @emhane @vkgnosis

    Also summoning top contributors: @e00E @rphmeier @debris @mjkoo

    opened by tomusdrw 2
  • Update idna requirement from 0.2 to 0.3

    Update idna requirement from 0.2 to 0.3

    Updates the requirements on idna to permit the latest version.

    Commits
    • 7161ea8 Use semver-compatible version requirement for serde.
    • f71d0f4 Auto merge of #135 - pyfisch:ipv4addr, r=Ms2ger
    • ecc7bb7 Add IPv4 variant to Host and remove custom Ipv6 address type
    • 845e14b Auto merge of #134 - mikedilger:value_chars, r=SimonSapin
    • 00fd5e3 rename VALUE_CHARS to HTTP_VALUE; flesh out code
    • cfb30ee Added VALUE_CHARS EncodeSet
    • fedf144 Auto merge of #133 - untitaker:issue-132-port-eq, r=SimonSapin
    • ab7f6fc Add tests
    • 3e72c19 Manually impl Ord, PartialOrd
    • b999b7d Make port: None equal to port: default_port
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • New release with update dependencies

    New release with update dependencies

    @tomusdrw would it be possible to release a new version with the update dependencies? The ethabi v16 for example is already 9 months old

    There haven't been any new PRs reviewed and merged lately, so I'm wondering if you plan to maintain the crate in the long run or if you're temporary occupied with other things?

    opened by elpiel 0
  • Error: Rpc(Error { code: MethodNotFound, message:

    Error: Rpc(Error { code: MethodNotFound, message: "Method not found", data: None })

    Hello, I have tried some examples from this repo, like send private, public tx, call account balance etc but I always get the same error :

    Error: Rpc(Error { code: MethodNotFound, message: "Method not found", data: None })

    I have tried to put all dependencies inside my cargo toml but it still not working

    I run an akula mainnet node in localhost 8545 with http request and its working well with web3 js

    opened by 0xZangetsudev 1
  • Update secp256k1 requirement from 0.21 to 0.24

    Update secp256k1 requirement from 0.21 to 0.24

    Updates the requirements on secp256k1 to permit the latest version.

    Changelog

    Sourced from secp256k1's changelog.

    0.24.0 - 2022-07-20

    0.23.4 - 2022-07-14

    0.23.3 - 2022-06-29

    0.23.2 - 2022-06-27

    0.23.1 - 2022-06-24

    Enable "rand/std_rng" feature when the crate's "rnd-std" feature is enabled.

    0.23.0 - 2022-06-21

    The major change in this version is the increase of the Minimum Supported Rust Version (MSRV) from 1.29 to 1.41.1, this is a big change because it introduces Rust Edition 2018 to the codebase along with all the benefits that brings.

    Breaking changes

    New features/APIs

    Other improvements

    • global-context feature now activates global-context-less-secure.
    • githooks/ directory added for contributors

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Releases(v0.18.0)
  • v0.18.0(Feb 6, 2022)

    What's Changed

    • Initialize secp256k1 context only once by @tomusdrw in https://github.com/tomusdrw/rust-web3/pull/535
    • Use shared context for both verification & signing by @tomusdrw in https://github.com/tomusdrw/rust-web3/pull/537
    • EIP-1559 Support by @mdben1247 in https://github.com/tomusdrw/rust-web3/pull/533
    • Optional Provider by @SionoiS in https://github.com/tomusdrw/rust-web3/pull/548
    • Fix panic when MetaMask returns error by @dvec in https://github.com/tomusdrw/rust-web3/pull/549
    • Update ethabi and ethereum-types by @palango in https://github.com/tomusdrw/rust-web3/pull/554
    • Update arrayvec by @palango in https://github.com/tomusdrw/rust-web3/pull/555
    • Update soketto by @palango in https://github.com/tomusdrw/rust-web3/pull/556
    • eth_feeHistory implementation by @sunce86 in https://github.com/tomusdrw/rust-web3/pull/558
    • Fix decimals decoding test by @tomusdrw in https://github.com/tomusdrw/rust-web3/pull/571
    • Do not require effectiveGasPrice in TransactionReceipt, by @marmistrz in https://github.com/tomusdrw/rust-web3/pull/570
    • Adding eth_getProof eth_ JSON-RPC method by @lightyear15 in https://github.com/tomusdrw/rust-web3/pull/569
    • Ethereum Name Service by @SionoiS in https://github.com/tomusdrw/rust-web3/pull/562
    • eth_getProof balance and nonce to U256 by @lightyear15 in https://github.com/tomusdrw/rust-web3/pull/572
    • Update ethabi requirement from 15.0.0 to 16.0.0 by @dependabot in https://github.com/tomusdrw/rust-web3/pull/577
    • Dependabot/cargo/secp256k1 0.21 by @palango in https://github.com/tomusdrw/rust-web3/pull/589
    • Update the docs for BaseFilter to mention that the filter is not uninstalled on Drop by @marmistrz in https://github.com/tomusdrw/rust-web3/pull/584
    • Support personal_sign rpc by @eiz in https://github.com/tomusdrw/rust-web3/pull/561
    • Update parking_lot requirement from 0.11.0 to 0.12.0 by @dependabot in https://github.com/tomusdrw/rust-web3/pull/591
    • signed_call (without confirmations) by @dpuyosa in https://github.com/tomusdrw/rust-web3/pull/581
    • move Accounts::hash_message and make it static by @blackghost1987 in https://github.com/tomusdrw/rust-web3/pull/588
    • Expose ParseSignatureError from recovery module by @tomusdrw in https://github.com/tomusdrw/rust-web3/pull/592
    • Allow setting basic auth credentials in websocket url by @717a56e1 in https://github.com/tomusdrw/rust-web3/pull/590
    • Get rid of compilation warnings in case signing is disabled. by @tomusdrw in https://github.com/tomusdrw/rust-web3/pull/594
    • Report HTTP failure codes as RPC errors if returned for an RPC call by @marmistrz in https://github.com/tomusdrw/rust-web3/pull/585
    • ENS documentation by @SionoiS in https://github.com/tomusdrw/rust-web3/pull/587
    • Fix compilation after broken GH auto-merge. by @tomusdrw in https://github.com/tomusdrw/rust-web3/pull/596
    • Fix clippy warnings by @niclaslind in https://github.com/tomusdrw/rust-web3/pull/597

    New Contributors

    • @SionoiS made their first contribution in https://github.com/tomusdrw/rust-web3/pull/548
    • @dvec made their first contribution in https://github.com/tomusdrw/rust-web3/pull/549
    • @palango made their first contribution in https://github.com/tomusdrw/rust-web3/pull/554
    • @sunce86 made their first contribution in https://github.com/tomusdrw/rust-web3/pull/558
    • @marmistrz made their first contribution in https://github.com/tomusdrw/rust-web3/pull/570
    • @lightyear15 made their first contribution in https://github.com/tomusdrw/rust-web3/pull/569
    • @eiz made their first contribution in https://github.com/tomusdrw/rust-web3/pull/561
    • @dpuyosa made their first contribution in https://github.com/tomusdrw/rust-web3/pull/581
    • @blackghost1987 made their first contribution in https://github.com/tomusdrw/rust-web3/pull/588
    • @717a56e1 made their first contribution in https://github.com/tomusdrw/rust-web3/pull/590
    • @niclaslind made their first contribution in https://github.com/tomusdrw/rust-web3/pull/597

    Full Changelog: https://github.com/tomusdrw/rust-web3/compare/v0.17.0...v0.18.0

    Source code(tar.gz)
    Source code(zip)
  • v0.17.0(Jul 29, 2021)

    • Rewrite HTTP Transport (#497)
    • Fix Windows IPC issues (#521)
    • Add baseFeePerGas to support London HF (#531)
    • Add CallRequestBuilder (#529)
    • Bump deps and improve docs & examples.
    Source code(tar.gz)
    Source code(zip)
  • v0.16.0-1(May 24, 2021)

    • Switch to reqwest as HTTP client & add WASM/browser support (#491)
    • trace_callMany (#494)
    • AccessList support - EIP 2930 (#489)
    • Fix infura compatiblity (#484)
    • tokio 1.0 (#454)
    • Allow signing deployment transaction (#473)
    • parity_pendingTransactions (#451)
    • TLS cleanups (#450, #466)

    and regular deps bump + bug fixes (IPC transport).

    Huge thanks to all contributors!!!

    Source code(tar.gz)
    Source code(zip)
  • v0.15.0(Jan 11, 2021)

  • v0.14.0(Dec 10, 2020)

    • Support both tokio and async-std runtimes (#368)
    • Support for HTTP_PROXY variables (#370)
    • Support for uint8[] types (#377)
    • Add txpool namespace support (#382)
    • Rewrite internal code to async/await (#387, #388, #389, #394, #398, #399, #403)
    • Expose TestTransport (#402)
    • Re-export ethabi (#409)
    • EIP-234 support (#411)
    • EIP-1193 support (#414)
    • Support pending block without author/miner (#405)
    • TurboGeth uncle format support (#406)

    Huge thanks to all contributors!!! :tada:

    Source code(tar.gz)
    Source code(zip)
  • v0.13.0(Jul 13, 2020)

    This release changes the way you handle signing. It's now your responsibility to prevent SecretKeys from leaking copies on stack/heap, see #365 for more details, solutions and migration path.

    • Add support for wss (#360)
    • Rework transport features (TLS especially) (#363)
    • Isolate crypto stuff and avoid dealing with leaking SecretKey (#365)
    • added Transaction::raw (#366)
    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Jun 22, 2020)

    • Get rid of futures=0.1, make the library async/await friendly. :partying_face:

    • Add Contract::signed_call_with_confirmations (#352)

    • Contract calldata api (#349)

    • Make CallRequest's to field optional (#348)

    • Basic contract events parsing (https://github.com/tomusdrw/rust-web3/commit/91133a00f9d4d129bfc21d10d6ac9213fcd709e0)

    • Box zeroize to prevent leaving copies on move. (#358)

    Regressions:

    • TLS support for WebSocket client
    • No IPC (UDS) transport
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(May 18, 2020)

    1. Implement parity namespace (#318)
    2. Bump ethabi to v11.0.0 (#326)
    3. Reimplement transaction signing with license compatible crate (#325)
    4. Update base64 requirement from 0.11.0 to 0.12.0 (#330)
    5. Tokenize negative signed integers (#333)
    6. Update Index type to be U64, make tx_index consistent (#336)
    7. Update ethabi and ethereum-types to latest (#339)
    8. Make logs_bloom optional (#343)
    9. Add root field to transaction receipt (#340)
    10. Support eth_call by block hash (#345)
    11. Implement Serde Deserialize for Call and Transaction Requests (#346)

    Full list of changes: https://github.com/tomusdrw/rust-web3/compare/v0.10.0...v0.11.0

    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Jan 28, 2020)

  • v0.9.0(Jan 18, 2020)

    • Support Infura Project secret (#239)
    • Fail deploy on failed status (#242)
    • Improve error for byte deserialization (#251)
    • Parse r/s values from signTransaction as U256 (#250)
    • Updated blocks numbers to use U64 (#253)
    • Add web3::contract::deploy::execute_no_unlock (#252)
    • Exported all the "pub" types that weren't (#259)
    • Fixes to tracing (#262, #261, #260)
    • Implemented From for TransactionId (#273)
    • Expose eth_subscribe (#274)
    • Fix tokenization for arrays and primitives (#277, #307)
    • EitherTransport implementation, to support transport-agnostic code (#297)
    • estimate_gas: do not serialize null block number (#291)
    • Add eth_chainId method (#293)
    • Custom signing methods (#287)
    • Add transaction signing with in accounts sub-namespace. (#279)
    • Updated dependencies (#232, #240, #268, #271, #272, #275) Full list of changes: https://github.com/tomusdrw/rust-web3/compare/v0.8.0...v0.9.0
    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Jul 12, 2019)

  • v0.7.0(Jun 11, 2019)

    • Update ethereum-types dependency (#211)
    • Migrate to edition=2018 (#206)
    • Fix Errors not implementing std::error::Error (#217)
    • Fix traces (#213)
    • Add netPeers (#199)
    • Support for truffles library linking (#209)
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Mar 6, 2019)

  • v0.5.1(Dec 4, 2018)

  • v0.5.0(Nov 13, 2018)

    • Parity's traces namespace
    • Update to latest hyper
    • Make block_number and block_hash optional in the receipt
    • Add Eq and Hash for Bytes.

    Full list of changes: https://github.com/tomusdrw/rust-web3/compare/v0.4.0...v0.5.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Sep 14, 2018)

  • v0.3.1(Jul 19, 2018)

    Notable fixes:

    • Support basic auth credentials for HTTP transport (kudos @blackbeam; #112)
    • Avoid waiting for confirmations if confirmations are not required (kudos @cheme; #110)
    • Fix sync status (kudos @mjkoo; #111)
    • Fix subscribe_logs (kudos @mjkoo; #118)
    • Set Block seal_fields to an empty vector if missing (kudos @Jannis; #136)
    • add support for eth_getLogs method (kudos @forrest-marshall; #122)
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Mar 22, 2018)

    • Logs contain removed flag and log_type (#100)
    • Call contract with confirmations (#102)
    • Status field in transaction receipt (#98)
    • WebSocket transport (#101)
    • PubSub support (#105)
    • TLS support for HTTP (#106)

    Big kudos to the contributors @akuanti, @Kmoneal and especially to @mjkoo ! :tada: Great work guys!

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Feb 7, 2018)

    • Use proper bignum types for U256 and fixed-hash
    • Implement Debug for Web3 and transports.
    • Rewrite errors using error-chain
    • Rework transports to avoid running into lifetime issues when using futures and nested calls
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Sep 29, 2017)

  • v0.0.5(Aug 23, 2017)

  • v0.0.3(Feb 16, 2017)

Owner
Tomasz Drwięga
tomusdrw.eth
Tomasz Drwięga
Substreams development kit for Ethereum chains, contains Firehose Block model and helpers as well as utilities for Ethereum ABI encoding/decoding.

Substreams Ethereum Substreams development kit for Ethereum chains, contains Rust Firehose Block model and helpers as well as utilities for Ethereum A

StreamingFast 10 Sep 13, 2022
Making Token Exchange program with Solana(Rust), Web3, and Vue

Escrow program for Solana blockchain Tech stack Program (Smart Contract) Rust crates: solana-program, spl-token Solana CLI for test validator UI Types

Hoon Wee 3 May 10, 2022
A Web3.0 forum implemented based on Substrate

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

Daogang Tang 5 Mar 24, 2022
A Web3.0 forum implemented based on Substrate

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

Mike Tang 5 Mar 24, 2022
Summer Boot (web2&web3, the decentralized web framework)

Summer Boot The next generation decentralized web framework allows users to manage and share their own data. It will be a wide area and cross regional

Summer 111 Sep 14, 2022
Next-generation implementation of Ethereum protocol ("client") written in Rust, based on Erigon architecture.

?? Martinez ?? Next-generation implementation of Ethereum protocol ("client") written in Rust, based on Erigon architecture. Why run Martinez? Look at

Arthur·Thomas 23 Jul 3, 2022
Rust Ethereum 2.0 Client

Lighthouse: Ethereum 2.0 An open-source Ethereum 2.0 client, written in Rust and maintained by Sigma Prime. Documentation Overview Lighthouse is: Read

Sigma Prime 2k Sep 22, 2022
Rust client to Opensea's APIs and Ethereum smart contracts

opensea.rs Rust bindings & CLI to the Opensea API and Contracts CLI Usage Run cargo r -- --help to get the top level help menu: opensea-cli 0.1.0 Choo

Georgios Konstantopoulos 213 Sep 25, 2022
The fast, light, and robust client for the Ethereum mainnet.

OpenEthereum Fast and feature-rich multi-network Ethereum client. » Download the latest release « Table of Contents Description Technical Overview Bui

OpenEthereum 1.6k Sep 21, 2022
The fast, light, and robust client for Ethereum-like networks.

The Fastest and most Advanced Ethereum Client. » Download the latest release « Table of Contents Description Technical Overview Building 3.1 Building

OpenEthereum 6.7k Sep 20, 2022
The Fastest and most Advanced Ethereum Client

The Fastest and most Advanced Ethereum Client. » Download the latest release « Table of Contents Description Technical Overview Building 3.1 Building

Jay Lee 6 Feb 17, 2022
An encrypted multi client messaging system written in pure Rust

?? Preamble This is a pure Rust multi-client encrypted messaging system, also known as Edode's Secured Messaging System. It is an end-to-end(s) commun

Edode 3 Sep 16, 2022
Complete Ethereum and Celo wallet implementation and utilities in Rust

ethers.rs Complete Ethereum and Celo wallet implementation and utilities in Rust Documentation Extensive documentation and examples are available here

Georgios Konstantopoulos 1.2k Sep 23, 2022
A library to help you sew up your Ethereum project with Rust and just like develop in a common backend

SewUp Secondstate EWasm Utility Program, a library helps you sew up your Ethereum project with Rust and just like development in a common backend. The

Second State 44 Aug 29, 2022
Bellman zkSNARK library for community with Ethereum's BN256 support

bellman "Community edition" Originally developed for ZCash, with extensions from us to make it a little more pleasant. Uses our "community edition" pa

Matter Labs 103 Sep 26, 2022
Rust implementation of multi-party Schnorr signatures over elliptic curves.

Multi Party Schnorr Signatures This library contains several Rust implementations of multi-signature Schnorr schemes. Generally speaking, these scheme

[ZenGo X] 141 Aug 29, 2022
Custom Ethereum vanity address generator made in Rust

ethaddrgen Custom Ethereum address generator Get a shiny ethereum address and stand out from the crowd! Disclaimer: Do not use the private key shown i

Jakub Hlusička 144 Sep 5, 2022
Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.

foundry Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust. Foundry consists of: Forge: Ethe

Georgios Konstantopoulos 4.3k Sep 24, 2022
A low-level assembly language for the Ethereum Virtual Machine built in blazing-fast pure rust.

huff-rs • huff-rs is a Huff compiler built in rust. What is a Huff? Huff is a low-level programming language designed for developing highly optimized

Huff 216 Sep 27, 2022