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

Charge NFT contract deploy gas on MsgLiquify #50

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

ChristianBorst
Copy link
Collaborator

@ChristianBorst ChristianBorst commented Feb 26, 2024

Merge after #49 is merged and this branch is rebased

Promising issue found in development: the old gas limit of 1,000,000 was not sufficient after the Charge liquified account gas on MsgLiquify change, the new limit needed to be 2,500,000 gas, because the test was using 2347396 locally.

@ChristianBorst ChristianBorst changed the title Charge NFT contract deploy gas on MsgLiquify WIP: Charge NFT contract deploy gas on MsgLiquify Feb 26, 2024
The initial MsgLiquify implementation had the NFT deployed in the EVM by
the microtx module, and ignored the gas cost incurred by the EVM
operations. A contract deploy is a pretty hefty op to allow for free so
to prevent spam we need to charge the user.
@ChristianBorst ChristianBorst force-pushed the christianborst/liquify-gas branch from 537cd1d to 41b20f2 Compare February 27, 2024 01:19
@ChristianBorst ChristianBorst changed the title WIP: Charge NFT contract deploy gas on MsgLiquify Charge NFT contract deploy gas on MsgLiquify Feb 27, 2024
MsgLiquify deploys a NFT contract with address derived from the user's
EVM address and their nonce. However the nonce is only incremented on
every Tx, so if a user submits multiple MsgLiquify in the same Tx there
may be deployment issues and undefined behavior.
@jkilpatr
Copy link
Collaborator

Nice simplification here avoiding the transfer!

@jkilpatr jkilpatr merged commit 0745d66 into main Feb 28, 2024
18 checks passed
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