Skip to content

Commit

Permalink
chore: removed console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
SwatiEY committed Aug 29, 2024
1 parent 0ae4fc3 commit ad53bd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/codeGenerators/contract/solidity/toContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ function codeGenerator(node: any) {
}

case 'VariableDeclarationStatement': {
console.log(node);
const declarations: string = node.declarations.map(codeGenerator).join(', ');
if (declarations === '') return declarations; // when all are secret, we ignore them
let initialValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ const internalCallVisitor = {
});
});
node.privateStates = Object.assign(node.privateStates,generateProofNode.privateStates);
node.parameters = [...new Set([...node.parameters ,...generateProofNode.parameters, ...state.returnPara])];
node.parameters = [...new Set([...node.parameters ,...generateProofNode.parameters])];
state.returnPara ? node.parameters = [...new Set([...node.parameters, ...state.returnPara])]: node.parameters;
break;
}
case 'SendTransaction': {
Expand Down Expand Up @@ -532,17 +533,8 @@ FunctionCall: {
name: returnPara,
internalFunctionInteractsWithSecret: internalFunctionInteractsWithSecret,
});
console.log(parent)
parent.interactsWithSecret ? state.returnPara = returnPara : ' ';

const functionParams = callingfnDefPath.node._newASTPointer.body.preStatements;
// console.log(functionParams);
// console.log(functionReferncedNode.node.returnParameters.parameters[0]._newASTPointer);
// if(!functionParams.includes(returnPara)){
// callingfnDefPath.node._newASTPointer.parameters.parameters.push(functionReferncedNode.node.returnParameters.parameters[0]._newASTPointer);
// callingfnDefPath.node._newASTPointer.parameters.parameters[functionParams.length].declarationType = 'parameter';
// callingfnDefPath.node._newASTPointer.parameters.parameters[functionParams.length].interactsWithSecret = true;
// }

parent._newASTPointer.interactsWithSecret ? state.returnPara = returnPara : ' ';
} else {
newNode = buildNode('InternalFunctionCall', {
name: node.expression.name,
Expand Down

0 comments on commit ad53bd5

Please sign in to comment.