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

refactor: data fee #40

Merged
merged 3 commits into from
Jul 31, 2024
Merged

refactor: data fee #40

merged 3 commits into from
Jul 31, 2024

Conversation

MiniFrenchBread
Copy link
Contributor

@MiniFrenchBread MiniFrenchBread commented Jul 31, 2024

  • Refactor the data fee estimation logic before uploading, now it reads the data price from Market contract dynamically
  • Add --fee for related CLI

This change is Reviewable

var fee *big.Int
if kvWriteArgs.fee > 0 {
feeInA0GI := big.NewFloat(kvWriteArgs.fee)
fee, _ = feeInA0GI.Mul(feeInA0GI, big.NewFloat(1e18)).Int(nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

how about let users to convert this and we only accept neuron?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure, it might require the user to input a number that is a dozen digits long

Copy link
Contributor

@boqiu boqiu left a comment

Choose a reason for hiding this comment

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

Reviewed 20 of 20 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @0g-peterzhb)


cmd/kv_write.go line 107 at r1 (raw file):

Previously, MiniFrenchBread wrote…

not sure, it might require the user to input a number that is a dozen digits long

As a user, I prefer to use A0GI as fee unit.

@MiniFrenchBread MiniFrenchBread merged commit a5b9576 into main Jul 31, 2024
2 of 3 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.

3 participants