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: deprecated SecurityToken investors function actually expects a uint256 - an index argument #704

Conversation

JeneaVranceanu
Copy link
Collaborator

@JeneaVranceanu JeneaVranceanu commented Dec 8, 2022

Summary of Changes

SecurityToken ABI located at Web3.Utils.st20ABI expects that investors function will be called with an argument of type uint256. Our implementation of encoding investors function call crashed as we gave it no arguments.

More info: function investors(uint256 _index) external view returns (address) (link to the function in old version of the contract) was deprecated and is no longer a part of ISecurityToken.sol. Instead there are getInvestors() and getInvestorsAt(uint256 _checkpointId) (link).

Strong advice: if we will add implementations to other smart contracts cover them with links to the source as much as possible.

Test Data or Screenshots

By submitting this pull request, you are confirming the following:
  • I have reviewed the Contribution Guidelines.
  • I have performed a self-review of my own code.
  • I have updated my repository to match the develop branch.
  • I have included test data or screenshots that prove my fix is effective or that my feature works.
  • I have checked that all tests work and swiftlint is not throwing any errors/warnings.

@JeneaVranceanu JeneaVranceanu added the bug Something isn't working label Dec 8, 2022
@JeneaVranceanu JeneaVranceanu self-assigned this Dec 8, 2022
This was referenced Dec 8, 2022
@yaroslavyaroslav
Copy link
Collaborator

I'd like to add your proposal about providing link to the specification as the one of the demands that would be necessary to pass the review process. @JeneaVranceanu

@yaroslavyaroslav yaroslavyaroslav merged commit e6c129e into web3swift-team:develop Dec 12, 2022
@JeneaVranceanu JeneaVranceanu deleted the fix/security-token-investors-call branch December 12, 2022 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants