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: gas service #3

Merged
merged 38 commits into from
Mar 19, 2024
Merged

feat: gas service #3

merged 38 commits into from
Mar 19, 2024

Conversation

canhtrinh
Copy link
Contributor

@canhtrinh canhtrinh commented Feb 26, 2024

Draft PR with remaining questions:

  • can we review overall structure of this impl? largely followed the structure of the gateway contracts but want to ensure it follows the same proxy/impl approach we want
  • for amounts, the solidity gas services uses u256 but transfer methods for tokens take i128.
  • what is the right pattern for auth? for example, want to make sure collect_fees and refund can only be invoked by gas_collector (which, in our Solidity impl, are set in the contract constructor) UPDATE: think i see the pattern, but do still want to discuss it before this is merged
  • how to check for address zero?
  • in my tests, not getting token transfers to work.
  • in my tests, not getting assertion of emitted events to work.

@canhtrinh canhtrinh changed the title Feat/gas service feat: gas service Feb 27, 2024
chore: add back contract_id as output to the setup_emv test

chore: update tests to pass in correct token address into refund

chore: WIP - adding auth for refund methods and tests for emitted events

chore: unwrapping index value
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 96.35628% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 92.30%. Comparing base (65a0891) to head (a8fb7b8).

Files Patch % Lines
contracts/axelar-gas-service/src/contract.rs 95.45% 4 Missing ⚠️
contracts/axelar-gas-service/src/error.rs 0.00% 2 Missing ⚠️
contracts/axelar-gas-service/src/storage_types.rs 50.00% 1 Missing ⚠️
...xelar-soroban-interfaces/src/axelar_gas_service.rs 0.00% 1 Missing ⚠️
packages/axelar-soroban-std/src/types.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
+ Coverage   91.21%   92.30%   +1.08%     
==========================================
  Files          19       26       +7     
  Lines         922     1169     +247     
==========================================
+ Hits          841     1079     +238     
- Misses         81       90       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@canhtrinh canhtrinh marked this pull request as ready for review March 6, 2024 03:41
@canhtrinh canhtrinh requested a review from a team as a code owner March 7, 2024 17:01
contracts/axelar-gas-service/Cargo.toml Outdated Show resolved Hide resolved
contracts/axelar-gas-service/Cargo.toml Show resolved Hide resolved
contracts/axelar-gas-service/Cargo.toml Outdated Show resolved Hide resolved
contracts/axelar-gas-service/Cargo.toml Outdated Show resolved Hide resolved
contracts/axelar-gas-service/Cargo.toml Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/test.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/test.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/test.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/types.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/test.rs Outdated Show resolved Hide resolved
chore: fmt code

chore: run cargo sort
contracts/axelar-gas-service/src/contract.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/event.rs Outdated Show resolved Hide resolved
packages/axelar-soroban-std/src/types.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/contract.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/contract.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/contract.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/event.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/test.rs Outdated Show resolved Hide resolved
contracts/axelar-gas-service/src/test.rs Outdated Show resolved Hide resolved
@canhtrinh canhtrinh merged commit 64fdccf into main Mar 19, 2024
5 checks passed
@canhtrinh canhtrinh deleted the feat/gas-service branch March 19, 2024 05:28
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.

4 participants