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 a test and RBAC common code #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ryan-Gordon
Copy link
Member

Added a common contract for authentication which Virus inherits from.

Note on the tests: they seem to pass without explicitly adding the admin. The second address from accounts generates an invalid address error.

console.log(`[DEBUG] <Test #1> response: ${response}`);
assert.ok(response);

// const tx_hash2 = await virusContract.addVaccine(competitor,"BCG",validIpfsHash);
Copy link
Member Author

Choose a reason for hiding this comment

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

Uncommenting this will make the test fail with Error: invalid address

@@ -0,0 +1,41 @@
pragma solidity 0.5.4;
Copy link
Member Author

Choose a reason for hiding this comment

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

Tronbox only has support for certain solidity versions. I can bump this to 0.5.8 now and higher in the future.

Copy link

Choose a reason for hiding this comment

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

I think it's fine as is 🤝

@PaddyMc
Copy link

PaddyMc commented Jan 21, 2020

Sorry for the delay in reviewing here ! Awesome work man 💎

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.

2 participants