// note: the precision of amount must be the same as when the token deployed, like: 100000.0000 HP, so amount is 12.0000
the precision of amount must be the same as when the token deployed, like: 100000.0000 HP, so amount is 12.0000
// note : the precision of amount must be the same as when the token deployed like : 100000 . 0000 HP so amount is 12 . 0000
func (n *nodeEOS) pushTransaction(contract, from, to, memo, symbol string, isMain bool, amount, fee string) (string, error) {
	api := n.api
	api.WalletUnlock("default", n.coin.Password)
	defer func() {
		api.WalletLock("default")
	}()
	quantity, err := eos.NewAsset(amount + " " + symbol)
	if err != nil {
		return "", err
	}
	action := eostoken.NewTransferCommon(eos.AN(contract), eos.AN(from), eos.AN(to), quantity, memo)
	pushed, err := api.SignPushActions(action)
	utils.Logger.Info("pushed action:%v, error:%v", pushed, err)
	if err != nil {
		return "", err
	}
	return pushed.TransactionID, nil
}
func ( n * nodeEOS ) pushTransaction ( contract , from , to , memo , symbol string , isMain bool , amount , fee string ) ( string , error ) { api := n . api api . WalletUnlock ( " " , n . coin . Password ) defer func ( ) { api . WalletLock ( " " ) } ( ) quantity , err := eos . NewAsset ( amount + " " + symbol ) if err != nil { return " " , err } action := eostoken . NewTransferCommon ( eos . AN ( contract ) , eos . AN ( from ) , eos . AN ( to ) , quantity , memo ) pushed , err := api . SignPushActions ( action ) utils . Logger . Info ( " " , pushed , err ) if err != nil { return " " , err } return pushed . TransactionID , nil }
the precision of amount must be the same as when the token deployed, like: 100000.0000 HP, so amount is 12.0000
the precision of amount must be the same as when the token deployed like : 100000 . 0000 HP so amount is 12 . 0000