Comments (5)
@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.
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.
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.
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.
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)
- Fix Ethereum spelling in demo / examples HOT 1
- Encode/decode big numbers correctly
- Add optional parameter chainId HOT 1
- canvas DOM element is appending on every toCanvas call HOT 2
- URL invalid when having 2 parameters
- document is not defined HOT 1
- Create good demo
- Add `data` to the simple schema
- [documentation] undef `codeContainer` HOT 2
- [Usage] Docs differ from Demo HOT 1
- Freezes on scan in Toshi wallet app
- Price doesn't get filled in the Trust wallet / Cipher wallet apps. HOT 4
- [Request] List with compatible wallet apps HOT 2
- Invoke contract does not work on Toshi/imToken/Cypher HOT 1
- Feature Request : a qr-code which can call a smart contract function HOT 1
- Remove excess vallidations
- add option with placing token icon on generated canvas
- fix this
- QR code reader library example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ethereum-qr-code.