0

Contract - 0xaB9d2D124E70Be7039d7CCba9AFd06AdC1Bc60C0 All the failed transactions are called from Metamask, and all the successes are called from the Brave browser.

It's a basic, "update a contract property" call, nothing crazy.

It has always worked from Brave Browser, but I was getting Error: cannot estimate gas; transaction errors from Chrom/MetaMask, so I added the provider.getGasPrice()

async function SendMessage() {
        contract = new ethers.Contract(contractAddress, abi, wallet);
        let gasEst = await provider.getGasPrice();
        console.log(ethers.utils.formatUnits(gasEst, 'gwei'));
        return contract.SendRequest(message, { gasLimit: 1000000, gasPrice: gasEst });
    }

Any help would be appreciated, thanks!

Impredicative
  • 5,039
  • 1
  • 17
  • 43
llama006
  • 7
  • 1
  • 4

1 Answers1

0

There is no contract on the 0xaB9d2D... address on the Ethereum mainnet (Etherscan link). So when you send it a transaction on the mainnet, it's a simple transfer between two end user addresses (in your case, you're sending value of 0 ETH) and the data field is ignored.

However, on the Goerli testnet (Etherscan link), there is a contract deployed on this address. Assuming this contract doesn't implement the SendRequest() function, nor the fallback() special function, it rejects all incoming transfers that are trying to execute a function that is not defined in this contract (in your case SendRequest()).

Petr Hejda
  • 40,554
  • 8
  • 72
  • 100
  • Yes, sorry for omitting the info, it is on Goerli. I am moron, I had a bad copy paste and accidently left a require owner annotation on it. – llama006 Jul 17 '22 at 21:13