Skip to content

Commit

Permalink
feat(dpp): extra methods for state transitions in wasm (#2401)
Browse files Browse the repository at this point in the history
  • Loading branch information
pshenmic authored Jan 26, 2025
1 parent cbddb8d commit 0743be2
Show file tree
Hide file tree
Showing 15 changed files with 400 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ impl TryFrom<&str> for DocumentTransitionActionType {
"replace" => Ok(DocumentTransitionActionType::Replace),
"delete" => Ok(DocumentTransitionActionType::Delete),
"transfer" => Ok(DocumentTransitionActionType::Transfer),
"purchase" => Ok(DocumentTransitionActionType::Purchase),
"updatePrice" => Ok(DocumentTransitionActionType::UpdatePrice),
action_type => Err(ProtocolError::Generic(format!(
"unknown action type {action_type}"
))),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ pub trait DocumentTransitionV0Methods {
fn get_dynamic_property(&self, path: &str) -> Option<&Value>;
/// get the id
fn get_id(&self) -> Identifier;
/// get the document type
/// get the entropy
fn entropy(&self) -> Option<Vec<u8>>;
fn document_type_name(&self) -> &String;
/// get the data contract id
fn data_contract_id(&self) -> Identifier;
Expand Down Expand Up @@ -167,6 +168,17 @@ impl DocumentTransitionV0Methods for DocumentTransition {
self.base().document_type_name()
}

fn entropy(&self) -> Option<Vec<u8>> {
match self {
DocumentTransition::Create(t) => Some(Vec::from(t.entropy())),
DocumentTransition::Replace(t) => None,

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default

Check warning on line 174 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:174:41 | 174 | DocumentTransition::Replace(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t` | = note: `#[warn(unused_variables)]` on by default
DocumentTransition::Delete(t) => None,

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 175 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:175:40 | 175 | DocumentTransition::Delete(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`
DocumentTransition::Transfer(t) => None,

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 176 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:176:42 | 176 | DocumentTransition::Transfer(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`
DocumentTransition::UpdatePrice(t) => None,

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 177 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:177:45 | 177 | DocumentTransition::UpdatePrice(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`
DocumentTransition::Purchase(t) => None,

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (dash-sdk) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`

Check warning on line 178 in packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused variable: `t`

warning: unused variable: `t` --> packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs:178:42 | 178 | DocumentTransition::Purchase(t) => None, | ^ help: if this is intentional, prefix it with an underscore: `_t`
}
}

fn data_contract_id(&self) -> Identifier {
self.base().data_contract_id()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,27 @@ impl DataContractCreateTransitionWasm {
pub fn get_type(&self) -> u32 {
self.0.state_transition_type() as u32
}

#[wasm_bindgen(js_name=setUserFeeIncrease)]
pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) {
self.0.set_user_fee_increase(user_fee_increase);
}

#[wasm_bindgen(js_name=getUserFeeIncrease)]
pub fn get_user_fee_increase(&self) -> u16 {
self.0.user_fee_increase() as u16
}

#[wasm_bindgen(js_name=getSignature)]
pub fn get_signature(&self) -> Buffer {
Buffer::from_bytes(self.0.signature().as_slice())
}

#[wasm_bindgen(js_name=getSignaturePublicKeyId)]
pub fn get_signature_public_key_id(&self) -> u32 {
self.0.signature_public_key_id()
}

//
// #[wasm_bindgen(js_name=toJSON)]
// pub fn to_json(&self, skip_signature: Option<bool>) -> Result<JsValue, JsValue> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,36 @@ impl DataContractUpdateTransitionWasm {
self.0.owner_id().into()
}

#[wasm_bindgen(js_name=getIdentityContractNonce)]
pub fn get_identity_contract_nonce(&self) -> u64 {
self.0.identity_contract_nonce() as u64
}

#[wasm_bindgen(js_name=getType)]
pub fn get_type(&self) -> u32 {
self.0.state_transition_type() as u32
}

#[wasm_bindgen(js_name=getUserFeeIncrease)]
pub fn get_user_fee_increase(&self) -> u16 {
self.0.user_fee_increase() as u16
}

#[wasm_bindgen(js_name=setUserFeeIncrease)]
pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) {
self.0.set_user_fee_increase(user_fee_increase);
}

#[wasm_bindgen(js_name=getSignature)]
pub fn get_signature(&self) -> Buffer {
Buffer::from_bytes(self.0.signature().as_slice())
}

#[wasm_bindgen(js_name=getSignaturePublicKeyId)]
pub fn get_signature_public_key_id(&self) -> u32 {
self.0.signature_public_key_id()
}

// #[wasm_bindgen(js_name=toJSON)]
// pub fn to_json(&self, skip_signature: Option<bool>) -> Result<JsValue, JsValue> {
// let serializer = serde_wasm_bindgen::Serializer::json_compatible();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use dpp::state_transition::documents_batch_transition::document_create_transitio

use dpp::document::INITIAL_REVISION;

use dpp::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods;
use dpp::state_transition::documents_batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods;
use wasm_bindgen::prelude::*;

#[wasm_bindgen(js_name=DocumentCreateTransition)]
Expand Down Expand Up @@ -81,6 +83,45 @@ impl DocumentCreateTransitionWasm {
INITIAL_REVISION as u32
}

#[wasm_bindgen(js_name = getEntropy)]
pub fn get_entropy(&self) -> Vec<u8> {
Vec::from(self.inner.entropy())
}

#[wasm_bindgen(js_name=getIdentityContractNonce)]
pub fn get_identity_contract_nonce(&self) -> u64 {
self.inner.base().identity_contract_nonce() as u64

Check warning on line 93 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

casting to the same type is unnecessary (`u64` -> `u64`)

warning: casting to the same type is unnecessary (`u64` -> `u64`) --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs:93:9 | 93 | self.inner.base().identity_contract_nonce() as u64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.inner.base().identity_contract_nonce()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 93 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

casting to the same type is unnecessary (`u64` -> `u64`)

warning: casting to the same type is unnecessary (`u64` -> `u64`) --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs:93:9 | 93 | self.inner.base().identity_contract_nonce() as u64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.inner.base().identity_contract_nonce()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 93 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

casting to the same type is unnecessary (`u64` -> `u64`)

warning: casting to the same type is unnecessary (`u64` -> `u64`) --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs:93:9 | 93 | self.inner.base().identity_contract_nonce() as u64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.inner.base().identity_contract_nonce()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 93 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

casting to the same type is unnecessary (`u64` -> `u64`)

warning: casting to the same type is unnecessary (`u64` -> `u64`) --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs:93:9 | 93 | self.inner.base().identity_contract_nonce() as u64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.inner.base().identity_contract_nonce()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
}

#[wasm_bindgen(js_name=setIdentityContractNonce)]
pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) -> () {

Check warning on line 97 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unneeded unit return type

warning: unneeded unit return type --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs:97:80 | 97 | pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) -> () { | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default

Check warning on line 97 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unneeded unit return type

warning: unneeded unit return type --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs:97:80 | 97 | pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) -> () { | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default

Check warning on line 97 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unneeded unit return type

warning: unneeded unit return type --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs:97:80 | 97 | pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) -> () { | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default

Check warning on line 97 in packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

unneeded unit return type

warning: unneeded unit return type --> packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs:97:80 | 97 | pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) -> () { | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default
let mut base = self.inner.base().clone();

base.set_identity_contract_nonce(identity_contract_nonce);

self.inner.set_base(base)
}

#[wasm_bindgen(js_name = getPrefundedVotingBalance)]
pub fn get_prefunded_voting_balance(&self) -> Result<JsValue, JsValue> {
let prefunded_voting_balance = self.inner.prefunded_voting_balance().clone();

match prefunded_voting_balance {
None => Ok(JsValue::null()),
Some((index_name, credits)) => {
let js_object = js_sys::Object::new();

js_sys::Reflect::set(
&js_object,
&JsValue::from_str(&index_name),
&JsValue::from(credits),
)?;

Ok(JsValue::from(js_object))
}
}
}

// // AbstractDocumentTransitionMethods
// #[wasm_bindgen(js_name=getId)]
// pub fn id(&self) -> IdentifierWrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,30 @@ impl DocumentDeleteTransitionWasm {
self.inner.base().document_type_name().clone()
}

#[wasm_bindgen(js_name = getEntropy)]
pub fn get_entropy(&self) -> Vec<u8> {
Vec::from(self.inner.entropy())
}

#[wasm_bindgen(js_name=getDataContractId)]
pub fn data_contract_id(&self) -> IdentifierWrapper {
self.inner.base().data_contract_id().into()
}

#[wasm_bindgen(js_name=getIdentityContractNonce)]
pub fn get_identity_contract_nonce(&self) -> u64 {
self.inner.base().identity_contract_nonce() as u64
}

#[wasm_bindgen(js_name=setIdentityContractNonce)]
pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) -> () {
let mut base = self.inner.base().clone();

base.set_identity_contract_nonce(identity_contract_nonce);

self.inner.set_base(base)
}

#[wasm_bindgen(js_name=get)]
pub fn get(&self, path: String) -> Result<JsValue, JsValue> {
let _ = path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ impl DocumentReplaceTransitionWasm {
self.inner.revision()
}

#[wasm_bindgen(js_name = getEntropy)]
pub fn get_entropy(&self) -> Vec<u8> {
Vec::from(self.inner.entropy())
}

#[wasm_bindgen(js_name=getUpdatedAt)]
pub fn updated_at(&self) -> Option<js_sys::Date> {
self.inner
Expand Down Expand Up @@ -189,6 +194,20 @@ impl DocumentReplaceTransitionWasm {
self.inner.base().data_contract_id().into()
}

#[wasm_bindgen(js_name=getIdentityContractNonce)]
pub fn get_identity_contract_nonce(&self) -> u64 {
self.inner.base().identity_contract_nonce() as u64
}

#[wasm_bindgen(js_name=setIdentityContractNonce)]
pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) -> () {
let mut base = self.inner.base().clone();

base.set_identity_contract_nonce(identity_contract_nonce);

self.inner.set_base(base)
}

#[wasm_bindgen(js_name=get)]
pub fn get(&self, path: String) -> Result<JsValue, JsValue> {
let document_data = if let Some(ref data) = self.inner.data() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ use dpp::{
use serde::Serialize;
use serde_json::Value as JsonValue;
use wasm_bindgen::prelude::*;

use dpp::fee::Credits;
use dpp::platform_value::converter::serde_json::BTreeValueJsonConverter;
use dpp::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition;
use dpp::state_transition::documents_batch_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods;
use dpp::state_transition::documents_batch_transition::document_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods;
use dpp::state_transition::documents_batch_transition::document_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods;
use dpp::state_transition::documents_batch_transition::document_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods;
use crate::{
buffer::Buffer,
identifier::{identifier_from_js_value, IdentifierWrapper},
Expand All @@ -42,6 +48,28 @@ impl DocumentTransitionWasm {
self.0.document_type_name().to_owned()
}

#[wasm_bindgen(js_name=getData)]
pub fn get_data(&self) -> JsValue {
match &self.0 {
DocumentTransition::Create(document_create_transition) => {
let json_value = document_create_transition.data().to_json_value().unwrap();
json_value
.serialize(&serde_wasm_bindgen::Serializer::json_compatible())
.unwrap()
}
DocumentTransition::Replace(document_replace_transition) => {
let json_value = document_replace_transition.data().to_json_value().unwrap();
json_value
.serialize(&serde_wasm_bindgen::Serializer::json_compatible())
.unwrap()
}
DocumentTransition::Delete(document_delete_transition) => JsValue::null(),
DocumentTransition::Transfer(document_transfer_transition) => JsValue::null(),
DocumentTransition::UpdatePrice(document_update_price_transition) => JsValue::null(),
DocumentTransition::Purchase(document_purchase_transition) => JsValue::null(),
}
}

#[wasm_bindgen(js_name=getAction)]
pub fn get_action(&self) -> u8 {
self.0.action_type() as u8
Expand All @@ -59,6 +87,13 @@ impl DocumentTransitionWasm {
Ok(())
}

#[wasm_bindgen(js_name=getIdentityContractNonce)]
pub fn get_identity_contract_nonce(&self) -> JsValue {
match self.0.base() {
DocumentBaseTransition::V0(v0) => JsValue::from(v0.identity_contract_nonce),
}
}

#[wasm_bindgen(js_name=getRevision)]
pub fn get_revision(&self) -> JsValue {
if let Some(revision) = self.0.revision() {
Expand All @@ -67,6 +102,34 @@ impl DocumentTransitionWasm {
JsValue::NULL
}
}
#[wasm_bindgen(js_name=getEntropy)]
pub fn get_entropy(&self) -> Option<Vec<u8>> {
self.0.entropy()
}

#[wasm_bindgen(js_name=get_price)]
pub fn get_price(&self) -> Option<Credits> {
match &self.0 {
DocumentTransition::Create(create) => None,
DocumentTransition::Replace(_) => None,
DocumentTransition::Delete(_) => None,
DocumentTransition::Transfer(_) => None,
DocumentTransition::UpdatePrice(update_price) => Some(update_price.price()),
DocumentTransition::Purchase(purchase) => Some(purchase.price()),
}
}

#[wasm_bindgen(js_name=getReceiverId)]
pub fn get_receiver_id(&self) -> Option<IdentifierWrapper> {
match &self.0 {
DocumentTransition::Create(create) => None,
DocumentTransition::Replace(_) => None,
DocumentTransition::Delete(_) => None,
DocumentTransition::Transfer(transfer) => Some(transfer.recipient_owner_id().into()),
DocumentTransition::UpdatePrice(update_price) => None,
DocumentTransition::Purchase(purchase) => None,
}
}

#[wasm_bindgen(js_name=setRevision)]
pub fn set_revision(&mut self, revision: u32) {
Expand All @@ -82,6 +145,32 @@ impl DocumentTransitionWasm {
_ => false,
}
}

#[wasm_bindgen(js_name=getPrefundedVotingBalance)]
pub fn get_prefunded_voting_balance(&self) -> Result<JsValue, JsValue> {
match &self.0 {
DocumentTransition::Create(create_transition) => {
let prefunded_voting_balance = create_transition.prefunded_voting_balance().clone();

if prefunded_voting_balance.is_none() {
return Ok(JsValue::null());
}

let (index_name, credits) = prefunded_voting_balance.unwrap();

let js_object = js_sys::Object::new();

js_sys::Reflect::set(
&js_object,
&JsValue::from_str(&index_name),
&JsValue::from(credits),
)?;

Ok(JsValue::from(js_object))
}
_ => Ok(JsValue::null()),
}
}
}

impl From<DocumentTransition> for DocumentTransitionWasm {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ impl DocumentsBatchTransitionWasm {
self.0.owner_id().to_owned().into()
}

#[wasm_bindgen(js_name=getUserFeeIncrease)]
pub fn get_user_fee_increase(&self) -> u16 {
self.0.user_fee_increase() as u16
}

#[wasm_bindgen(js_name=setUserFeeIncrease)]
pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) {
self.0.set_user_fee_increase(user_fee_increase);
}

#[wasm_bindgen(js_name=getTransitions)]
pub fn get_transitions(&self) -> js_sys::Array {
let array = js_sys::Array::new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,16 @@ impl IdentityCreateTransitionWasm {
(IdentityCreateTransitionAccessorsV0::owner_id(&self.0)).into()
}

#[wasm_bindgen(js_name=getUserFeeIncrease)]
pub fn get_user_fee_increase(&self) -> u16 {
self.0.user_fee_increase() as u16
}

#[wasm_bindgen(js_name=setUserFeeIncrease)]
pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) {
self.0.set_user_fee_increase(user_fee_increase);
}

#[wasm_bindgen(js_name=toObject)]
pub fn to_object(&self, options: JsValue) -> Result<JsValue, JsValue> {
let opts: super::to_object::ToObjectOptions = if options.is_object() {
Expand Down
Loading

0 comments on commit 0743be2

Please sign in to comment.