Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade doc store #282

Merged
merged 8 commits into from
Sep 13, 2023
Merged

feat: upgrade doc store #282

merged 8 commits into from
Sep 13, 2023

Conversation

osslgtm
Copy link
Contributor

@osslgtm osslgtm commented Aug 11, 2023

Summary

Upgrade Document Store to v2.6.1

Changes

  • package.json
  • use of ownablefactory for transferOwnership

Issues

document-creator-website
tradetrust-website
TradeTrust/document-creator-website#297

@osslgtm osslgtm marked this pull request as ready for review August 22, 2023 05:57
Copy link
Contributor

@superical superical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing the context of this PR. I don't quite understand why changing the doc store version involves changing from DocumentStoreFactory to OwnableFactory.

const documentStore = await DocumentStoreFactory.connect(address, wallet);
const documentStore = await OwnableFactory.connect(address, wallet);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change DocumentStoreFactory to OwnableFactory in this PR? Do you mind sharing the rationale behind making this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the dist/types/contracts/DocumentStore.d.ts definition file doesn't contain definitions for transferOwnership, but it's mentioned in the README.md file, so i'm presuming transferOwnership has been inherited on the smart contract, but is inaccessible in the definition files.

or has the contract switched to inherit DocumentStoreAccessControl .sol for ownership instead ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh… No more using transferOwnership. Use grantRole and revokeRole instead if you wish to change someone’s access roles.

The transferOwnership shouldn’t be in the readme. I will update the readme for document store tomorrow when I have time.🤞

@osslgtm osslgtm requested a review from superical August 23, 2023 15:55
Comment on lines +59 to +65
info(
`Find more details at ${getEtherscanAddress({
network: args.network,
})}/tx/${grantTransactionHash} (grant) and ${getEtherscanAddress({
network: args.network,
})}/tx/${revokeTransactionHash} (revoke)`
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we send the output as soon as the grant transaction is completed instead of waiting for both to finish then show them together? I'm thinking what if grant was successful but revoke failed? Then the display for the first successful transaction won't be known?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the transfer-ownership command have its own tests too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've created transfer-ownership as a new implementation as opposed to using grant and revoke seperately. tests written

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, got it.

@superical
Copy link
Contributor

The readme file may need to be updated with the new usage too. After the readme is updated, it should be good to go.

@osslgtm
Copy link
Contributor Author

osslgtm commented Sep 13, 2023

added in information on grant, revoke and transfer ownership

Copy link
Contributor

@superical superical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!🙏

@osslgtm osslgtm merged commit c087fba into master Sep 13, 2023
6 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants