|
|
@ -47,6 +47,18 @@ func (lib *PEthereum) GetStateObject(address string) *PStateObject { |
|
|
|
return NewPStateObject(nil) |
|
|
|
return NewPStateObject(nil) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (lib *PEthereum) GetStorage(address, storageAddress string) string { |
|
|
|
|
|
|
|
return lib.GetStateObject(address).GetStorage(storageAddress) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (lib *PEthereum) GetTxCount(address string) int { |
|
|
|
|
|
|
|
return lib.GetStateObject(address).Nonce() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (lib *PEthereum) IsContract(address string) bool { |
|
|
|
|
|
|
|
return lib.GetStateObject(address).IsContract() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (lib *PEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr string) (*PReceipt, error) { |
|
|
|
func (lib *PEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr string) (*PReceipt, error) { |
|
|
|
return lib.createTx(key, recipient, valueStr, gasStr, gasPriceStr, dataStr, "") |
|
|
|
return lib.createTx(key, recipient, valueStr, gasStr, gasPriceStr, dataStr, "") |
|
|
|
} |
|
|
|
} |
|
|
|