Skip to content
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

Cleanup #102

Merged
merged 35 commits into from
Jan 5, 2024
Merged

Cleanup #102

merged 35 commits into from
Jan 5, 2024

Conversation

dbrajovic
Copy link
Contributor

@dbrajovic dbrajovic commented Dec 22, 2023

Changelist:

  • .env file usage: PEGGO_COSMOS_GRPC and PEGGO_TENDERMINT_RPC do not have default values anymore. Omitting these 2 fields from the .env file will have peggo create a load-balanced connection to one of known Injective networks (based on the value of PEGGO_COSMOS_CHAIN_ID). This change was enforced in the newer sdk-go version as default behaviour. If these 2 values are provided, peggo will connect to the custom RPC node.

  • ethBlockConfirmationDelay = 96: previously set to 12 (release-prod/release-staging) but increased for security reasons due to Ethereum switching to PoS from PoW. This will affect ethereum->injective UX as it incurs a delay in observing Eth events

@dbrajovic dbrajovic mentioned this pull request Dec 22, 2023
@dbrajovic dbrajovic changed the base branch from fix/bump-sdk-go to master December 29, 2023 12:29
@dbrajovic dbrajovic mentioned this pull request Jan 4, 2024
@dbrajovic dbrajovic marked this pull request as ready for review January 4, 2024 12:43
tokenPriceInUSDDec := decimal.NewFromFloat(tokenPriceInUSD)
totalFeeInUSDDec := decimal.NewFromBigInt(totalFees.BigInt(), -18).Mul(tokenPriceInUSDDec)
minFeeInUSDDec := decimal.NewFromFloat(r.minBatchFee)
totalFeeInUSDDec := decimal.NewFromBigInt(fees.BigInt(), -18).Mul(tokenPriceInUSDDec)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can obtain the actual accurate decimals from the alchemy API (for tokens that are supported by their API) and/or fallback to querying the actual ERC-20 decimals function to obtain the accurate number of decimals

@albertchon albertchon merged commit 9e702f1 into master Jan 5, 2024
@albertchon albertchon deleted the cleanup branch January 5, 2024 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants