Description:
Smart contract deployed on Ethereum with Factory features.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"contracts/EdenProofRegistry.sol": {
"content": "// contracts/EdenProofRegistry.sol\r
// SPDX-License-Identifier: MIT\r
pragma solidity ^0.8.20;\r
\r
/// @title EdenProofRegistry - Public Proof-of-Asset Registry for EDEN\r
/// @notice docHash = SHA-256 canonical JSON (bytes32)\r
contract EdenProofRegistry {\r
event ProofPublished(\r
bytes32 indexed docHash,\r
uint256 amount,\r
string currency,\r
string uri,\r
uint256 timestamp\r
);\r
\r
struct Proof {\r
uint256 amount;\r
string currency;\r
string uri;\r
uint256 timestamp;\r
address publisher;\r
}\r
\r
mapping(bytes32 => Proof) public proofs;\r
\r
function publishProof(\r
bytes32 docHash,\r
uint256 amount,\r
string calldata currency,\r
string calldata uri\r
) external {\r
require(proofs[docHash].timestamp == 0, "PoA: already published");\r
proofs[docHash] = Proof({\r
amount: amount,\r
currency: currency,\r
uri: uri,\r
timestamp: block.timestamp,\r
publisher: msg.sender\r
});\r
emit ProofPublished(docHash, amount, currency, uri, block.timestamp);\r
}\r
\r
function isPublished(bytes32 docHash) external view returns (bool) {\r
return proofs[docHash].timestamp != 0;\r
}\r
}\r
"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "shanghai",
"viaIR": false,
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}
}}
Submitted on: 2025-09-22 16:29:25
Comments
Log in to comment.
No comments yet.