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: added additional checks for call contract with token #249

Merged
merged 36 commits into from
Apr 12, 2024

Conversation

Foivos
Copy link
Contributor

@Foivos Foivos commented Feb 6, 2024

Tests to hit:
for executeWithToken:

  • hit InvalidExpressMessageType(messageType) on wrong message type.
  • hit CallWithTokenMissmatch on wrong amount OR token symbol.

for expressExecuteWithToken:

  • hit CallWithTokenMissmatch on wrong amount OR token symbol.
  • InvalidExpressMessageType(messageType) on wrong message type. Should be checked already but make sure.

@Foivos Foivos requested a review from a team as a code owner February 6, 2024 16:27
contracts/interfaces/IInterchainTokenService.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenService.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenService.sol Show resolved Hide resolved
contracts/InterchainTokenService.sol Show resolved Hide resolved
@Foivos Foivos changed the title feat: added additional checks but code size is too large feat: added additional checks for call contract with token Feb 7, 2024
contracts/utils/Create3Fixed.sol Outdated Show resolved Hide resolved
hardhat.config.js Outdated Show resolved Hide resolved
test/InterchainTokenService.js Outdated Show resolved Hide resolved
contracts/utils/Create3Address.sol Outdated Show resolved Hide resolved
contracts/utils/Create3Address.sol Outdated Show resolved Hide resolved
contracts/utils/Create3Address.sol Outdated Show resolved Hide resolved
contracts/utils/TokenManagerDeployer.sol Outdated Show resolved Hide resolved
test/InterchainTokenService.js Show resolved Hide resolved
test/UtilsTest.js Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Show resolved Hide resolved
contracts/InterchainTokenService.sol Show resolved Hide resolved
contracts/InterchainTokenService.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenService.sol Show resolved Hide resolved
test/InterchainTokenService.js Outdated Show resolved Hide resolved
test/InterchainTokenService.js Outdated Show resolved Hide resolved
test/InterchainTokenService.js Outdated Show resolved Hide resolved
test/InterchainTokenService.js Outdated Show resolved Hide resolved
test/InterchainTokenService.js Show resolved Hide resolved
contracts/InterchainTokenService.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenService.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenService.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenService.sol Show resolved Hide resolved
Copy link
Contributor

@re1ro re1ro left a comment

Choose a reason for hiding this comment

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

LGTM! Only question was if we should put Express methods behind the access control modifier

test/UtilsTest.js Outdated Show resolved Hide resolved
contracts/InterchainTokenService.sol Show resolved Hide resolved
contracts/InterchainTokenService.sol Show resolved Hide resolved
contracts/InterchainTokenService.sol Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 98.58%. Comparing base (e2cb43c) to head (a2b9e47).

Files Patch % Lines
contracts/utils/Create3Fixed.sol 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #249      +/-   ##
==========================================
- Coverage   98.70%   98.58%   -0.12%     
==========================================
  Files          16       18       +2     
  Lines         541      567      +26     
  Branches      107      112       +5     
==========================================
+ Hits          534      559      +25     
  Misses          2        2              
- Partials        5        6       +1     

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

@milapsheth milapsheth enabled auto-merge (squash) April 12, 2024 09:37
@milapsheth milapsheth merged commit 2ed153a into main Apr 12, 2024
5 checks passed
@milapsheth milapsheth deleted the feat/additional-checks-for-execute-with-token branch April 12, 2024 09:38
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