|
|
@@ -29,6 +29,9 @@ pub enum DaoError {
|
|
|
#[error("Proposal inputs are empty")]
|
|
|
ProposalInputsEmpty,
|
|
|
|
|
|
+ #[error("Proposal inputs are not unique")]
|
|
|
+ ProposalInputsReuse,
|
|
|
+
|
|
|
#[error("Invalid input Merkle root")]
|
|
|
InvalidInputMerkleRoot,
|
|
|
|
|
|
@@ -102,28 +105,29 @@ impl From<DaoError> for ContractError {
|
|
|
DaoError::InvalidCalls => Self::Custom(1),
|
|
|
DaoError::DaoAlreadyExists => Self::Custom(2),
|
|
|
DaoError::ProposalInputsEmpty => Self::Custom(3),
|
|
|
- DaoError::InvalidInputMerkleRoot => Self::Custom(4),
|
|
|
- DaoError::NonMatchingSnapshotRoots => Self::Custom(5),
|
|
|
- DaoError::SnapshotTooOld => Self::Custom(6),
|
|
|
- DaoError::SnapshotDeserializationError => Self::Custom(7),
|
|
|
- DaoError::InvalidDaoMerkleRoot => Self::Custom(8),
|
|
|
- DaoError::ProposalAlreadyExists => Self::Custom(9),
|
|
|
- DaoError::VoteInputsEmpty => Self::Custom(10),
|
|
|
- DaoError::ProposalNonexistent => Self::Custom(11),
|
|
|
- DaoError::ProposalEnded => Self::Custom(12),
|
|
|
- DaoError::CoinAlreadySpent => Self::Custom(13),
|
|
|
- DaoError::DoubleVote => Self::Custom(14),
|
|
|
- DaoError::ExecCallWrongChildCallsLen => Self::Custom(15),
|
|
|
- DaoError::ExecCallWrongChildCall => Self::Custom(16),
|
|
|
- DaoError::ExecCallInvalidFormat => Self::Custom(17),
|
|
|
- DaoError::ExecCallValueMismatch => Self::Custom(18),
|
|
|
- DaoError::VoteCommitMismatch => Self::Custom(19),
|
|
|
- DaoError::AuthXferSiblingWrongContractId => Self::Custom(20),
|
|
|
- DaoError::AuthXferSiblingWrongFunctionCode => Self::Custom(21),
|
|
|
- DaoError::AuthXferNonMatchingEncInputUserData => Self::Custom(22),
|
|
|
- DaoError::AuthXferCallNotFoundInParent => Self::Custom(23),
|
|
|
- DaoError::AuthXferWrongNumberOutputs => Self::Custom(24),
|
|
|
- DaoError::AuthXferWrongOutputCoin => Self::Custom(25),
|
|
|
+ DaoError::ProposalInputsReuse => Self::Custom(4),
|
|
|
+ DaoError::InvalidInputMerkleRoot => Self::Custom(5),
|
|
|
+ DaoError::NonMatchingSnapshotRoots => Self::Custom(6),
|
|
|
+ DaoError::SnapshotTooOld => Self::Custom(7),
|
|
|
+ DaoError::SnapshotDeserializationError => Self::Custom(8),
|
|
|
+ DaoError::InvalidDaoMerkleRoot => Self::Custom(9),
|
|
|
+ DaoError::ProposalAlreadyExists => Self::Custom(10),
|
|
|
+ DaoError::VoteInputsEmpty => Self::Custom(11),
|
|
|
+ DaoError::ProposalNonexistent => Self::Custom(12),
|
|
|
+ DaoError::ProposalEnded => Self::Custom(13),
|
|
|
+ DaoError::CoinAlreadySpent => Self::Custom(14),
|
|
|
+ DaoError::DoubleVote => Self::Custom(15),
|
|
|
+ DaoError::ExecCallWrongChildCallsLen => Self::Custom(16),
|
|
|
+ DaoError::ExecCallWrongChildCall => Self::Custom(17),
|
|
|
+ DaoError::ExecCallInvalidFormat => Self::Custom(18),
|
|
|
+ DaoError::ExecCallValueMismatch => Self::Custom(19),
|
|
|
+ DaoError::VoteCommitMismatch => Self::Custom(20),
|
|
|
+ DaoError::AuthXferSiblingWrongContractId => Self::Custom(21),
|
|
|
+ DaoError::AuthXferSiblingWrongFunctionCode => Self::Custom(22),
|
|
|
+ DaoError::AuthXferNonMatchingEncInputUserData => Self::Custom(23),
|
|
|
+ DaoError::AuthXferCallNotFoundInParent => Self::Custom(24),
|
|
|
+ DaoError::AuthXferWrongNumberOutputs => Self::Custom(25),
|
|
|
+ DaoError::AuthXferWrongOutputCoin => Self::Custom(26),
|
|
|
}
|
|
|
}
|
|
|
}
|