Contract Address Details

0x219e6e6520889d1F67Cc1ba39dAE26700cEfd989

SynergyOfSerraWhitelist Last Balance Update: Block #14456235
Created by 0x3502–674dec at 0xe8da–f29a39

Balance

0 MATIC

(@ /MATIC)

Fetching tokens...

Contract name:
SynergyOfSerraWhitelist




Optimization enabled
true
Compiler version
v0.8.2+commit.661d1103




Optimization runs
1337
EVM Version
istanbul

Constructor Arguments

000000000000000000000000801b308f0213445e070f0d0cc052db38c17eda51

Arg [0] (address) : 0x801b308f0213445e070f0d0cc052db38c17eda51

              

Contract source code

/**
* Submitted for verification at blockscout.com on 2021-03-23 20:18:30.357110Z
*/
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
/**
@author The Calystral Team
@title The RegistrableContractState's Interface
*/
interface IRegistrableContractState is IERC165 {
/*==============================
= EVENTS =
==============================*/
/// @dev MUST emit when the contract is set to an active state.
event Activated();
/// @dev MUST emit when the contract is set to an inactive state.
event Inactivated();
/*==============================
= FUNCTIONS =
==============================*/
/**
@notice Sets the contract state to active.
@dev Sets the contract state to active.
*/
function setActive() external;
/**
@notice Sets the contract state to inactive.
@dev Sets the contract state to inactive.
*/
function setInactive() external;
/**
@dev Sets the registry contract object.
Reverts if the registryAddress doesn't implement the IRegistry interface.
@param registryAddress The registry address
*/
function setRegistry(address registryAddress) external;
/**
@notice Returns the current contract state.
@dev Returns the current contract state.
@return The current contract state (true == active; false == inactive)
*/
function getIsActive() external view returns (bool);
/**
@notice Returns the Registry address.
@dev Returns the Registry address.
@return The Registry address
*/
function getRegistryAddress() external view returns (address);
/**
@notice Returns the current address associated with `key` identifier.
@dev Look-up in the Registry.
Returns the current address associated with `key` identifier.
@return The key identifier
*/
function getContractAddress(uint256 key) external view returns (address);
}
/**
@author The Calystral Team
@title The Whitelist's Interface
*/
interface IWhitelist is IRegistrableContractState {
/*==============================
= EVENTS =
==============================*/
/**
@dev Emits on successful subscription.
@param _subscriberAddress The address of the subscriber.
*/
event OnSubscribed(address _subscriberAddress);
/**
@dev Emits on successful unsubscription.
@param _subscriberAddress The address of the unsubscriber.
*/
event OnUnsubscribed(address _subscriberAddress);
/*==============================
= FUNCTIONS =
==============================*/
/**
@notice Calls the subscribe function if no specific function was called.
@dev Fallback function forwards to subscribe function.
*/
fallback() external;
/**
@notice Any user can add him or herself to the subscriber list.
@dev Subscribes the message sender to the list. Other contracts are not allowed to subscribe.
*/
function subscribe() external;
/**
@notice Any user can revoke his or her subscription.
@dev Deletes the index entry in the _subscriberIndexToAddress mapping for the message sender.
*/
function unsubscribe() external;
/**
@notice Migrates whitelisted users from a legacy Whitelist contract.
@dev Migrates whitelisted users from a legacy Whitelist contract.
@param userAccounts Array of user addresses to migrate. Note: Mind the block gas limit !
*/
function migrate(address[] memory userAccounts) external;
/**
@notice Any user is added to this whitelist on sign-up.
@dev Subscribes the user to this whitelist on sign-up.
@param user The user address of the new user
*/
function subscribeOnSignUp(address user) external;
/**
@notice Checks wether a user is in the subscriber list.
@dev tx.origin is used instead of msg.sender so other contracts may forward a user request (e.g. limited rewards contract).
@return The blocknumber at which the user has subscribed or 0 if not subscribed at all.
*/
function isSubscriber() external view returns (uint256);
/**
@notice Checks wheter the given address is in the subscriber list.
@dev This function isn't external since it's used by the contract as well.
@param _subscriberAddress The address to check for.
@return The blocknumber at which the user has subscribed or 0 if not subscribed at all.
*/
function isSubscriber(address _subscriberAddress)
external
view
returns (uint256);
/**
@notice Shows the whole subscriber list.
@dev Returns all current subscribers as an address array.
@return A list of subscriber addresses.
*/
function getSubscriberList() external view returns (address[] memory);
/**
@notice Shows the count of subscribers.
@dev Returns the subscriber count as an integer.
@return The count of subscribers
*/
function getSubscriberCount() external view returns (uint256);
}
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/
abstract contract ERC165 is IERC165 {
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedInterfaces;
constructor() {
// Derived contracts need only register support for their own interfaces,
// we register support for ERC165 itself here
_registerInterface(_INTERFACE_ID_ERC165);
}
/**
* @dev See {IERC165-supportsInterface}.
*
* Time complexity O(1), guaranteed to always use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId)
public
view
override
returns (bool)
{
return _supportedInterfaces[interfaceId];
}
/**
* @dev Registers the contract as an implementer of the interface defined by
* `interfaceId`. Support of the actual ERC165 interface is automatic and
* registering its interface id is not required.
*
* See {IERC165-supportsInterface}.
*
* Requirements:
*
* - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
*/
function _registerInterface(bytes4 interfaceId) internal virtual {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
}
/**
@author The Calystral Team
@title The Registry's Interface
*/
interface IRegistry is IRegistrableContractState {
/*==============================
= EVENTS =
==============================*/
/**
@dev MUST emit when an entry in the Registry is set or updated.
The `key` argument MUST be the key of the entry which is set or updated.
The `value` argument MUST be the address of the entry which is set or updated.
*/
event EntrySet(uint256 indexed key, address value);
/**
@dev MUST emit when an entry in the Registry is removed.
The `key` argument MUST be the key of the entry which is removed.
The `value` argument MUST be the address of the entry which is removed.
*/
event EntryRemoved(uint256 indexed key, address value);
/*==============================
= FUNCTIONS =
==============================*/
/**
@notice Sets the MultiSigAdmin contract as Registry entry 1.
@dev Sets the MultiSigAdmin contract as Registry entry 1.
@param msaAddress The contract address of the MultiSigAdmin
*/
function initializeMultiSigAdmin(address msaAddress) external;
/**
@notice Checks if the registry Map contains the key.
@dev Returns true if the key is in the registry map. O(1).
@param key The key to search for
@return The boolean result
*/
function contains(uint256 key) external view returns (bool);
/**
@notice Returns the registry map length.
@dev Returns the number of key-value pairs in the registry map. O(1).
@return The registry map length
*/
function length() external view returns (uint256);
/**
@notice Returns the key-value pair stored at position `index` in the registry map.
@dev Returns the key-value pair stored at position `index` in the registry map. O(1).
Note that there are no guarantees on the ordering of entries inside the
array, and it may change when more entries are added or removed.
Requirements:
- `index` must be strictly less than {length}.
@param index The position in the registry map
@return The key-value pair as a tuple
*/
function at(uint256 index) external view returns (uint256, address);
/**
@notice Tries to return the value associated with `key`.
@dev Tries to return the value associated with `key`. O(1).
Does not revert if `key` is not in the registry map.
@param key The key to search for
@return The key-value pair as a tuple
*/
function tryGet(uint256 key) external view returns (bool, address);
/**
@notice Returns the value associated with `key`.
@dev Returns the value associated with `key`. O(1).
Requirements:
- `key` must be in the registry map.
@param key The key to search for
@return The contract address
*/
function get(uint256 key) external view returns (address);
/**
@notice Returns all indices, keys, addresses.
@dev Returns all indices, keys, addresses as three seperate arrays.
@return Indices, keys, addresses
*/
function getAll()
external
view
returns (
uint256[] memory,
uint256[] memory,
address[] memory
);
/**
@notice Adds a key-value pair to a map, or updates the value for an existing
key.
@dev Adds a key-value pair to the registry map, or updates the value for an existing
key. O(1).
Returns true if the key was added to the registry map, that is if it was not
already present.
@param key The key as an identifier
@param value The address of the contract
@return Success as a bool
*/
function set(uint256 key, address value) external returns (bool);
/**
@notice Removes a value from the registry map.
@dev Removes a value from the registry map. O(1).
Returns true if the key was removed from the registry map, that is if it was present.
@param key The key as an identifier
@return Success as a bool
*/
function remove(uint256 key) external returns (bool);
/**
@notice Sets a contract state to active.
@dev Sets a contract state to active.
@param key The key as an identifier
*/
function setContractActiveByKey(uint256 key) external;
/**
@notice Sets a contract state to active.
@dev Sets a contract state to active.
@param contractAddress The contract's address
*/
function setContractActiveByAddress(address contractAddress) external;
/**
@notice Sets all contracts within the registry to state active.
@dev Sets all contracts within the registry to state active.
Does NOT revert if any contract doesn't implement the RegistrableContractState interface.
Does NOT revert if it is an externally owned user account.
*/
function setAllContractsActive() external;
/**
@notice Sets a contract state to inactive.
@dev Sets a contract state to inactive.
@param key The key as an identifier
*/
function setContractInactiveByKey(uint256 key) external;
/**
@notice Sets a contract state to inactive.
@dev Sets a contract state to inactive.
@param contractAddress The contract's address
*/
function setContractInactiveByAddress(address contractAddress) external;
/**
@notice Sets all contracts within the registry to state inactive.
@dev Sets all contracts within the registry to state inactive.
Does NOT revert if any contract doesn't implement the RegistrableContractState interface.
Does NOT revert if it is an externally owned user account.
*/
function setAllContractsInactive() external;
}
/**
@author The Calystral Team
@title A helper parent contract: Pausable & Registry
*/
contract RegistrableContractState is IRegistrableContractState, ERC165 {
/*==============================
= CONSTANTS =
==============================*/
/*==============================
= STORAGE =
==============================*/
/// @dev Current contract state
bool private _isActive;
/// @dev Current registry pointer
address private _registryAddress;
/*==============================
= MODIFIERS =
==============================*/
modifier isActive() {
_isActiveCheck();
_;
}
modifier isAuthorizedAdmin() {
_isAuthorizedAdmin();
_;
}
modifier isAuthorizedAdminOrRegistry() {
_isAuthorizedAdminOrRegistry();
_;
}
/*==============================
= CONSTRUCTOR =
==============================*/
/**
@notice Creates and initializes the contract.
@dev Creates and initializes the contract.
Registers all implemented interfaces.
Inheriting contracts are INACTIVE by default.
*/
constructor(address registryAddress) {
_registryAddress = registryAddress;
_registerInterface(type(IRegistrableContractState).interfaceId);
}
/*==============================
= PUBLIC & EXTERNAL =
==============================*/
/*==============================
= RESTRICTED =
==============================*/
function setActive() external override isAuthorizedAdminOrRegistry() {
_isActive = true;
emit Activated();
}
function setInactive() external override isAuthorizedAdminOrRegistry() {
_isActive = false;
emit Inactivated();
}
function setRegistry(address registryAddress)
external
override
isAuthorizedAdmin()
{
_registryAddress = registryAddress;
try
_registryContract().supportsInterface(type(IRegistry).interfaceId)
returns (bool supportsInterface) {
require(
supportsInterface,
"The provided contract does not implement the Registry interface"
);
} catch {
revert(
"The provided contract does not implement the Registry interface"
);
}
}
/*==============================
= VIEW & PURE =
==============================*/
function getIsActive() public view override returns (bool) {
return _isActive;
}
function getRegistryAddress() public view override returns (address) {
return _registryAddress;
}
function getContractAddress(uint256 key)
public
view
override
returns (address)
{
return _registryContract().get(key);
}
/*==============================
= INTERNAL & PRIVATE =
==============================*/
/**
@dev Returns the target Registry object.
@return The target Registry object
*/
function _registryContract() internal view returns (IRegistry) {
return IRegistry(_registryAddress);
}
/**
@dev Checks if the contract is in an active state.
Reverts if the contract is INACTIVE.
*/
function _isActiveCheck() internal view {
require(_isActive == true, "The contract is not active");
}
/**
@dev Checks if the msg.sender is the Admin.
Reverts if msg.sender is not the Admin.
*/
function _isAuthorizedAdmin() internal view {
require(msg.sender == getContractAddress(1), "Unauthorized call");
}
/**
@dev Checks if the msg.sender is the Admin or the Registry.
Reverts if msg.sender is not the Admin or the Registry.
*/
function _isAuthorizedAdminOrRegistry() internal view {
require(
msg.sender == _registryAddress ||
msg.sender == getContractAddress(1),
"Unauthorized call"
);
}
}
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(
address(this).balance >= amount,
"Address: insufficient balance"
);
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{value: amount}("");
require(
success,
"Address: unable to send value, recipient may have reverted"
);
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return
functionCallWithValue(
target,
data,
value,
"Address: low-level call with value failed"
);
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(
address(this).balance >= value,
"Address: insufficient balance for call"
);
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) =
target.call{value: value}(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data)
internal
view
returns (bytes memory)
{
return
functionStaticCall(
target,
data,
"Address: low-level static call failed"
);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.3._
*/
function functionDelegateCall(address target, bytes memory data)
internal
returns (bytes memory)
{
return
functionDelegateCall(
target,
data,
"Address: low-level delegate call failed"
);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.3._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
/// @author The Calystral Team
/// @title Sign-up contract for all tech pioneers
/// @notice A list, which is maintained to grant extras to the community
contract SynergyOfSerraWhitelist is IWhitelist, RegistrableContractState {
using Address for address;
/*==============================
= CONSTANTS =
==============================*/
/*==============================
= STORAGE =
==============================*/
/// @dev Used to point towards the subscriber address. Caution: This will be likely unequal to the actual subscriber count. We start at 1 because 0 will be the indicator that an address is not a subscriber.
uint256 private _subscriberIndex = 1;
/// @dev Maps the subscriber index to an address
mapping(uint256 => address) private _subscriberIndexToAddress;
/// @dev Maps the subscriber address to the subscriber index or 0 if not subscriped.
mapping(address => uint256) private _subscriberAddressToSubscribed;
/// @dev Maps the subscriber address to the blocknumber of subscription or 0 if not subscriped.
mapping(address => uint256) private _subscriberAddressToBlockNumber;
/*==============================
= MODIFIERS =
==============================*/
/// @notice This modifier prevents other smart contracts from subscribing.
modifier isNotAContract() {
address adr = msg.sender;
require(!adr.isContract(), "Contracts are not allowed to interact");
_;
}
/// @notice This modifier allows the ListAdmin to subscribe users on sign-up.
modifier isAuthorizedListAdmin() {
require(msg.sender == getContractAddress(1001), "Unauthorized call");
_;
}
/*==============================
= CONSTRUCTOR =
==============================*/
/**
@notice Creates the smart contract and initializes the whitelist.
Contract is INACTIVE by default.
@param registryAddress Address of the RegistryManager contract
*/
constructor(address registryAddress)
RegistrableContractState(registryAddress)
{
_registerInterface(type(IWhitelist).interfaceId);
}
/*==============================
= PUBLIC & EXTERNAL =
==============================*/
fallback() external override isActive() {
subscribe();
}
function subscribe() public override isNotAContract() isActive() {
_subscribe(msg.sender);
}
function unsubscribe() public override isNotAContract() isActive() {
require(isSubscriber(msg.sender) != 0, "You have not subscribed yet.");
uint256 index = _subscriberAddressToSubscribed[msg.sender];
delete _subscriberIndexToAddress[index];
emit OnUnsubscribed(msg.sender);
}
/*==============================
= RESTRICTED =
==============================*/
function migrate(address[] memory userAccounts)
external
override
isAuthorizedAdmin()
{
for (uint256 index = 0; index < userAccounts.length; ++index) {
_subscribe(userAccounts[index]);
}
}
function subscribeOnSignUp(address user)
public
override
isAuthorizedListAdmin()
{
_subscribe(user);
}
/*==============================
= VIEW & PURE =
==============================*/
function isSubscriber() public view override returns (uint256) {
return isSubscriber(tx.origin);
}
function isSubscriber(address _subscriberAddress)
public
view
override
returns (uint256)
{
if (
_subscriberIndexToAddress[
_subscriberAddressToSubscribed[_subscriberAddress]
] != address(0)
) {
return _subscriberAddressToBlockNumber[_subscriberAddress];
} else {
return 0;
}
}
function getSubscriberList()
public
view
override
returns (address[] memory)
{
uint256 subscriberListCounter = 0;
uint256 subscriberListCount = getSubscriberCount();
address[] memory subscriberList = new address[](subscriberListCount);
for (uint256 i = 1; i < _subscriberIndex; i++) {
address subscriberAddress = _subscriberIndexToAddress[i];
if (isSubscriber(subscriberAddress) != 0) {
subscriberList[subscriberListCounter] = subscriberAddress;
subscriberListCounter++;
}
}
return subscriberList;
}
function getSubscriberCount() public view override returns (uint256) {
uint256 subscriberListCount = 0;
for (uint256 i = 1; i < _subscriberIndex; i++) {
address subscriberAddress = _subscriberIndexToAddress[i];
if (isSubscriber(subscriberAddress) != 0) {
subscriberListCount++;
}
}
return subscriberListCount;
}
/*==============================
= INTERNAL & PRIVATE =
==============================*/
/**
@dev This function is necessary, so it can be used by the constructor. Nobody should be able to add other people to the list.
@param _subscriber The user address, which should be added.
*/
function _subscribe(address _subscriber) private {
require(isSubscriber(_subscriber) == 0, "You already subscribed.");
_subscriberAddressToSubscribed[_subscriber] = _subscriberIndex;
_subscriberAddressToBlockNumber[_subscriber] = block.number;
_subscriberIndexToAddress[_subscriberIndex] = _subscriber;
_subscriberIndex++;
emit OnSubscribed(_subscriber);
}
}

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"registryAddress","internalType":"address"}]},{"type":"event","name":"Activated","inputs":[],"anonymous":false},{"type":"event","name":"Inactivated","inputs":[],"anonymous":false},{"type":"event","name":"OnSubscribed","inputs":[{"type":"address","name":"_subscriberAddress","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"OnUnsubscribed","inputs":[{"type":"address","name":"_subscriberAddress","internalType":"address","indexed":false}],"anonymous":false},{"type":"fallback","stateMutability":"nonpayable"},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getContractAddress","inputs":[{"type":"uint256","name":"key","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"getIsActive","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getRegistryAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getSubscriberCount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getSubscriberList","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"isSubscriber","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"isSubscriber","inputs":[{"type":"address","name":"_subscriberAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"migrate","inputs":[{"type":"address[]","name":"userAccounts","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setActive","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setInactive","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRegistry","inputs":[{"type":"address","name":"registryAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"subscribe","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"subscribeOnSignUp","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unsubscribe","inputs":[]}]
            

Contract Byte Code

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80638f449a0511610097578063f1b9ee2411610066578063f1b9ee24146101e1578063f21de1e8146101e9578063fba7cc7914610200578063fcae44841461020b576100f5565b80638f449a05146100fd578063a91ee0dc14610190578063aefa7d98146101a3578063c4804ef0146101ce576100f5565b80632e558d69116100d35780632e558d691461014d57806351d5d80d14610160578063760a8c2a146101755780638b8291be1461017d576100f5565b806301ffc9a71461010757806317e703ab1461012f5780631fcb4ee414610145575b6100fd610213565b610105610270565b005b61011a610115366004610cd1565b6102e2565b60405190151581526020015b60405180910390f35b61013761031d565b604051908152602001610126565b61013761037a565b61010561015b366004610beb565b61038a565b6101686103e2565b6040516101269190610d29565b6101056104db565b61010561018b366004610bac565b61051a565b61010561019e366004610bac565b61058e565b6101b66101b1366004610d11565b610773565b6040516001600160a01b039091168152602001610126565b6101376101dc366004610bac565b61080f565b610105610865565b6101b660015461010090046001600160a01b031690565b60015460ff1661011a565b6101056108a2565b6001805460ff1615151461026e5760405162461bcd60e51b815260206004820152601a60248201527f54686520636f6e7472616374206973206e6f742061637469766500000000000060448201526064015b60405180910390fd5b565b33803b156102ce5760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163747320617265206e6f7420616c6c6f77656420746f20696e74604482015264195c9858dd60da1b6064820152608401610265565b6102d6610213565b6102df336109cb565b50565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60008060015b600254811015610374576000818152600360205260409020546001600160a01b031661034e8161080f565b15610361578261035d81610d76565b9350505b508061036c81610d76565b915050610323565b50905090565b60006103853261080f565b905090565b610392610ac8565b60005b81518110156103de576103ce8282815181106103c157634e487b7160e01b600052603260045260246000fd5b60200260200101516109cb565b6103d781610d76565b9050610395565b5050565b60606000806103ef61031d565b905060008167ffffffffffffffff81111561041a57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610443578160200160208202803683370190505b50905060015b6002548110156104d3576000818152600360205260409020546001600160a01b03166104748161080f565b156104c0578083868151811061049a57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152846104bc81610d76565b9550505b50806104cb81610d76565b915050610449565b509250505090565b6104e3610b32565b6001805460ff1916811790556040517fed1cd0670ee0c0017f550451a038818c696d0b6a9d6ce5b369e44275573cf9b090600090a1565b6105256103e9610773565b6001600160a01b0316336001600160a01b0316146105855760405162461bcd60e51b815260206004820152601160248201527f556e617574686f72697a65642063616c6c0000000000000000000000000000006044820152606401610265565b6102df816109cb565b610596610ac8565b600180547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038416021790556105e460015461010090046001600160a01b031690565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f60e56d110000000000000000000000000000000000000000000000000000000060048201526001600160a01b0391909116906301ffc9a79060240160206040518083038186803b15801561065e57600080fd5b505afa92505050801561068e575060408051601f3d908101601f1916820190925261068b91810190610cb1565b60015b6107005760405162461bcd60e51b815260206004820152603f60248201527f5468652070726f766964656420636f6e747261637420646f6573206e6f74206960448201527f6d706c656d656e742074686520526567697374727920696e74657266616365006064820152608401610265565b806103de5760405162461bcd60e51b815260206004820152603f60248201527f5468652070726f766964656420636f6e747261637420646f6573206e6f74206960448201527f6d706c656d656e742074686520526567697374727920696e74657266616365006064820152608401610265565b600061078c60015461010090046001600160a01b031690565b6001600160a01b0316639507d39a836040518263ffffffff1660e01b81526004016107b991815260200190565b60206040518083038186803b1580156107d157600080fd5b505afa1580156107e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108099190610bcf565b92915050565b6001600160a01b03818116600090815260046020908152604080832054835260039091528120549091161561085d57506001600160a01b038116600090815260056020526040902054610318565b506000610318565b61086d610b32565b6001805460ff191690556040517f83b03c3d41b5de9902c98822951ff375666c0cd7fd69f8993c0267ad087734d190600090a1565b33803b156109005760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163747320617265206e6f7420616c6c6f77656420746f20696e74604482015264195c9858dd60da1b6064820152608401610265565b610908610213565b6109113361080f565b61095d5760405162461bcd60e51b815260206004820152601c60248201527f596f752068617665206e6f742073756273637269626564207965742e000000006044820152606401610265565b336000818152600460209081526040808320548084526003835292819020805473ffffffffffffffffffffffffffffffffffffffff191690555192835290917f8d2aae3bd92acf221b185992d11dffa4ff32f3b5f8d9a474d3b7a6ccf067a321910160405180910390a15050565b6109d48161080f565b15610a215760405162461bcd60e51b815260206004820152601760248201527f596f7520616c726561647920737562736372696265642e0000000000000000006044820152606401610265565b600280546001600160a01b038316600081815260046020908152604080832094909455600581528382204390558454825260039052918220805473ffffffffffffffffffffffffffffffffffffffff1916909117905581549190610a8483610d76565b90915550506040516001600160a01b03821681527fea9dde00ed9f1133889d723ccfcd41c6d6cc3120be2c167eae94d8b65b463f019060200160405180910390a150565b610ad26001610773565b6001600160a01b0316336001600160a01b03161461026e5760405162461bcd60e51b815260206004820152601160248201527f556e617574686f72697a65642063616c6c0000000000000000000000000000006044820152606401610265565b60015461010090046001600160a01b0316331480610b555750610ad26001610773565b61026e5760405162461bcd60e51b815260206004820152601160248201527f556e617574686f72697a65642063616c6c0000000000000000000000000000006044820152606401610265565b803561031881610db3565b600060208284031215610bbd578081fd5b8135610bc881610db3565b9392505050565b600060208284031215610be0578081fd5b8151610bc881610db3565b60006020808385031215610bfd578182fd5b823567ffffffffffffffff80821115610c14578384fd5b818501915085601f830112610c27578384fd5b813581811115610c3957610c39610d9d565b838102604051601f19603f83011681018181108582111715610c5d57610c5d610d9d565b604052828152858101935084860182860187018a1015610c7b578788fd5b8795505b83861015610ca457610c9081610ba1565b855260019590950194938601938601610c7f565b5098975050505050505050565b600060208284031215610cc2578081fd5b81518015158114610bc8578182fd5b600060208284031215610ce2578081fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610bc8578182fd5b600060208284031215610d22578081fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015610d6a5783516001600160a01b031683529284019291840191600101610d45565b50909695505050505050565b6000600019821415610d9657634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146102df57600080fdfea26469706673582212205088e71017235eb9ab3d39c8dc2c1ea4da6931b47ce6386c23d5850a1dda252264736f6c63430008020033