diff --git a/.changelog/unreleased/bug-fixes/2817-light-sdk-clone.md b/.changelog/unreleased/bug-fixes/2817-light-sdk-clone.md new file mode 100644 index 0000000000..ce2e70b9f2 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/2817-light-sdk-clone.md @@ -0,0 +1,2 @@ +- Light SDK objects must be clone-able. + ([\#2817](https://github.com/anoma/namada/pull/2817)) \ No newline at end of file diff --git a/crates/light_sdk/src/transaction/account.rs b/crates/light_sdk/src/transaction/account.rs index 855886dd6c..be385ea024 100644 --- a/crates/light_sdk/src/transaction/account.rs +++ b/crates/light_sdk/src/transaction/account.rs @@ -13,6 +13,7 @@ const TX_REVEAL_PK_WASM: &str = "tx_reveal_pk.wasm"; const TX_UPDATE_ACCOUNT_WASM: &str = "tx_update_account.wasm"; /// Transaction to initialize an established account +#[derive(Debug, Clone)] pub struct InitAccount(Tx); impl InitAccount { diff --git a/crates/light_sdk/src/transaction/bridge.rs b/crates/light_sdk/src/transaction/bridge.rs index 991b4ee4f5..c8fd2cbb71 100644 --- a/crates/light_sdk/src/transaction/bridge.rs +++ b/crates/light_sdk/src/transaction/bridge.rs @@ -12,6 +12,7 @@ use crate::transaction; const TX_BRIDGE_POOL_WASM: &str = "tx_bridge_pool.wasm"; /// A transfer over the Ethereum bridge +#[derive(Debug, Clone)] pub struct BridgeTransfer(Tx); impl BridgeTransfer { diff --git a/crates/light_sdk/src/transaction/governance.rs b/crates/light_sdk/src/transaction/governance.rs index 4019f35c8f..4cfab99828 100644 --- a/crates/light_sdk/src/transaction/governance.rs +++ b/crates/light_sdk/src/transaction/governance.rs @@ -14,6 +14,7 @@ const TX_INIT_PROPOSAL_WASM: &str = "tx_init_proposal.wasm"; const TX_VOTE_PROPOSAL: &str = "tx_vote_proposal.wasm"; /// Transaction to initialize a governance proposal +#[derive(Debug, Clone)] pub struct InitProposal(Tx); impl InitProposal { diff --git a/crates/light_sdk/src/transaction/ibc.rs b/crates/light_sdk/src/transaction/ibc.rs index 10715ae2b2..a254a7aef1 100644 --- a/crates/light_sdk/src/transaction/ibc.rs +++ b/crates/light_sdk/src/transaction/ibc.rs @@ -16,6 +16,7 @@ use crate::transaction; const TX_IBC_WASM: &str = "tx_ibc.wasm"; /// An IBC transfer +#[derive(Debug, Clone)] pub struct IbcTransfer(Tx); impl IbcTransfer { diff --git a/crates/light_sdk/src/transaction/mod.rs b/crates/light_sdk/src/transaction/mod.rs index e7fe8ce6bd..4117c791aa 100644 --- a/crates/light_sdk/src/transaction/mod.rs +++ b/crates/light_sdk/src/transaction/mod.rs @@ -20,6 +20,7 @@ pub mod pos; pub mod transfer; /// Generic arguments required to construct a transaction +#[derive(Debug, Clone)] pub struct GlobalArgs { pub expiration: Option, pub code_hash: Hash, diff --git a/crates/light_sdk/src/transaction/pgf.rs b/crates/light_sdk/src/transaction/pgf.rs index 2b68693f64..7f5f153ea2 100644 --- a/crates/light_sdk/src/transaction/pgf.rs +++ b/crates/light_sdk/src/transaction/pgf.rs @@ -14,6 +14,7 @@ const TX_RESIGN_STEWARD: &str = "tx_resign_steward.wasm"; const TX_UPDATE_STEWARD_COMMISSION: &str = "tx_update_steward_commission.wasm"; /// A transaction to resign from stewarding pgf +#[derive(Debug, Clone)] pub struct ResignSteward(Tx); impl ResignSteward { diff --git a/crates/light_sdk/src/transaction/pos.rs b/crates/light_sdk/src/transaction/pos.rs index 6fe2426afd..bb5b9b31ce 100644 --- a/crates/light_sdk/src/transaction/pos.rs +++ b/crates/light_sdk/src/transaction/pos.rs @@ -25,6 +25,7 @@ const TX_CHANGE_COMMISSION_WASM: &str = "tx_change_validator_commission.wasm"; const TX_WITHDRAW_WASM: &str = "tx_withdraw.wasm"; /// A bond transaction +#[derive(Debug, Clone)] pub struct Bond(Tx); impl Bond { diff --git a/crates/light_sdk/src/transaction/transfer.rs b/crates/light_sdk/src/transaction/transfer.rs index e76bf2d331..a93d1a68be 100644 --- a/crates/light_sdk/src/transaction/transfer.rs +++ b/crates/light_sdk/src/transaction/transfer.rs @@ -12,6 +12,7 @@ use crate::transaction; const TX_TRANSFER_WASM: &str = "tx_transfer.wasm"; /// A transfer transaction +#[derive(Debug, Clone)] pub struct Transfer(Tx); impl Transfer {