Giter Club home page Giter Club logo

Comments (4)

pawanjay176 avatar pawanjay176 commented on May 23, 2024 1

@gakonst sorry, got busy over the weekend. Have started working on it. Will make some commits in a day or two :)

from ethers-rs.

pawanjay176 avatar pawanjay176 commented on May 23, 2024

Hi @gakonst, I'd like to take this up to familiarise myself with the codebase a bit :)

So from what I understand, the task is mainly to split the existing Contract struct to

pub struct BaseContract {
    abi: Abi,
    methods: HashMap<Selector, (String, usize)>,
}

pub struct Contract<M> {
    base_contract: BaseContract,
    client: Arc<M>,
    address: Address,
}

impl BaseContract {
    ....
    
    /// Should be upgradeable to a "full" `Contract` struct.
    pub fn into_full_contract<M>(self, address: Address, client: impl Into<Arc<M>>) -> Contract<M> {
        Contract {
            base_contract: self,
            address,
            client: client.into(),
        }
    }
}

Is this roughly what you have in mind?

It'd also be nice if we supported human readable ABIs.

could you expand on "human readable" a bit?

from ethers-rs.

gakonst avatar gakonst commented on May 23, 2024

Hey! Yes, exactly what I had in mind. Human readable ABIs, are the ones from Ethers-js https://blog.ricmoo.com/human-readable-contract-abis-in-ethers-js-141902f4d917

from ethers-rs.

gakonst avatar gakonst commented on May 23, 2024

hey @pawanjay176! were you able to take a stab at the issue? If there was anything confusing, could I help you in some way?

from ethers-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.