Skip to content

Upgrade from ethabi to alloy-json-abi #710

Description

@acemasterjb

As per the ethabi repo:

This project is not actively maintained. Consider these alternatives:

alloy-rs is also now utilized by foundry-compilers.

So if alloy-rs is utilized in rust-web3 as well it could allow for something like:

let all_contracts_compiled: VersionedContracts = self.contract_interfaces;
let dai_abi: &JsonAbi = all_contracts_compiled
    .find_first("ERC20")
    .unwrap()
    .abi
    .unwrap();

let dai_address = Address::from_str("6b175474e89094c44da98b954eedeac495271d0f").unwrap();
let dai_contract = Contract::new(self.client.eth(), dai_address, erc20_abi);

to be easily implemented. Assuming that self.client is a Web3<Transport>.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions