From 9e75a5a8a6b60bb872993c09a55203c48a85483e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=8B=E5=85=9A=20Lidang?= Date: Sat, 3 Jun 2023 04:42:57 -0500 Subject: [PATCH] update --- darc-protocol/contracts/{ => protocol}/DARC.sol | 0 .../contracts/{ => protocol}/Dashboard/Dashboard.sol | 0 darc-protocol/contracts/{ => protocol}/MachineState.sol | 0 .../contracts/{ => protocol}/MachineStateManager.sol | 0 darc-protocol/contracts/{ => protocol}/Opcodes.sol | 0 .../{ => protocol}/Plugin/ConditionExpressionFactory.sol | 0 .../Plugin/Conditions/MachineStateExpressionFunction.sol | 0 .../Plugin/Conditions/MintTokensExpressionFunction.sol_ | 0 .../Plugin/Conditions/OperatorExpressionFunction.sol | 0 .../Plugin/Conditions/TransferTokensExpressionFunction.sol_ | 0 .../{ => protocol}/Plugin/EnumConditionExpression.sol | 0 darc-protocol/contracts/{ => protocol}/Plugin/Plugin.sol | 0 .../contracts/{ => protocol}/Plugin/PluginFactory.sol | 0 .../contracts/{ => protocol}/Plugin/PluginSystem.sol | 0 darc-protocol/contracts/{ => protocol}/Program.sol | 0 .../{ => protocol}/Runtime/Executable/Executable.sol | 0 .../Runtime/Executable/InstructionMachine.sol | 0 .../Executable/Instructions/MembershipInstructions.sol | 0 .../Runtime/Executable/Instructions/MoneyInstructions.sol | 0 .../Executable/Instructions/OfferDividendsInstructions.sol | 0 .../Executable/Instructions/ParameterInstructions.sol | 0 .../Runtime/Executable/Instructions/PluginInstructions.sol | 0 .../Runtime/Executable/Instructions/TokenInstructions.sol | 0 .../Runtime/Executable/Instructions/UtilityInstructions.sol | 0 .../{ => protocol}/Runtime/PaymentCheck/PaymentCheck.sol | 0 .../Runtime/ProgramValidator/ProgramValidator.sol | 0 darc-protocol/contracts/{ => protocol}/Runtime/Runtime.sol | 0 .../{ => protocol}/Runtime/VotingMachine/VotingMachine.sol | 0 .../contracts/{ => protocol}/TokenOwnerListManager.sol | 0 .../contracts/{ => protocol}/Utilities/ErrorMsg.sol | 0 .../contracts/{ => protocol}/Utilities/FindInArray.sol | 0 .../contracts/{ => protocol}/Utilities/OpcodeMap.sol | 0 .../contracts/{ => protocol}/Utilities/StringUtils.sol | 0 darc-protocol/contracts/{ => protocol}/VirtualMachine.sol | 0 .../contracts/test-contracts/test-voting/VotingTest.sol | 6 ++++-- darc-protocol/test/ABITest/ABITest.ts | 2 +- 36 files changed, 5 insertions(+), 3 deletions(-) rename darc-protocol/contracts/{ => protocol}/DARC.sol (100%) rename darc-protocol/contracts/{ => protocol}/Dashboard/Dashboard.sol (100%) rename darc-protocol/contracts/{ => protocol}/MachineState.sol (100%) rename darc-protocol/contracts/{ => protocol}/MachineStateManager.sol (100%) rename darc-protocol/contracts/{ => protocol}/Opcodes.sol (100%) rename darc-protocol/contracts/{ => protocol}/Plugin/ConditionExpressionFactory.sol (100%) rename darc-protocol/contracts/{ => protocol}/Plugin/Conditions/MachineStateExpressionFunction.sol (100%) rename darc-protocol/contracts/{ => protocol}/Plugin/Conditions/MintTokensExpressionFunction.sol_ (100%) rename darc-protocol/contracts/{ => protocol}/Plugin/Conditions/OperatorExpressionFunction.sol (100%) rename darc-protocol/contracts/{ => protocol}/Plugin/Conditions/TransferTokensExpressionFunction.sol_ (100%) rename darc-protocol/contracts/{ => protocol}/Plugin/EnumConditionExpression.sol (100%) rename darc-protocol/contracts/{ => protocol}/Plugin/Plugin.sol (100%) rename darc-protocol/contracts/{ => protocol}/Plugin/PluginFactory.sol (100%) rename darc-protocol/contracts/{ => protocol}/Plugin/PluginSystem.sol (100%) rename darc-protocol/contracts/{ => protocol}/Program.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/Executable/Executable.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/Executable/InstructionMachine.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/Executable/Instructions/MembershipInstructions.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/Executable/Instructions/MoneyInstructions.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/Executable/Instructions/OfferDividendsInstructions.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/Executable/Instructions/ParameterInstructions.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/Executable/Instructions/PluginInstructions.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/Executable/Instructions/TokenInstructions.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/Executable/Instructions/UtilityInstructions.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/PaymentCheck/PaymentCheck.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/ProgramValidator/ProgramValidator.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/Runtime.sol (100%) rename darc-protocol/contracts/{ => protocol}/Runtime/VotingMachine/VotingMachine.sol (100%) rename darc-protocol/contracts/{ => protocol}/TokenOwnerListManager.sol (100%) rename darc-protocol/contracts/{ => protocol}/Utilities/ErrorMsg.sol (100%) rename darc-protocol/contracts/{ => protocol}/Utilities/FindInArray.sol (100%) rename darc-protocol/contracts/{ => protocol}/Utilities/OpcodeMap.sol (100%) rename darc-protocol/contracts/{ => protocol}/Utilities/StringUtils.sol (100%) rename darc-protocol/contracts/{ => protocol}/VirtualMachine.sol (100%) diff --git a/darc-protocol/contracts/DARC.sol b/darc-protocol/contracts/protocol/DARC.sol similarity index 100% rename from darc-protocol/contracts/DARC.sol rename to darc-protocol/contracts/protocol/DARC.sol diff --git a/darc-protocol/contracts/Dashboard/Dashboard.sol b/darc-protocol/contracts/protocol/Dashboard/Dashboard.sol similarity index 100% rename from darc-protocol/contracts/Dashboard/Dashboard.sol rename to darc-protocol/contracts/protocol/Dashboard/Dashboard.sol diff --git a/darc-protocol/contracts/MachineState.sol b/darc-protocol/contracts/protocol/MachineState.sol similarity index 100% rename from darc-protocol/contracts/MachineState.sol rename to darc-protocol/contracts/protocol/MachineState.sol diff --git a/darc-protocol/contracts/MachineStateManager.sol b/darc-protocol/contracts/protocol/MachineStateManager.sol similarity index 100% rename from darc-protocol/contracts/MachineStateManager.sol rename to darc-protocol/contracts/protocol/MachineStateManager.sol diff --git a/darc-protocol/contracts/Opcodes.sol b/darc-protocol/contracts/protocol/Opcodes.sol similarity index 100% rename from darc-protocol/contracts/Opcodes.sol rename to darc-protocol/contracts/protocol/Opcodes.sol diff --git a/darc-protocol/contracts/Plugin/ConditionExpressionFactory.sol b/darc-protocol/contracts/protocol/Plugin/ConditionExpressionFactory.sol similarity index 100% rename from darc-protocol/contracts/Plugin/ConditionExpressionFactory.sol rename to darc-protocol/contracts/protocol/Plugin/ConditionExpressionFactory.sol diff --git a/darc-protocol/contracts/Plugin/Conditions/MachineStateExpressionFunction.sol b/darc-protocol/contracts/protocol/Plugin/Conditions/MachineStateExpressionFunction.sol similarity index 100% rename from darc-protocol/contracts/Plugin/Conditions/MachineStateExpressionFunction.sol rename to darc-protocol/contracts/protocol/Plugin/Conditions/MachineStateExpressionFunction.sol diff --git a/darc-protocol/contracts/Plugin/Conditions/MintTokensExpressionFunction.sol_ b/darc-protocol/contracts/protocol/Plugin/Conditions/MintTokensExpressionFunction.sol_ similarity index 100% rename from darc-protocol/contracts/Plugin/Conditions/MintTokensExpressionFunction.sol_ rename to darc-protocol/contracts/protocol/Plugin/Conditions/MintTokensExpressionFunction.sol_ diff --git a/darc-protocol/contracts/Plugin/Conditions/OperatorExpressionFunction.sol b/darc-protocol/contracts/protocol/Plugin/Conditions/OperatorExpressionFunction.sol similarity index 100% rename from darc-protocol/contracts/Plugin/Conditions/OperatorExpressionFunction.sol rename to darc-protocol/contracts/protocol/Plugin/Conditions/OperatorExpressionFunction.sol diff --git a/darc-protocol/contracts/Plugin/Conditions/TransferTokensExpressionFunction.sol_ b/darc-protocol/contracts/protocol/Plugin/Conditions/TransferTokensExpressionFunction.sol_ similarity index 100% rename from darc-protocol/contracts/Plugin/Conditions/TransferTokensExpressionFunction.sol_ rename to darc-protocol/contracts/protocol/Plugin/Conditions/TransferTokensExpressionFunction.sol_ diff --git a/darc-protocol/contracts/Plugin/EnumConditionExpression.sol b/darc-protocol/contracts/protocol/Plugin/EnumConditionExpression.sol similarity index 100% rename from darc-protocol/contracts/Plugin/EnumConditionExpression.sol rename to darc-protocol/contracts/protocol/Plugin/EnumConditionExpression.sol diff --git a/darc-protocol/contracts/Plugin/Plugin.sol b/darc-protocol/contracts/protocol/Plugin/Plugin.sol similarity index 100% rename from darc-protocol/contracts/Plugin/Plugin.sol rename to darc-protocol/contracts/protocol/Plugin/Plugin.sol diff --git a/darc-protocol/contracts/Plugin/PluginFactory.sol b/darc-protocol/contracts/protocol/Plugin/PluginFactory.sol similarity index 100% rename from darc-protocol/contracts/Plugin/PluginFactory.sol rename to darc-protocol/contracts/protocol/Plugin/PluginFactory.sol diff --git a/darc-protocol/contracts/Plugin/PluginSystem.sol b/darc-protocol/contracts/protocol/Plugin/PluginSystem.sol similarity index 100% rename from darc-protocol/contracts/Plugin/PluginSystem.sol rename to darc-protocol/contracts/protocol/Plugin/PluginSystem.sol diff --git a/darc-protocol/contracts/Program.sol b/darc-protocol/contracts/protocol/Program.sol similarity index 100% rename from darc-protocol/contracts/Program.sol rename to darc-protocol/contracts/protocol/Program.sol diff --git a/darc-protocol/contracts/Runtime/Executable/Executable.sol b/darc-protocol/contracts/protocol/Runtime/Executable/Executable.sol similarity index 100% rename from darc-protocol/contracts/Runtime/Executable/Executable.sol rename to darc-protocol/contracts/protocol/Runtime/Executable/Executable.sol diff --git a/darc-protocol/contracts/Runtime/Executable/InstructionMachine.sol b/darc-protocol/contracts/protocol/Runtime/Executable/InstructionMachine.sol similarity index 100% rename from darc-protocol/contracts/Runtime/Executable/InstructionMachine.sol rename to darc-protocol/contracts/protocol/Runtime/Executable/InstructionMachine.sol diff --git a/darc-protocol/contracts/Runtime/Executable/Instructions/MembershipInstructions.sol b/darc-protocol/contracts/protocol/Runtime/Executable/Instructions/MembershipInstructions.sol similarity index 100% rename from darc-protocol/contracts/Runtime/Executable/Instructions/MembershipInstructions.sol rename to darc-protocol/contracts/protocol/Runtime/Executable/Instructions/MembershipInstructions.sol diff --git a/darc-protocol/contracts/Runtime/Executable/Instructions/MoneyInstructions.sol b/darc-protocol/contracts/protocol/Runtime/Executable/Instructions/MoneyInstructions.sol similarity index 100% rename from darc-protocol/contracts/Runtime/Executable/Instructions/MoneyInstructions.sol rename to darc-protocol/contracts/protocol/Runtime/Executable/Instructions/MoneyInstructions.sol diff --git a/darc-protocol/contracts/Runtime/Executable/Instructions/OfferDividendsInstructions.sol b/darc-protocol/contracts/protocol/Runtime/Executable/Instructions/OfferDividendsInstructions.sol similarity index 100% rename from darc-protocol/contracts/Runtime/Executable/Instructions/OfferDividendsInstructions.sol rename to darc-protocol/contracts/protocol/Runtime/Executable/Instructions/OfferDividendsInstructions.sol diff --git a/darc-protocol/contracts/Runtime/Executable/Instructions/ParameterInstructions.sol b/darc-protocol/contracts/protocol/Runtime/Executable/Instructions/ParameterInstructions.sol similarity index 100% rename from darc-protocol/contracts/Runtime/Executable/Instructions/ParameterInstructions.sol rename to darc-protocol/contracts/protocol/Runtime/Executable/Instructions/ParameterInstructions.sol diff --git a/darc-protocol/contracts/Runtime/Executable/Instructions/PluginInstructions.sol b/darc-protocol/contracts/protocol/Runtime/Executable/Instructions/PluginInstructions.sol similarity index 100% rename from darc-protocol/contracts/Runtime/Executable/Instructions/PluginInstructions.sol rename to darc-protocol/contracts/protocol/Runtime/Executable/Instructions/PluginInstructions.sol diff --git a/darc-protocol/contracts/Runtime/Executable/Instructions/TokenInstructions.sol b/darc-protocol/contracts/protocol/Runtime/Executable/Instructions/TokenInstructions.sol similarity index 100% rename from darc-protocol/contracts/Runtime/Executable/Instructions/TokenInstructions.sol rename to darc-protocol/contracts/protocol/Runtime/Executable/Instructions/TokenInstructions.sol diff --git a/darc-protocol/contracts/Runtime/Executable/Instructions/UtilityInstructions.sol b/darc-protocol/contracts/protocol/Runtime/Executable/Instructions/UtilityInstructions.sol similarity index 100% rename from darc-protocol/contracts/Runtime/Executable/Instructions/UtilityInstructions.sol rename to darc-protocol/contracts/protocol/Runtime/Executable/Instructions/UtilityInstructions.sol diff --git a/darc-protocol/contracts/Runtime/PaymentCheck/PaymentCheck.sol b/darc-protocol/contracts/protocol/Runtime/PaymentCheck/PaymentCheck.sol similarity index 100% rename from darc-protocol/contracts/Runtime/PaymentCheck/PaymentCheck.sol rename to darc-protocol/contracts/protocol/Runtime/PaymentCheck/PaymentCheck.sol diff --git a/darc-protocol/contracts/Runtime/ProgramValidator/ProgramValidator.sol b/darc-protocol/contracts/protocol/Runtime/ProgramValidator/ProgramValidator.sol similarity index 100% rename from darc-protocol/contracts/Runtime/ProgramValidator/ProgramValidator.sol rename to darc-protocol/contracts/protocol/Runtime/ProgramValidator/ProgramValidator.sol diff --git a/darc-protocol/contracts/Runtime/Runtime.sol b/darc-protocol/contracts/protocol/Runtime/Runtime.sol similarity index 100% rename from darc-protocol/contracts/Runtime/Runtime.sol rename to darc-protocol/contracts/protocol/Runtime/Runtime.sol diff --git a/darc-protocol/contracts/Runtime/VotingMachine/VotingMachine.sol b/darc-protocol/contracts/protocol/Runtime/VotingMachine/VotingMachine.sol similarity index 100% rename from darc-protocol/contracts/Runtime/VotingMachine/VotingMachine.sol rename to darc-protocol/contracts/protocol/Runtime/VotingMachine/VotingMachine.sol diff --git a/darc-protocol/contracts/TokenOwnerListManager.sol b/darc-protocol/contracts/protocol/TokenOwnerListManager.sol similarity index 100% rename from darc-protocol/contracts/TokenOwnerListManager.sol rename to darc-protocol/contracts/protocol/TokenOwnerListManager.sol diff --git a/darc-protocol/contracts/Utilities/ErrorMsg.sol b/darc-protocol/contracts/protocol/Utilities/ErrorMsg.sol similarity index 100% rename from darc-protocol/contracts/Utilities/ErrorMsg.sol rename to darc-protocol/contracts/protocol/Utilities/ErrorMsg.sol diff --git a/darc-protocol/contracts/Utilities/FindInArray.sol b/darc-protocol/contracts/protocol/Utilities/FindInArray.sol similarity index 100% rename from darc-protocol/contracts/Utilities/FindInArray.sol rename to darc-protocol/contracts/protocol/Utilities/FindInArray.sol diff --git a/darc-protocol/contracts/Utilities/OpcodeMap.sol b/darc-protocol/contracts/protocol/Utilities/OpcodeMap.sol similarity index 100% rename from darc-protocol/contracts/Utilities/OpcodeMap.sol rename to darc-protocol/contracts/protocol/Utilities/OpcodeMap.sol diff --git a/darc-protocol/contracts/Utilities/StringUtils.sol b/darc-protocol/contracts/protocol/Utilities/StringUtils.sol similarity index 100% rename from darc-protocol/contracts/Utilities/StringUtils.sol rename to darc-protocol/contracts/protocol/Utilities/StringUtils.sol diff --git a/darc-protocol/contracts/VirtualMachine.sol b/darc-protocol/contracts/protocol/VirtualMachine.sol similarity index 100% rename from darc-protocol/contracts/VirtualMachine.sol rename to darc-protocol/contracts/protocol/VirtualMachine.sol diff --git a/darc-protocol/contracts/test-contracts/test-voting/VotingTest.sol b/darc-protocol/contracts/test-contracts/test-voting/VotingTest.sol index d3603bf..ba3f413 100644 --- a/darc-protocol/contracts/test-contracts/test-voting/VotingTest.sol +++ b/darc-protocol/contracts/test-contracts/test-voting/VotingTest.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.9; -import "../../Runtime/VotingMachine/VotingMachine.sol"; +import '../../protocol/Runtime/VotingMachine/VotingMachine.sol'; /** @@ -10,5 +10,7 @@ import "../../Runtime/VotingMachine/VotingMachine.sol"; */ contract VotingTestContract is VotingMachine{ - + function initializeVotingTest() public { + this.initialize(); + } } \ No newline at end of file diff --git a/darc-protocol/test/ABITest/ABITest.ts b/darc-protocol/test/ABITest/ABITest.ts index 0d1134b..a72b20b 100644 --- a/darc-protocol/test/ABITest/ABITest.ts +++ b/darc-protocol/test/ABITest/ABITest.ts @@ -5,7 +5,7 @@ import { ethers } from "hardhat"; import { BigNumber } from "ethers"; import { deployDARC } from "../../scripts/deployDARC"; -import * as darcjson from "../../../darc-protocol/artifacts/contracts/Darc.sol/Darc.json"; +import * as darcjson from "../../../darc-protocol/artifacts/contracts/protocol/Darc.sol/Darc.json"; // test for batch mint token instruction on DARC // transfer tokens to another 2 addresses