Merge branch 'master' into nvolf
This commit is contained in:
commit
f99151bf47
@ -67,6 +67,24 @@ impl Transaction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a new message-call transaction.
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub fn new_call(to: Address, value: U256, data: Bytes, gas: U256, gas_price: U256, nonce: U256) -> Transaction {
|
||||||
|
Transaction {
|
||||||
|
nonce: nonce,
|
||||||
|
gas_price: gas_price,
|
||||||
|
gas: gas,
|
||||||
|
action: Action::Call(to),
|
||||||
|
value: value,
|
||||||
|
data: data,
|
||||||
|
v: 0,
|
||||||
|
r: x!(0),
|
||||||
|
s: x!(0),
|
||||||
|
hash: RefCell::new(None),
|
||||||
|
sender: RefCell::new(None),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Create a new contract-creation transaction.
|
/// Create a new contract-creation transaction.
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub fn new_create(value: U256, data: Bytes, gas: U256, gas_price: U256, nonce: U256) -> Transaction {
|
pub fn new_create(value: U256, data: Bytes, gas: U256, gas_price: U256, nonce: U256) -> Transaction {
|
||||||
|
@ -463,4 +463,4 @@ function run_installer()
|
|||||||
finish
|
finish
|
||||||
}
|
}
|
||||||
|
|
||||||
run_installer
|
run_installer
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
description = "Ethcore jsonrpc"
|
description = "Ethcore jsonrpc"
|
||||||
name = "ethcore-rpc"
|
name = "ethcore-rpc"
|
||||||
version = "0.1.0"
|
version = "0.9.0"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
authors = ["Ethcore <admin@ethcore.io"]
|
authors = ["Ethcore <admin@ethcore.io"]
|
||||||
|
|
||||||
@ -17,4 +17,5 @@ ethcore-util = { path = "../util" }
|
|||||||
ethcore = { path = "../ethcore" }
|
ethcore = { path = "../ethcore" }
|
||||||
ethsync = { path = "../sync" }
|
ethsync = { path = "../sync" }
|
||||||
clippy = "0.0.37"
|
clippy = "0.0.37"
|
||||||
|
target_info = "0.1.0"
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#![plugin(serde_macros)]
|
#![plugin(serde_macros)]
|
||||||
#![plugin(clippy)]
|
#![plugin(clippy)]
|
||||||
|
|
||||||
|
extern crate target_info;
|
||||||
extern crate serde;
|
extern crate serde;
|
||||||
extern crate serde_json;
|
extern crate serde_json;
|
||||||
extern crate jsonrpc_core;
|
extern crate jsonrpc_core;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//! Web3 rpc implementation.
|
//! Web3 rpc implementation.
|
||||||
|
use target_info::Target;
|
||||||
use jsonrpc_core::*;
|
use jsonrpc_core::*;
|
||||||
use v1::traits::Web3;
|
use v1::traits::Web3;
|
||||||
|
|
||||||
@ -13,8 +14,7 @@ impl Web3Client {
|
|||||||
impl Web3 for Web3Client {
|
impl Web3 for Web3Client {
|
||||||
fn client_version(&self, params: Params) -> Result<Value, Error> {
|
fn client_version(&self, params: Params) -> Result<Value, Error> {
|
||||||
match params {
|
match params {
|
||||||
//Params::None => Ok(Value::String("parity/0.1.0/-/rust1.7-nightly".to_owned())),
|
Params::None => Ok(Value::String(format!("Parity/{}/{}-{}-{}", env!("CARGO_PKG_VERSION"), Target::arch(), Target::env(), Target::os()))),
|
||||||
Params::None => Ok(Value::String("surprise/0.1.0/surprise/surprise".to_owned())),
|
|
||||||
_ => Err(Error::invalid_params())
|
_ => Err(Error::invalid_params())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user