Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // getSponsoringCount(): returns the number of points _sponsor is
- // providing service to
- //
- function getSponsoringCount(uint32 _sponsor)
- view
- external
- returns (uint256 count)
- {
- return sponsoring[_sponsor].length;
- }
- // getSponsoring(): returns a list of points _sponsor is providing
- // service to
- //
- // Note: only useful for clients, as Solidity does not currently
- // support returning dynamic arrays.
- //
- function getSponsoring(uint32 _sponsor)
- view
- external
- returns (uint32[] sponsees)
- {
- return sponsoring[_sponsor];
- }
- // sponsoring: per point, the points they are sponsoring
- //
- mapping(uint32 => uint32[]) public sponsoring;
- // sponsoringIndexes: per point, per point, (index + 1) in
- // the sponsoring array
- //
- mapping(uint32 => mapping(uint32 => uint256)) public sponsoringIndexes;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement