Address Contract Verified
Address
0xcBeC1a9F6F3d34e00D507539315084e05fcFf742
Balance
0 ETH
Nonce
1
Code Size
4293 bytes
Creator
0x50de0035...ea2e at tx 0xe67ed8af...8747b2
Indexed Transactions
0
Contract Bytecode
4293 bytes
0x6080604052600436106100865760003560e01c8063743c078011610059578063743c0780146101125780638da5cb5b1461013b578063e686d3eb14610166578063f2fde38b14610191578063fb235f34146101ba57610086565b80633242ce7c1461008b57806344478425146100b457806347e7ef24146100df578063715018a6146100fb575b600080fd5b34801561009757600080fd5b506100b260048036038101906100ad9190610a2f565b6101e3565b005b3480156100c057600080fd5b506100c961029e565b6040516100d69190610a6b565b60405180910390f35b6100f960048036038101906100f49190610abc565b6102c4565b005b34801561010757600080fd5b5061011061068a565b005b34801561011e57600080fd5b5061013960048036038101906101349190610afc565b61069e565b005b34801561014757600080fd5b506101506106f5565b60405161015d9190610a6b565b60405180910390f35b34801561017257600080fd5b5061017b61071e565b6040516101889190610a6b565b60405180910390f35b34801561019d57600080fd5b506101b860048036038101906101b39190610a2f565b610744565b005b3480156101c657600080fd5b506101e160048036038101906101dc9190610a2f565b6107c7565b005b6101eb610882565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361025a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025190610b86565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610333576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032a90610bf2565b60405180910390fd5b612710816003546103449190610c41565b1115610385576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161037c90610cc1565b60405180910390fd5b6000612710600354346103989190610ce1565b6103a29190610d52565b9050600061271083346103b59190610ce1565b6103bf9190610d52565b90506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360405161040990610db4565b60006040518083038185875af1925050503d8060008114610446576040519150601f19603f3d011682016040523d82523d6000602084013e61044b565b606091505b505090508061048f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048690610e3b565b60405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff16836040516104b590610db4565b60006040518083038185875af1925050503d80600081146104f2576040519150601f19603f3d011682016040523d82523d6000602084013e6104f7565b606091505b505090508061053b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053290610ea7565b60405180910390fd5b83836105479190610c41565b341115610634576000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168585346105969190610ec7565b6105a09190610ec7565b6040516105ac90610db4565b60006040518083038185875af1925050503d80600081146105e9576040519150601f19603f3d011682016040523d82523d6000602084013e6105ee565b606091505b5050905080610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990610f47565b60405180910390fd5b505b8573ffffffffffffffffffffffffffffffffffffffff167f756f9d03c52778a91aaf30612c69cad202a64dff8c4b220683d52a5225193b518460405161067a9190610f76565b60405180910390a2505050505050565b610692610882565b61069c6000610900565b565b6106a6610882565b6127108111156106eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e290610cc1565b60405180910390fd5b8060038190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61074c610882565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036107bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b290611003565b60405180910390fd5b6107c481610900565b50565b6107cf610882565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361083e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083590610b86565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61088a6109c4565b73ffffffffffffffffffffffffffffffffffffffff166108a86106f5565b73ffffffffffffffffffffffffffffffffffffffff16146108fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f59061106f565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006109fc826109d1565b9050919050565b610a0c816109f1565b8114610a1757600080fd5b50565b600081359050610a2981610a03565b92915050565b600060208284031215610a4557610a446109cc565b5b6000610a5384828501610a1a565b91505092915050565b610a65816109f1565b82525050565b6000602082019050610a806000830184610a5c565b92915050565b6000819050919050565b610a9981610a86565b8114610aa457600080fd5b50565b600081359050610ab681610a90565b92915050565b60008060408385031215610ad357610ad26109cc565b5b6000610ae185828601610a1a565b9250506020610af285828601610aa7565b9150509250929050565b600060208284031215610b1257610b116109cc565b5b6000610b2084828501610aa7565b91505092915050565b600082825260208201905092915050565b7f496e76616c696420616464726573730000000000000000000000000000000000600082015250565b6000610b70600f83610b29565b9150610b7b82610b3a565b602082019050919050565b60006020820190508181036000830152610b9f81610b63565b9050919050565b7f496e76616c696420726566206164647265737300000000000000000000000000600082015250565b6000610bdc601383610b29565b9150610be782610ba6565b602082019050919050565b60006020820190508181036000830152610c0b81610bcf565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610c4c82610a86565b9150610c5783610a86565b9250828201905080821115610c6f57610c6e610c12565b5b92915050565b7f496e76616c696420666565207461780000000000000000000000000000000000600082015250565b6000610cab600f83610b29565b9150610cb682610c75565b602082019050919050565b60006020820190508181036000830152610cda81610c9e565b9050919050565b6000610cec82610a86565b9150610cf783610a86565b9250828202610d0581610a86565b91508282048414831517610d1c57610d1b610c12565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610d5d82610a86565b9150610d6883610a86565b925082610d7857610d77610d23565b5b828204905092915050565b600081905092915050565b50565b6000610d9e600083610d83565b9150610da982610d8e565b600082019050919050565b6000610dbf82610d91565b9150819050919050565b7f4661696c656420746f2073656e6420737562736372697074696f6e57616c6c6560008201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b6000610e25602183610b29565b9150610e3082610dc9565b604082019050919050565b60006020820190508181036000830152610e5481610e18565b9050919050565b7f4661696c656420746f2073656e64207265664164647265737300000000000000600082015250565b6000610e91601983610b29565b9150610e9c82610e5b565b602082019050919050565b60006020820190508181036000830152610ec081610e84565b9050919050565b6000610ed282610a86565b9150610edd83610a86565b9250828203905081811115610ef557610ef4610c12565b5b92915050565b7f4661696c656420746f2073656e6420726576656e756557616c6c657400000000600082015250565b6000610f31601c83610b29565b9150610f3c82610efb565b602082019050919050565b60006020820190508181036000830152610f6081610f24565b9050919050565b610f7081610a86565b82525050565b6000602082019050610f8b6000830184610f67565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000610fed602683610b29565b9150610ff882610f91565b604082019050919050565b6000602082019050818103600083015261101c81610fe0565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611059602083610b29565b915061106482611023565b602082019050919050565b600060208201905081810360008301526110888161104c565b905091905056fea2646970667358221220175ef42c3ca7f26aadb3c6e77810977f5515f62ce078a347bbd3446f5daf4ba964736f6c63430008130033
Verified Source Code Full Match
Compiler: v0.8.19+commit.7dd6d404
EVM: paris
Optimization: No
Subscription.sol 53 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
contract Subscription is Ownable {
address public subscriptionWallet =
0x241397fa0B3023a9CF37C13A7083013e0511853A;
address public revenueWallet = 0xff5EDB0A0682D4B3d27495E2B00A324d8f5c16b9;
uint256 feeSub = 7500;
event SubscriptionTransferred(address indexed to, uint256 amount);
constructor() {}
function setSubscriptionWallet(
address _subscriptionWallet
) external onlyOwner {
require(_subscriptionWallet != address(0), "Invalid address");
subscriptionWallet = _subscriptionWallet;
}
function setRevenueWallet(address _revenueWallet) external onlyOwner {
require(_revenueWallet != address(0), "Invalid address");
revenueWallet = _revenueWallet;
}
function setFeeSub(uint256 _feeSub) external onlyOwner {
require(_feeSub <= 10000, "Invalid fee tax");
feeSub = _feeSub;
}
function deposit(address _refAddress, uint _feeTax) external payable {
require(_refAddress != address(0), "Invalid ref address");
require(feeSub + _feeTax <= 10000, "Invalid fee tax");
uint256 subAmount = (msg.value * feeSub) / 10000;
uint256 refAmount = (msg.value * _feeTax) / 10000;
(bool success1, ) = subscriptionWallet.call{value: subAmount}("");
require(success1, "Failed to send subscriptionWallet");
(bool success2, ) = _refAddress.call{value: refAmount}("");
require(success2, "Failed to send refAddress");
if (msg.value > refAmount + subAmount) {
(bool success3, ) = revenueWallet.call{
value: msg.value - refAmount - subAmount
}("");
require(success3, "Failed to send revenueWallet");
}
emit SubscriptionTransferred(_refAddress, refAmount);
}
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.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 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) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @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.
*/
abstract 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() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(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");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
Read Contract
owner 0x8da5cb5b → address
revenueWallet 0x44478425 → address
subscriptionWallet 0xe686d3eb → address
Write Contract 6 functions
These functions modify contract state and require a wallet transaction to execute.
deposit 0x47e7ef24
address _refAddress
uint256 _feeTax
renounceOwnership 0x715018a6
No parameters
setFeeSub 0x743c0780
uint256 _feeSub
setRevenueWallet 0xfb235f34
address _revenueWallet
setSubscriptionWallet 0x3242ce7c
address _subscriptionWallet
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address