8000 feat: create erc20 contract on denom metadata registration by zale144 · Pull Request #22 · dymensionxyz/evmos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: create erc20 contract on denom metadata registration #22

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

Conversation

zale144
Copy link
@zale144 zale144 commented Mar 22, 2024

Description


Closes #dymension-rdk/311

@zale144 zale144 self-assigned this Mar 22, 2024
@zale144 zale144 marked this pull request as draft March 22, 2024 11:17
@zale144 zale144 changed the title Create erc20 contract on denom metadata registration [WIP] Create erc20 contract on denom metadata registration Mar 22, 2024
@zale144 zale144 assigned omritoptix and unassigned zale144 Mar 22, 2024
Copy link
@danwt danwt left a comment

Choose a reason for hiding this comment

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

Hey Alex

Looks like nice work

I'm think I'm being dumb as I'm super tired atm, but I'm having trouble fully understanding

Most of my comments are asking for more comments and docstrings

@zale144 zale144 marked this pull request as ready for review March 23, 2024 00:32
@zale144 zale144 changed the title [WIP] Create erc20 contract on denom metadata registration Create erc20 contract on denom metadata registration Mar 23, 2024
@mtsitrin mtsitrin self-requested a review March 24, 2024 06:33
@mtsitrin mtsitrin removed their assignment Mar 24, 2024
10000
@zale144 zale144 requested a review from danwt March 25, 2024 21:38
@omritoptix omritoptix changed the title Create erc20 contract on denom metadata registration feat: create erc20 contract on denom metadata registration Mar 25, 2024
@mtsitrin mtsitrin assigned zale144 and unassigned omritoptix Mar 26, 2024
Comment on lines +72 to +77
err := e.AfterDenomMetadataCreation(sdk.Context{}, tt.args.newDenomMetadata)
if tt.expectErr != "" {
require.EqualError(t, err, tt.expectErr)
} else {
require.NoError(t, err)
}
Copy link

Choose a reason for hiding this comment

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

can we replace the errors with Err* types and use require.True(t, errors.Is(err, ErrFoo))

Copy link

Choose a reason for hiding this comment

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

aka no string matching plz 🙏

Copy link
Author

Choose a reason for hiding this comment

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

addressed here: #23

// short-circuit: if the denom is not registered, conversion will fail
// so we can continue with the rest of the stack
return ack
err = errorsmod.Wrapf(types.ErrTokenPairNotFound, "token pair not found for %s", coin.Denom)
Copy link

Choose a reason for hiding this comment

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

Suggested change
err = errorsmod.Wrapf(types.ErrTokenPairNotFound, "token pair not found for %s", coin.Denom)
err = errorsmod.Wrapf(types.ErrTokenPairNotFound, "token pair not found: denom: %s", coin.Denom)

Copy link
Author

Choose a reason for hiding this comment

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

addressed here: #23

@danwt
Copy link
danwt commented Mar 26, 2024

Approved but I left an improvement for the test

@zale144 zale144 merged commit 6345243 into main-dym Mar 26, 2024
@zale144 zale144 deleted the zale144/311-create-erc20-contract-on-denom-metadata-registration branch March 26, 2024 13:30
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.

5 participants
0