Address Contract Partially Verified
Address
0x3885c4e1107b445dd370D09008D90b5153132FFF
Balance
0 ETH
Nonce
1
Code Size
5112 bytes
Creator
0x29BfF390...337a at tx 0x1f0fa1dd...37243d
Indexed Transactions
0 (1 on-chain, 1.3% indexed)
Contract Bytecode
5112 bytes
0x608060405234801561001057600080fd5b50600436106100db5760003560e01c80630a499ad3146100e05780630ded3e601461011a578063187521a21461016b5780632e9c544e1461019957806348fbfcde1461020b5780635e664758146102c95780636e090c18146102f0578063715018a6146103be5780638da5cb5b146103c6578063a4a521da146103ea578063afff324914610410578063b23184f914610448578063d2a5bb9a14610476578063d594399f1461054b578063ddf823c414610571578063ea3457b71461062f578063f2fde38b14610665575b600080fd5b610106600480360360208110156100f657600080fd5b50356001600160a01b031661068b565b604080519115158252519081900360200190f35b6101506004803603604081101561013057600080fd5b5080356001600160a01b031690602001356001600160e01b0319166106a9565b60408051921515835290151560208301528051918290030190f35b6101066004803603604081101561018157600080fd5b506001600160a01b03813581169160200135166106d2565b610209600480360360408110156101af57600080fd5b810190602081018135600160201b8111156101c957600080fd5b8201836020820111156101db57600080fd5b803590602001918460208302840111600160201b831117156101fc57600080fd5b9193509150351515610702565b005b6102096004803603604081101561022157600080fd5b810190602081018135600160201b81111561023b57600080fd5b82018360208201111561024d57600080fd5b803590602001918460208302840111600160201b8311171561026e57600080fd5b919390929091602081019035600160201b81111561028b57600080fd5b82018360208201111561029d57600080fd5b803590602001918460208302840111600160201b831117156102be57600080fd5b509092509050610834565b610106600480360360208110156102df57600080fd5b50356001600160e01b0319166108ff565b6102096004803603606081101561030657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561033057600080fd5b82018360208201111561034257600080fd5b803590602001918460208302840111600160201b8311171561036357600080fd5b919390929091602081019035600160201b81111561038057600080fd5b82018360208201111561039257600080fd5b803590602001918460208302840111600160201b831117156103b357600080fd5b509092509050610914565b610209610adb565b6103ce610b6b565b604080516001600160a01b039092168252519081900360200190f35b6101066004803603602081101561040057600080fd5b50356001600160a01b0316610b7a565b6104366004803603602081101561042657600080fd5b50356001600160a01b0316610b8f565b60408051918252519081900360200190f35b6101066004803603604081101561045e57600080fd5b506001600160a01b0381358116916020013516610baa565b6102096004803603608081101561048c57600080fd5b6001600160a01b03823516916020810135151591810190606081016040820135600160201b8111156104bd57600080fd5b8201836020820111156104cf57600080fd5b803590602001918460208302840111600160201b831117156104f057600080fd5b919390929091602081019035600160201b81111561050d57600080fd5b82018360208201111561051f57600080fd5b803590602001918460208302840111600160201b8311171561054057600080fd5b509092509050610bca565b6104366004803603602081101561056157600080fd5b50356001600160a01b0316610c99565b6102096004803603604081101561058757600080fd5b810190602081018135600160201b8111156105a157600080fd5b8201836020820111156105b357600080fd5b803590602001918460208302840111600160201b831117156105d457600080fd5b919390929091602081019035600160201b8111156105f157600080fd5b82018360208201111561060357600080fd5b803590602001918460208302840111600160201b8311171561062457600080fd5b509092509050610cab565b6101066004803603604081101561064557600080fd5b5080356001600160a01b031690602001356001600160e01b031916610d70565b6102096004803603602081101561067b57600080fd5b50356001600160a01b0316610e05565b6001600160a01b031660009081526005602052604090205460ff1690565b600360209081526000928352604080842090915290825290205460ff8082169161010090041682565b6001600160a01b0380831660009081526004602090815260408083209385168352929052205460ff165b92915050565b61070a610eeb565b6000546001600160a01b0390811691161461075a576040805162461bcd60e51b8152602060048201819052602482015260008051602061135b833981519152604482015290519081900360640190fd5b8161076481610eef565b60005b8181101561082d57826005600087878581811061078057fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055508484828181106107d357fe5b905060200201356001600160a01b03166001600160a01b03167fa0eb08aa77ca875e3b26fa653f960a22e1e9c5e5bf44a88508120a5c91c3480d8460405180821515815260200191505060405180910390a2600101610767565b5050505050565b61083c610eeb565b6000546001600160a01b0390811691161461088c576040805162461bcd60e51b8152602060048201819052602482015260008051602061135b833981519152604482015290519081900360640190fd5b6108f984848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808802828101820190935287825290935087925086918291850190849080828437600092019190915250610f3292505050565b50505050565b60026020526000908152604090205460ff1681565b61091c610eeb565b6000546001600160a01b0390811691161461096c576040805162461bcd60e51b8152602060048201819052602482015260008051602061135b833981519152604482015290519081900360640190fd5b8261097681610eef565b8082146109b8576040805162461bcd60e51b815260206004820152601d602482015260008051602061133b833981519152604482015290519081900360640190fd5b60005b81811015610ad2578383828181106109cf57fe5b90506020020135151560046000896001600160a01b03166001600160a01b031681526020019081526020016000206000888885818110610a0b57fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550858582818110610a5e57fe5b905060200201356001600160a01b03166001600160a01b0316876001600160a01b03167f1499e41de6480285a66f114deb6ffbc96c48ac56c01079821fcee776da9b5d09868685818110610aae57fe5b604080516020928302949094013515158452519283900301919050a36001016109bb565b50505050505050565b610ae3610eeb565b6000546001600160a01b03908116911614610b33576040805162461bcd60e51b8152602060048201819052602482015260008051602061135b833981519152604482015290519081900360640190fd5b600080546040516001600160a01b039091169060008051602061137b833981519152908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60056020526000908152604090205460ff1681565b6001600160a01b031660009081526001602052604090205490565b600460209081526000928352604080842090915290825290205460ff1681565b610bd2610eeb565b6000546001600160a01b03908116911614610c22576040805162461bcd60e51b8152602060048201819052602482015260008051602061135b833981519152604482015290519081900360640190fd5b610c91868686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525061105592505050565b505050505050565b60016020526000908152604090205481565b610cb3610eeb565b6000546001600160a01b03908116911614610d03576040805162461bcd60e51b8152602060048201819052602482015260008051602061135b833981519152604482015290519081900360640190fd5b6108f9848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040805160208088028281018201909352878252909350879250869182918501908490808284376000920191909152506111e492505050565b6001600160a01b03821660009081526003602090815260408083206001600160e01b031985168452909152812054610100900460ff1615610de257506001600160a01b03821660009081526003602090815260408083206001600160e01b03198516845290915290205460ff166106fc565b506001600160e01b0319811660009081526002602052604090205460ff166106fc565b610e0d610eeb565b6000546001600160a01b03908116911614610e5d576040805162461bcd60e51b8152602060048201819052602482015260008051602061135b833981519152604482015290519081900360640190fd5b6001600160a01b038116610ea25760405162461bcd60e51b81526004018080602001828103825260268152602001806113156026913960400191505060405180910390fd5b600080546040516001600160a01b038085169392169160008051602061137b83398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6064811115610f2f5760405162461bcd60e51b815260040180806020018281038252602881526020018061139b6028913960400191505060405180910390fd5b50565b8151610f3d81610eef565b81518114610f80576040805162461bcd60e51b815260206004820152601d602482015260008051602061133b833981519152604482015290519081900360640190fd5b60005b818110156108f9576040518060200160405280848381518110610fa257fe5b602002602001015181525060016000868481518110610fbd57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020905190558351849082908110610ff257fe5b60200260200101516001600160a01b03167f9a6e696e413bf386826186807d8ba42af4025e19298cd4d13de51391bc031c9a84838151811061103057fe5b60200260200101516040518082815260200191505060405180910390a2600101610f83565b815161106081610eef565b815181146110a3576040805162461bcd60e51b815260206004820152601d602482015260008051602061133b833981519152604482015290519081900360640190fd5b60005b81811015610c915760405180604001604052808483815181106110c557fe5b60200260200101511515815260200186151581525060036000886001600160a01b03166001600160a01b03168152602001908152602001600020600086848151811061110d57fe5b6020908102919091018101516001600160e01b03191682528181019290925260400160002082518154939092015115156101000261ff001992151560ff199094169390931791909116919091179055835184908290811061116a57fe5b60200260200101516001600160e01b031916866001600160a01b03167f8722ca8386a9ccdbb24deb758ec8969964a39478af2b005ed97e75b41da89e3c8584815181106111b357fe5b60200260200101518860405180831515815260200182151581526020019250505060405180910390a36001016110a6565b81516111ef81610eef565b81518114611232576040805162461bcd60e51b815260206004820152601d602482015260008051602061133b833981519152604482015290519081900360640190fd5b60005b818110156108f95782818151811061124957fe5b60200260200101516002600086848151811061126157fe5b60200260200101516001600160e01b0319166001600160e01b031916815260200190815260200160002060006101000a81548160ff0219169083151502179055508381815181106112ae57fe5b60200260200101516001600160e01b0319167f451d2d879da5fda5b63ace3ffa396619321e212363998d55449bafd511f89ed08483815181106112ed57fe5b602002602001015160405180821515815260200191505060405180910390a260010161123556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373417272617973206c656e6774687320617265206e6f7420657175616c730000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e04172726179206c656e6774682073686f756c64206265206c657373206f7220657175616c20313030a26469706673582212206145fa49651969cac97f3ceee8a9f7f4114718a4e292d00135bdc982a95e5d5b64736f6c634300060c0033
Verified Source Code Partial Match
Compiler: v0.6.12+commit.27d51765
EVM: istanbul
Optimization: Yes (2 runs)
PoolRestrictions.sol 269 lines
/*
https://powerpool.finance/
wrrrw r wrr
ppwr rrr wppr0 prwwwrp prwwwrp wr0
rr 0rrrwrrprpwp0 pp pr prrrr0 pp 0r prrrr0 0rwrrr pp pr prrrr0 prrrr0 r0
rrp pr wr00rrp prwww0 pp wr pp w00r prwwwpr 0rw prwww0 pp wr pp wr r0
r0rprprwrrrp pr0 pp wr pr pp rwwr wr 0r pp wr pr wr pr r0
prwr wrr0wpwr 00 www0 0w0ww www0 0w 00 www0 www0 0www0
wrr ww0rrrr
*/
// File: @openzeppelin/contracts/GSN/Context.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
pragma solidity ^0.6.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
// File: contracts/interfaces/IPoolRestrictions.sol
pragma solidity 0.6.12;
interface IPoolRestrictions {
function getMaxTotalSupply(address _pool) external view returns (uint256);
function isVotingSignatureAllowed(address _votingAddress, bytes4 _signature) external view returns (bool);
function isVotingSenderAllowed(address _votingAddress, address _sender) external view returns (bool);
function isWithoutFee(address _addr) external view returns (bool);
}
// File: contracts/PoolRestrictions.sol
pragma solidity 0.6.12;
contract PoolRestrictions is IPoolRestrictions, Ownable {
event SetTotalRestrictions(address indexed token, uint256 maxTotalSupply);
event SetSignatureAllowed(bytes4 indexed signature, bool allowed);
event SetSignatureAllowedForAddress(
address indexed voting,
bytes4 indexed signature,
bool allowed,
bool overrideAllowed
);
event SetVotingSenderAllowed(address indexed voting, address indexed sender, bool allowed);
event SetWithoutFee(address indexed addr, bool withoutFee);
struct TotalRestrictions {
uint256 maxTotalSupply;
}
// token => restrictions
mapping(address => TotalRestrictions) public totalRestrictions;
// signature => allowed
mapping(bytes4 => bool) public signaturesAllowed;
struct VotingSignature {
bool allowed;
bool overrideAllowed;
}
// votingAddress => signature => data
mapping(address => mapping(bytes4 => VotingSignature)) public votingSignatures;
// votingAddress => sender => boolean
mapping(address => mapping(address => bool)) public votingSenderAllowed;
mapping(address => bool) public withoutFeeAddresses;
constructor() public Ownable() {}
function setTotalRestrictions(address[] calldata _poolsList, uint256[] calldata _maxTotalSupplyList)
external
onlyOwner
{
_setTotalRestrictions(_poolsList, _maxTotalSupplyList);
}
function setVotingSignatures(bytes4[] calldata _signatures, bool[] calldata _allowed) external onlyOwner {
_setVotingSignatures(_signatures, _allowed);
}
function setVotingSignaturesForAddress(
address _votingAddress,
bool _override,
bytes4[] calldata _signatures,
bool[] calldata _allowed
) external onlyOwner {
_setVotingSignaturesForAddress(_votingAddress, _override, _signatures, _allowed);
}
function setVotingAllowedForSenders(
address _votingAddress,
address[] calldata _senders,
bool[] calldata _allowed
) external onlyOwner {
uint256 len = _senders.length;
_validateArrayLength(len);
require(len == _allowed.length, "Arrays lengths are not equals");
for (uint256 i = 0; i < len; i++) {
votingSenderAllowed[_votingAddress][_senders[i]] = _allowed[i];
emit SetVotingSenderAllowed(_votingAddress, _senders[i], _allowed[i]);
}
}
function setWithoutFee(address[] calldata _addresses, bool _withoutFee) external onlyOwner {
uint256 len = _addresses.length;
_validateArrayLength(len);
for (uint256 i = 0; i < len; i++) {
withoutFeeAddresses[_addresses[i]] = _withoutFee;
emit SetWithoutFee(_addresses[i], _withoutFee);
}
}
function getMaxTotalSupply(address _poolAddress) external view override returns (uint256) {
return totalRestrictions[_poolAddress].maxTotalSupply;
}
function isVotingSignatureAllowed(address _votingAddress, bytes4 _signature) external view override returns (bool) {
if (votingSignatures[_votingAddress][_signature].overrideAllowed) {
return votingSignatures[_votingAddress][_signature].allowed;
} else {
return signaturesAllowed[_signature];
}
}
function isVotingSenderAllowed(address _votingAddress, address _sender) external view override returns (bool) {
return votingSenderAllowed[_votingAddress][_sender];
}
function isWithoutFee(address _address) external view override returns (bool) {
return withoutFeeAddresses[_address];
}
/*** Internal Functions ***/
function _setTotalRestrictions(address[] memory _poolsList, uint256[] memory _maxTotalSupplyList) internal {
uint256 len = _poolsList.length;
_validateArrayLength(len);
require(len == _maxTotalSupplyList.length, "Arrays lengths are not equals");
for (uint256 i = 0; i < len; i++) {
totalRestrictions[_poolsList[i]] = TotalRestrictions(_maxTotalSupplyList[i]);
emit SetTotalRestrictions(_poolsList[i], _maxTotalSupplyList[i]);
}
}
function _setVotingSignatures(bytes4[] memory _signatures, bool[] memory _allowed) internal {
uint256 len = _signatures.length;
_validateArrayLength(len);
require(len == _allowed.length, "Arrays lengths are not equals");
for (uint256 i = 0; i < len; i++) {
signaturesAllowed[_signatures[i]] = _allowed[i];
emit SetSignatureAllowed(_signatures[i], _allowed[i]);
}
}
function _setVotingSignaturesForAddress(
address _votingAddress,
bool _override,
bytes4[] memory _signatures,
bool[] memory _allowed
) internal {
uint256 len = _signatures.length;
_validateArrayLength(len);
require(len == _allowed.length, "Arrays lengths are not equals");
for (uint256 i = 0; i < len; i++) {
votingSignatures[_votingAddress][_signatures[i]] = VotingSignature(_allowed[i], _override);
emit SetSignatureAllowedForAddress(_votingAddress, _signatures[i], _allowed[i], _override);
}
}
function _validateArrayLength(uint256 _len) internal {
require(_len <= 100, "Array length should be less or equal 100");
}
}
Read Contract
getMaxTotalSupply 0xafff3249 → uint256
isVotingSenderAllowed 0x187521a2 → bool
isVotingSignatureAllowed 0xea3457b7 → bool
isWithoutFee 0x0a499ad3 → bool
owner 0x8da5cb5b → address
signaturesAllowed 0x5e664758 → bool
totalRestrictions 0xd594399f → uint256
votingSenderAllowed 0xb23184f9 → bool
votingSignatures 0x0ded3e60 → bool, bool
withoutFeeAddresses 0xa4a521da → bool
Write Contract 7 functions
These functions modify contract state and require a wallet transaction to execute.
renounceOwnership 0x715018a6
No parameters
setTotalRestrictions 0x48fbfcde
address[] _poolsList
uint256[] _maxTotalSupplyList
setVotingAllowedForSenders 0x6e090c18
address _votingAddress
address[] _senders
bool[] _allowed
setVotingSignatures 0xddf823c4
bytes4[] _signatures
bool[] _allowed
setVotingSignaturesForAddress 0xd2a5bb9a
address _votingAddress
bool _override
bytes4[] _signatures
bool[] _allowed
setWithoutFee 0x2e9c544e
address[] _addresses
bool _withoutFee
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
This address has 1 on-chain transactions, but only 1.3% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →