From 8ee5f00e5f609eb4d8c767f89b3414c6a9021f3d Mon Sep 17 00:00:00 2001 From: bengtlofgren Date: Fri, 10 Nov 2023 16:23:25 +0100 Subject: [PATCH] added builder to txinitvalidator --- sdk/src/args.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sdk/src/args.rs b/sdk/src/args.rs index f8454648b5..e5eed87943 100644 --- a/sdk/src/args.rs +++ b/sdk/src/args.rs @@ -723,7 +723,7 @@ impl TxInitAccount { } } -/// Transaction to initialize a new account +/// Transaction to initialize a new validator account #[derive(Clone, Debug)] pub struct TxInitValidator { /// Common tx arguments @@ -754,6 +754,18 @@ pub struct TxInitValidator { pub unsafe_dont_encrypt: bool, } +impl TxBuilder for TxInitValidator { + fn tx(self, func: F) -> Self + where + F: FnOnce(Tx) -> Tx, + { + TxInitValidator { + tx: func(self.tx), + ..self + } + } +} + /// Transaction to update a VP arguments #[derive(Clone, Debug)] pub struct TxUpdateAccount {