You can see in the code that I had to make assumptions on how the gnosis safe estimates map to transaction confirmed time. I'm happy to hear other ideas on how to do this.
Edit: It looks like the file shows up as deleted and re-created instead of moved on github. If you want to see it as a diff you can look at the second commit individually instead of going through Files changed.
Test Plan
Tested that real request still works and print out gas estimations:
GasPrices { last_update: "2020-10-29T11:58:47.411059Z", lowest: 1000000001.0, safe_low: 76000000001.0, standard: 85000000001.0, fast: 93000000001.0, fastest: 4710211381864.0 }
gas price estimate for 0 seconds: 186.000000002 gwei
gas price estimate for 10 seconds: 139.5000000015 gwei
gas price estimate for 20 seconds: 93.000000001 gwei
gas price estimate for 30 seconds: 85.000000001 gwei
gas price estimate for 40 seconds: 80.500000001 gwei
gas price estimate for 50 seconds: 76.000000001 gwei
gas price estimate for 60 seconds: 75.30909091008182 gwei
gas price estimate for 70 seconds: 74.61818181916364 gwei
gas price estimate for 80 seconds: 73.92727272824546 gwei
gas price estimate for 90 seconds: 73.23636363732727 gwei
You can see in the code that I had to make assumptions on how the gnosis safe estimates map to transaction confirmed time. I'm happy to hear other ideas on how to do this.
Edit: It looks like the file shows up as deleted and re-created instead of moved on github. If you want to see it as a diff you can look at the second commit individually instead of going through
Files changed
.Test Plan
Tested that real request still works and print out gas estimations: