Unable to call transfer function though Relay

:computer: Environment
Unable to execute transfer function though relay in Mainnet

I given all permission to Relay and Relay having Minter role, but while executing the withdraw function though SDK or Relay interface I am getting "Transaction would revert: could not estimate gas for transaction.", Urgent help required because same code I tried on Testnet it is working so I deployed over the Mainnet but not my client ETH is stuck

function withdrawAll() public payable onlyRole(MINTER_ROLE) {

1 Like

Can you please explain what is x?

address public t1 = 0xA7de0063e7197009c4E67a4356A70d6473bD0587;

hard to tell from this detail, but my best guess is the Relayer does not have MINTER_ROLE

If relay doesn't have Minter Role then it will give permission issue not gas issue, I am assure about all permission given to relay. Please do let me know if you required more details so that you may help. I am updating Etherscan code

This is not a gas issue.

The error message `"Transaction would revert: could not estimate gas for transaction." simply tells you that the transaction is going to revert, and that you therefore cannot get an accurate estimation of how much gas it is going to cost you.

Two options:

  1. The t1 address is that of a contract which does not implement the fallback function and the receive function.
  2. You have not granted Minter permission to the account that you are using in order to execute this transaction.

I given all permission and as I mentioned t1 is just simple ETH address, and it is working is testenet too

This is what I see in the Paiverse contract that you've linked above:

    address public t1 = 0xA7de0063e7197009c4E67a4356A70d6473bD0589;

And this is the answer that you gave me (above) on "please explain what is x":

address public t1 = 0xA7de0063e7197009c4E67a4356A70d6473bD0587;

Which one is it?

Try to be a little more meticulous in the information that you provide.

Sorry, I thought it is x but as per the give code I am trying to withdraw though Paiverse contract where t1 is address public t1 = 0xA7de0063e7197009c4E67a4356A70d6473bD0587;, and Relay having Minter Role because minting is working fine.

Well, the fact of the matter is that this address - pointed by t1 in your contract - happens to be the address of a contract on mainnet, and not "just simple ETH address" as you have previously claimed in response to my speculation:

The t1 address is that of a contract which does not implement the fallback function and the receive function.

Hence, most likely, this is indeed what's causing your transaction to revert.

It might also explain why it works for you on a testnet, where unlike mainnet, no contract is deployed at the address the pointed by t1.

BTW, it is possible that the contract at that address DOES implement a fallback function or a receive function, and that this function reverts internally for whatever reason.

In short, you'll need to look into the code of that contract in order to find out for sure.

Hi, I am having the same issue as originally described
Transaction would revert: could not estimate gas for transaction.

I am using remix to build the contract and everything works through their GUI injected & on testnet.. so I am having a hard time debugging the issue.

contract address is here: 0x4a396205e94fe6474a2de647933466c1e84a9d54

I can paste the code but I am calling a function which reduces a internal struct balance and transfers the number of tokens out, similar to a staking contract