From 952443fc70c5b2315025552de11471113dbfc19a Mon Sep 17 00:00:00 2001 From: Lukasz Rubaszewski Date: Thu, 23 Nov 2023 16:50:05 +0100 Subject: [PATCH 1/2] Add missing types to scrypto-bindgen --- simulator/src/scrypto_bindgen/translation.rs | 21 +++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/simulator/src/scrypto_bindgen/translation.rs b/simulator/src/scrypto_bindgen/translation.rs index d89f58fd930..dd937e18099 100644 --- a/simulator/src/scrypto_bindgen/translation.rs +++ b/simulator/src/scrypto_bindgen/translation.rs @@ -226,18 +226,15 @@ where TypeKind::Custom(ScryptoCustomTypeKind::Own) => match type_validation { TypeValidation::Custom(ScryptoCustomTypeValidation::Own( OwnValidation::IsTypedObject(package_address, bp_name), - )) if package_address == Some(RESOURCE_PACKAGE) - && bp_name == FUNGIBLE_BUCKET_BLUEPRINT => - { - "FungibleBucket".to_owned() - } - TypeValidation::Custom(ScryptoCustomTypeValidation::Own( - OwnValidation::IsTypedObject(package_address, bp_name), - )) if package_address == Some(RESOURCE_PACKAGE) - && bp_name == NON_FUNGIBLE_BUCKET_BLUEPRINT => - { - "NonFungibleBucket".to_owned() - } + )) if package_address == Some(RESOURCE_PACKAGE) => match bp_name.as_str() { + FUNGIBLE_BUCKET_BLUEPRINT => "FungibleBucket".to_owned(), + NON_FUNGIBLE_BUCKET_BLUEPRINT => "NonFungibleBucket".to_owned(), + FUNGIBLE_PROOF_BLUEPRINT => "FungibleProof".to_owned(), + NON_FUNGIBLE_PROOF_BLUEPRINT => "NonFungibleProof".to_owned(), + FUNGIBLE_VAULT_BLUEPRINT => "FungibleVault".to_owned(), + NON_FUNGIBLE_VAULT_BLUEPRINT => "NonFungibleVault".to_owned(), + _ => "Own".to_owned(), + }, TypeValidation::Custom(ScryptoCustomTypeValidation::Own( OwnValidation::IsTypedObject(package_address, bp_name), )) if package_address.is_none() From 4e3afd4453cffeef7b9c861a2b79fa924d642224 Mon Sep 17 00:00:00 2001 From: Lukasz Rubaszewski Date: Thu, 23 Nov 2023 17:08:12 +0100 Subject: [PATCH 2/2] Remove unused verifier structs --- transaction/src/signing/ed25519/signature.rs | 3 --- transaction/src/signing/secp256k1/signature.rs | 3 --- 2 files changed, 6 deletions(-) diff --git a/transaction/src/signing/ed25519/signature.rs b/transaction/src/signing/ed25519/signature.rs index 215826224b1..333a09298c7 100644 --- a/transaction/src/signing/ed25519/signature.rs +++ b/transaction/src/signing/ed25519/signature.rs @@ -13,9 +13,6 @@ pub struct Ed25519Signature( #[cfg_attr(feature = "serde", serde(with = "hex::serde"))] pub [u8; Self::LENGTH], ); -/// Ed25519 signature verifier. -pub struct Ed25519Verifier; - impl Ed25519Signature { pub const LENGTH: usize = 64; diff --git a/transaction/src/signing/secp256k1/signature.rs b/transaction/src/signing/secp256k1/signature.rs index ee6c16ab961..60b80226b2c 100644 --- a/transaction/src/signing/secp256k1/signature.rs +++ b/transaction/src/signing/secp256k1/signature.rs @@ -13,9 +13,6 @@ pub struct Secp256k1Signature( #[cfg_attr(feature = "serde", serde(with = "hex::serde"))] pub [u8; Self::LENGTH], ); -/// Secp256k1 signature verifier. -pub struct Secp256k1Verifier; - impl Secp256k1Signature { pub const LENGTH: usize = 65; // recovery id + signature