Skip to content

Commit

Permalink
Merge branch 'bengt/light-sdk-clone' (#2817)
Browse files Browse the repository at this point in the history
* bengt/light-sdk-clone:
  Changelog #2817
  added clone to transaction structs
  • Loading branch information
brentstone committed May 9, 2024
2 parents 7bf6772 + f3765ee commit afeef6d
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/2817-light-sdk-clone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Light SDK objects must be clone-able.
([\#2817](https://github.com/anoma/namada/pull/2817))
1 change: 1 addition & 0 deletions crates/light_sdk/src/transaction/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions crates/light_sdk/src/transaction/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions crates/light_sdk/src/transaction/governance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions crates/light_sdk/src/transaction/ibc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions crates/light_sdk/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<DateTimeUtc>,
pub code_hash: Hash,
Expand Down
1 change: 1 addition & 0 deletions crates/light_sdk/src/transaction/pgf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions crates/light_sdk/src/transaction/pos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions crates/light_sdk/src/transaction/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit afeef6d

Please sign in to comment.