Verified contractPartial
ChaFund
Address0xe2d82b2f2a110d3f96a94b1ac91b4062c7eb4618
- Balance
0 ETH
- Transactions
19
- Compiler
solc 0.5.13
- Same code
Only this contract
Details
- Compiler
- solc 0.5.13+commit.5b0b510c
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 9,291,775
- Creation transaction
- 0x4709121ef0…69fd6f494f
ChaFund.sol
/*! chafund.sol | (c) 2019 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | License: MIT */
pragma solidity 0.5.13;
contract ChaFund {
struct Certificate {
uint32 payment_time;
string payment_msg;
uint32 delivery_time;
string delivery_msg;
}
address payable public owner;
mapping(uint256 => Certificate) public certifications;
event Payment(uint256 indexed id, string message);
event Delivery(uint256 indexed id, string message);
modifier onlyOwner() {
require(msg.sender == owner, "Only owner");
_;
}
constructor() public {
owner = 0x94FCDb67C646D165566EDf7534930D2002D0c868;
}
function() external payable {
revert();
}
function payment(uint256 id, string calldata message) onlyOwner external {
require(certifications[id].payment_time == 0, "Certificate already payment");
certifications[id].payment_time = uint32(block.timestamp);
certifications[id].payment_msg = message;
emit Payment(id, message);
}
function delivery(uint256 id, string calldata message) onlyOwner external {
require(certifications[id].payment_time > 0, "Certificate not payment");
require(certifications[id].delivery_time == 0, "Certificate already delivery");
certifications[id].delivery_time = uint32(block.timestamp);
certifications[id].delivery_msg = message;
emit Delivery(id, message);
}
}Compiler settingsShow
{
"optimizer": {
"runs": 0,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.