Giter Site home page Giter Site logo

Convert v5 signer to v6 signer about ethers.js HOT 5 OPEN

Hugo0 avatar Hugo0 commented on June 12, 2024
Convert v5 signer to v6 signer

from ethers.js.

Comments (5)

Hugo0 avatar Hugo0 commented on June 12, 2024 1

@apuigsech nope, delayed the project and we just support ethersv5 for now. But these guys told me they did it (i haven't looked through their code though) https://github.com/0xsquid/squid-sdk

from ethers.js.

Hugo0 avatar Hugo0 commented on June 12, 2024

@ricmoo Could I get some guidance on this? Is this feasible, to take in an ethers v5 Signer object and 1-1 map it to an ethers v6 Signer object?

My stopgap solution is to have 2 versions of the sdk, one for ethers v5 and one for ethers v6, but it's quite painful to maintain.

Any other ideas highly welcome

from ethers.js.

ricmoo avatar ricmoo commented on June 12, 2024

Heya! Sorry, this fell off my radar.

When comparing the TypeScript type incompatibilities, what does it complain about? I think they should be mostly already compatible, except the _signTypedData became signTypedData and the getNonce should point to the getTransactionCount.

The other option you have is to sub-class the AbstractSigner which accepts an v5 Signer and just fill in the abstract methods to point to the equivalent methods?

Ideally more people would move to v6. Do you know of any hang ups? I can help anyone that needs migrating, especially frameworks and such. :)

from ethers.js.

JADcooler avatar JADcooler commented on June 12, 2024

Heya! Sorry, this fell off my radar.

When comparing the TypeScript type incompatibilities, what does it complain about? I think they should be mostly already compatible, except the _signTypedData became signTypedData and the getNonce should point to the getTransactionCount.

The other option you have is to sub-class the AbstractSigner which accepts an v5 Signer and just fill in the abstract methods to point to the equivalent methods?

Ideally more people would move to v6. Do you know of any hang ups? I can help anyone that needs migrating, especially frameworks and such. :)

The docs are the bottleneck in migrating :(
even though ur probably doing a good job developing

from ethers.js.

apuigsech avatar apuigsech commented on June 12, 2024

I need to do exactly the same.

@Hugo0 did you make any progress?

from ethers.js.

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.