Skip to content

Commit

Permalink
Joystream#1752 review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lezek123 committed Dec 11, 2020
1 parent 4ff8242 commit 95b42f4
Show file tree
Hide file tree
Showing 11 changed files with 182 additions and 803 deletions.
174 changes: 92 additions & 82 deletions smart-contracts/contracts/ContentDirectory.sol

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "./auth.sol";

contract ContentWorkingGroupBridge is RuntimeManageable {
// A map of curatorId => evmAddress(roleKey)
mapping(uint64 => address) private addressByCuratorId;
mapping(uint256 => address) private addressByCuratorId;

// evmAddress(roleKey) of current lead
address public currentLeadAddress;
Expand All @@ -15,7 +15,7 @@ contract ContentWorkingGroupBridge is RuntimeManageable {

constructor(RuntimeAddressProvider _provider) public RuntimeManageable(_provider) {}

function setCuratorAddress(uint64 _curatorId, address _address) public onlyRuntime {
function setCuratorAddress(uint256 _curatorId, address _address) public onlyRuntime {
addressByCuratorId[_curatorId] = _address;
}

Expand All @@ -27,11 +27,11 @@ contract ContentWorkingGroupBridge is RuntimeManageable {
isLeadActive = _status;
}

function isCurator(address _address, uint64 _curatorId) public view returns (bool) {
function isCurator(address _address, uint256 _curatorId) public view returns (bool) {
return (curatorExists(_curatorId) && addressByCuratorId[_curatorId] == _address);
}

function curatorExists(uint64 _curatorId) public view returns (bool) {
function curatorExists(uint256 _curatorId) public view returns (bool) {
return addressByCuratorId[_curatorId] != address(0);
}

Expand Down
8 changes: 4 additions & 4 deletions smart-contracts/contracts/bridge/MembershipBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ pragma solidity ^0.6.0;
import "./auth.sol";

contract MembershipBridge is RuntimeManageable {
mapping(uint64 => address) private controllerAddressByMemberId;
mapping(uint256 => address) private controllerAddressByMemberId;

constructor(RuntimeAddressProvider _provider) public RuntimeManageable(_provider) {}

function setMemberAddress(uint64 _memberId, address _address) public onlyRuntime {
function setMemberAddress(uint256 _memberId, address _address) public onlyRuntime {
controllerAddressByMemberId[_memberId] = _address;
}

function isMemberController(address _address, uint64 _memberId) public view returns (bool) {
function isMemberController(address _address, uint256 _memberId) public view returns (bool) {
return (memberExists(_memberId) && controllerAddressByMemberId[_memberId] == _address);
}

function memberExists(uint64 _memberId) public view returns (bool) {
function memberExists(uint256 _memberId) public view returns (bool) {
return controllerAddressByMemberId[_memberId] != address(0);
}
}
158 changes: 0 additions & 158 deletions smart-contracts/contracts/lib/SafeMath16.sol

This file was deleted.

158 changes: 0 additions & 158 deletions smart-contracts/contracts/lib/SafeMath32.sol

This file was deleted.

0 comments on commit 95b42f4

Please sign in to comment.