blockchain-certificates / cert-issuer

Issues Blockcerts using either the Bitcoin or Ethereum blockchain
MIT License
409 stars 208 forks source link

Fetching current gas price from Etherscan #287

Closed abhisheksarka closed 1 month ago

abhisheksarka commented 1 month ago

Currently cert issuer supports setting a fixed gas price to issue credentials into the Ethereum blockchain. When issuing credentials via an automated process, using the cert issuer APIs, a fixed value would need constant intervention or it needs to have a high value. Neither of which is scalable or cost efficient.

To handle this case, I have introduced a gas_dynamic_price config which when set to True, will fetch the current gas price from Etherscan.

Issue: https://github.com/blockchain-certificates/cert-issuer/issues/285

lemoustachiste commented 1 month ago

I think it makes sense, and the integration is clean and easy to follow.

You will likely need to rewrite your commit to feat:.

abhisheksarka commented 1 month ago

@lemoustachiste I have tested this feature out and works as expected. Please take a look when you get time. Thanks!