-
Notifications
You must be signed in to change notification settings - Fork 1
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
24/Service registry #28
base: develop
Are you sure you want to change the base?
Conversation
Remaining: node-test/getlogs_*.js
BytesLib.sol Removed unnecessary functions VeridaDIDRegistry.sol Update function modifiers from 'public' to 'external'
- Add comments in the body of functions - Add discoverService() function
6830a7a
to
326e631
Compare
bool isRegistered = registeredIds[identity].contains(serviceId); | ||
require(!isRegistered, "Service has already registered!"); | ||
registeredIds[identity].add(serviceId); | ||
AccountInfo storage _account = accountInfos[identity]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First check the account exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
@BlockchainCrazy95 The comments are not quite in good order, can you please format function comments in this way. /**
* @dev Returns x raised to the n-th power.
*
* @param {number} x The number to raise.
* @param {number} n The power, must be a natural number.
* @return {number} x raised to the n-th power.
*/
function pow(x, n) {
...
} Refer to this if you need some more understanding: https://javascript.info/comments |
|
||
const tokenFactory = await ethers.getContractFactory("MockVDA"); | ||
const tokenContract = await tokenFactory.deploy(); | ||
await tokenContract.deployed(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a condition that this doesn't deploy the same(VDA) in mainnet (ETH or MATIC)
Also, add the part that we can feed in the 'actual' VDA token address for mainnet launches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean. Can you kindly explain more about it?
It's a sample token for test. I won't deploy the Verida Token
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testnet and mainnet deployment.
Have one test case failing @ITStar10 |
SlitherRun slither and it showed below issues. There were two high level severity issues and fixed.
|
MythrilNo issues were detected. |
Update public methods to external
Added comment in NatSpec Updated configuration : using .env
Please kindly explain about how the process of updating service will work. In case of decreasing the maxAccounts. |
Remaining: node-test/getlogs_*.js
BytesLib.sol Removed unnecessary functions VeridaDIDRegistry.sol Update function modifiers from 'public' to 'external'
Added comment in NatSpec Updated configuration : using .env
…n-contracts into feature/10-did-registry
- Add comments in the body of functions - Add discoverService() function
struct AccountInfo { | ||
address identity; | ||
uint256 creditAmount; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need AccountInfo.
/** | ||
* did => AccountInfo | ||
*/ | ||
mapping (address => AccountInfo) accountInfos; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to use AccountInfo struct.
uint256 maxAccounts, | ||
uint256 pricePerAccount, | ||
bytes calldata signature | ||
) public onlyVerifiedSignature(identity, signature) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check out status of service.
address identity, | ||
bytes32 serviceId, | ||
bytes calldata signature | ||
) external onlyVerifiedSignature(identity, signature) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check service status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Need updates for credit. Or it can be resolved while implementing treasury.
- Need service status check in functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Consolidate unnecessary functions.
- Remove unnecessary checks on token transfer.
Remaining: CheckServiceAvailability for user User disconnect problem And other stuffs
…chain-contracts into feature/24-service-registry
Closes #24 .
Initial MVP of service registry.