All Projects → bcnmy → mexa

bcnmy / mexa

Licence: MIT License
Repository contains smart contracts for biconomy's Mexa platform to implement meta transactions and allow dapp users to perform blockchain operations without holding any ether or other crypto currency.

Programming Languages

javascript
184084 projects - #8 most used programming language
solidity
1140 projects

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! 💪 This implementation is designed to work with eth_sign instead of EIP712 - due to it's wider support.

EIP712MetaTransaction

Inherit this in your contract and replace msg.sender with msgSender() and you're good to go! 💪 This implementation is designed to work with EIP712 signatures for providing a better messaging to the end users while getting their signatures.

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.

FORWARD --> Save your ETH. Pay gas in ERC20 tokens

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

Providing Seed Phrase

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 .secret to the root folder and add the 12 word mnemonic phrase corresponding to your account which will be used to deploy the contracts.

Providing API Keys

Both an Alchemy 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].