-
Notifications
You must be signed in to change notification settings - Fork 17
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(its): remove unnecessary use of payable in functions #298
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #298 +/- ##
==========================================
+ Coverage 97.67% 97.79% +0.12%
==========================================
Files 19 19
Lines 601 545 -56
Branches 126 120 -6
==========================================
- Hits 587 533 -54
+ Misses 5 4 -1
+ Partials 9 8 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You cannot call non payable functions in multical, which is why the payable is needed on all these functions.
…xelarnetwork/interchain-token-service into fix/remove-unnecessary-payable
AXE-4706
InterchainTokenFactory.sol
[x] deployInterchainToken -> MulticallFailed, unit test failed
[x] deployRemoteInterchainToken -> MulticallFailed, unit test failed
[x] registerCanonicalInterchainToken -> MulticallFailed, TakeTokenFailed, unit test failed
[x] deployRemoteCanonicalInterchainToken -> MulticallFailed, unit test failed
TokenHandler.sol
[o] giveToken ->
payable
can be removed.[x] takeToken -> lockUnlockFee failed
[o] transferTokenFrom ->
payable
can be removed.[x] postTokenManagerDeploy -> PostDeployFailed
InterchainTokenService.sol
[x] deployTokenManager -> failed
[x] deployInterchainToken -> Cannot set option "value" on a non-payable function type.
[x] expressExecute
[x] interchainTransfer -> MultiCallFailed, non-payable method cannot override value
[o] callContractWithInterchainToken ->
payable
can be removed.=> Not sure we should remove it. Are we allowing ETH to be sent or not?
=> Unit test should be added.
TransmitInterchainToken.sol
[x] transmitInterchainTransfer -> Cannot set option "value" on a non-payable function type.
InterchainTokenStandard.sol
[x] interchainTransfer -> "msg.value" and "callvalue()" can only be used in payable public functions.
[x] interchainTransferFrom -> "msg.value" and "callvalue()" can only be used in payable public functions.
GatewayCaller.sol
[x] callContract -> GatewayCallFailed
TokenManagerDeployer
[x] deployTokenManager -> TokenManagerDeploymentFailed