0

Guys I am trying to send an ERC 20 out of a safe address but for example when I try the following command:

send_erc20 0x7F5c764cBc14f9669B8 8837ca1490cCa17c31607 0x1dE---ab4Bc 1

I get the following error related to gas allowance:

in formatted_response raise ValueError(response["error"]) ValueError: {'code': -32000, 'message': 'gas required exceeds allowance (550000000)'}

How can I add the gas amount information to the command line? and how much gas should I include? Thanks in advance!

1 Answer 1

1

You need to add the gas parameter when calling the send_erc20 function.

You can estimate the required gas using a function like estimateGas before sending the transaction.

You'll also need to specify the gasPrice in Gwei. Sites like Etherscan or ETH Gas Station will let you retrieve current recommended gas prices.

5
  • Thank you so much for the help. Buy how can I add the gas parameter to the command for transferring the token? Sorry for the noob question.
    – Mrbiii
    Apr 22 at 15:10
  • 1
    --gas 600000 --gasPrice 20 Add these flags/your gas price to your command
    – VX3
    Apr 22 at 15:17
  • Sorry to bother you again man but when I add it to the drain command line like this: drain 0x1dE****ab4Bc --gas 600000 --gasPrice 35 I get another error: error: unrecognized arguments: --gas 600000 --gasPrice 35 Can you help me with this too? Thanks in advance.
    – Mrbiii
    Apr 22 at 20:54
  • 1
    Any reason why you're using drain? I couldn't find any documentation for this function, are you able to expand on where you got this from? 'send_erc20 0x7F5c764cBc14f9669B8 8837ca1490cCa17c31607 0x1dE---ab4Bc 1 --gas 600000 --gasPrice 20' works for me :) try using the send_erc20 function
    – VX3
    Apr 23 at 10:57
  • I got the drain function from here "github.com/5afe/safe-cli" I still have a problem with gas I try this: send_erc20 0x7F5c764cBc14f9669B88837ca1490cCa17c31607 0x1dE***ab4Bc 1 --gas 600000 --gasPrice 20" And I get this error AGAIN ": error: unrecognized arguments: --gas 600000 --gasPrice 20" it's terrible
    – Mrbiii
    Apr 23 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.