Create a smart contract that can use a relayer account from Openzeppelin defender and do the gasless meta transactions. Which I already created and sent some Ethereum too.
The contract can receive USDTerc20 funds, and show balance, and the contract owner can withdraw the funds.
Then use Metamask in a react frontend and call those functions. Here the Metamask account will not pay the gas fees. Instead, the relayer will do.
The contract I created,
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
contract EtherWallet{
address payable public owner;
constructor() {
owner =payable(msg.sender);
}
receive() external payable {}
function withdraw(uint _amount) external {
require(msg.sender == owner, "Only owner can withdraw");
payable(msg.sender).transfer(_amount);
}
function getBalance() external view returns (uint) {
return address(this).balance;
}
}
But not sure how to do this. I need help with all the 3 options.
I'm not sure if I'm misunderstanding your question, but I think you're referring to the address of a deployed MinimalForwarder contract you'll need to deploy.
Were you able to create a contract that could it? If so how I can do the same?
Iām trying to use meta-transactions to transfer ERC-20 USDT tokens from one account to another. But the programming is too complex to understand what to do.
Any advice will be much appreciated.
Hopefully, the written guide here can help. The functionality for transferring an ERC20 token would be similar -- this guide can show you the basic building blocks so that you can adapt it to a different contract's specific needs.