Giter Site home page Giter Site logo

opengsn / workshop2 Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 15.0 155 KB

A sample project to how how to add GSN to a simple Web3 project. See the PRs to see the needed changes.

Home Page: https://youtu.be/Tb4HKboFmoU

License: GNU General Public License v3.0

Solidity 15.27% JavaScript 68.76% Shell 3.96% HTML 12.01%

workshop2's People

Contributors

drortirosh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

workshop2's Issues

Feedback from presentation

As requested, thought on sharing some feedback on the great presentation! After watching the entire workshop, here are some recommendations:

  • 7:12 Ideally it would be great to show early the diff for the changes when implementing GSN. You mention that afterward, but in case someone wanted to skip the manual changes, that would have been great.
  • 14:19 There are too many moving parts IMHO to be sharing there, and maybe some visual aid would have been welcomed. Do I require the paymaster in my contract? Update the provider? Redeploy the relayer? Some time ago I put together a diagram for showcasing GSN, happy to chip in here and try to visualize all the moving parts so devs know how to change what where.
  • 16:47 Woah, what was that 1 ETH for? Is that needed as a “deposit” for the relayer?

In general, I really enjoyed the walkthrough, but I do see as a challenge how the average developer will go and overhaul their app into implementing the entire stack. From reading this, I see there are 3 challenges needed for OpenGSN adoption:

  • Reusing existing forwarder. Requiring only updating msg.sender to _msgSender() is great, but having to redeploy the contract with a forwarder as a constructor is a bit of a turn-off, because a Forwarder needs to be deployed. What would it take for any contract just to take an existing Forwarder? Does it have to be something the contract owner manages?
  • Automating boilerplate. My guess is that for 80% of the use cases people will just want a WhitelistPaymaster that they can offline manage via some API they can validate off-chain. How hard would it be to have a script deploy one ready to use?
  • Paymaster management. It seems that for the UI to work we need to have a wrapped Paymaster and the RelayProvider, the former having set up the RelayHub and trusted Forwarder address. Is there a roadmap or feature request to allow the creation of tooling to manage these Paymaster contracts? For the average UI guy they just want to update their Metamask modal and go to some dashboard to fund calls for whitelisted addresses. If none exists, are there any existing grants on Gitcoin or similar to be able to contribute to?

Very excited about the project! Take the feedback as a grain of salt and don't hesitate to ping me in Twitter if I can help somehow.

Workshop with paymaster: Error: Rejected relayTransaction call with reason: Cannot read properties of undefined (reading 'contract')

Facing an issue with the whitelist paymaster, the program throws an exception Uncaught (in promise) Error: Rejected relayTransaction call with reason: Cannot read properties of undefined (reading 'contract').

Initially, I was following the youtube tutorial but cloned the paymaster pull request upon encountering this issue. However, the error persists.

For reference, this was the console output prior to the error:

CaptureTheFlag contract 0x0E696947A06550DEf604e82C26fd9E493e576337

identified network: {"chainId":1337,"name":"unknown"}

calling sendAsync{"method":"eth_sendTransaction","params":
[{"gas":"0xb0a4","from":"0xffcf8fdee72ac11b5c542428b35eef5769c409f0","to":"0x0e696947a06550def604e82c26fd9e493e576337","data":"0x239e26f2"}],"id":11,"jsonrpc":"2.0"}

Rejected relayTransaction call with reason: Cannot read properties of undefined (reading 'contract')

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.