Verified contractExactGPL-3.0
DealGuaranteeStorage
Address0xa2d1156f52eefda458a563c6ca3c47cda1214c92
- Balance
0 ETH
- Transactions
42
- Compiler
solc 0.8.26
- Same code
Only this contract
Details
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Language
- solidity
- Optimization
- No
- EVM version
- cancun
- License
- GPL-3.0
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 21,121,088
- Creation transaction
- 0x477fd1144b…bac936a3d8
contracts/DealGuaranteeStorage.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.2;
/// Хранение данных о событиях в жизненном цикле сделки
contract DealGuaranteeStorage {
struct Event {
uint256 timestamp;
/// Hash данных полученный после их загрузки в IPFS
string hash;
}
/// Регистр uuid сделки в bytes16 => события
mapping(bytes16 => Event[]) private registry;
/// Запись в блокчейн
/// @param _dealId uuid сделки преобразованный в bytes16
/// @param _fileHash hash данных полученный после их загрузки в IPFS
function add(uint256 timestamp, bytes16 _dealId, string memory _fileHash) public returns (bool) {
registry[_dealId].push(Event(timestamp, _fileHash));
return true;
}
/// Чтение из блокчейна
/// @param _dealId uuid сделки преобразованный в bytes16
function get(bytes16 _dealId) public view returns (Event[] memory) {
return registry[_dealId];
}
}Compiler settingsShow
{
"metadata": {
"bytecodeHash": "ipfs"
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
},
"evmVersion": "cancun",
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.