Skip to content

add getTokensByDelegate #547

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

Merged
merged 5 commits into from
Feb 11, 2019
Merged

add getTokensByDelegate #547

merged 5 commits into from
Feb 11, 2019

Conversation

adamdossa
Copy link
Contributor

@adamdossa adamdossa commented Feb 7, 2019

add getTokensByDelegate:

    /**
     * @notice Returns the list of tokens to which the delegate has some access
     * @param _delegate is the address for the delegate
     * @dev Intention is that this is called off-chain so block gas limit is not relevant
     */
    function getTokensByDelegate(address _delegate) external view returns(address[]);

@adamdossa adamdossa changed the title WIP - add getTokensByDelegate add getTokensByDelegate Feb 8, 2019
@coveralls
Copy link

coveralls commented Feb 8, 2019

Coverage Status

Coverage increased (+0.002%) to 96.416% when pulling e2a84ca on tokensByDelegate into fd15cb8 on dev-2.2.0.

return token;
}
}
return token;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we return address(0) here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will return automatically the address(0) I think as you read data from the eternal storage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant for the case when token exists but the owner is someone else.

return token;
}
}
return token;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will return automatically the address(0) I think as you read data from the eternal storage.

@adamdossa adamdossa merged commit 6921cbe into dev-2.2.0 Feb 11, 2019
maxsam4 pushed a commit that referenced this pull request Apr 8, 2019
* Add getTokensByDelegate

* Simple check

* Add more test cases

* Add interface file

* minor fix
maxsam4 pushed a commit that referenced this pull request Apr 8, 2019
* Add getTokensByDelegate

* Simple check

* Add more test cases

* Add interface file

* minor fix
adamdossa pushed a commit that referenced this pull request Apr 11, 2019
* Initial circleci script

* circle ci run fixed

* Added global truffle installation

* Added sudo to global install

* Added coverage, parallelism

* Workflow fixed

* Removed parallelism

* WIP

* CircleCI changes

* CircleCI changes

* CircleCI changes

* Badge

* Store test results

* Removed coverage from commit workflow

* Fix merge conflict

* Addded artifact collection

* Added parallelism

* Comment

* Bumped parallelism to 3

* Coverage requires approval

* Bumped parallelism to 4

* Removed manual approval

* Combine travis and CircleCI

* env var changes

* comment

* Increased no o/p timeout

* update contributing.md (#486)

* Initial auto deploy

* HDWalletProvider

* Use local truffle

* Deploy only on dev and master branches

* Added deploy script

* Enabled deployment on commit

* Deploy only on dev/master branches

* Add files via upload

* Force overrite existing solc

* Fix reading factory address from module registry for dividends modules

* Alternative symbol() ABI for ERC20 tokens

* STO fixes (#583)

* Minor STO changes

* typo fix

* Added STO interface

* Typo fixed

* Refund remaining amount in last cappedsto tx

* Finalize changed granularity edge case fixed (#588)

* Added libz3-dev

* Updated circleci image

* Updated solidity-docgen

* Added git identity

* Generate docs only on merge to master

* USDTieredSTO Granularity edge case fixed (#595)

* sto granularity edge case fixed

* Added test case

* gtm matm optimizations (#601)

* MATM optimizations

* Added code comments

* Updated tests

* Updated names

* Added overflow check

* Fixes

* Allow maturity / expiry dates to be updated

* Add tests & fixes

* Typo

* More tests

* Add more test cases

* Update versions

* Only bump dividends

* Fix decimals in dividends modules

* STOs are listed with its version

* Reclaim ETH and ERC20 tokens from STO and Dividends modules

* Pause/Unpase dividend modules

* Minor fix

* BigNumber library for dividends

* STO selection fix

* Fix for pause/unpause STOs

* Show sto version when selecting

* Updated Kovan addresses

* Version info for all modules

* audit fixes 1..9

* add test cases for the major issue

* test fix

* improve the test run

* add the startTime == 0 check

* resolve the edge case when the investors restriction changes

* Minor change

* VRTM size reduction to 24.21KB

* Reduced VRTM size to be under the limit

* add the code comments

* increase the time to fix the coverage

* optimize the code

* updated readme with 2.1.0 mainnet addresses

* Fix to keep transfer_manager compatible with GTM v1.0.0

* docs update & minor improvements

* Use bokky's timestamp library in scheduled checkpoint (#466)

* added enum TimeUnit

* update depends on timeUnit

* test for monthly checkpoint

* tests for monthly checkpoint

* use UTC instead of local time

* minor fix

* Tests for yearly checkpoint

* Tests for last day of month

* Updated tests for last day of month

* commented failed test

* fix for end of month schedule

* refactored _update function

* added TimeUnits: DAYS, WEEKS

* add getTokensByDelegate (#547)

* Add getTokensByDelegate

* Simple check

* Add more test cases

* Add interface file

* minor fix
@satyamakgec satyamakgec deleted the tokensByDelegate branch October 30, 2019 12:16
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.

5 participants