Jelajahi Sumber

src/contract: add Debug trait to DeployFunction and MoneyFunction to be able to change to string for python tx bindings

oars 11 bulan lalu
induk
melakukan
5e51bc9925
2 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 1 0
      src/contract/deployooor/src/lib.rs
  2. 1 0
      src/contract/money/src/lib.rs

+ 1 - 0
src/contract/deployooor/src/lib.rs

@@ -22,6 +22,7 @@ use darkfi_sdk::error::ContractError;
 
 /// Functions available in the contract
 #[repr(u8)]
+#[derive(Debug)]
 pub enum DeployFunction {
     DeployV1 = 0x00,
     LockV1 = 0x01,

+ 1 - 0
src/contract/money/src/lib.rs

@@ -25,6 +25,7 @@ use darkfi_sdk::error::ContractError;
 
 /// Functions available in the contract
 #[repr(u8)]
+#[derive(Debug)]
 // ANCHOR: money-function
 pub enum MoneyFunction {
     FeeV1 = 0x00,