Graphite Testnet

Contract Address Details

Contract
0x0000000000000000000000000000000000001000
Balance
0.27 @G ($0.0)
Tokens
0 Tokens
$0.0 USD
Transactions
Balance changes
27
Gas Used
0
Last Balance Update
Contract Source Code Verified
Contract NameFeeContract
Compiler Versionv0.8.19+commit.7dd6d404
Optimization EnabledYes
Other SettingsDefault evmVersion
Contract Source Code (Solidity)
1
// SPDX-License-Identifier: MIT
2
 
3
pragma solidity ^0.8.6;
4
 
5
abstract contract Context {
6
function _msgSender() internal view virtual returns (address) {
7
return msg.sender;
8
}
9
 
10
function _msgData() internal view virtual returns (bytes calldata) {
11
return msg.data;
12
}
13
}
14
 
15
abstract contract Ownable is Context {
16
address private _owner;
17
 
18
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
19
 
20
constructor() {
21
_setOwner(_msgSender());
22
}
23
 
24
function owner() public view virtual returns (address) {
25
return _owner;
26
}
27
 
28
modifier onlyOwner() {
29
require(owner() == _msgSender(), "Ownable: caller is not the owner");
30
_;
31
}
32
 
33
function renounceOwnership() public virtual onlyOwner {
34
_setOwner(address(0));
35
}
36
 
37
function transferOwnership(address newOwner) public virtual onlyOwner {
38
require(newOwner != address(0), "Ownable: new owner is the zero address");
39
_setOwner(newOwner);
40
}
41
 
42
function _setOwner(address newOwner) private {
43
address oldOwner = _owner;
44
_owner = newOwner;
45
emit OwnershipTransferred(oldOwner, newOwner);
46
}
47
}
48
 
49
contract FeeContract is Ownable {
50
uint public initialFee;
51
 
52
mapping(address => bool) public paidFee;
53
mapping(address => uint) public paidFeeBlock;
54
 
55
event AccountActivated(address indexed account);
56
event ActivationFeeChanged(uint indexed previousFee, uint indexed newFee);
57
 
58
function changeFee(uint newFee) external onlyOwner {
59
uint previousFee = initialFee;
60
initialFee = newFee;
61
emit ActivationFeeChanged(previousFee, newFee);
62
}
63
 
64
function pay() external payable {
65
 
66
address sender = msg.sender;
67
uint value = msg.value;
68
 
69
require(paidFee[sender] != true, "G000");
70
require(value >= initialFee, "G001");
71
 
72
paidFee[sender] = true;
73
paidFeeBlock[sender] = block.number;
74
 
75
if (value > initialFee) {
76
payable(sender).transfer(value - initialFee);
77
}
78
emit AccountActivated(sender);
79
}
80
}
Contract ABI
[{"name": "AccountActivated", "type": "event", "inputs": [{"name": "account", "type": "address", "indexed": true, "internalType": "address"}], "anonymous": false}, {"name": "ActivationFeeChanged", "type": "event", "inputs": [{"name": "previousFee", "type": "uint256", "indexed": true, "internalType": "uint256"}, {"name": "newFee", "type": "uint256", "indexed": true, "internalType": "uint256"}], "anonymous": false}, {"name": "OwnershipTransferred", "type": "event", "inputs": [{"name": "previousOwner", "type": "address", "indexed": true, "internalType": "address"}, {"name": "newOwner", "type": "address", "indexed": true, "internalType": "address"}], "anonymous": false}, {"name": "changeFee", "type": "function", "inputs": [{"name": "newFee", "type": "uint256", "internalType": "uint256"}], "outputs": [], "stateMutability": "nonpayable"}, {"name": "initialFee", "type": "function", "inputs": [], "outputs": [{"name": "", "type": "uint256", "internalType": "uint256"}], "stateMutability": "view"}, {"name": "owner", "type": "function", "inputs": [], "outputs": [{"name": "", "type": "address", "internalType": "address"}], "stateMutability": "view"}, {"name": "paidFee", "type": "function", "inputs": [{"name": "", "type": "address", "internalType": "address"}], "outputs": [{"name": "", "type": "bool", "internalType": "bool"}], "stateMutability": "view"}, {"name": "paidFeeBlock", "type": "function", "inputs": [{"name": "", "type": "address", "internalType": "address"}], "outputs": [{"name": "", "type": "uint256", "internalType": "uint256"}], "stateMutability": "view"}, {"name": "pay", "type": "function", "inputs": [], "outputs": [], "stateMutability": "payable"}, {"name": "renounceOwnership", "type": "function", "inputs": [], "outputs": [], "stateMutability": "nonpayable"}, {"name": "transferOwnership", "type": "function", "inputs": [{"name": "newOwner", "type": "address", "internalType": "address"}], "outputs": [], "stateMutability": "nonpayable"}]
Contract Creation Code
0x60806040526004361061007b5760003560e01c806385cb04651161004e57806385cb0465146101045780638da5cb5b1461013f5780639c00316e14610167578063f2fde38b1461017d57600080fd5b80631b9265b814610080578063591a726f1461008a5780636a1db1bf146100cf578063715018a6146100ef575b600080fd5b61008861019d565b005b34801561009657600080fd5b506100ba6100a536600461046d565b60026020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156100db57600080fd5b506100886100ea36600461049d565b6102e9565b3480156100fb57600080fd5b5061008861034c565b34801561011057600080fd5b5061013161011f36600461046d565b60036020526000908152604090205481565b6040519081526020016100c6565b34801561014b57600080fd5b506000546040516001600160a01b0390911681526020016100c6565b34801561017357600080fd5b5061013160015481565b34801561018957600080fd5b5061008861019836600461046d565b610382565b33600081815260026020526040902054349060ff1615156001036101f55760405162461bcd60e51b81526004016101ec906020808252600490820152630473030360e41b604082015260600190565b60405180910390fd5b6001548110156102305760405162461bcd60e51b81526004016101ec906020808252600490820152634730303160e01b604082015260600190565b6001600160a01b0382166000908152600260209081526040808320805460ff191660019081179091556003909252909120439055548111156102b157816001600160a01b03166108fc6001548361028791906104b6565b6040518115909202916000818181858888f193505050501580156102af573d6000803e3d6000fd5b505b6040516001600160a01b038316907fcfacdcf9289f1b69c533dda67fc14bae036114cd912d8f9fa9676e95d4ec028490600090a25050565b6000546001600160a01b031633146103135760405162461bcd60e51b81526004016101ec906104dd565b6001805490829055604051829082907f423ebc668569f7b038607398feb70f9248fe8722178a1f31cb670fff7835570790600090a35050565b6000546001600160a01b031633146103765760405162461bcd60e51b81526004016101ec906104dd565b610380600061041d565b565b6000546001600160a01b031633146103ac5760405162461bcd60e51b81526004016101ec906104dd565b6001600160a01b0381166104115760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101ec565b61041a8161041d565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561047f57600080fd5b81356001600160a01b038116811461049657600080fd5b9392505050565b6000602082840312156104af57600080fd5b5035919050565b818103818111156104d757634e487b7160e01b600052601160045260246000fd5b92915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea264697066735822122040fd68993625ed1c6bd6b2761068d322127fc345c467ac61118876207ca37ce364736f6c63430008130033
©2022-now by Graphite