matter-labs / paymaster-examples Goto Github PK
View Code? Open in Web Editor NEWReady to use paymaster contracts for zkSync Era
License: MIT License
Ready to use paymaster contracts for zkSync Era
License: MIT License
To create a paymaster that facilitates the payment of transaction fees in wETH (wrapped Eth) using the ApprovalBased flow.
Creating a paymaster that pays fees in wETH, we can enhance user experience, security, and flexibility, promoting broader adoption of zkSync's advanced features.
wETH
using the ApprovalBased flow.Objective: Implement aSignatureBasedPaymaster
contract that covers gas fees for users based on valid signature provided by the signer of the paymaster contract.
Enhanced user flexibility : Current gated examples Allowlist
,ERC20Fixed
,ERC721Gated
require owner of the paymaster to perform a certain type of on-chain transactions such as setBatchAllowance() in Allowlist
, Transferring ERC20 token to user
, Transferring ERC721 token to user
etc. However, SignatureBasedPaymaster eliminates the necessity for pre-transaction and post-transaction requirements, thus making it more flexible.
Efficient short term use : New users onboarding without on-chain transactions from owner providing a one-time speedy and hassle-free process.
Secure personalised paymasters : A personalised paymaster that takes care of gas fees of all the user's related addresses with simple off-chain signatures. An application can be build over this use-case; thus expanding mainstream paymaster services.
innerInputs
whether or not the user's transaction shall be allowed to proceed or not.(user address, last timestamp, nonces)
.innerInputs
in paymaster params.transaction.from
, block.timestamp
and nonces
to ensure only valid users are allowed to use paymaster.transaction.from
to ensure correct user has sent transaction.Yes. Completed below deliverable tasks at PR-22:
Sample deployment on mainnet
Objective: Implement an ERC20GatedPaymaster
that covers gas fees for users based on their possession of a specific ERC20 token.
Functionality:
ERC20GatedPaymaster
will verify if the user holds a certain ERC20 token in their account.ERC20GatedPaymaster
can easily be adopted and integrated, making it a valuable tool for numerous projects.ERC20GatedPaymaster
contractA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.