diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-06 15:53:00 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-06 15:53:00 +0800 |
commit | da50c751480da32036f41ccbeb1f292694ca0286 (patch) | |
tree | d83eb84c684d0c86d4fcdc20b8acb525b8f923de /ethpub | |
parent | 4edf7cfb0543555921a79f572c749615c4997ea7 (diff) | |
download | dexon-da50c751480da32036f41ccbeb1f292694ca0286.tar dexon-da50c751480da32036f41ccbeb1f292694ca0286.tar.gz dexon-da50c751480da32036f41ccbeb1f292694ca0286.tar.bz2 dexon-da50c751480da32036f41ccbeb1f292694ca0286.tar.lz dexon-da50c751480da32036f41ccbeb1f292694ca0286.tar.xz dexon-da50c751480da32036f41ccbeb1f292694ca0286.tar.zst dexon-da50c751480da32036f41ccbeb1f292694ca0286.zip |
Added state dump method
Diffstat (limited to 'ethpub')
-rw-r--r-- | ethpub/pub.go | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/ethpub/pub.go b/ethpub/pub.go index 7cc7cf6ce..f971313d8 100644 --- a/ethpub/pub.go +++ b/ethpub/pub.go @@ -3,14 +3,15 @@ package ethpub import ( "bytes" "encoding/json" + "math/big" + "strings" + "sync/atomic" + "github.com/ethereum/eth-go/ethchain" "github.com/ethereum/eth-go/ethcrypto" "github.com/ethereum/eth-go/ethlog" "github.com/ethereum/eth-go/ethstate" "github.com/ethereum/eth-go/ethutil" - "math/big" - "strings" - "sync/atomic" ) var logger = ethlog.NewLogger("PUB") @@ -165,14 +166,6 @@ func (lib *PEthereum) SecretToAddress(key string) string { return ethutil.Bytes2Hex(pair.Address()) } -func (lib *PEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr string) (*PReceipt, error) { - return lib.createTx(key, recipient, valueStr, gasStr, gasPriceStr, dataStr) -} - -func (lib *PEthereum) Create(key, valueStr, gasStr, gasPriceStr, script string) (*PReceipt, error) { - return lib.createTx(key, "", valueStr, gasStr, gasPriceStr, script) -} - func FindAddressInNameReg(stateManager *ethchain.StateManager, name string) []byte { nameReg := EthereumConfig(stateManager).NameReg() if nameReg != nil { @@ -199,6 +192,14 @@ func FindNameInNameReg(stateManager *ethchain.StateManager, addr []byte) string return "" } +func (lib *PEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr string) (*PReceipt, error) { + return lib.createTx(key, recipient, valueStr, gasStr, gasPriceStr, dataStr) +} + +func (lib *PEthereum) Create(key, valueStr, gasStr, gasPriceStr, script string) (*PReceipt, error) { + return lib.createTx(key, "", valueStr, gasStr, gasPriceStr, script) +} + func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, scriptStr string) (*PReceipt, error) { var hash []byte var contractCreation bool |