Skip to content

Commit

Permalink
test: vontent vault
Browse files Browse the repository at this point in the history
  • Loading branch information
geolffreym committed Aug 8, 2024
1 parent 9b869bd commit 35fe3dd
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 78 deletions.
2 changes: 1 addition & 1 deletion cache_forge/solidity-files-cache.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions contracts/base/upgradeable/ContentVaultUpgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ abstract contract ContentVaultUpgradeable is Initializable, IContentVault {
/// @param contentId The identifier of the content.
/// @param encryptedContent The encrypted content to store.
/// @dev This function allows storing any secured data as bytes, enabling dynamic secure data storage.
/// For example: LIT ciphertext:hash combination, public key encrypted data, shared key encrypted data, etc.
/// For example: LIT chain.ciphertext.dataToEncryptHash combination, public key encrypted data, shared key encrypted data, etc.

Check failure on line 48 in contracts/base/upgradeable/ContentVaultUpgradeable.sol

View workflow job for this annotation

GitHub Actions / solhint linting

Line length must be no more than 120 but current length is 131
function _secureContent(
uint256 contentId,
bytes calldata encryptedContent
bytes memory encryptedContent
) internal {
VaultStorage storage $ = _getVaultStorage();
$._secured[contentId] = encryptedContent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"abi":[{"type":"function","name":"getSecuredContent","inputs":[{"name":"contentId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getSecuredContent(uint256)":"11e09d32"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"contentId\",\"type\":\"uint256\"}],\"name\":\"getSecuredContent\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This contract uses an upgradeable pattern and a namespaced storage layout to avoid storage conflicts.\",\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"getSecuredContent(uint256)\":{\"params\":{\"contentId\":\"The identifier of the content.\"},\"returns\":{\"_0\":\"The encrypted content as bytes.\"}}},\"title\":\"Content Vault Upgradeable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getSecuredContent(uint256)\":{\"notice\":\"Returns the encrypted content for a given content ID.\"}},\"notice\":\"This contract manages encrypted content storage in a secure vault.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/base/upgradeable/ContentVaultUpgradeable.sol\":\"ContentVaultUpgradeable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":eth-gas-reporter/=node_modules/eth-gas-reporter/\",\":forge-std/=lib/forge-std/src/\",\":hardhat/=node_modules/hardhat/\"],\"viaIR\":true},\"sources\":{\"contracts/base/upgradeable/ContentVaultUpgradeable.sol\":{\"keccak256\":\"0xc3c134c42e96db3cb64420e693fbfef4f6d0a7fb72f011a3b1c3bc6e04a19021\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://32f8bbda9fbe6aa64c44bebd958407ad24939ab45501089a10ba63e526db9a79\",\"dweb:/ipfs/QmXHdVNJDmnZhYEqymNadinnui5UGfYC3T8yciiTV8YFdG\"]},\"contracts/interfaces/IContentVault.sol\":{\"keccak256\":\"0xb12ee1c203a4eb5722524e02a507b8eb02933d130ebb6f25712151e23e2b400d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a03888cbe8bc39d664247cc629a37b4c83d71786540c678d3b7dafa0fbb2441f\",\"dweb:/ipfs/QmQGXsLPQcHYCSFBTmE37TmAfNkCBMFBTc27sR2fHoXjAv\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609\",\"dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.24+commit.e11b9ed9"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"InvalidInitialization"},{"inputs":[],"type":"error","name":"NotInitializing"},{"inputs":[{"internalType":"uint64","name":"version","type":"uint64","indexed":false}],"type":"event","name":"Initialized","anonymous":false},{"inputs":[{"internalType":"uint256","name":"contentId","type":"uint256"}],"stateMutability":"view","type":"function","name":"getSecuredContent","outputs":[{"internalType":"bytes","name":"","type":"bytes"}]}],"devdoc":{"kind":"dev","methods":{"getSecuredContent(uint256)":{"params":{"contentId":"The identifier of the content."},"returns":{"_0":"The encrypted content as bytes."}}},"version":1},"userdoc":{"kind":"user","methods":{"getSecuredContent(uint256)":{"notice":"Returns the encrypted content for a given content ID."}},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","eth-gas-reporter/=node_modules/eth-gas-reporter/","forge-std/=lib/forge-std/src/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":20000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"contracts/base/upgradeable/ContentVaultUpgradeable.sol":"ContentVaultUpgradeable"},"evmVersion":"paris","libraries":{},"viaIR":true},"sources":{"contracts/base/upgradeable/ContentVaultUpgradeable.sol":{"keccak256":"0xc3c134c42e96db3cb64420e693fbfef4f6d0a7fb72f011a3b1c3bc6e04a19021","urls":["bzz-raw://32f8bbda9fbe6aa64c44bebd958407ad24939ab45501089a10ba63e526db9a79","dweb:/ipfs/QmXHdVNJDmnZhYEqymNadinnui5UGfYC3T8yciiTV8YFdG"],"license":"MIT"},"contracts/interfaces/IContentVault.sol":{"keccak256":"0xb12ee1c203a4eb5722524e02a507b8eb02933d130ebb6f25712151e23e2b400d","urls":["bzz-raw://a03888cbe8bc39d664247cc629a37b4c83d71786540c678d3b7dafa0fbb2441f","dweb:/ipfs/QmQGXsLPQcHYCSFBTmE37TmAfNkCBMFBTc27sR2fHoXjAv"],"license":"MIT"},"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"keccak256":"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b","urls":["bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609","dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM"],"license":"MIT"}},"version":1},"id":11}
{"abi":[{"type":"function","name":"getSecuredContent","inputs":[{"name":"contentId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getSecuredContent(uint256)":"11e09d32"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"contentId\",\"type\":\"uint256\"}],\"name\":\"getSecuredContent\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This contract uses an upgradeable pattern and a namespaced storage layout to avoid storage conflicts.\",\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"getSecuredContent(uint256)\":{\"params\":{\"contentId\":\"The identifier of the content.\"},\"returns\":{\"_0\":\"The encrypted content as bytes.\"}}},\"title\":\"Content Vault Upgradeable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getSecuredContent(uint256)\":{\"notice\":\"Returns the encrypted content for a given content ID.\"}},\"notice\":\"This contract manages encrypted content storage in a secure vault.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/base/upgradeable/ContentVaultUpgradeable.sol\":\"ContentVaultUpgradeable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":eth-gas-reporter/=node_modules/eth-gas-reporter/\",\":forge-std/=lib/forge-std/src/\",\":hardhat/=node_modules/hardhat/\"],\"viaIR\":true},\"sources\":{\"contracts/base/upgradeable/ContentVaultUpgradeable.sol\":{\"keccak256\":\"0x45e2ab99fc72bff97e2630a42d7aedd80b01ce8f7f106f7ba8876ed697b56e26\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84200e3c581ba10d62e97f04f46f64769ff323d8e582ed9c60b38305407b207c\",\"dweb:/ipfs/QmcT8tWE41KVCp1cynpKYHZhp8VS3EkcSkv1tCkHcFy5os\"]},\"contracts/interfaces/IContentVault.sol\":{\"keccak256\":\"0xb12ee1c203a4eb5722524e02a507b8eb02933d130ebb6f25712151e23e2b400d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a03888cbe8bc39d664247cc629a37b4c83d71786540c678d3b7dafa0fbb2441f\",\"dweb:/ipfs/QmQGXsLPQcHYCSFBTmE37TmAfNkCBMFBTc27sR2fHoXjAv\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609\",\"dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.24+commit.e11b9ed9"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"InvalidInitialization"},{"inputs":[],"type":"error","name":"NotInitializing"},{"inputs":[{"internalType":"uint64","name":"version","type":"uint64","indexed":false}],"type":"event","name":"Initialized","anonymous":false},{"inputs":[{"internalType":"uint256","name":"contentId","type":"uint256"}],"stateMutability":"view","type":"function","name":"getSecuredContent","outputs":[{"internalType":"bytes","name":"","type":"bytes"}]}],"devdoc":{"kind":"dev","methods":{"getSecuredContent(uint256)":{"params":{"contentId":"The identifier of the content."},"returns":{"_0":"The encrypted content as bytes."}}},"version":1},"userdoc":{"kind":"user","methods":{"getSecuredContent(uint256)":{"notice":"Returns the encrypted content for a given content ID."}},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","eth-gas-reporter/=node_modules/eth-gas-reporter/","forge-std/=lib/forge-std/src/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":20000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"contracts/base/upgradeable/ContentVaultUpgradeable.sol":"ContentVaultUpgradeable"},"evmVersion":"paris","libraries":{},"viaIR":true},"sources":{"contracts/base/upgradeable/ContentVaultUpgradeable.sol":{"keccak256":"0x45e2ab99fc72bff97e2630a42d7aedd80b01ce8f7f106f7ba8876ed697b56e26","urls":["bzz-raw://84200e3c581ba10d62e97f04f46f64769ff323d8e582ed9c60b38305407b207c","dweb:/ipfs/QmcT8tWE41KVCp1cynpKYHZhp8VS3EkcSkv1tCkHcFy5os"],"license":"MIT"},"contracts/interfaces/IContentVault.sol":{"keccak256":"0xb12ee1c203a4eb5722524e02a507b8eb02933d130ebb6f25712151e23e2b400d","urls":["bzz-raw://a03888cbe8bc39d664247cc629a37b4c83d71786540c678d3b7dafa0fbb2441f","dweb:/ipfs/QmQGXsLPQcHYCSFBTmE37TmAfNkCBMFBTc27sR2fHoXjAv"],"license":"MIT"},"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"keccak256":"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b","urls":["bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609","dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM"],"license":"MIT"}},"version":1},"id":1}
2 changes: 1 addition & 1 deletion out/RightsManager.sol/RightsManager.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion out/build-info/7d2b9b47a62557593b32cf31a409ad1a.json

This file was deleted.

72 changes: 0 additions & 72 deletions test/internals/CurrentManager.t.sol

This file was deleted.

0 comments on commit 35fe3dd

Please sign in to comment.