Address Contract Partially Verified
Address
0x3FD2371B53F2Db38765220c90F2FfD4ddbE8AfD1
Balance
0 ETH
Nonce
1
Code Size
2227 bytes
Creator
0x00c2f554...5Ff8 at tx 0x681c810b...5f1021
Indexed Transactions
0 (1 on-chain, 1.1% indexed)
Contract Bytecode
2227 bytes
0x6080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166311ce026781146100a857806312bcc858146100d957806336f7ab5e146101075780634c1b64cb1461019157806370269774146101b25780638da5cb5b146101d3578063b967a52e146101e8578063eadb6fa914610241578063f2fde38b14610261578063fe417fa514610282575b600080fd5b3480156100b457600080fd5b506100bd6102a6565b60408051600160a060020a039092168252519081900360200190f35b3480156100e557600080fd5b5061010560246004803582810192908201359181359182019101356102b5565b005b34801561011357600080fd5b5061011c6103b0565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015657818101518382015260200161013e565b50505050905090810190601f1680156101835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019d57600080fd5b50610105600160a060020a036004351661043d565b3480156101be57600080fd5b50610105600160a060020a03600435166104f6565b3480156101df57600080fd5b506100bd6105c3565b3480156101f457600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101059436949293602493928401919081908401838280828437509497506105d29650505050505050565b34801561024d57600080fd5b506101056004803560248101910135610600565b34801561026d57600080fd5b50610105600160a060020a03600435166106d2565b34801561028e57600080fd5b50610105600160a060020a0360043516602435610766565b600254600160a060020a031681565b600054600160a060020a031633146102cc57600080fd5b600254604080517fee2eba5b0000000000000000000000000000000000000000000000000000000081526004810191825260448101869052600160a060020a039092169163ee2eba5b9187918791879187919081906024810190606401876020880280828437909101848103835285815260209081019150869086028082843782019150509650505050505050602060405180830381600087803b15801561037357600080fd5b505af1158015610387573d6000803e3d6000fd5b505050506040513d602081101561039d57600080fd5b505115156103aa57600080fd5b50505050565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104355780601f1061040a57610100808354040283529160200191610435565b820191906000526020600020905b81548152906001019060200180831161041857829003601f168201915b505050505081565b600054600160a060020a0316331461045457600080fd5b600254604080517f64100038000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301529151919092169163641000389160248083019260209291908290030181600087803b1580156104bc57600080fd5b505af11580156104d0573d6000803e3d6000fd5b505050506040513d60208110156104e657600080fd5b505115156104f357600080fd5b50565b600054600160a060020a0316331461050d57600080fd5b600254604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b15801561057457600080fd5b505af1158015610588573d6000803e3d6000fd5b5050604051600160a060020a03841692507fec3a47b01c1882d34b4d79717433a1075a7d707e8e2b1b0f1f1e73d63fc7f0679150600090a250565b600054600160a060020a031681565b600054600160a060020a031633146105e957600080fd5b80516105fc9060019060208401906107ec565b5050565b600054600160a060020a0316331461061757600080fd5b6002546040517f1481d43900000000000000000000000000000000000000000000000000000000815260206004820181815260248301859052600160a060020a0390931692631481d4399286928692918291604490910190859085028082843782019150509350505050602060405180830381600087803b15801561069b57600080fd5b505af11580156106af573d6000803e3d6000fd5b505050506040513d60208110156106c557600080fd5b505115156105fc57600080fd5b600054600160a060020a031633146106e957600080fd5b600160a060020a03811615156106fe57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a0316331461077d57600080fd5b600254604080517f61f66dc4000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015260248201859052915191909216916361f66dc49160448083019260209291908290030181600087803b15801561069b57600080fd5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061082d57805160ff191683800117855561085a565b8280016001018555821561085a579182015b8281111561085a57825182559160200191906001019061083f565b5061086692915061086a565b5090565b61088491905b808211156108665760008155600101610870565b905600a165627a7a72305820ae8bb992d1afe38db7a90ffcd56713b5ce37ed564b95042e7c66ffbd9430af710029
Verified Source Code Partial Match
Compiler: v0.4.24+commit.e67f0147
EVM: byzantium
Optimization: Yes (200 runs)
MonethaUsersClaimHandler.sol 207 lines
pragma solidity ^0.4.23;
// File: zeppelin-solidity/contracts/ownership/Ownable.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;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
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) onlyOwner public {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
}
// File: zeppelin-solidity/contracts/ownership/Contactable.sol
/**
* @title Contactable token
* @dev Basic version of a contactable contract, allowing the owner to provide a string with their
* contact information.
*/
contract Contactable is Ownable{
string public contactInformation;
/**
* @dev Allows the owner to set a string with their contact information.
* @param info The contact information to attach to the contract.
*/
function setContactInformation(string info) onlyOwner public {
contactInformation = info;
}
}
// File: contracts/MonethaUsersClaimStorage.sol
/**
* @title MonethaUsersClaimStorage
*
* MonethaUsersClaimStorage is a storage contract.
* It will be used by MonethaUsersClaimHandler to update and delete user claim.
*/
contract MonethaUsersClaimStorage is Contactable {
string constant VERSION = "0.1";
// claimedTokens stores tokens claimed by the user.
mapping (address => uint256) public claimedTokens;
event UpdatedClaim(address indexed _userAddress, uint256 _claimedTokens, bool _isDeleted);
event DeletedClaim(address indexed _userAddress, uint256 _unclaimedTokens, bool _isDeleted);
/**
* updateUserClaim updates user claim status and adds token to his wallet
* @param _userAddress address of user's wallet
* @param _tokens corresponds to user's token that is to be claimed.
*/
function updateUserClaim(address _userAddress, uint256 _tokens)
external onlyOwner returns (bool)
{
claimedTokens[_userAddress] = claimedTokens[_userAddress] + _tokens;
emit UpdatedClaim(_userAddress, _tokens, false);
return true;
}
/**
* updateUserClaimInBulk updates multiple users claim status and adds token to their wallet
*/
function updateUserClaimInBulk(address[] _userAddresses, uint256[] _tokens)
external onlyOwner returns (bool)
{
require(_userAddresses.length == _tokens.length);
for (uint16 i = 0; i < _userAddresses.length; i++) {
claimedTokens[_userAddresses[i]] = claimedTokens[_userAddresses[i]] + _tokens[i];
emit UpdatedClaim(_userAddresses[i], _tokens[i], false);
}
return true;
}
/**
* deleteUserClaim deletes user account
* @param _userAddress corresponds to address of user's wallet
*/
function deleteUserClaim(address _userAddress)
external onlyOwner returns (bool)
{
delete claimedTokens[_userAddress];
emit DeletedClaim(_userAddress, 0, true);
return true;
}
/**
* deleteUserClaimInBulk deletes user account in bulk
*/
function deleteUserClaimInBulk(address[] _userAddresses)
external onlyOwner returns (bool)
{
for (uint16 i = 0; i < _userAddresses.length; i++) {
delete claimedTokens[_userAddresses[i]];
emit DeletedClaim(_userAddresses[i], 0, true);
}
return true;
}
}
// File: contracts/MonethaUsersClaimHandler.sol
/**
* @title MonethaUsersClaimHandler
*
* MonethaUsersClaimHandler contract is a calling contract,
* which is used to update the storage contract MonethaUsersClaimStorage.
*/
contract MonethaUsersClaimHandler is Contactable {
string constant VERSION = "0.1";
MonethaUsersClaimStorage public storageContract;
event StorageContractOwnerChanged(address indexed _newOwner);
constructor(address _storageAddr) public {
storageContract = MonethaUsersClaimStorage(_storageAddr);
}
/**
* claimTokens calls updateUserClaim function of MonethaUsersClaimStorage contract to update user's token claim status and assign tokens to user.
* @param _monethaUser address of user's wallet
* @param _tokens corresponds to user's token that is to be claimed.
*/
function claimTokens(address _monethaUser, uint256 _tokens) external onlyOwner {
require(storageContract.updateUserClaim(_monethaUser, _tokens));
}
/**
* claimTokensInBulk calls updateUserClaim function of MonethaUsersClaimStorage contract to update multiple users token claim status and assign tokens to user.
*/
function claimTokensInBulk(address[] _monethaUsers, uint256[] _tokens) external onlyOwner {
require(storageContract.updateUserClaimInBulk(_monethaUsers, _tokens));
}
/**
* deleteAccount deletes user's claimed token
* @param _monethaUser address of users wallet
*/
function deleteAccount(address _monethaUser) external onlyOwner {
require(storageContract.deleteUserClaim(_monethaUser));
}
/**
* deleteAccountsInBulk deletes user account in bulk.
*/
function deleteAccountsInBulk(address[] _monethaUsers) external onlyOwner {
require(storageContract.deleteUserClaimInBulk(_monethaUsers));
}
/**
* changeOwnerOfMonethaUsersClaimStorage changes ownership
* @param _newOwner address of new owner
*/
function changeOwnerOfMonethaUsersClaimStorage(address _newOwner) external onlyOwner {
storageContract.transferOwnership(_newOwner);
emit StorageContractOwnerChanged(_newOwner);
}
}
Read Contract
contactInformation 0x36f7ab5e → string
owner 0x8da5cb5b → address
storageContract 0x11ce0267 → address
Write Contract 7 functions
These functions modify contract state and require a wallet transaction to execute.
changeOwnerOfMonethaUsersClaimStorage 0x70269774
address _newOwner
claimTokens 0xfe417fa5
address _monethaUser
uint256 _tokens
claimTokensInBulk 0x12bcc858
address[] _monethaUsers
uint256[] _tokens
deleteAccount 0x4c1b64cb
address _monethaUser
deleteAccountsInBulk 0xeadb6fa9
address[] _monethaUsers
setContactInformation 0xb967a52e
string info
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
This address has 1 on-chain transactions, but only 1.1% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →