Skip to content
Discussion options

You must be logged in to vote

Gasless transactions implement karne ke liye aapko meta-transactions ka use karna hoga jisme user apna transaction sign karta hai, but koi relayer service usko blockchain par execute karti hai aur gas pay karti hai.

Steps:

1. Smart Contract Setup:

  • Create an ERC2771-compatible contract (EIP-2771 = trusted forwarders).
  • Use OpenZeppelin’s MinimalForwarder for signature verification.

2. User Flow:

  • User signs transaction off-chain with private key.
  • Relayer picks it up, verifies via Forwarder contract.
  • Relayer submits tx with its own ETH for gas.

3. Security Best Practices:

  • Only use trusted forwarders (to prevent replay attacks).
  • Add nonce-based signature verification.
  • Implement domain sep…

Replies: 2 comments 1 reply

This comment was marked as off-topic.

@DIVYANSHUSINGHNIYA
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Security Build security into your GitHub workflow with features to keep your codebase secure Question Ask and answer questions about GitHub features and usage
3 participants