NatSpec, URL register storage retrieval
fixed 2/3 tests
This commit is contained in:
@ -1,9 +1,5 @@
|
||||
package xeth
|
||||
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
)
|
||||
|
||||
// Frontend should be implemented by users of XEth. Its methods are
|
||||
// called whenever XEth makes a decision that requires user input.
|
||||
type Frontend interface {
|
||||
@ -21,12 +17,12 @@ type Frontend interface {
|
||||
//
|
||||
// ConfirmTransaction is not used for Call transactions
|
||||
// because they cannot change any state.
|
||||
ConfirmTransaction(tx *types.Transaction) bool
|
||||
ConfirmTransaction(tx string) bool
|
||||
}
|
||||
|
||||
// dummyFrontend is a non-interactive frontend that allows all
|
||||
// transactions but cannot not unlock any keys.
|
||||
type dummyFrontend struct{}
|
||||
|
||||
func (dummyFrontend) UnlockAccount([]byte) bool { return false }
|
||||
func (dummyFrontend) ConfirmTransaction(*types.Transaction) bool { return true }
|
||||
func (dummyFrontend) UnlockAccount([]byte) bool { return false }
|
||||
func (dummyFrontend) ConfirmTransaction(string) bool { return true }
|
||||
|
@ -608,6 +608,12 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st
|
||||
return common.ToHex(res), err
|
||||
}
|
||||
|
||||
func (self *XEth) ConfirmTransaction(tx string) bool {
|
||||
|
||||
return self.frontend.ConfirmTransaction(tx)
|
||||
|
||||
}
|
||||
|
||||
func (self *XEth) Transact(fromStr, toStr, valueStr, gasStr, gasPriceStr, codeStr string) (string, error) {
|
||||
var (
|
||||
from = common.HexToAddress(fromStr)
|
||||
|
Reference in New Issue
Block a user