Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

348
Visualizações
Gnosis Transaction Failing On Polygon w/ "Transaction Underpriced" error

I've been trying to get a transaction to execute on Polygon but it's been failing with the following error:

  reason: 'processing response error',
  code: 'SERVER_ERROR',
  body: '{"jsonrpc":"2.0","id":89,"error":{"code":-32000,"message":"transaction underpriced"}}',

This error only occurs on Polygon and it only occurs when using the Gnosis SDK. I've tested it using the Gnosis UI and it executes successfully. I've also tested it using the Gnosis SDK on rinkeby and that works as well.

Here is the code that fails:

const infuraProvider = new ethers.providers.JsonRpcProvider(RPC_PROVIDER);

const wallet = new ethers.Wallet(`0x${PRIVATE_KEY}`, infuraProvider);
const owner1 = wallet.connect(infuraProvider);

const ethAdapterOwner1 = new EthersAdapter({ ethers, signer: owner1 });

const safeSdkInstance = await Safe.create({
    ethAdapter: ethAdapterOwner1,
    safeAddress: GNOSIS_SAFE_ADDR,
});

const contract = new ethers.Contract(contractJson.address, contractJson.abi, owner1);

const tx = {
    to: contract.address,
    value: '0',
    data: contract.interface.encodeFunctionData('mint', ['[wallet address here]', '[token id here]']),
};
const safeTransaction = await safeSdkInstance.createTransaction(tx);

const executeTxResponse = await safeSdkInstance.executeTransaction(safeTransaction);

Other things I've tried:

  • Adding a gasPrice - making that gas price incredibly large
  • Adding a gasLimit
  • Changing RPC_PROVIDER from an infura provider to a public one
  • Calling a different function - I tried calling my contracts burn function and it came back with the exact same error

I did notice that even when providing a gasPrice the error I get back says that the transaction provided had a gasPrice of null. But when logging the safeTransaction object it shows a gasPrice is generated by the createTransaction function. So something must be going wrong in the executeTransaction function

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda