Crate tidyups.
- Move Updater into its own crate. - Change ethcore -> parity in authors, homepages and licenses.
This commit is contained in:
parent
e09b1faf20
commit
10b0898bdf
42
Cargo.lock
generated
42
Cargo.lock
generated
@ -8,11 +8,9 @@ dependencies = [
|
|||||||
"daemonize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"daemonize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"docopt 0.6.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
"docopt 0.6.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"ethcore 1.5.0",
|
"ethcore 1.5.0",
|
||||||
"ethcore-dapps 1.5.0",
|
"ethcore-dapps 1.5.0",
|
||||||
"ethcore-devtools 1.5.0",
|
"ethcore-devtools 1.5.0",
|
||||||
"ethcore-hash-fetch 1.5.0",
|
|
||||||
"ethcore-io 1.5.0",
|
"ethcore-io 1.5.0",
|
||||||
"ethcore-ipc 1.5.0",
|
"ethcore-ipc 1.5.0",
|
||||||
"ethcore-ipc-codegen 1.5.0",
|
"ethcore-ipc-codegen 1.5.0",
|
||||||
@ -33,6 +31,8 @@ dependencies = [
|
|||||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num_cpus 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num_cpus 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"number_prefix 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"number_prefix 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"parity-hash-fetch 1.5.0",
|
||||||
|
"parity-updater 1.5.0",
|
||||||
"regex 0.1.68 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 0.1.68 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rlp 0.1.0",
|
"rlp 0.1.0",
|
||||||
"rpassword 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rpassword 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -347,7 +347,6 @@ dependencies = [
|
|||||||
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethcore-devtools 1.5.0",
|
"ethcore-devtools 1.5.0",
|
||||||
"ethcore-hash-fetch 1.5.0",
|
|
||||||
"ethcore-rpc 1.5.0",
|
"ethcore-rpc 1.5.0",
|
||||||
"ethcore-util 1.5.0",
|
"ethcore-util 1.5.0",
|
||||||
"fetch 0.1.0",
|
"fetch 0.1.0",
|
||||||
@ -359,6 +358,7 @@ dependencies = [
|
|||||||
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"parity-hash-fetch 1.5.0",
|
||||||
"parity-ui 1.5.0",
|
"parity-ui 1.5.0",
|
||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -378,18 +378,6 @@ dependencies = [
|
|||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ethcore-hash-fetch"
|
|
||||||
version = "1.5.0"
|
|
||||||
dependencies = [
|
|
||||||
"ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"ethcore-util 1.5.0",
|
|
||||||
"fetch 0.1.0",
|
|
||||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ethcore-io"
|
name = "ethcore-io"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
@ -774,6 +762,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
name = "https-fetch"
|
name = "https-fetch"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"mio 0.5.1 (git+https://github.com/ethcore/mio?branch=v0.5.x)",
|
"mio 0.5.1 (git+https://github.com/ethcore/mio?branch=v0.5.x)",
|
||||||
"rustls 0.1.2 (git+https://github.com/ctz/rustls)",
|
"rustls 0.1.2 (git+https://github.com/ctz/rustls)",
|
||||||
@ -1274,6 +1263,18 @@ dependencies = [
|
|||||||
"syntex_syntax 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"syntex_syntax 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parity-hash-fetch"
|
||||||
|
version = "1.5.0"
|
||||||
|
dependencies = [
|
||||||
|
"ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ethcore-util 1.5.0",
|
||||||
|
"fetch 0.1.0",
|
||||||
|
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parity-ui"
|
name = "parity-ui"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
@ -1298,6 +1299,17 @@ dependencies = [
|
|||||||
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parity-updater"
|
||||||
|
version = "1.5.0"
|
||||||
|
dependencies = [
|
||||||
|
"ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ethcore 1.5.0",
|
||||||
|
"ethcore-util 1.5.0",
|
||||||
|
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"parity-hash-fetch 1.5.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot"
|
name = "parking_lot"
|
||||||
version = "0.2.8"
|
version = "0.2.8"
|
||||||
|
16
Cargo.toml
16
Cargo.toml
@ -1,9 +1,9 @@
|
|||||||
[package]
|
[package]
|
||||||
description = "Ethcore client."
|
description = "Parity Ethereum client"
|
||||||
name = "parity"
|
name = "parity"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
authors = ["Ethcore <admin@ethcore.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
@ -31,24 +31,24 @@ serde_json = "0.8.0"
|
|||||||
hyper = { version = "0.9", default-features = false }
|
hyper = { version = "0.9", default-features = false }
|
||||||
ctrlc = { git = "https://github.com/ethcore/rust-ctrlc.git" }
|
ctrlc = { git = "https://github.com/ethcore/rust-ctrlc.git" }
|
||||||
fdlimit = "0.1"
|
fdlimit = "0.1"
|
||||||
|
clippy = { version = "0.0.103", optional = true}
|
||||||
|
rlp = { path = "util/rlp" }
|
||||||
|
ethsync = { path = "sync" }
|
||||||
ethcore = { path = "ethcore" }
|
ethcore = { path = "ethcore" }
|
||||||
ethcore-util = { path = "util" }
|
ethcore-util = { path = "util" }
|
||||||
ethsync = { path = "sync" }
|
|
||||||
ethcore-io = { path = "util/io" }
|
ethcore-io = { path = "util/io" }
|
||||||
ethcore-devtools = { path = "devtools" }
|
ethcore-devtools = { path = "devtools" }
|
||||||
ethcore-rpc = { path = "rpc" }
|
ethcore-rpc = { path = "rpc" }
|
||||||
ethcore-signer = { path = "signer" }
|
ethcore-signer = { path = "signer" }
|
||||||
ethcore-ipc-nano = { path = "ipc/nano" }
|
|
||||||
ethcore-ipc = { path = "ipc/rpc" }
|
ethcore-ipc = { path = "ipc/rpc" }
|
||||||
|
ethcore-ipc-nano = { path = "ipc/nano" }
|
||||||
ethcore-ipc-hypervisor = { path = "ipc/hypervisor" }
|
ethcore-ipc-hypervisor = { path = "ipc/hypervisor" }
|
||||||
ethcore-logger = { path = "logger" }
|
ethcore-logger = { path = "logger" }
|
||||||
ethcore-hash-fetch = { path = "ethcore/hash-fetch" }
|
|
||||||
rlp = { path = "util/rlp" }
|
|
||||||
ethcore-stratum = { path = "stratum" }
|
ethcore-stratum = { path = "stratum" }
|
||||||
ethcore-dapps = { path = "dapps", optional = true }
|
ethcore-dapps = { path = "dapps", optional = true }
|
||||||
clippy = { version = "0.0.103", optional = true}
|
|
||||||
ethcore-light = { path = "ethcore/light" }
|
ethcore-light = { path = "ethcore/light" }
|
||||||
ethabi = "0.2.2"
|
parity-hash-fetch = { path = "hash-fetch" }
|
||||||
|
parity-updater = { path = "updater" }
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
winapi = "0.2"
|
winapi = "0.2"
|
||||||
|
2
build.rs
2
build.rs
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -3,7 +3,7 @@ description = "Parity Dapps crate"
|
|||||||
name = "ethcore-dapps"
|
name = "ethcore-dapps"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
authors = ["Ethcore <admin@ethcore.io"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@ -30,9 +30,9 @@ zip = { version = "0.1", default-features = false }
|
|||||||
ethcore-devtools = { path = "../devtools" }
|
ethcore-devtools = { path = "../devtools" }
|
||||||
ethcore-rpc = { path = "../rpc" }
|
ethcore-rpc = { path = "../rpc" }
|
||||||
ethcore-util = { path = "../util" }
|
ethcore-util = { path = "../util" }
|
||||||
ethcore-hash-fetch = { path = "../ethcore/hash-fetch" }
|
|
||||||
fetch = { path = "../util/fetch" }
|
fetch = { path = "../util/fetch" }
|
||||||
parity-ui = { path = "./ui" }
|
parity-ui = { path = "./ui" }
|
||||||
|
parity-hash-fetch = { path = "../hash-fetch" }
|
||||||
|
|
||||||
clippy = { version = "0.0.103", optional = true}
|
clippy = { version = "0.0.103", optional = true}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -3,7 +3,7 @@ description = "Base Package for all Parity built-in dapps"
|
|||||||
name = "parity-dapps-glue"
|
name = "parity-dapps-glue"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
authors = ["Ethcore <admin@ethcore.io"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
@ -57,7 +57,7 @@ extern crate mime_guess;
|
|||||||
extern crate rustc_serialize;
|
extern crate rustc_serialize;
|
||||||
extern crate ethcore_rpc;
|
extern crate ethcore_rpc;
|
||||||
extern crate ethcore_util as util;
|
extern crate ethcore_util as util;
|
||||||
extern crate ethcore_hash_fetch as hash_fetch;
|
extern crate parity_hash_fetch as hash_fetch;
|
||||||
extern crate linked_hash_map;
|
extern crate linked_hash_map;
|
||||||
extern crate fetch;
|
extern crate fetch;
|
||||||
extern crate parity_dapps_glue as parity_dapps;
|
extern crate parity_dapps_glue as parity_dapps;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
description = "Ethcore Parity UI"
|
description = "Ethcore Parity UI"
|
||||||
homepage = "http://ethcore.io"
|
homepage = "http://parity.io"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
name = "parity-ui"
|
name = "parity-ui"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
authors = ["Ethcore <admin@ethcore.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
rustc_version = "0.1"
|
rustc_version = "0.1"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
description = "Ethcore Database"
|
description = "Ethcore Database"
|
||||||
homepage = "http://ethcore.io"
|
homepage = "http://parity.io"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
name = "ethcore-db"
|
name = "ethcore-db"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
authors = ["Ethcore <admin@ethcore.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
description = "Ethcore development/test/build tools"
|
description = "Ethcore development/test/build tools"
|
||||||
homepage = "http://ethcore.io"
|
homepage = "http://parity.io"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
name = "ethcore-devtools"
|
name = "ethcore-devtools"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
authors = ["Ethcore <admin@ethcore.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ethash"
|
name = "ethash"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
authors = ["arkpar <arkadiy@ethcore.io"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
description = "Ethcore library"
|
description = "Ethcore library"
|
||||||
homepage = "http://ethcore.io"
|
homepage = "http://parity.io"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
name = "ethcore"
|
name = "ethcore"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
authors = ["Ethcore <admin@ethcore.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
[package]
|
|
||||||
description = "Fetching hash-addressed content."
|
|
||||||
homepage = "https://ethcore.io"
|
|
||||||
license = "GPL-3.0"
|
|
||||||
name = "ethcore-hash-fetch"
|
|
||||||
version = "1.5.0"
|
|
||||||
authors = ["Ethcore <admin@ethcore.io>"]
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
log = "0.3"
|
|
||||||
rustc-serialize = "0.3"
|
|
||||||
ethabi = "0.2.2"
|
|
||||||
mime_guess = "1.6.1"
|
|
||||||
fetch = { path = "../../util/fetch" }
|
|
||||||
ethcore-util = { path = "../../util" }
|
|
@ -1,21 +0,0 @@
|
|||||||
[
|
|
||||||
{"constant":false,"inputs":[{"name":"_new","type":"address"}],"name":"setOwner","outputs":[],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"confirmReverse","outputs":[{"name":"success","type":"bool"}],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserve","outputs":[{"name":"success","type":"bool"}],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"bytes32"}],"name":"set","outputs":[{"name":"success","type":"bool"}],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"drop","outputs":[{"name":"success","type":"bool"}],"type":"function"},
|
|
||||||
{"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getAddress","outputs":[{"name":"","type":"address"}],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"setFee","outputs":[],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_to","type":"address"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"type":"function"},
|
|
||||||
{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},
|
|
||||||
{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserved","outputs":[{"name":"reserved","type":"bool"}],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[],"name":"drain","outputs":[],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_who","type":"address"}],"name":"proposeReverse","outputs":[{"name":"success","type":"bool"}],"type":"function"},
|
|
||||||
{"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getUint","outputs":[{"name":"","type":"uint256"}],"type":"function"},
|
|
||||||
{"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"get","outputs":[{"name":"","type":"bytes32"}],"type":"function"},
|
|
||||||
{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint256"}],"type":"function"},
|
|
||||||
{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"reverse","outputs":[{"name":"","type":"string"}],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"uint256"}],"name":"setUint","outputs":[{"name":"success","type":"bool"}],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[],"name":"removeReverse","outputs":[],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"address"}],"name":"setAddress","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Drained","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"}],"name":"Reserved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"oldOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"}],"name":"Dropped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"key","type":"string"}],"name":"DataChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"current","type":"address"}],"name":"NewOwner","type":"event"}
|
|
||||||
]
|
|
@ -1,6 +0,0 @@
|
|||||||
[
|
|
||||||
{"constant":false,"inputs":[{"name":"_content","type":"bytes32"},{"name":"_url","type":"string"}],"name":"hintURL","outputs":[],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_content","type":"bytes32"},{"name":"_accountSlashRepo","type":"string"},{"name":"_commit","type":"bytes20"}],"name":"hint","outputs":[],"type":"function"},
|
|
||||||
{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"entries","outputs":[{"name":"accountSlashRepo","type":"string"},{"name":"commit","type":"bytes20"},{"name":"owner","type":"address"}],"type":"function"},
|
|
||||||
{"constant":false,"inputs":[{"name":"_content","type":"bytes32"}],"name":"unhint","outputs":[],"type":"function"}
|
|
||||||
]
|
|
@ -1,119 +0,0 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
|
||||||
// This file is part of Parity.
|
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
//! Hash-addressed content resolver & fetcher.
|
|
||||||
|
|
||||||
use std::{io, fs};
|
|
||||||
use std::sync::Arc;
|
|
||||||
use std::path::PathBuf;
|
|
||||||
|
|
||||||
use util::{Mutex, H256, sha3};
|
|
||||||
use fetch::{Fetch, FetchError, Client as FetchClient};
|
|
||||||
|
|
||||||
use urlhint::{ContractClient, URLHintContract, URLHint, URLHintResult};
|
|
||||||
|
|
||||||
/// API for fetching by hash.
|
|
||||||
pub trait HashFetch: Send + Sync + 'static {
|
|
||||||
/// Fetch hash-addressed content.
|
|
||||||
/// Parameters:
|
|
||||||
/// 1. `hash` - content hash
|
|
||||||
/// 2. `on_done` - callback function invoked when the content is ready (or there was error during fetch)
|
|
||||||
///
|
|
||||||
/// This function may fail immediately when fetch cannot be initialized or content cannot be resolved.
|
|
||||||
fn fetch(&self, hash: H256, on_done: Box<Fn(Result<PathBuf, Error>) + Send>) -> Result<(), Error>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Hash-fetching error.
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub enum Error {
|
|
||||||
/// Hash could not be resolved to a valid content address.
|
|
||||||
NoResolution,
|
|
||||||
/// Downloaded content hash does not match.
|
|
||||||
HashMismatch {
|
|
||||||
/// Expected hash
|
|
||||||
expected: H256,
|
|
||||||
/// Computed hash
|
|
||||||
got: H256,
|
|
||||||
},
|
|
||||||
/// IO Error while validating hash.
|
|
||||||
IO(io::Error),
|
|
||||||
/// Error during fetch.
|
|
||||||
Fetch(FetchError),
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<FetchError> for Error {
|
|
||||||
fn from(error: FetchError) -> Self {
|
|
||||||
Error::Fetch(error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<io::Error> for Error {
|
|
||||||
fn from(error: io::Error) -> Self {
|
|
||||||
Error::IO(error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Default Hash-fetching client using on-chain contract to resolve hashes to URLs.
|
|
||||||
pub struct Client {
|
|
||||||
contract: URLHintContract,
|
|
||||||
fetch: Mutex<FetchClient>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Client {
|
|
||||||
/// Creates new instance of the `Client` given on-chain contract client.
|
|
||||||
pub fn new(contract: Arc<ContractClient>) -> Self {
|
|
||||||
Client {
|
|
||||||
contract: URLHintContract::new(contract),
|
|
||||||
fetch: Mutex::new(FetchClient::default()),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl HashFetch for Client {
|
|
||||||
fn fetch(&self, hash: H256, on_done: Box<Fn(Result<PathBuf, Error>) + Send>) -> Result<(), Error> {
|
|
||||||
debug!(target: "fetch", "Fetching: {:?}", hash);
|
|
||||||
|
|
||||||
let url = try!(
|
|
||||||
self.contract.resolve(hash.to_vec()).map(|content| match content {
|
|
||||||
URLHintResult::Dapp(dapp) => {
|
|
||||||
dapp.url()
|
|
||||||
},
|
|
||||||
URLHintResult::Content(content) => {
|
|
||||||
content.url
|
|
||||||
},
|
|
||||||
}).ok_or_else(|| Error::NoResolution)
|
|
||||||
);
|
|
||||||
|
|
||||||
debug!(target: "fetch", "Resolved {:?} to {:?}. Fetching...", hash, url);
|
|
||||||
|
|
||||||
self.fetch.lock().request_async(&url, Default::default(), Box::new(move |result| {
|
|
||||||
fn validate_hash(hash: H256, result: Result<PathBuf, FetchError>) -> Result<PathBuf, Error> {
|
|
||||||
let path = try!(result);
|
|
||||||
let mut file_reader = io::BufReader::new(try!(fs::File::open(&path)));
|
|
||||||
let content_hash = try!(sha3(&mut file_reader));
|
|
||||||
|
|
||||||
if content_hash != hash {
|
|
||||||
Err(Error::HashMismatch{ got: content_hash, expected: hash })
|
|
||||||
} else {
|
|
||||||
Ok(path)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
debug!(target: "fetch", "Content fetched, validating hash ({:?})", hash);
|
|
||||||
on_done(validate_hash(hash, result))
|
|
||||||
})).map_err(Into::into)
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
|
||||||
// This file is part of Parity.
|
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
//! Hash-addressed content resolver & fetcher.
|
|
||||||
|
|
||||||
#![warn(missing_docs)]
|
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate log;
|
|
||||||
extern crate rustc_serialize;
|
|
||||||
extern crate mime_guess;
|
|
||||||
extern crate ethabi;
|
|
||||||
extern crate ethcore_util as util;
|
|
||||||
extern crate fetch;
|
|
||||||
|
|
||||||
mod client;
|
|
||||||
|
|
||||||
pub mod urlhint;
|
|
||||||
|
|
||||||
pub use client::{HashFetch, Client, Error};
|
|
@ -1,409 +0,0 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
|
||||||
// This file is part of Parity.
|
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
//! URLHint Contract
|
|
||||||
|
|
||||||
use std::fmt;
|
|
||||||
use std::sync::Arc;
|
|
||||||
use rustc_serialize::hex::ToHex;
|
|
||||||
use mime_guess;
|
|
||||||
|
|
||||||
use ethabi::{Interface, Contract, Token};
|
|
||||||
use util::{Address, Bytes, Hashable};
|
|
||||||
|
|
||||||
const COMMIT_LEN: usize = 20;
|
|
||||||
|
|
||||||
/// RAW Contract interface.
|
|
||||||
/// Should execute transaction using current blockchain state.
|
|
||||||
pub trait ContractClient: Send + Sync {
|
|
||||||
/// Get registrar address
|
|
||||||
fn registrar(&self) -> Result<Address, String>;
|
|
||||||
/// Call Contract
|
|
||||||
fn call(&self, address: Address, data: Bytes) -> Result<Bytes, String>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Github-hosted dapp.
|
|
||||||
#[derive(Debug, PartialEq)]
|
|
||||||
pub struct GithubApp {
|
|
||||||
/// Github Account
|
|
||||||
pub account: String,
|
|
||||||
/// Github Repository
|
|
||||||
pub repo: String,
|
|
||||||
/// Commit on Github
|
|
||||||
pub commit: [u8;COMMIT_LEN],
|
|
||||||
/// Dapp owner address
|
|
||||||
pub owner: Address,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl GithubApp {
|
|
||||||
/// Returns URL of this Github-hosted dapp package.
|
|
||||||
pub fn url(&self) -> String {
|
|
||||||
// Since https fetcher doesn't support redirections we use direct link
|
|
||||||
// format!("https://github.com/{}/{}/archive/{}.zip", self.account, self.repo, self.commit.to_hex())
|
|
||||||
format!("https://codeload.github.com/{}/{}/zip/{}", self.account, self.repo, self.commit.to_hex())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn commit(bytes: &[u8]) -> Option<[u8;COMMIT_LEN]> {
|
|
||||||
if bytes.len() < COMMIT_LEN {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut commit = [0; COMMIT_LEN];
|
|
||||||
for i in 0..COMMIT_LEN {
|
|
||||||
commit[i] = bytes[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
Some(commit)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Hash-Addressed Content
|
|
||||||
#[derive(Debug, PartialEq)]
|
|
||||||
pub struct Content {
|
|
||||||
/// URL of the content
|
|
||||||
pub url: String,
|
|
||||||
/// MIME type of the content
|
|
||||||
pub mime: String,
|
|
||||||
/// Content owner address
|
|
||||||
pub owner: Address,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Result of resolving id to URL
|
|
||||||
#[derive(Debug, PartialEq)]
|
|
||||||
pub enum URLHintResult {
|
|
||||||
/// Dapp
|
|
||||||
Dapp(GithubApp),
|
|
||||||
/// Content
|
|
||||||
Content(Content),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// URLHint Contract interface
|
|
||||||
pub trait URLHint {
|
|
||||||
/// Resolves given id to registrar entry.
|
|
||||||
fn resolve(&self, id: Bytes) -> Option<URLHintResult>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// `URLHintContract` API
|
|
||||||
pub struct URLHintContract {
|
|
||||||
urlhint: Contract,
|
|
||||||
registrar: Contract,
|
|
||||||
client: Arc<ContractClient>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl URLHintContract {
|
|
||||||
/// Creates new `URLHintContract`
|
|
||||||
pub fn new(client: Arc<ContractClient>) -> Self {
|
|
||||||
let urlhint = Interface::load(include_bytes!("../res/urlhint.json")).expect("urlhint.json is valid ABI");
|
|
||||||
let registrar = Interface::load(include_bytes!("../res/registrar.json")).expect("registrar.json is valid ABI");
|
|
||||||
|
|
||||||
URLHintContract {
|
|
||||||
urlhint: Contract::new(urlhint),
|
|
||||||
registrar: Contract::new(registrar),
|
|
||||||
client: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn urlhint_address(&self) -> Option<Address> {
|
|
||||||
let res = || {
|
|
||||||
let get_address = try!(self.registrar.function("getAddress".into()).map_err(as_string));
|
|
||||||
let params = try!(get_address.encode_call(
|
|
||||||
vec![Token::FixedBytes((*"githubhint".sha3()).to_vec()), Token::String("A".into())]
|
|
||||||
).map_err(as_string));
|
|
||||||
let output = try!(self.client.call(try!(self.client.registrar()), params));
|
|
||||||
let result = try!(get_address.decode_output(output).map_err(as_string));
|
|
||||||
|
|
||||||
match result.get(0) {
|
|
||||||
Some(&Token::Address(address)) if address != *Address::default() => Ok(address.into()),
|
|
||||||
Some(&Token::Address(_)) => Err(format!("Contract not found.")),
|
|
||||||
e => Err(format!("Invalid result: {:?}", e)),
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
match res() {
|
|
||||||
Ok(res) => Some(res),
|
|
||||||
Err(e) => {
|
|
||||||
warn!(target: "dapps", "Error while calling registrar: {:?}", e);
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn encode_urlhint_call(&self, id: Bytes) -> Option<Bytes> {
|
|
||||||
let call = self.urlhint
|
|
||||||
.function("entries".into())
|
|
||||||
.and_then(|f| f.encode_call(vec![Token::FixedBytes(id)]));
|
|
||||||
|
|
||||||
match call {
|
|
||||||
Ok(res) => {
|
|
||||||
Some(res)
|
|
||||||
},
|
|
||||||
Err(e) => {
|
|
||||||
warn!(target: "dapps", "Error while encoding urlhint call: {:?}", e);
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn decode_urlhint_output(&self, output: Bytes) -> Option<URLHintResult> {
|
|
||||||
trace!(target: "dapps", "Output: {:?}", output.to_hex());
|
|
||||||
let output = self.urlhint
|
|
||||||
.function("entries".into())
|
|
||||||
.and_then(|f| f.decode_output(output));
|
|
||||||
|
|
||||||
if let Ok(vec) = output {
|
|
||||||
if vec.len() != 3 {
|
|
||||||
warn!(target: "dapps", "Invalid contract output: {:?}", vec);
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut it = vec.into_iter();
|
|
||||||
let account_slash_repo = it.next().expect("element 0 of 3-len vector known to exist; qed");
|
|
||||||
let commit = it.next().expect("element 1 of 3-len vector known to exist; qed");
|
|
||||||
let owner = it.next().expect("element 2 of 3-len vector known to exist qed");
|
|
||||||
|
|
||||||
match (account_slash_repo, commit, owner) {
|
|
||||||
(Token::String(account_slash_repo), Token::FixedBytes(commit), Token::Address(owner)) => {
|
|
||||||
let owner = owner.into();
|
|
||||||
if owner == Address::default() {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
let commit = GithubApp::commit(&commit);
|
|
||||||
if commit == Some(Default::default()) {
|
|
||||||
let mime = guess_mime_type(&account_slash_repo).unwrap_or("application/octet-stream".into());
|
|
||||||
return Some(URLHintResult::Content(Content {
|
|
||||||
url: account_slash_repo,
|
|
||||||
mime: mime,
|
|
||||||
owner: owner,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
let (account, repo) = {
|
|
||||||
let mut it = account_slash_repo.split('/');
|
|
||||||
match (it.next(), it.next()) {
|
|
||||||
(Some(account), Some(repo)) => (account.into(), repo.into()),
|
|
||||||
_ => return None,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
commit.map(|commit| URLHintResult::Dapp(GithubApp {
|
|
||||||
account: account,
|
|
||||||
repo: repo,
|
|
||||||
commit: commit,
|
|
||||||
owner: owner,
|
|
||||||
}))
|
|
||||||
},
|
|
||||||
e => {
|
|
||||||
warn!(target: "dapps", "Invalid contract output parameters: {:?}", e);
|
|
||||||
None
|
|
||||||
},
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
warn!(target: "dapps", "Invalid contract output: {:?}", output);
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl URLHint for URLHintContract {
|
|
||||||
fn resolve(&self, id: Bytes) -> Option<URLHintResult> {
|
|
||||||
self.urlhint_address().and_then(|address| {
|
|
||||||
// Prepare contract call
|
|
||||||
self.encode_urlhint_call(id)
|
|
||||||
.and_then(|data| {
|
|
||||||
let call = self.client.call(address, data);
|
|
||||||
if let Err(ref e) = call {
|
|
||||||
warn!(target: "dapps", "Error while calling urlhint: {:?}", e);
|
|
||||||
}
|
|
||||||
call.ok()
|
|
||||||
})
|
|
||||||
.and_then(|output| self.decode_urlhint_output(output))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn guess_mime_type(url: &str) -> Option<String> {
|
|
||||||
const CONTENT_TYPE: &'static str = "content-type=";
|
|
||||||
|
|
||||||
let mut it = url.split('#');
|
|
||||||
// skip url
|
|
||||||
let url = it.next();
|
|
||||||
// get meta headers
|
|
||||||
let metas = it.next();
|
|
||||||
if let Some(metas) = metas {
|
|
||||||
for meta in metas.split('&') {
|
|
||||||
let meta = meta.to_lowercase();
|
|
||||||
if meta.starts_with(CONTENT_TYPE) {
|
|
||||||
return Some(meta[CONTENT_TYPE.len()..].to_owned());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
url.and_then(|url| {
|
|
||||||
url.split('.').last()
|
|
||||||
}).and_then(|extension| {
|
|
||||||
mime_guess::get_mime_type_str(extension).map(Into::into)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
fn as_string<T: fmt::Debug>(e: T) -> String {
|
|
||||||
format!("{:?}", e)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use std::sync::Arc;
|
|
||||||
use std::str::FromStr;
|
|
||||||
use rustc_serialize::hex::FromHex;
|
|
||||||
|
|
||||||
use super::*;
|
|
||||||
use super::guess_mime_type;
|
|
||||||
use util::{Bytes, Address, Mutex, ToPretty};
|
|
||||||
|
|
||||||
struct FakeRegistrar {
|
|
||||||
pub calls: Arc<Mutex<Vec<(String, String)>>>,
|
|
||||||
pub responses: Mutex<Vec<Result<Bytes, String>>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2";
|
|
||||||
const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000";
|
|
||||||
|
|
||||||
impl FakeRegistrar {
|
|
||||||
fn new() -> Self {
|
|
||||||
FakeRegistrar {
|
|
||||||
calls: Arc::new(Mutex::new(Vec::new())),
|
|
||||||
responses: Mutex::new(
|
|
||||||
vec![
|
|
||||||
Ok(format!("000000000000000000000000{}", URLHINT).from_hex().unwrap()),
|
|
||||||
Ok(Vec::new())
|
|
||||||
]
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ContractClient for FakeRegistrar {
|
|
||||||
|
|
||||||
fn registrar(&self) -> Result<Address, String> {
|
|
||||||
Ok(REGISTRAR.parse().unwrap())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn call(&self, address: Address, data: Bytes) -> Result<Bytes, String> {
|
|
||||||
self.calls.lock().push((address.to_hex(), data.to_hex()));
|
|
||||||
self.responses.lock().remove(0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn should_call_registrar_and_urlhint_contracts() {
|
|
||||||
// given
|
|
||||||
let registrar = FakeRegistrar::new();
|
|
||||||
let calls = registrar.calls.clone();
|
|
||||||
let urlhint = URLHintContract::new(Arc::new(registrar));
|
|
||||||
|
|
||||||
// when
|
|
||||||
let res = urlhint.resolve("test".bytes().collect());
|
|
||||||
let calls = calls.lock();
|
|
||||||
let call0 = calls.get(0).expect("Registrar resolve called");
|
|
||||||
let call1 = calls.get(1).expect("URLHint Resolve called");
|
|
||||||
|
|
||||||
// then
|
|
||||||
assert!(res.is_none());
|
|
||||||
assert_eq!(call0.0, REGISTRAR);
|
|
||||||
assert_eq!(call0.1,
|
|
||||||
"6795dbcd058740ee9a5a3fb9f1cfa10752baec87e09cc45cd7027fd54708271aca300c75000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000014100000000000000000000000000000000000000000000000000000000000000".to_owned()
|
|
||||||
);
|
|
||||||
assert_eq!(call1.0, URLHINT);
|
|
||||||
assert_eq!(call1.1,
|
|
||||||
"267b69227465737400000000000000000000000000000000000000000000000000000000".to_owned()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn should_decode_urlhint_output() {
|
|
||||||
// given
|
|
||||||
let mut registrar = FakeRegistrar::new();
|
|
||||||
registrar.responses = Mutex::new(vec![
|
|
||||||
Ok(format!("000000000000000000000000{}", URLHINT).from_hex().unwrap()),
|
|
||||||
Ok("0000000000000000000000000000000000000000000000000000000000000060ec4c1fe06c808fe3739858c347109b1f5f1ed4b5000000000000000000000000000000000000000000000000deadcafebeefbeefcafedeaddeedfeedffffffff0000000000000000000000000000000000000000000000000000000000000011657468636f72652f64616f2e636c61696d000000000000000000000000000000".from_hex().unwrap()),
|
|
||||||
]);
|
|
||||||
let urlhint = URLHintContract::new(Arc::new(registrar));
|
|
||||||
|
|
||||||
// when
|
|
||||||
let res = urlhint.resolve("test".bytes().collect());
|
|
||||||
|
|
||||||
// then
|
|
||||||
assert_eq!(res, Some(URLHintResult::Dapp(GithubApp {
|
|
||||||
account: "ethcore".into(),
|
|
||||||
repo: "dao.claim".into(),
|
|
||||||
commit: GithubApp::commit(&"ec4c1fe06c808fe3739858c347109b1f5f1ed4b5".from_hex().unwrap()).unwrap(),
|
|
||||||
owner: Address::from_str("deadcafebeefbeefcafedeaddeedfeedffffffff").unwrap(),
|
|
||||||
})))
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn should_decode_urlhint_content_output() {
|
|
||||||
// given
|
|
||||||
let mut registrar = FakeRegistrar::new();
|
|
||||||
registrar.responses = Mutex::new(vec![
|
|
||||||
Ok(format!("000000000000000000000000{}", URLHINT).from_hex().unwrap()),
|
|
||||||
Ok("00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000deadcafebeefbeefcafedeaddeedfeedffffffff000000000000000000000000000000000000000000000000000000000000003d68747470733a2f2f657468636f72652e696f2f6173736574732f696d616765732f657468636f72652d626c61636b2d686f72697a6f6e74616c2e706e67000000".from_hex().unwrap()),
|
|
||||||
]);
|
|
||||||
let urlhint = URLHintContract::new(Arc::new(registrar));
|
|
||||||
|
|
||||||
// when
|
|
||||||
let res = urlhint.resolve("test".bytes().collect());
|
|
||||||
|
|
||||||
// then
|
|
||||||
assert_eq!(res, Some(URLHintResult::Content(Content {
|
|
||||||
url: "https://ethcore.io/assets/images/ethcore-black-horizontal.png".into(),
|
|
||||||
mime: "image/png".into(),
|
|
||||||
owner: Address::from_str("deadcafebeefbeefcafedeaddeedfeedffffffff").unwrap(),
|
|
||||||
})))
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn should_return_valid_url() {
|
|
||||||
// given
|
|
||||||
let app = GithubApp {
|
|
||||||
account: "test".into(),
|
|
||||||
repo: "xyz".into(),
|
|
||||||
commit: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
|
|
||||||
owner: Address::default(),
|
|
||||||
};
|
|
||||||
|
|
||||||
// when
|
|
||||||
let url = app.url();
|
|
||||||
|
|
||||||
// then
|
|
||||||
assert_eq!(url, "https://codeload.github.com/test/xyz/zip/000102030405060708090a0b0c0d0e0f10111213".to_owned());
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn should_guess_mime_type_from_url() {
|
|
||||||
let url1 = "https://ethcore.io/parity";
|
|
||||||
let url2 = "https://ethcore.io/parity#content-type=image/png";
|
|
||||||
let url3 = "https://ethcore.io/parity#something&content-type=image/png";
|
|
||||||
let url4 = "https://ethcore.io/parity.png#content-type=image/jpeg";
|
|
||||||
let url5 = "https://ethcore.io/parity.png";
|
|
||||||
|
|
||||||
|
|
||||||
assert_eq!(guess_mime_type(url1), None);
|
|
||||||
assert_eq!(guess_mime_type(url2), Some("image/png".into()));
|
|
||||||
assert_eq!(guess_mime_type(url3), Some("image/png".into()));
|
|
||||||
assert_eq!(guess_mime_type(url4), Some("image/jpeg".into()));
|
|
||||||
assert_eq!(guess_mime_type(url5), Some("image/png".into()));
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,7 +4,7 @@ homepage = "https://ethcore.io"
|
|||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
name = "ethcore-light"
|
name = "ethcore-light"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
authors = ["Ethcore <admin@ethcore.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user