Implement eth_sendRawTransaction (#101)

* Implement sendRawTransaction (tx not being broadcasted to node from server)

* Add broadcast type flag to rpc API and fixed amount validation

* Add documentation
This commit is contained in:
Austin Abell
2019-09-18 16:14:39 -04:00
committed by GitHub
parent 69567e29d5
commit 2ca42cc155
3 changed files with 31 additions and 5 deletions
+2 -1
View File
@@ -131,7 +131,8 @@ func (msg EthereumTxMsg) ValidateBasic() sdk.Error {
return types.ErrInvalidValue(fmt.Sprintf("Price must be positive: %x", msg.Data.Price))
}
if msg.Data.Amount.Sign() != 1 {
// Amount can be 0
if msg.Data.Amount.Sign() == -1 {
return types.ErrInvalidValue(fmt.Sprintf("amount must be positive: %x", msg.Data.Amount))
}