2018-04-25 07:18:06 -07:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
bank "github.com/cosmos/cosmos-sdk/x/bank"
|
|
|
|
)
|
|
|
|
|
|
|
|
// build the sendTx msg
|
2018-07-06 00:06:53 -07:00
|
|
|
func BuildMsg(from sdk.AccAddress, to sdk.AccAddress, coins sdk.Coins) sdk.Msg {
|
2018-04-25 07:18:06 -07:00
|
|
|
input := bank.NewInput(from, coins)
|
|
|
|
output := bank.NewOutput(to, coins)
|
|
|
|
msg := bank.NewMsgSend([]bank.Input{input}, []bank.Output{output})
|
|
|
|
return msg
|
|
|
|
}
|