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

question: how to set fee for upload of wasm file proportional to wasm file size? #1768

Closed
dzmitry-lahoda opened this issue Dec 31, 2023 · 1 comment

Comments

@dzmitry-lahoda
Copy link

I am trying to add spam protection against contract files uploads.

I spent hour searching here or in Osmosis how to set fee for upload (on top of usual gas TX), but failed.

How can I ensure to set custom fee for upload?

@dzmitry-lahoda dzmitry-lahoda changed the title quetion: how to set fee for upload of wasm file proportional to wasm file size? question: how to set fee for upload of wasm file proportional to wasm file size? Jan 2, 2024
@webmaster128
Copy link
Member

There is not message-specific fee setting. The gas parameters you can change are:

  1. Transaction size limits in CometBFT
  2. Wasm size limits (MaxWasmSize)
  3. The compile cost per by (CompileCosts in GasRegister). This is charged for every upload where the contract is compiled once from Wasm to a module.

The last one is probably the closest to what you are looking for.

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

No branches or pull requests

2 participants