fix: deprecated SecurityToken investors function actually expects a uint256 - an index argument #704
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
SecurityToken ABI located at
Web3.Utils.st20ABI
expects thatinvestors
function will be called with an argument of typeuint256
. Our implementation of encodinginvestors
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 aregetInvestors()
andgetInvestorsAt(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:
develop
branch.