-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: migrate from ethers.js to viem #117
base: master
Are you sure you want to change the base?
Conversation
Thanks for submitting the PR. Pls can you let us know how you tested this? |
Hey i have tested my changes individully, but e2e testing is not done. Please provide me api details and sample env. |
@@ -41,16 +42,16 @@ export async function getEtherscanFee(chainId: number, log?: FastifyBaseLogger): | |||
const response: EtherscanResponse = await data.json(); | |||
if (response.result && typeof response.result === "object" && response.status === "1") { | |||
if(log) log.info('setting maxFeePerGas and maxPriorityFeePerGas as received') | |||
const maxFeePerGas = ethers.utils.parseUnits(response.result.suggestBaseFee, 'gwei') | |||
const fastGasPrice = ethers.utils.parseUnits(response.result.FastGasPrice, 'gwei') | |||
const maxFeePerGas = parseUnits(response.result.suggestBaseFee, 9); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikhilkumar1612 create a constant value for gwei and use it allover where parseUnits
of viem is called for GWEI conversion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikhilkumar1612 create a constant value for gwei and use it allover where
parseUnits
of viem is called for GWEI conversion
sure 👍 @kanthgithub
@nikhilkumar1612 please use the latest version of viem. seems the |
hey @kanthgithub i can see 2.17.10 is the latest version, please let me know if i have to use 2.17.0 or 2.17.10 ? |
hey @kanthgithub are there any further changes that i have to make ? also please provide a confirm on the version of viem. |
Description
Types of changes
What types of changes does your code introduce?
Further comments (optional)