Example #1
0
func deployFinalize(do *definitions.Do, tx interface{}, wait bool) (string, error) {
	var result string

	res, err := core.SignAndBroadcast(do.ChainID, do.Chain, do.Signer, tx.(types.Tx), true, true, wait)
	if err != nil {
		logger.Errorf("ERROR =>\n")
		return "", err
	}

	if err := util.ReadTxSignAndBroadcast(res, err); err != nil {
		logger.Errorf("ERROR =>\n")
		return "", err
	}

	result = fmt.Sprintf("%X", res.Address)
	return result, nil
}
Example #2
0
func txFinalize(do *definitions.Do, tx interface{}, wait bool) (string, error) {
	var result string

	erisNodeClient := client.NewErisNodeClient(do.Chain)
	erisKeyClient := keys.NewErisKeyClient(do.Signer)
	res, err := core.SignAndBroadcast(do.ChainID, erisNodeClient, erisKeyClient, tx.(txs.Tx), true, true, wait)
	if err != nil {
		return util.MintChainErrorHandler(do, err)
	}

	if err := util.ReadTxSignAndBroadcast(res, err); err != nil {
		log.Error("ERROR =>")
		return "", err
	}

	result = fmt.Sprintf("%X", res.Hash)
	return result, nil
}