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

Remove duplicate calculateFees method #46

Open
Ryanmtate opened this issue Mar 25, 2019 · 4 comments
Open

Remove duplicate calculateFees method #46

Ryanmtate opened this issue Mar 25, 2019 · 4 comments

Comments

@Ryanmtate
Copy link
Contributor

This appears to be a duplicate, having the same method ID.

https://github.com/tokenio/tokeninc-smart-contracts/blob/7346eb641930004853de791cbe650d9dd07e8285/contracts/TokenIOERC20FeesApply.sol#L185

@RostyslavBortmanAdoria
Copy link

It is not duplicate, if you will check modifiers - you will see there are internal and external functions instead of one public. It helps to minimize gas usage for every call inside contract functions.

@Ryanmtate
Copy link
Contributor Author

Hmm, interesting; Why not call lib.calulateFees() internally in the contract functions; For example:

change the call to the contracts method to directly call the library methods?

https://github.com/tokenio/tokeninc-smart-contracts/blob/7346eb641930004853de791cbe650d9dd07e8285/contracts/TokenIOERC20FeesApply.sol#L198

@RostyslavBortmanAdoria
Copy link

Sure, you are right - my mistake. I will fix that

@Ryanmtate
Copy link
Contributor Author

No worries; not a mistake! I left it out of the method to begin with! So it was my mistake! 😄

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

No branches or pull requests

2 participants