Giter VIP home page Giter VIP logo

Comments (5)

imsys avatar imsys commented on May 19, 2024 1

And I see this was apparently solved in #218 , but I tried to get it working with safe-apps-sdk + safe-apps-web3modal and it did not work, personal_sign returns as soon as the first signer do the signature, and it returns just 0x and nothing more.

https://github.com/milliontokenfan/milliontokenfan.github.io/blob/main/sign.html

And by the way, another issue, but very minor with easy workaround: Error: "personal_ecRecover" not implemented

from safe-apps-sdk.

imsys avatar imsys commented on May 19, 2024

I would really like this feature.

I saw this post https://help.gnosis-safe.io/en/articles/3940875-gas-less-signatures and thought it was possible, so I tried gnosisSDK.txs.signMessage(message) but had no luck.

It actually pops up a modal to sign the message, and when I go to the second account and approve it as a "transaction", I try to copy the "Data (hex encoded)" thinking this could be the signed data, but no luck, that's not really the signature.

from safe-apps-sdk.

imsys avatar imsys commented on May 19, 2024

I wonder the technical aspect of multisig personal_sign implementation.

To get a signature from the multisig smartcontract, it would have to be executed on chain and spill the signature on chain, making it public, is that correct? or not necessary?

So, let's say I have NFTs to be minted with a fixed price, I could make a Black Friday discount event by calling some setPrice method in the smartcontract using a Gnosis Safe multisig wallet.

But what if I want to create 3 discount vouchers to be distributed? Each vouchers would need to be signed, and the signature should not be leaked before use.

Would it be possible?

For now, I got two workaround ideas:

  • Include multiple signatures in the voucher, and the smartcontract would check each one. The problem is that the contract would get overly complex for me (accounting for adding and removing signers), and more prone to bugs.
  • create a method setVoucherSigner(walletAddress) that would to be called using a multisig wallet. This option seems to be the best, as a single signer could sign many vouchers easily, and I could just call setVoucherSigner() again to void its role in case that wallet gets compromised.

I will probably use the last option, but it would be good to have personal_sign implemented in Gnosis Safe if possible, as someone else might create another use case we have not thought of. It would also be good for offchain voting. (like snapshot.org)

from safe-apps-sdk.

imsys avatar imsys commented on May 19, 2024

#204

from safe-apps-sdk.

nicosampler avatar nicosampler commented on May 19, 2024

hi @rmeissner @mikhailxyz 👋🏾 😃

I found this ticket because I'm working on an integration. Seems like it is possible to allow the wallet connected to sign a message requested from a safe-app. Check this video: https://www.loom.com/share/e16739892ef843198587917d130bf878

I used this code:

<button
    onClick={async () => {
      const w = window as any
      const provider = new Web3Provider(w.ethereum)
      const signer = provider.getSigner()
      const signature = await signer.signMessage('hello world')
      console.log(signature)
    }}
  >
    Sign MM
  </button>

I was wondering if you can prioritize this ticket as it might be super handy for the safe-app I'm working on and many others. safe-apps.

from safe-apps-sdk.

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.