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

Add a calculateGasFee method for Archway on CosmJS #101

Open
lufa23 opened this issue Aug 25, 2023 · 0 comments
Open

Add a calculateGasFee method for Archway on CosmJS #101

lufa23 opened this issue Aug 25, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@lufa23
Copy link

lufa23 commented Aug 25, 2023

Background
Currently, Archway differentiates itself from other Cosmos SDK chains by employing a distinct approach to calculate gas fees. To address this unique calculation, the arch3js library has extended CosmJS functionality. While this custom solution streamlines usage and enhances maintainability, it also has introduces some overhead for multi-chain dapps, especially the ones that need to ru multiple clients for non-Cosmos SDK chains.

Problem
While CosmJS is widely adopted, arch3js is used within the Archway ecosystem due to its specific calculation of gas fees. Several dapps use arch3js exclusively for handling these gas fees. However, this situation may introduce unnecessary overhead for specific dapps.

Proposal
Based on the received feedback to streamline the usage of CosmJS for Archway, a method named calculateGasFee can be added into the CosmJS library to calculate Archway's fees. This method would be the most critical one, as it is the one that disrupts CosmJS' flow.

Implementation
The suggested enhancement would involve extending the CosmJS client configuration to allow for a customized approach to gas fee calculation for Archway. Leveraging the parser in the stargate library can facilitate this process. More information about integrating custom protobuf codecs can be found in the stargate library documentation.

Benefits

  • Enhanced developer experience by aligning with the CosmJS flow.
  • Reduced overhead for multi-chain protocols.

References

CosmJS Repository
Stargate Custom Protobuf Codecs Documentation
Archway's minimum consensus fees

@lufa23 lufa23 added the enhancement New feature or request label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants