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: add access control to pushCertificate #98

Merged
merged 5 commits into from
Aug 17, 2023
Merged

Conversation

JDawg287
Copy link
Member

@JDawg287 JDawg287 commented Aug 2, 2023

Description

This PR adds an access control modifier to the pushCertificate method of the ToposCore.sol smart contract. That is to prevent external access for the time being.
In order to isolate the constant deployment account from the admin (sequencer) of the ToposCore.sol contract, this PR also adds an initialize function to the ToposCore.sol contract.

Fixes TP-656

Additions and Changes

  • Added onlyAdmin modifier for the pushCertificate method
  • Added initialize function in the ToposCore.sol contract
  • Removed the setup function in the ToposCore.sol contract as it is no longer required
  • Removed the initial arguments for the setup in the ToposCoreProxy.sol contract
  • Added unit test to test the functionality

PR Checklist:

  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

@JDawg287 JDawg287 self-assigned this Aug 2, 2023
@hadjiszs
Copy link
Member

hadjiszs commented Aug 3, 2023

ah I think the Sequencer test doesn't pass anymore because it can't call the pushCertificate as it needs to be added as admin then

cc @atanmarko

@sebastiendan
Copy link
Member

ah I think the Sequencer test doesn't pass anymore because it can't call the pushCertificate as it needs to be added as admin then

cc @atanmarko

I was waiting for the test to pass to review. @JDawg287 ping me when everything passes!

@JDawg287
Copy link
Member Author

@sebastiendan The e2e tests are working!
@atanmarko We just need to change a bit again for the sequencer tests.

@JDawg287 JDawg287 merged commit 6988d8f into main Aug 17, 2023
13 of 14 checks passed
@JDawg287 JDawg287 deleted the feature/TP-656 branch August 17, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants