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(igp): handle zero gas #59

Merged
merged 2 commits into from
Oct 29, 2023
Merged

feat(igp): handle zero gas #59

merged 2 commits into from
Oct 29, 2023

Conversation

byeongsu-hong
Copy link
Collaborator

No description provided.

Comment on lines 73 to 74
Ok(QuoteDispatchResponse {
gas_amount: Some(coin(
quote_res?.gas_needed.to_string().parse::<u128>()?,
GAS_TOKEN.load(deps.storage)?,
)),
gas_amount: if gas_needed.is_zero() {

Choose a reason for hiding this comment

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

nit: I'd assign to a variable on a line above to keep this easy to read, like

let gas_amount = if gas_needed.is_zero() {
        None
    } else {
        Some(coin(
            gas_needed.to_string().parse::<u128>()?,
            GAS_TOKEN.load(deps.storage)?,
        ))
    };
Ok(QuoteDispatchResponse {
   gas_amount
})

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It makes sense

@byeongsu-hong byeongsu-hong merged commit 6ab3891 into develop Oct 29, 2023
@byeongsu-hong byeongsu-hong deleted the eddy/igp-zero-gas branch October 29, 2023 14:59
byeongsu-hong added a commit that referenced this pull request Nov 1, 2023
* some scripts (#50)

* feat: deploy scripts

* refactor

* filter wasm event

* feat: utilties

---------

Co-authored-by: hashableric <hashableric@gmail.com>

* fix: coverage ci (#49)

* try: use llvm cov

* fix

* asdf

* nightly

* test: warp route (#51)

* Revert "revert: aggregate"

This reverts commit 00fe615.

* test(cw20): cw20 init

* test(warp): unit test for cw20

* test(warp): add query test for cw20

* test(warp): remove existing tests for native

* feat(warp): add ownable message

* wip

* test(warp): unit test for native denom

* test: use u32 directly

* fix!(ism): use parsed u32 merkle index

* test: modularize

* test: add empty warp

* test: runnable mailbox

* test: warp placeholder

* test: deployable

* fix(warp): inject minter to cw20

* fix(warp): use consistant event name

* test: warp cw20 / native denom creation

* chore: prune

* feat: aggregation

* schema

* fix: evm equivalence

* fix(hook): pass entire metadata

* fix: aggregate works

* chore: remove debugger

* fix: tests

* clippy

* use aggregate ism on integration test

* feat: migrate to aggregations (#53)

* with proper igp and aggregation

* rc4

* fix: use ethereum-style address scheme (#55)

* set mailbox version to 3

* feat(ism): use ethereum-style address to verify

* feat: add enroll / unenroll test

* refactor: merge into one file

* make test runnable

* test: add case

* fix: with all (#54)

* fix: with all

* broken test

---------

Co-authored-by: byeongsu-hong <hong@byeongsu.dev>

* feat: mailbox as binary

* rc5

* feat: use recovery param from signature

* fix: va test

---------

Co-authored-by: Eric <125242347+hashableric@users.noreply.github.com>
Co-authored-by: hashableric <hashableric@gmail.com>

* feat: use eth_addr

* feat: open testnet deployment

* fix(warp): consideration of igp (#56)

* fix: merkle tree

* fix(warp): gas issue

* fix(warp): use transfer from

* feat(warp): enable migration

* clippy

* feat: scripts

* feat(hook): enable migrate

* build: new code

* chore: addr converter

* fix: inherit ism

* build: migrate

* feat: inheritable ism receiver interface

* fix: hide important files

* rc6

* feat: migratable

* migrate

* fix: remove feature & deploy codes

* feat(warp): make ism configurable

* feat(warp): make hook configurable

* feat(warp): apply hook

* feat: connection client (#58)

* feat: make gas amount none if is zero

* Revert "feat: make gas amount none if is zero"

This reverts commit bac3aa2.

* feat(igp): handle zero gas (#59)

* feat: make gas amount none if is zero

* clean code

* feat: uploading codes to each networks (#60)

* new codes for devnet - dev

* new codes for mainnet - dev

* new codes for devnet / mainnet - prod

* fix: assert addr len (#61)

* fix: assert addr len

* new codes for devnet / mainnet - prod

* fix test

* Deployment scripts (#62)

* Deployment scripts

* chore: use dash case (#63)

* chore: use dash case

* fix: make inject works

---------

Co-authored-by: ByeongSu Hong <hong@byeongsu.dev>

* feat(igp): default gas works (#64)

* feat(igp): default gas works

* fix test

* test(igp): gas config

* feat: new codes

* feat: add migration

* revert: roll back igp-oracle migration

* chore: with migration

* feat: conv rev

* migrate

* feat: add default gas

* feat(igp): add gas query

* feat: store igp

---------

Co-authored-by: hashableric <hashableric@gmail.com>
Co-authored-by: Eric <125242347+hashableric@users.noreply.github.com>
Co-authored-by: Nam Chu Hoai <nambrot@googlemail.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.

None yet

2 participants