We need a Polygon gas estimation tool -- 2

Job ID: 35519793

Budget: $10 – $60 USD

We need you provide a script that has a function can return a response with an estimated Gas fee, say with a probability range of 99, 95, 90, 80, 70 % probability chance of being included in the upcoming block (amount of transactions in a pending block, max price in pending block, base fee Gwei, Priority Fee and Max fee).

We run our own Polygon node, so it can use that mempool/tx-pool data, to calculate the probabilities.

We want the response data to be exact same as this endpoint gasprices/blockprices: https://docs.blocknative.com/gas-platform?no_third_party_tracking=true
Related categories: Blockchain Web3.js