convert 2 spaces to 4 spaces

This commit is contained in:
Francisco Giordano
2019-01-17 18:02:50 -03:00
parent b047d28476
commit bce2d68e7f
118 changed files with 3729 additions and 3729 deletions

View File

@ -6,36 +6,36 @@ pragma solidity ^0.4.24;
* @dev Library for managing addresses assigned to a Role.
*/
library Roles {
struct Role {
mapping (address => bool) bearer;
}
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
role.bearer[account] = true;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
role.bearer[account] = true;
}
/**
* @dev remove an account's access to this role
*/
function remove(Role storage role, address account) internal {
require(account != address(0));
role.bearer[account] = false;
}
/**
* @dev remove an account's access to this role
*/
function remove(Role storage role, address account) internal {
require(account != address(0));
role.bearer[account] = false;
}
/**
* @dev check if an account has this role
* @return bool
*/
function has(Role storage role, address account)
internal
view
returns (bool)
{
require(account != address(0));
return role.bearer[account];
}
/**
* @dev check if an account has this role
* @return bool
*/
function has(Role storage role, address account)
internal
view
returns (bool)
{
require(account != address(0));
return role.bearer[account];
}
}

View File

@ -5,45 +5,45 @@ import "../Roles.sol";
contract CapperRole is Initializable {
using Roles for Roles.Role;
using Roles for Roles.Role;
event CapperAdded(address indexed account);
event CapperRemoved(address indexed account);
event CapperAdded(address indexed account);
event CapperRemoved(address indexed account);
Roles.Role private cappers;
Roles.Role private cappers;
function initialize(address sender) public initializer {
if (!isCapper(sender)) {
_addCapper(sender);
function initialize(address sender) public initializer {
if (!isCapper(sender)) {
_addCapper(sender);
}
}
}
modifier onlyCapper() {
require(isCapper(msg.sender));
_;
}
modifier onlyCapper() {
require(isCapper(msg.sender));
_;
}
function isCapper(address account) public view returns (bool) {
return cappers.has(account);
}
function isCapper(address account) public view returns (bool) {
return cappers.has(account);
}
function addCapper(address account) public onlyCapper {
_addCapper(account);
}
function addCapper(address account) public onlyCapper {
_addCapper(account);
}
function renounceCapper() public {
_removeCapper(msg.sender);
}
function renounceCapper() public {
_removeCapper(msg.sender);
}
function _addCapper(address account) internal {
cappers.add(account);
emit CapperAdded(account);
}
function _addCapper(address account) internal {
cappers.add(account);
emit CapperAdded(account);
}
function _removeCapper(address account) internal {
cappers.remove(account);
emit CapperRemoved(account);
}
function _removeCapper(address account) internal {
cappers.remove(account);
emit CapperRemoved(account);
}
uint256[50] private ______gap;
uint256[50] private ______gap;
}

View File

@ -5,45 +5,45 @@ import "../Roles.sol";
contract MinterRole is Initializable {
using Roles for Roles.Role;
using Roles for Roles.Role;
event MinterAdded(address indexed account);
event MinterRemoved(address indexed account);
event MinterAdded(address indexed account);
event MinterRemoved(address indexed account);
Roles.Role private minters;
Roles.Role private minters;
function initialize(address sender) public initializer {
if (!isMinter(sender)) {
_addMinter(sender);
function initialize(address sender) public initializer {
if (!isMinter(sender)) {
_addMinter(sender);
}
}
}
modifier onlyMinter() {
require(isMinter(msg.sender));
_;
}
modifier onlyMinter() {
require(isMinter(msg.sender));
_;
}
function isMinter(address account) public view returns (bool) {
return minters.has(account);
}
function isMinter(address account) public view returns (bool) {
return minters.has(account);
}
function addMinter(address account) public onlyMinter {
_addMinter(account);
}
function addMinter(address account) public onlyMinter {
_addMinter(account);
}
function renounceMinter() public {
_removeMinter(msg.sender);
}
function renounceMinter() public {
_removeMinter(msg.sender);
}
function _addMinter(address account) internal {
minters.add(account);
emit MinterAdded(account);
}
function _addMinter(address account) internal {
minters.add(account);
emit MinterAdded(account);
}
function _removeMinter(address account) internal {
minters.remove(account);
emit MinterRemoved(account);
}
function _removeMinter(address account) internal {
minters.remove(account);
emit MinterRemoved(account);
}
uint256[50] private ______gap;
uint256[50] private ______gap;
}

View File

@ -5,45 +5,45 @@ import "../Roles.sol";
contract PauserRole is Initializable {
using Roles for Roles.Role;
using Roles for Roles.Role;
event PauserAdded(address indexed account);
event PauserRemoved(address indexed account);
event PauserAdded(address indexed account);
event PauserRemoved(address indexed account);
Roles.Role private pausers;
Roles.Role private pausers;
function initialize(address sender) public initializer {
if (!isPauser(sender)) {
_addPauser(sender);
function initialize(address sender) public initializer {
if (!isPauser(sender)) {
_addPauser(sender);
}
}
}
modifier onlyPauser() {
require(isPauser(msg.sender));
_;
}
modifier onlyPauser() {
require(isPauser(msg.sender));
_;
}
function isPauser(address account) public view returns (bool) {
return pausers.has(account);
}
function isPauser(address account) public view returns (bool) {
return pausers.has(account);
}
function addPauser(address account) public onlyPauser {
_addPauser(account);
}
function addPauser(address account) public onlyPauser {
_addPauser(account);
}
function renouncePauser() public {
_removePauser(msg.sender);
}
function renouncePauser() public {
_removePauser(msg.sender);
}
function _addPauser(address account) internal {
pausers.add(account);
emit PauserAdded(account);
}
function _addPauser(address account) internal {
pausers.add(account);
emit PauserAdded(account);
}
function _removePauser(address account) internal {
pausers.remove(account);
emit PauserRemoved(account);
}
function _removePauser(address account) internal {
pausers.remove(account);
emit PauserRemoved(account);
}
uint256[50] private ______gap;
uint256[50] private ______gap;
}

View File

@ -5,45 +5,45 @@ import "../Roles.sol";
contract SignerRole is Initializable {
using Roles for Roles.Role;
using Roles for Roles.Role;
event SignerAdded(address indexed account);
event SignerRemoved(address indexed account);
event SignerAdded(address indexed account);
event SignerRemoved(address indexed account);
Roles.Role private signers;
Roles.Role private signers;
function initialize(address sender) public initializer {
if (!isSigner(sender)) {
_addSigner(sender);
function initialize(address sender) public initializer {
if (!isSigner(sender)) {
_addSigner(sender);
}
}
}
modifier onlySigner() {
require(isSigner(msg.sender));
_;
}
modifier onlySigner() {
require(isSigner(msg.sender));
_;
}
function isSigner(address account) public view returns (bool) {
return signers.has(account);
}
function isSigner(address account) public view returns (bool) {
return signers.has(account);
}
function addSigner(address account) public onlySigner {
_addSigner(account);
}
function addSigner(address account) public onlySigner {
_addSigner(account);
}
function renounceSigner() public {
_removeSigner(msg.sender);
}
function renounceSigner() public {
_removeSigner(msg.sender);
}
function _addSigner(address account) internal {
signers.add(account);
emit SignerAdded(account);
}
function _addSigner(address account) internal {
signers.add(account);
emit SignerAdded(account);
}
function _removeSigner(address account) internal {
signers.remove(account);
emit SignerRemoved(account);
}
function _removeSigner(address account) internal {
signers.remove(account);
emit SignerRemoved(account);
}
uint256[50] private ______gap;
uint256[50] private ______gap;
}