Estimate Gas Cost

A post was split to a new topic: How can I check in the script if my relayer has enough eth to pay tx fee?