Rework CreateSmartTransactionConfig
to Resolve Lifetime Issues
#83
Labels
CreateSmartTransactionConfig
to Resolve Lifetime Issues
#83
The lifetime parameter on
CreateSmartTransactionConfig
is required because it contains references to signers and instructions. This has the potential to create several issues and should be avoided. We should rework this to avoid any potential lifetime issues.An arc-based solution is probably best as no lifetime parameters are needed, it's thread-safe, and it shares ownership efficiently. The only downside is a slight runtime overhead from reference counting and then the need to wrap signers in an arc when creating the config. A builder pattern solution is also a possibility, but then we introduce a lot of boilerplate, and a clone-based solution would require signers to implement clone
The text was updated successfully, but these errors were encountered: