Coder Social home page Coder Social logo

Add "version" to Order object and get*Order calls to indicate the Swap contract intended for settlement about airswap-protocols HOT 8 CLOSED

airswap avatar airswap commented on August 26, 2024 3
Add "version" to Order object and get*Order calls to indicate the Swap contract intended for settlement

from airswap-protocols.

Comments (8)

hensha256 avatar hensha256 commented on August 26, 2024

This seems fair.
A malicious person could still deploy a swap contract with the same version though. So it could make more sense for the swap contract address to be specified in the order not the version

from airswap-protocols.

dmosites avatar dmosites commented on August 26, 2024

Yes, sorry. Meant to say that the value of version would be a Swap contract address.

from airswap-protocols.

hensha256 avatar hensha256 commented on August 26, 2024

Ah I see. I thought you meant the DOMAIN_VERSION constant that already exists.

from airswap-protocols.

poiresel avatar poiresel commented on August 26, 2024

If that's the case, then maybe modify the Types.hashDomain to use the order.version if that's the new verifying contract? Also recommend calling it versioningAddress / versioningContract or something else appending to indicate this is a contractAddress and not just a a version 1 or 2

from airswap-protocols.

dmosites avatar dmosites commented on August 26, 2024

If that's the case, then maybe modify the Types.hashDomain to use the order.version if that's the new verifying contract? Also recommend calling it versioningAddress / versioningContract or something else appending to indicate this is a contractAddress and not just a a version 1 or 2

The EIP-712 domainSeparator is calculated by hashDomain at deploy time for each Swap contract, not on a per-order basis. As for naming, agree it should be clear, though it could be clear simply to see that the values and types are addresses.

from airswap-protocols.

cloudonshore avatar cloudonshore commented on August 26, 2024

Agreed!

from airswap-protocols.

poiresel avatar poiresel commented on August 26, 2024

dmosites 3:03 PM
signatureValidator is flat
signature.validator is nested
it would be a part of Signature struct

from airswap-protocols.

poiresel avatar poiresel commented on August 26, 2024

Close as #265 has been merged

from airswap-protocols.

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.