Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #13 from Securrency-OSS/dev
Browse files Browse the repository at this point in the history
Origin updates
  • Loading branch information
TonioMacaronio authored Sep 8, 2023
2 parents 6c4539d + 037986d commit cb89bf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 1 addition & 5 deletions modules/code-generator/engine/Engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,26 @@ class Engine {
* Render a main template
*/
async render() {
const ComplianceOracle = artifacts.require("./registry-layer/compliance-oracle/ComplianceOracle.sol");

return whiskers.render(template, {
verifyFnBody: await this.rulesSetsGenerator.render(),
internalFunctions: this.rulesSetsGenerator.renderInternalFunctionsList(),
library: library,
solidityVersion: this.solidityVersion,
contractName: "PermissionsVerification",
complianceOracleAddress: ComplianceOracle.address,
interfaces: whiskers.render(interfaces),
structs: whiskers.render(structs),
getExternalCallsTotalFn: getExternalCallsTotalFn.render(),
supportsInterfaceFn: supportsInterfaceFn.render(),
});
}

async renderFrontend( complianceOracleAddress ) {
async renderFrontend() {
return whiskers.render(template, {
verifyFnBody: await this.rulesSetsGenerator.render(true),
internalFunctions: this.rulesSetsGenerator.renderInternalFunctionsList(),
library: library,
solidityVersion: this.solidityVersion,
contractName: "PermissionsVerification",
complianceOracleAddress: complianceOracleAddress,
interfaces: whiskers.render(interfaces),
structs: whiskers.render(structs),
getExternalCallsTotalFn: getExternalCallsTotalFn.render(),
Expand Down
6 changes: 5 additions & 1 deletion modules/code-generator/engine/templates/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ contract {contractName} is IERC165, IPolicy {
// Define libraries
using ComparisonOperations for *;
// Compliance oracle address
address internal _complianceOracle = {complianceOracleAddress};
address internal _complianceOracle;
// session -> condition number -> is verified
mapping(bytes32 => mapping(uint => PolicyResult)) internal _conditionsVerified;
constructor(address complianceOracle) {
_complianceOracle = complianceOracle;
}
{supportsInterfaceFn}
{getExternalCallsTotalFn}
Expand Down

0 comments on commit cb89bf8

Please sign in to comment.