-
Notifications
You must be signed in to change notification settings - Fork 42
Adarsh/per decorator #479
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
base: master
Are you sure you want to change the base?
Adarsh/per decorator #479
Conversation
lydiagarms
left a comment
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.
Really nice work.
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 think for the merge into Starlight, this file could be deleted?
| // We need to hard-code the mappingId's of mappings into the circuit: | ||
| field ${m}_mappingId = ${mappingId};`, | ||
| ]; | ||
|
|
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.
maybe just fix the indenting here
| @@ -48,11 +48,15 @@ function saveMetadata ( | |||
| // console.log("hardhatArtifactPath: ", hardhatArtifactPath); | |||
|
|
|||
| const compilationData = fs.readFileSync(hardhatArtifactPath, 'utf-8') | |||
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.
Why are these changes necessary?
| @@ -80,7 +80,13 @@ export async function getContractInstance(contractName, deployedAddress) { | |||
|
|
|||
| export async function getContractBytecode(contractName) { | |||
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.
Why is this change necessary?
| commitmentRoutes(): string { | ||
| return `// commitment getter routes | ||
| router.get("/getAllCommitments", service_allCommitments); | ||
| router.get("/getCommitmentsByVariableName", service_getCommitmentsByState); |
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.
Why do we now need to make these post?
| @@ -0,0 +1,78 @@ | |||
| // SPDX-License-Identifier: CC0 | |||
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.
Maybe as this is the test contract that will be used for per, we could include multiple domain parameters, which would give a syntactical guide and allow for better testing? We'll also need to add this to the tests.
| @@ -0,0 +1,78 @@ | |||
| // SPDX-License-Identifier: CC0 | |||
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.
We should also add this new functionality to the readme.
|
|
||
| // this adds other values we need in the circuit | ||
| for (const param of node._newASTPointer.parameters.parameters) { | ||
| // Get the circuit AST function node to determine the correct parameter order |
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 would rather not use the circuit AST, in order to keep the orchestration and circuit components of Starlight separate, can we remove this and just fall back to the solidity AST immediately as in line 1016
| if ( para?.name === param?.name ) | ||
| oldParam = para ; | ||
| break; | ||
| for(const para of node.parameters.parameters) { |
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.
Are we intending to change the logic here? Is this a bug being fixed?
|
|
||
| updateOwnership(ownerNode: any, msgIsMappingKeyorMappingValue?: string | null) { | ||
| if (this.isOwned && this.owner.mappingOwnershipType === 'key') return; | ||
|
|
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.
What bug is this fixing? It seems related to a bug Sebastian found last PI. If this is already fixed we can probably remove this change?
Summary
Related Issues
Changes
Checklist
How to test
Screenshots / Evidence (if applicable)