feat(client): add WithFromName to tx factory (#18852)
This commit is contained in:
@@ -132,6 +132,7 @@ func (f Factory) Fees() sdk.Coins { return f.fees }
|
||||
func (f Factory) GasPrices() sdk.DecCoins { return f.gasPrices }
|
||||
func (f Factory) AccountRetriever() client.AccountRetriever { return f.accountRetriever }
|
||||
func (f Factory) TimeoutHeight() uint64 { return f.timeoutHeight }
|
||||
func (f Factory) FromName() string { return f.fromName }
|
||||
|
||||
// SimulateAndExecute returns the option to simulate and then execute the transaction
|
||||
// using the gas from the simulation results
|
||||
@@ -189,6 +190,13 @@ func (f Factory) WithKeybase(keybase keyring.Keyring) Factory {
|
||||
return f
|
||||
}
|
||||
|
||||
// WithFromName returns a copy of the Factory with updated fromName
|
||||
// fromName will be use for building a simulation tx.
|
||||
func (f Factory) WithFromName(fromName string) Factory {
|
||||
f.fromName = fromName
|
||||
return f
|
||||
}
|
||||
|
||||
// WithSequence returns a copy of the Factory with an updated sequence number.
|
||||
func (f Factory) WithSequence(sequence uint64) Factory {
|
||||
f.sequence = sequence
|
||||
|
||||
Reference in New Issue
Block a user