Mexa By Biconomy
Mexa is Biconomy's implementation of meta transactions.
This repo contains the stuff that makes Biconomy tick, plus some cool resources that dApps can use to integrate meta transactions into their contracts.
🤩 Cool Contracts for Gasless Meta Transactions
Custom Meta Transactions
BasicMetaTransaction
Inherit this in your contract and replace msg.sender with msgSender() and you're good to go!EIP712MetaTransaction
Inherit this in your contract and replace msg.sender with msgSender() and you're good to go!EIP-2771 Secure Native Meta Transactions
With adherence to EIP-2771 to enable native meta transactions in your contract, you can just inherit a simple contract BaseRelayRecipient.sol and set the trusted forwarder address.The Trusted Forwarder is responsible for signature verification and replay protection and forwards the transaction to your smart contract by appending the user address at the end of calldata. The _msgSender() method in your smart contract (inherited by BaseRelayRecipient) does the rest by returning the correct address for any context. Use _msgSender() wherever you use msg.sender.
Using Biconomy Forward module, you can let your users pay the gas fee in ERC20 tokens and let your users save ETH and providing a seamless transaction experience. FORWARD --> Save your ETH. Pay gas in ERC20 tokens
Forward contracts can be found here
Refer our official documentation for more information on how to use Biconomy to start providing a seamless experience to your users.
👨💻 Working On Mexa
To keep testing and deployment consistent, we use a seed phrase to generate the accounts we use - when testing and deploying contracts. You need to add file with name Providing Seed Phrase
.secret
to the root folder and add the 12 word mnemonic phrase corresponding to your account which will be used to deploy the contracts.
Both an Providing API KeysAlchemy and an Infura API key will be needed to compile and test the contracts.
# create necessary files
touch .infura .alchemy
# add keys to file
👷 Compiling Contracts
npx hardhat compile
✔️ Running Tests
Run Unit Tests :
npx hardhat test
✔️ Running Test Coverage
npx hardhat coverage --solcoverjs ./.solcover.js
Note: Some tests are skipped while running coverage as per hardhat documentation
📡 Deploying Contracts
See Hardhat Deploy
👋 How to Reach Out to Us
Join our discord channel https://discord.gg/C4XtWtB