Skip to content

Commit

Permalink
Added ContractsGenesis.json to gitignore
Browse files Browse the repository at this point in the history
Signed-off-by: artem.ivanov <[email protected]>
  • Loading branch information
Artemkaaas committed Nov 24, 2023
1 parent e0fb07c commit d1159f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions indy-besu/smart_contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ artifacts
typechain
typechain-types
compiled-contracts
ContractsGenesis.json

.openzeppelin
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ contract CredentialDefinitionRegistry is CredentialDefinitionRegistryInterface,
try _didRegistry.resolveDid(id) returns (DidDocumentStorage memory didDocumentStorage) {
if (msg.sender != didDocumentStorage.metadata.creator)
revert SenderIsNotIssuerDidOwner(msg.sender, didDocumentStorage.metadata.creator);
_;
if (didDocumentStorage.metadata.deactivated) revert IssuerHasBeenDeactivated(id);
_;
} catch (bytes memory reason) {
Expand Down
3 changes: 2 additions & 1 deletion indy-besu/smart_contracts/contracts/cl/SchemaRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ contract SchemaRegistry is SchemaRegistryInterface, ControlledUpgradeable {
/**
* Checks that the Issuer DID exist, controlled by sender, and active
*/
// FIXME: this function is duplicated at CredentialDefinitionRegistry smart contract
// Find a way how to avoid duplication - for example add common CLRegistryLibrary
modifier _validIssuer(string memory id) {
try _didRegistry.resolveDid(id) returns (DidDocumentStorage memory didDocumentStorage) {
if (msg.sender != didDocumentStorage.metadata.creator)
revert SenderIsNotIssuerDidOwner(msg.sender, didDocumentStorage.metadata.creator);
_;
if (didDocumentStorage.metadata.deactivated) revert IssuerHasBeenDeactivated(id);
_;
} catch (bytes memory reason) {
Expand Down

0 comments on commit d1159f5

Please sign in to comment.