Giter Club home page Giter Club logo

useful-solidity-patterns's People

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  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  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  avatar

Watchers

 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  avatar

useful-solidity-patterns's Issues

Permit2: Example for PermitBatchTransferFrom

Hello πŸ‘‹

I've followed your patterns for PermitTransferFrom utilization and I've tried to apply it to the PermitBatchTransferFrom version.
But because the signature for the user, for "batched version" is different from the "original" version, I've modified the helpers functions : _signPermitt() and especially _getEIP712Hash in order to fit to the new version. Attached the modification I've done.
Capture d’écran 2023-01-03 aΜ€ 17 08 35

But I receive this error with I'm testing it : "InvalidSigner()". So I assume that the hash that I'm generating is wrong.
I've you can provide a quick example on how generate the hash for batched permit2 transfer, this could be really useful!

Thanks a lot in advance 😁

Can i translate it into Chinese

This project is amazing and has been very helpful to me. I'm wondering if I can open another repository and translate it into Chinese. I will definitely credit the source. Or do you have any recommendations on how I can contribute Chinese translation right into to this repository ?

Add an example for Check-Effects-Interactions & FREI-PI

Hello! First of all, thank you for creating and maintaining this extremely valuable list of common Solidity patterns, personally that's something I was looking for (for a while πŸ˜„).

Secondly, in my opinion, it will be useful to add the latest Solidity pattern: "Function Requirements-Effects-Interactions + Protocol Invariants", proposed by @brockelmore in the following article.

Thanks in advance for your consideration.

Add an example for `PermitBatchTransferFrom`

This has been an extremely useful example (as the name says it) for knowing how Permit2 works.

I believe it'd go full circe if you guys could add a working example for how it would be with PermitBatchTransferFrom.

permit2 diagram

Thank you for these excellent descriptions! They are super helpful.

I wanted to mention that the following image for the permit2 system is, for me, a tad hard to parse. I believe that Alice doesn't need to perform an interaction with a protocol contract; anyone with her permit can pass off her message and signature as long as they match to perform permitTransferFrom.

image

I believe a more accurate photo should look something like the following to show that Alice doesn't need to perform any more on-chain interactions herself.

permit2-interaction

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.