How can I do contract call transaction from Metamask qr code scan?

I have a payable function in the smart contract that takes some ether from the sender and does some tasks. I want to generate QR code for this contract call transaction so that user can scan and confirm from their Metamask mobile app. But I am not sure how to implement that.

We can generate qr code for general ether transfer transaction by the URL:
ethereum:0x7e3b984faE2b9235B38D8f8704091253F6e34692?value=1e18

Similarly, can we generate the QR code for the contract calls from EIP-681 and eip681-link-generator. But the generated QR code is not working with metamask app.

So, can I generate the contract call QR code for metamask??

1 Like

I also agree that the support for EIP-681 is lacking. Something as simple as requesting a transaction via a qr code:
ethereum:0x7049747E615a1C5C22935D5790a664B7E65D9681/pay?chain_id=1&value=0.25e18

should make payments really easy, but it doesn’t switch to the right network :frowning: If I am connected to polygon, it tried to send matic on polygon (or the native coin on whatever chain you are connected to) instead of asking to switch to Ethereum
ethpay

1 Like