Verified contractExactMIT
MyFeeContract
Address0xd5c63b2b932548b430ee534f8b1f4a9ca0d8a37c
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.34
- Same code
Only this contract
Details
- Compiler
- solc 0.8.34+commit.80d5c536
- Language
- solidity
- Optimization
- No
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,343,041
- Creation transaction
- 0x272580a32e…a9f7894194
MyFeeContract.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract MyFeeContract {
address payable public owner;
constructor() {
// When deploying, the address that deploys the contract becomes the owner (your MetaMask address)
owner = payable(msg.sender);
}
// Users need to pay when calling this function
function payMe() external payable {
// Set the royalty here: approximately $0.10 equivalent in ETH
uint256 royalty = 0.00003 ether;
require(msg.value >= royalty, "Need to pay royalty");
// Transfer the royalty to you
(bool success, ) = owner.call{value: royalty}("");
require(success, "Transfer failed");
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.