Verified contractPartial
BigbomContributorWhiteList
Address0x35b59527647cff6be6dfca8c9519feb77dc575ea
- Balance
0 ETH
- Transactions
4,669
- Compiler
solc 0.4.19
- Same code
Only this contract
Details
- Compiler
- solc 0.4.19+commit.c4cbbb05
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 5,325,749
- Creation transaction
- 0x6416d9fd30…5851f3024b
BigbomContributorWhiteList.sol
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
if (newOwner != address(0)) {
owner = newOwner;
}
}
}
contract BigbomContributorWhiteList is Ownable {
mapping(address=>uint) public addressMinCap;
mapping(address=>uint) public addressMaxCap;
function BigbomContributorWhiteList() public {}
event ListAddress( address _user, uint _mincap, uint _maxcap, uint _time );
// Owner can delist by setting cap = 0.
// Onwer can also change it at any time
function listAddress( address _user, uint _mincap, uint _maxcap ) public onlyOwner {
require(_mincap <= _maxcap);
require(_user != address(0x0));
addressMinCap[_user] = _mincap;
addressMaxCap[_user] = _maxcap;
ListAddress( _user, _mincap, _maxcap, now );
}
// an optimization in case of network congestion
function listAddresses( address[] _users, uint[] _mincap, uint[] _maxcap ) public onlyOwner {
require(_users.length == _mincap.length );
require(_users.length == _maxcap.length );
for( uint i = 0 ; i < _users.length ; i++ ) {
listAddress( _users[i], _mincap[i], _maxcap[i] );
}
}
function getMinCap( address _user ) public constant returns(uint) {
return addressMinCap[_user];
}
function getMaxCap( address _user ) public constant returns(uint) {
return addressMaxCap[_user];
}
}Compiler settingsShow
{
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.