예제 #1
0
파일: js.go 프로젝트: este-xx/go-expanse
func (self *jsre) ConfirmTransaction(tx string) bool {
	if self.expanse.NatSpec {
		notice := natspec.GetNotice(self.xeth, tx, self.ds)
		fmt.Println(notice)
		answer, _ := self.Prompt("Confirm Transaction [y/n]")
		return strings.HasPrefix(strings.Trim(answer, " "), "y")
	} else {
		return true
	}
}
예제 #2
0
파일: eth.go 프로젝트: 5mil/go-expanse
func (self *ethApi) GetNatSpec(req *shared.Request) (interface{}, error) {
	args := new(NewTxArgs)
	if err := self.codec.Decode(req.Params, &args); err != nil {
		return nil, shared.NewDecodeParamError(err.Error())
	}

	var jsontx = fmt.Sprintf(`{"params":[{"to":"%s","data": "%s"}]}`, args.To, args.Data)
	notice := natspec.GetNotice(self.xeth, jsontx, self.expanse.HTTPClient())

	return notice, nil
}
예제 #3
0
func (self *testjethre) ConfirmTransaction(tx string) bool {
	if self.expanse.NatSpec {
		self.lastConfirm = natspec.GetNotice(self.xeth, tx, self.ds)
	}
	return true
}