Giter Club home page Giter Club logo

Comments (2)

CooleRnax avatar CooleRnax commented on September 27, 2024

I was coping valid order generated by 1inch..
I implemented sign_hash function part and almost was able to sign it, but the last character is different.
What am I doing wrong?

I'm getting signature:
0x1ced85d5cd22c76361e376afb66d2c06dc304bddcd0454d0f9b9a1cba1c93bf082226f26f5e77dfd23k515f91fe0c49n92e80e912bf06247d5b50e61en6493d6c103

But valid signature is:
0x1ced85d5cd22c76361e376afb66d2c06dc304bddcd0454d0f9b9a1cba1c93bf082226f26f5e77dfd23k515f91fe0c49n92e80e912bf06247d5b50e61en6493d6c102

ec_signature = _parse_signature_hex_as_rsv(signature.signature.hex())
if ec_signature["v"] in valid_v_param_values:
    signature_as_vrst_hex = (
        _convert_ec_signature_to_vrs_hex(ec_signature)
        + _Constants.SignatureType.ETH_SIGN.value.to_bytes(
            1, byteorder="big"
        ).hex()
    )
    signature_as_vrst_hex

ec_signature = _parse_signature_hex_as_vrs(signature.signature.hex())
if ec_signature["v"] in valid_v_param_values:
    signature_as_vrst_hex = (
        _convert_ec_signature_to_vrs_hex(ec_signature)
        + _Constants.SignatureType.ETH_SIGN.value.to_bytes(
            1, byteorder="big"
        ).hex()
    )
    signature_as_vrst_hex

from 0x-monorepo.

CooleRnax avatar CooleRnax commented on September 27, 2024

ended with a solution:

        signature_as_vrst_hex = (
            zero_ex.order_utils._convert_ec_signature_to_vrs_hex(
                ec_signature) + '02'
        )

from 0x-monorepo.

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.