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

fix: preventing original chain name & destination chain name are the same #277

Merged
merged 12 commits into from
Sep 27, 2024

Conversation

ahramy
Copy link
Contributor

@ahramy ahramy commented Sep 10, 2024

AXE-4776

  • In InterchainTokenFactory.deployRemoteInterchainToken, check if destinationChain is the same as originalChainName to prevent remote deployment requests to the original chain.
  • Check originalChainName and destinationChain in InterchainTokenFactory.deployRemoteCanonicalInterchainToken to ensure that a remote deploy cannot be requested to the original chain.
  • Unit test coverage is 100% for InterchainTokenFactory.sol and InterchainTokenService.sol
----------------------------------------|----------|----------|----------|----------|----------------|
File                                    |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
----------------------------------------|----------|----------|----------|----------|----------------|
  InterchainTokenFactory.sol            |      100 |      100 |      100 |      100 |                |
  InterchainTokenService.sol            |      100 |      100 |      100 |      100 |                |

@ahramy ahramy requested a review from a team as a code owner September 10, 2024 04:44
@ahramy ahramy changed the title fix: preventing original chain name & destination chan name are the same fix: preventing original chain name & destination chain name are the same Sep 10, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.68%. Comparing base (b680103) to head (759c5fb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #277      +/-   ##
==========================================
- Coverage   97.70%   97.68%   -0.02%     
==========================================
  Files          19       19              
  Lines         609      604       -5     
  Branches      125      127       +2     
==========================================
- Hits          595      590       -5     
  Misses          5        5              
  Partials        9        9              
Flag Coverage Δ
97.68% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

contracts/InterchainTokenFactory.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Outdated Show resolved Hide resolved
contracts/interfaces/IInterchainTokenService.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Show resolved Hide resolved
contracts/interfaces/IInterchainTokenFactory.sol Outdated Show resolved Hide resolved
InterchainTokenFactory.deployRemoteInterchainToken(string,bytes32,address,string,uint256).chainNameHash_ (contracts/InterchainTokenFactory.sol#204) is a local variable never initialized
InterchainTokenFactory.deployRemoteCanonicalInterchainToken(string,address,string,uint256).chainNameHash_ (contracts/InterchainTokenFactory.sol#336) is a local variable never initialized
contracts/InterchainTokenFactory.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Outdated Show resolved Hide resolved
contracts/InterchainTokenFactory.sol Show resolved Hide resolved
test/InterchainTokenFactory.js Show resolved Hide resolved
@ahramy ahramy merged commit 92cbbf1 into main Sep 27, 2024
5 checks passed
@ahramy ahramy deleted the fix/check_chain_name branch September 27, 2024 22: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