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

Allow the Staker to Include Multiple Claimants per Stake #95

Open
1 task
eduardo-munoz opened this issue Jul 30, 2018 · 4 comments
Open
1 task

Allow the Staker to Include Multiple Claimants per Stake #95

eduardo-munoz opened this issue Jul 30, 2018 · 4 comments

Comments

@eduardo-munoz
Copy link

Problem

  • Only one wallet address can be listed as the claimant within a stake
  • Within adChain's "Smart IOs", Advertisers (stakers) will be needing to whitelist multiple Publishers (claimants)
  • With the current code, ADVs would have to create individual stakes per PUB (up to 65 claimants since there are 65 PUBs in the adChain Publisher Registry

Solution

  • Within the whitelistClaimant function, add the ability to whitelist multiple claimants in order to minimize the number of unnecessary transactions
@mbeylin
Copy link
Collaborator

mbeylin commented Jul 30, 2018

Question: would the batch-whitelisted claimants be treated as a coalition (i.e. they all open claims in tandem), or does it suffice to have a function which allows for bulk whitelisting, but each entry is it's own whitelist, capable of opening independent claims?

@eduardo-munoz
Copy link
Author

Correct, we see each wallet address having the ability to open independent claims. Since each wallet address will be a Publisher, they will each be claiming unique amounts.

@skmgoldin
Copy link
Collaborator

I think literally this will suffice, Mark:

    function whitelistClaimants(address[] _claimants, uint[] _deadlines)
    public
    onlyStaker
    {
        require(_claimants.length == _deadlines.length);
        for(uint i = 0; i < _claimants.length; i++) {
            whitelistClaimant(_claimants[i], _deadlines[i]);
        }
    }

@mbeylin
Copy link
Collaborator

mbeylin commented Jul 30, 2018

@skmgoldin will need arrays for all other fields and requirements that all arrays are of equal length, but yes this makes sense.

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

3 participants