Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lidangzzz committed Jun 4, 2023
1 parent 9e75a5a commit 1ebbb32
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ contract MachineStateExpressionFunction is MachineStateManager{
return block.timestamp > timeStampToCompare;
}

function timestampLessThan(uint256 timeStampToCompare) internal view returns (bool) {
function timestampSmallerThan(uint256 timeStampToCompare) internal view returns (bool) {
return block.timestamp < timeStampToCompare;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.9;
/**
* @title ConditionExpressionFunctions
* @author DARC Team
* @notice Functions of criteria expression related to Machine State
*/


import "../../../MachineState.sol";
import "../../../MachineStateManager.sol";
import "../../../Utilities/StringUtils.sol";
import "../../../Utilities/OpcodeMap.sol";

contract CertainTokenNumberExpressionFunction is MachineStateManager{

function certainTokenDividendWeightLessThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokenDividendWeightGreaterThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokenDividendWeightInRange(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokenVotingWeightLessThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokenVotingWeightGreaterThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokenVotingWeightInRange(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.9;
/**
* @title ConditionExpressionFunctions
* @author DARC Team
* @notice Functions of criteria expression related to Machine State
*/


import "../../../MachineState.sol";
import "../../../MachineStateManager.sol";
import "../../../Utilities/StringUtils.sol";
import "../../../Utilities/OpcodeMap.sol";

contract CertainTokenPermyriadExpressionFunction is MachineStateManager{

function certainTokenDividendWeightLessThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokenDividendWeightGreaterThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokenDividendWeightInRange(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokenVotingWeightLessThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokenVotingWeightGreaterThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokenVotingWeightInRange(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.9;
/**
* @title ConditionExpressionFunctions
* @author DARC Team
* @notice Functions of criteria expression related to Machine State
*/


import "../../../MachineState.sol";
import "../../../MachineStateManager.sol";
import "../../../Utilities/StringUtils.sol";
import "../../../Utilities/OpcodeMap.sol";

contract TotalTokenNumberExpressionFunction is MachineStateManager{

// total token dividend & voting weight number less/greater/in range
function totalTokenDividendWeightLessThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function totalTokenVotingWeightLessThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function totalTokenDividendWeightGreaterThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function totalTokenVotingWeightGreaterThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function totalTokenDividendWeightInRange(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function totalTokenVotingWeightInRange(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}




function certainTokensDividendWeightLessThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokensDividendWeightGreaterThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokensDividendWeightInRange(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokensVotingWeightLessThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokensVotingWeightGreaterThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function certainTokensVotingWeightInRange(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.9;
/**
* @title ConditionExpressionFunctions
* @author DARC Team
* @notice Functions of criteria expression related to Machine State
*/


import "../../../MachineState.sol";
import "../../../MachineStateManager.sol";
import "../../../Utilities/StringUtils.sol";
import "../../../Utilities/OpcodeMap.sol";

contract TotalTokenPermyriadExpressionFunction is MachineStateManager{

// total token dividend & voting weight permyriad less/greater/in range
function totalTokenDividendWeightPermyriadLessThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function totalTokenVotingWeightPermyriadLessThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function totalTokenDividendWeightPermyriadGreaterThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}

function totalTokenVotingWeightPermyriadGreaterThan(Operation memory operation, NodeParam memory param) internal view returns (bool) {
//
}
}
1 change: 1 addition & 0 deletions darc-protocol/contracts/protocol/Plugin/Plugin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,5 @@ struct Plugin {
* plugin or after operation plugin
*/
bool bIsBeforeOperation;

}

0 comments on commit 1ebbb32

Please sign in to comment.