Giter VIP home page Giter VIP logo

Comments (5)

mezrin avatar mezrin commented on May 24, 2024

@Reminouche , hi
That was done intentionally

Currently supported URI scheme: ethereum:<address>[?from=<sender_address>][?value=<ethamount>][?gas=<suggestedGas>]. This used to send ETH between accounts.

If you need to invoke specific method of the contract - please, see this part of readme: https://github.com/jibrelnetwork/ethereum-qr-code#2-invoke-function-of-a-contract

What is the reason to support [?data=<bytecode>]?
I can imagine only one use-case - when you want to deploy a new contract.
But this is not a purpose of QR code :)

from ethereum-qr-code.

remiroyc avatar remiroyc commented on May 24, 2024

Yea i saw your invoke function feature, but imagine :

I have a web application wich needs to pass some parameters to ether contract.

If user interacts with your contract via a qr code, there are no problems (user passes data with function parameters).

But if he wants to send a transaction directly from a eth wallet (online web wallet for example), it is a little bit complex for a user to format a correct json into data message field. I think it could be easier for him to send hexacode directly in data.

from ethereum-qr-code.

mezrin avatar mezrin commented on May 24, 2024

We miss something

QR code used to transfer info between two apps.
This is the only purpose of the QR code.
I.e.:

  • you have an app A1 which needs to invoke a contract
  • this app A1 packs needed info to invoke a contract
  • another app A2 manages your private keys
  • app A2 receives packed info, unpacks it, signs transaction, sends the transaction to the network

Generally, you can use anything to pack data. A text file will work just fine.
But we use QR code because it is handier for end-user.

The user is not able to interact with the contract via QR code.
User does not need to create json - data should be combined with the app A1

If you develop app A1 and need to pass some data to the contract - just use field argsDefaults.
You can set any value to the function argument there

Real use case: you come to the shop and want to buy bread with some TOKEN

  • cashier creates a receipt for 5 Euro
  • cashier creates QR code to send 100 TOKEN to his account
  • you scan QR code with the smartphone
  • app on your smartphone reads data from the QR code and creates an interface to send tokens
  • you check encoded data (receiver address, number of tokens) and confirms a transaction
  • app on your smartphone combines transaction and sends it to the network

As I see, there is no place for compiled data parameter...

from ethereum-qr-code.

mezrin avatar mezrin commented on May 24, 2024

Also, I do not know about widely used Ethereum wallets that support QR codes and data parameter. Most known Ethereum wallet and myetherwallet do not support QR codes at all...

from ethereum-qr-code.

shershen08 avatar shershen08 commented on May 24, 2024

Closing for now, since there was no activity on this issue for 3 days.
@Reminouche feel free to reopen if you have further proposal.

from ethereum-qr-code.

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.