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

feat: support other coin decimals, e.g. Ethermint #866

Merged
merged 8 commits into from
Nov 9, 2023
Merged

Conversation

Reecepbcups
Copy link
Member

@Reecepbcups Reecepbcups commented Nov 7, 2023

closes #854, #835 (evm usage)

summary

  • switch to use math.Int everywhere
  • adds CoinDecimals *int64 to ibc.ChainConfig (default is 6 or 18 depending on cointype)
  • on init validator, use baseReq * CoinDecimals = genesis amounts
  • adds Ethermint basic example

@Reecepbcups Reecepbcups changed the title migrate to math.Int everywhere feat: support 18 decimals (ethermint) Nov 9, 2023
@Reecepbcups Reecepbcups changed the title feat: support 18 decimals (ethermint) feat: support any coin decimals (for ethermint) Nov 9, 2023
@Reecepbcups
Copy link
Member Author

Reecepbcups commented Nov 9, 2023

@ItayLevyOfficial this is running locally for me with dymension and 18 coin decimals. Here is the setup lmk if you run into issues

A future PR can add support for specific Ethermint functions (e.g. 0x hex address things)

@Reecepbcups Reecepbcups changed the title feat: support any coin decimals (for ethermint) feat: support other coin decimals, e.g. Ethermint Nov 9, 2023
@Reecepbcups Reecepbcups marked this pull request as ready for review November 9, 2023 17:43
@Reecepbcups Reecepbcups requested a review from a team as a code owner November 9, 2023 17:43
@Reecepbcups Reecepbcups requested a review from vimystic November 9, 2023 17:43
examples/hyperspace/hyperspace_test.go Outdated Show resolved Hide resolved
examples/cosmos/builds/dymension.tar.xz Outdated Show resolved Hide resolved
Copy link
Contributor

@boojamya boojamya left a comment

Choose a reason for hiding this comment

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

👏

@Reecepbcups Reecepbcups enabled auto-merge (squash) November 9, 2023 22:32
@Reecepbcups Reecepbcups merged commit a033ba4 into main Nov 9, 2023
@Reecepbcups Reecepbcups deleted the reece/ints branch November 9, 2023 22:45
@Reecepbcups
Copy link
Member Author

@Mergifyio backport v7

Copy link
Contributor

mergify bot commented Nov 19, 2023

backport v7

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 19, 2023
* move to math.NewInt

* mod tidy

* ethermint support + chain example

* remove c.CoinDecimals from isFullyConfigured check

* revert accidental hyperspace finalStakeBal change

* use heighliner image

* remove unused docker state export

---------

Co-authored-by: Dan Kanefsky <daniel.kanefsky@gmail.com>
(cherry picked from commit a033ba4)

# Conflicts:
#	chain/cosmos/cosmos_chain.go
#	examples/cosmos/chain_upgrade_ibc_test.go
#	examples/cosmwasm/rust-optimizer/rust_optimizer_test.go
#	examples/cosmwasm/workspace-optimizer/workspace_optimizer_test.go
#	examples/hyperspace/hyperspace_test.go
#	examples/penumbra/penumbra_chain_test.go
#	go.sum
#	go.work.sum
Reecepbcups added a commit that referenced this pull request Dec 4, 2023
* feat: support other coin decimals, e.g. Ethermint (#866)

* move to math.NewInt

* mod tidy

* ethermint support + chain example

* remove c.CoinDecimals from isFullyConfigured check

* revert accidental hyperspace finalStakeBal change

* use heighliner image

* remove unused docker state export

---------

Co-authored-by: Dan Kanefsky <daniel.kanefsky@gmail.com>
(cherry picked from commit a033ba4)

# Conflicts:
#	chain/cosmos/cosmos_chain.go
#	examples/cosmos/chain_upgrade_ibc_test.go
#	examples/cosmwasm/rust-optimizer/rust_optimizer_test.go
#	examples/cosmwasm/workspace-optimizer/workspace_optimizer_test.go
#	examples/hyperspace/hyperspace_test.go
#	examples/penumbra/penumbra_chain_test.go
#	go.sum
#	go.work.sum

* mod tidy + sdkmath

* remove unused features from v7 (CW compile)

---------

Co-authored-by: Reece Williams <31943163+Reecepbcups@users.noreply.github.com>
Co-authored-by: Reece Williams <reecepbcups@gmail.com>
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.

use sdk.Int to support 128bit ints
2 participants