Merge remote-tracking branch 'parity/master' into auth-round-no-mocknet

This commit is contained in:
keorn 2016-11-02 13:01:31 +00:00
commit 03c9760de2
242 changed files with 3270 additions and 3967 deletions

View File

@ -1,11 +1,11 @@
stages:
- build
- test
variables:
GIT_DEPTH: "3"
SIMPLECOV: "true"
RUST_BACKTRACE: "1"
RUSTFLAGS: ""
CARGOFLAGS: ""
cache:
key: "$CI_BUILD_NAME/$CI_BUILD_REF_NAME"
untracked: true
@ -18,7 +18,7 @@ linux-stable:
- tags
- stable
script:
- cargo build --release --verbose
- cargo build --release $CARGOFLAGS
- strip target/release/parity
- md5sum target/release/parity >> parity.md5
- sh scripts/deb-build.sh amd64
@ -48,7 +48,7 @@ linux-stable-14.04:
- tags
- stable
script:
- cargo build --release --verbose
- cargo build --release $CARGOFLAGS
- strip target/release/parity
- md5sum target/release/parity >> parity.md5
- sh scripts/deb-build.sh amd64
@ -78,7 +78,7 @@ linux-beta:
- tags
- stable
script:
- cargo build --release --verbose
- cargo build --release $CARGOFLAGS
- strip target/release/parity
tags:
- rust
@ -97,7 +97,7 @@ linux-nightly:
- tags
- stable
script:
- cargo build --release --verbose
- cargo build --release $CARGOFLAGS
- strip target/release/parity
tags:
- rust
@ -118,7 +118,7 @@ linux-centos:
script:
- export CXX="g++"
- export CC="gcc"
- cargo build --release --verbose
- cargo build --release $CARGOFLAGS
- strip target/release/parity
- md5sum target/release/parity >> parity.md5
- aws configure set aws_access_key_id $s3_key
@ -150,7 +150,7 @@ linux-armv7:
- echo "[target.armv7-unknown-linux-gnueabihf]" >> .cargo/config
- echo "linker= \"arm-linux-gnueabihf-gcc\"" >> .cargo/config
- cat .cargo/config
- cargo build --target armv7-unknown-linux-gnueabihf --release --verbose
- cargo build --target armv7-unknown-linux-gnueabihf --release $CARGOFLAGS
- arm-linux-gnueabihf-strip target/armv7-unknown-linux-gnueabihf/release/parity
- md5sum target/armv7-unknown-linux-gnueabihf/release/parity >> parity.md5
- sh scripts/deb-build.sh armhf
@ -190,7 +190,7 @@ linux-arm:
- echo "[target.arm-unknown-linux-gnueabihf]" >> .cargo/config
- echo "linker= \"arm-linux-gnueabihf-gcc\"" >> .cargo/config
- cat .cargo/config
- cargo build --target arm-unknown-linux-gnueabihf --release --verbose
- cargo build --target arm-unknown-linux-gnueabihf --release $CARGOFLAGS
- arm-linux-gnueabihf-strip target/arm-unknown-linux-gnueabihf/release/parity
- md5sum target/arm-unknown-linux-gnueabihf/release/parity >> parity.md5
- sh scripts/deb-build.sh armhf
@ -229,7 +229,7 @@ linux-armv6:
- echo "[target.arm-unknown-linux-gnueabi]" >> .cargo/config
- echo "linker= \"arm-linux-gnueabi-gcc\"" >> .cargo/config
- cat .cargo/config
- cargo build --target arm-unknown-linux-gnueabi --release --verbose
- cargo build --target arm-unknown-linux-gnueabi --release $CARGOFLAGS
- arm-linux-gnueabi-strip target/arm-unknown-linux-gnueabi/release/parity
- md5sum target/arm-unknown-linux-gnueabi/release/parity >> parity.md5
- aws configure set aws_access_key_id $s3_key
@ -262,7 +262,7 @@ linux-aarch64:
- echo "[target.aarch64-unknown-linux-gnu]" >> .cargo/config
- echo "linker= \"aarch64-linux-gnu-gcc\"" >> .cargo/config
- cat .cargo/config
- cargo build --target aarch64-unknown-linux-gnu --release --verbose
- cargo build --target aarch64-unknown-linux-gnu --release $CARGOFLAGS
- aarch64-linux-gnu-strip target/aarch64-unknown-linux-gnu/release/parity
- md5sum target/aarch64-unknown-linux-gnu/release/parity >> parity.md5
- sh scripts/deb-build.sh arm64
@ -292,7 +292,7 @@ darwin:
- tags
- stable
script:
- cargo build --release --verbose
- cargo build --release $CARGOFLAGS
- rm -rf parity.md5
- md5sum target/release/parity >> parity.md5
- aws configure set aws_access_key_id $s3_key
@ -318,7 +318,7 @@ windows:
- set RUST_BACKTRACE=1
- set RUSTFLAGS=%RUSTFLAGS% -Zorbit=off
- rustup default stable-x86_64-pc-windows-msvc
- cargo build --release --verbose
- cargo build --release %CARGOFLAGS%
- curl -sL --url "https://github.com/ethcore/win-build/raw/master/SimpleFC.dll" -o nsis\SimpleFC.dll
- curl -sL --url "https://github.com/ethcore/win-build/raw/master/vc_redist.x64.exe" -o nsis\vc_redist.x64.exe
- signtool sign /f %keyfile% /p %certpass% target\release\parity.exe
@ -353,39 +353,34 @@ windows:
- target/release/parity.pdb
- nsis/InstallParity.exe
name: "x86_64-pc-windows-msvc_parity"
#test-darwin:
# stage: build
# before_script:
# - git submodule update --init --recursive
# script:
# - export RUST_BACKTRACE=1
# - ./test.sh $CARGOFLAGS --no-release
# tags:
# - osx
#test-windows:
# stage: build
# before_script:
# - git submodule update --init --recursive
# script:
# - set RUST_BACKTRACE=1
# - cargo test --features json-tests -p rlp -p ethash -p ethcore -p ethcore-bigint -p ethcore-dapps -p ethcore-rpc -p ethcore-signer -p ethcore-util -p ethcore-network -p ethcore-io -p ethkey -p ethstore -p ethsync -p ethcore-ipc -p ethcore-ipc-tests -p ethcore-ipc-nano -p parity %CARGOFLAGS% --verbose --release
# tags:
# - rust-windows
# allow_failure: true
test-linux:
stage: test
stage: build
before_script:
- git submodule update --init --recursive
script:
- export RUST_BACKTRACE=1
- ./test.sh --verbose
- ./test.sh $CARGOFLAGS --no-release
tags:
- rust-test
dependencies:
- linux-stable
test-darwin:
stage: test
before_script:
- git submodule update --init --recursive
script:
- export RUST_BACKTRACE=1
- ./test.sh --verbose
tags:
- osx
dependencies:
- darwin
test-windows:
stage: test
before_script:
- git submodule update --init --recursive
script:
- set RUST_BACKTRACE=1
- PowerShell ./test.sh --verbose
tags:
- rust-windows
dependencies:
- windows
js-release:
stage: build
image: ethcore/javascript:latest
@ -399,7 +394,7 @@ js-release:
tags:
- javascript
js-lint:
stage: test
stage: build
image: ethcore/javascript:latest
before_script:
- ./js/scripts/install-deps.sh
@ -408,7 +403,7 @@ js-lint:
tags:
- javascript-test
js-test:
stage: test
stage: build
image: ethcore/javascript:latest
before_script:
- ./js/scripts/install-deps.sh
@ -417,7 +412,7 @@ js-test:
tags:
- javascript-test
js-pack:
stage: test
stage: build
image: ethcore/javascript:latest
before_script:
- ./js/scripts/install-deps.sh

View File

@ -32,6 +32,7 @@ env:
- RUN_DOCS="false"
- TEST_OPTIONS=""
- RUSTFLAGS="-D warnings"
- TRAVIS_NODE_VERSION="6"
# GH_TOKEN for documentation
- secure: bumJASbZSU8bxJ0EyPUJmu16AiV9EXOpyOj86Jlq/Ty9CfwGqsSXt96uDyE+OUJf34RUFQMsw0nk37/zC4lcn6kqk2wpuH3N/o85Zo/cVZY/NusBWLQqtT5VbYWsV+u2Ua4Tmmsw8yVYQhYwU2ZOejNpflL+Cs9XGgORp1L+/gMRMC2y5Se6ZhwnKPQlRJ8LGsG1dzjQULxzADIt3/zuspNBS8a2urJwlHfGMkvHDoUWCviP/GXoSqw3TZR7FmKyxE19I8n9+iSvm9+oZZquvcgfUxMHn8Gq/b44UbPvjtFOg2yam4xdWXF/RyWCHdc/R9EHorSABeCbefIsm+zcUF3/YQxwpSxM4IZEeH2rTiC7dcrsKw3XsO16xFQz5YI5Bay+CT/wTdMmJd7DdYz7Dyf+pOvcM9WOf/zorxYWSBOMYy0uzbusU2iyIghQ82s7E/Ahg+WARtPgkuTLSB5aL1oCTBKHqQscMr7lo5Ti6RpWLxEdTQMBznc+bMr+6dEtkEcG9zqc6cE9XX+ox3wTU6+HVMfQ1ltCntJ4UKcw3A6INEbw9wgocQa812CIASQ2fE+SCAbz6JxBjIAlFUnD1lUB7S8PdMPwn9plfQgKQ2A5YZqg6FnBdf0rQXIJYxQWKHXj/rBHSUCT0tHACDlzTA+EwWggvkP5AGIxRxm8jhw=
- KCOV_CMD="./kcov-master/tmp/usr/local/bin/kcov"
@ -41,6 +42,7 @@ cache:
directories:
- $TRAVIS_BUILD_DIR/target
- $TRAVIS_BUILD_DIR/kcov-master
- $TRAVIS_BUILD_DIR/js/node_modules
- $HOME/.cargo
addons:
@ -64,9 +66,14 @@ install:
make && make install DESTDIR=../tmp &&
cd
)
- nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION && ./js/scripts/install-deps.sh
script:
- if [ "$RUN_TESTS" = "true" ]; then ./test.sh $TEST_OPTIONS --verbose; fi
- if [ "$RUN_TESTS" = "true" ]; then
./js/scripts/lint.sh &&
./js/scripts/test.sh &&
./test.sh $TEST_OPTIONS --verbose;
fi
- if [ "$RUN_COVERAGE" = "true" ]; then ./scripts/cov.sh "$KCOV_CMD"; fi
after_success: |

2
Cargo.lock generated
View File

@ -1235,7 +1235,7 @@ dependencies = [
[[package]]
name = "parity-ui-precompiled"
version = "1.4.0"
source = "git+https://github.com/ethcore/js-precompiled.git#eec3d41e6fd1a10e4d69470a9e8c2a7b1b464466"
source = "git+https://github.com/ethcore/js-precompiled.git#8e8432d2986c29e9ff4c338cb4d2a11bc9c3c557"
dependencies = [
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

View File

@ -1,6 +1,8 @@
# [Parity](https://ethcore.io/parity.html)
### Fast, light, and robust Ethereum implementation
[![Join the chat at https://gitter.im/ethcore/parity.js](https://badges.gitter.im/ethcore/parity.js.svg)](https://gitter.im/ethcore/parity.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Join the chat at https://gitter.im/ethcore/parity][gitter-image]][gitter-url] [![GPLv3][license-image]][license-url]
[Internal Documentation][doc-url]

View File

@ -105,8 +105,12 @@ impl<A: Authorization + 'static> server::Handler<HttpStream> for Router<A> {
trace!(target: "dapps", "Resolving to fetchable content.");
self.fetch.to_async_handler(path.clone(), control)
},
// NOTE [todr] /home is redirected to home page since some users may have the redirection cached
// (in the past we used 301 instead of 302)
// It should be safe to remove it in (near) future.
//
// 404 for non-existent content
(Some(_), _) if *req.method() == hyper::method::Method::Get => {
(Some(ref path), _) if *req.method() == hyper::Method::Get && path.app_id != "home" => {
trace!(target: "dapps", "Resolving to 404.");
Box::new(ContentHandler::error(
StatusCode::NotFound,
@ -116,7 +120,7 @@ impl<A: Authorization + 'static> server::Handler<HttpStream> for Router<A> {
))
},
// Redirect any other GET request to signer.
_ if *req.method() == hyper::method::Method::Get => {
_ if *req.method() == hyper::Method::Get => {
if let Some(port) = self.signer_port {
trace!(target: "dapps", "Redirecting to signer interface.");
Redirection::boxed(&format!("http://{}", signer_address(port)))

View File

@ -56,6 +56,26 @@ fn should_redirect_to_home_when_trailing_slash_is_missing() {
assert_eq!(response.headers.get(0).unwrap(), "Location: http://127.0.0.1:18180");
}
#[test]
fn should_redirect_to_home_for_users_with_cached_redirection() {
// given
let server = serve();
// when
let response = request(server,
"\
GET /home/ HTTP/1.1\r\n\
Host: 127.0.0.1:8080\r\n\
Connection: close\r\n\
\r\n\
"
);
// then
assert_eq!(response.status, "HTTP/1.1 302 Found".to_owned());
assert_eq!(response.headers.get(0).unwrap(), "Location: http://127.0.0.1:18180");
}
#[test]
fn should_display_404_on_invalid_dapp() {
// given

View File

@ -36,7 +36,7 @@ enum Unlock {
/// Use with caution.
Perm,
/// Account unlocked with a timeout
Timed((Instant, u32)),
Timed(Instant),
}
/// Data associated with account.
@ -308,8 +308,8 @@ impl AccountProvider {
if let Unlock::Temp = data.unlock {
unlocked.remove(account).expect("data exists: so key must exist: qed");
}
if let Unlock::Timed((ref start, ref duration)) = data.unlock {
if start.elapsed() > Duration::from_millis(*duration as u64) {
if let Unlock::Timed(ref end) = data.unlock {
if Instant::now() > *end {
unlocked.remove(account).expect("data exists: so key must exist: qed");
return Err(Error::NotUnlocked);
}
@ -329,7 +329,7 @@ impl AccountProvider {
/// Unlocks account temporarily with a timeout.
pub fn unlock_account_timed(&self, account: Address, password: String, duration_ms: u32) -> Result<(), Error> {
self.unlock_account(account, password, Unlock::Timed((Instant::now(), duration_ms)))
self.unlock_account(account, password, Unlock::Timed(Instant::now() + Duration::from_millis(duration_ms as u64)))
}
/// Checks if given account is unlocked
@ -363,11 +363,11 @@ impl AccountProvider {
#[cfg(test)]
mod tests {
use super::{AccountProvider, AddressBook};
use super::{AccountProvider, AddressBook, Unlock};
use std::collections::HashMap;
use std::time::Instant;
use ethjson::misc::AccountMeta;
use ethstore::ethkey::{Generator, Random};
use std::time::Duration;
use devtools::RandomTempPath;
#[test]
@ -411,10 +411,10 @@ mod tests {
let kp = Random.generate().unwrap();
let ap = AccountProvider::transient_provider();
assert!(ap.insert_account(kp.secret().clone(), "test").is_ok());
assert!(ap.unlock_account_timed(kp.address(), "test1".into(), 2000).is_err());
assert!(ap.unlock_account_timed(kp.address(), "test".into(), 2000).is_ok());
assert!(ap.unlock_account_timed(kp.address(), "test1".into(), 60000).is_err());
assert!(ap.unlock_account_timed(kp.address(), "test".into(), 60000).is_ok());
assert!(ap.sign(kp.address(), None, Default::default()).is_ok());
::std::thread::sleep(Duration::from_millis(2000));
ap.unlocked.lock().get_mut(&kp.address()).unwrap().unlock = Unlock::Timed(Instant::now());
assert!(ap.sign(kp.address(), None, Default::default()).is_err());
}
}

View File

@ -45,6 +45,7 @@ use block::*;
use transaction::{LocalizedTransaction, SignedTransaction, Action};
use blockchain::extras::TransactionAddress;
use types::filter::Filter;
use types::mode::Mode as IpcMode;
use log_entry::LocalizedLogEntry;
use verification::queue::BlockQueue;
use blockchain::{BlockChain, BlockProvider, TreeRoute, ImportRoute};
@ -123,7 +124,7 @@ impl SleepState {
/// Blockchain database client backed by a persistent database. Owns and manages a blockchain and a block queue.
/// Call `import_block()` to import a block asynchronously; `flush_queue()` flushes the queue.
pub struct Client {
mode: Mode,
mode: Mutex<Mode>,
chain: RwLock<Arc<BlockChain>>,
tracedb: RwLock<TraceDB<BlockChain>>,
engine: Arc<Engine>,
@ -221,7 +222,7 @@ impl Client {
let client = Client {
sleep_state: Mutex::new(SleepState::new(awake)),
liveness: AtomicBool::new(awake),
mode: config.mode.clone(),
mode: Mutex::new(config.mode.clone()),
chain: RwLock::new(chain),
tracedb: tracedb,
engine: engine,
@ -620,7 +621,8 @@ impl Client {
self.block_queue.collect_garbage();
self.tracedb.read().collect_garbage();
match self.mode {
let mode = self.mode.lock().clone();
match mode {
Mode::Dark(timeout) => {
let mut ss = self.sleep_state.lock();
if let Some(t) = ss.last_activity {
@ -772,7 +774,7 @@ impl BlockChainClient for Client {
fn call(&self, t: &SignedTransaction, block: BlockID, analytics: CallAnalytics) -> Result<Executed, CallError> {
let header = try!(self.block_header(block).ok_or(CallError::StatePruned));
let view = HeaderView::new(&header);
let last_hashes = self.build_last_hashes(view.hash());
let last_hashes = self.build_last_hashes(view.parent_hash());
let env_info = EnvInfo {
number: view.number(),
author: view.author(),
@ -844,12 +846,24 @@ impl BlockChainClient for Client {
}
fn keep_alive(&self) {
if self.mode != Mode::Active {
let mode = self.mode.lock().clone();
if mode != Mode::Active {
self.wake_up();
(*self.sleep_state.lock()).last_activity = Some(Instant::now());
}
}
fn mode(&self) -> IpcMode { self.mode.lock().clone().into() }
fn set_mode(&self, mode: IpcMode) {
*self.mode.lock() = mode.clone().into();
match mode {
IpcMode::Active => self.wake_up(),
IpcMode::Off => self.sleep(),
_ => {(*self.sleep_state.lock()).last_activity = Some(Instant::now()); }
}
}
fn best_block_header(&self) -> Bytes {
self.chain.read().best_block_header()
}

View File

@ -76,6 +76,8 @@ pub enum Mode {
/// Goes offline after RLP is inactive for some (given) time and
/// stays inactive.
Dark(Duration),
/// Always off.
Off,
}
impl Default for Mode {

View File

@ -37,6 +37,7 @@ use error::{ImportResult};
use evm::{Factory as EvmFactory, VMType, Schedule};
use miner::{Miner, MinerService, TransactionImportResult};
use spec::Spec;
use types::mode::Mode;
use verification::queue::QueueInfo;
use block::{OpenBlock, SealedBlock};
@ -83,6 +84,10 @@ pub struct TestBlockChainClient {
pub vm_factory: EvmFactory,
/// Timestamp assigned to latest sealed block
pub latest_block_timestamp: RwLock<u64>,
/// Ancient block info.
pub ancient_block: RwLock<Option<(H256, u64)>>,
/// First block info.
pub first_block: RwLock<Option<(H256, u64)>>,
}
#[derive(Clone)]
@ -142,6 +147,8 @@ impl TestBlockChainClient {
spec: spec,
vm_factory: EvmFactory::new(VMType::Interpreter, 1024 * 1024),
latest_block_timestamp: RwLock::new(10_000_000),
ancient_block: RwLock::new(None),
first_block: RwLock::new(None),
};
client.add_blocks(1, EachBlockWith::Nothing); // add genesis block
client.genesis_hash = client.last_hash.read().clone();
@ -603,10 +610,10 @@ impl BlockChainClient for TestBlockChainClient {
genesis_hash: self.genesis_hash.clone(),
best_block_hash: self.last_hash.read().clone(),
best_block_number: self.blocks.read().len() as BlockNumber - 1,
first_block_hash: None,
first_block_number: None,
ancient_block_hash: None,
ancient_block_number: None,
first_block_hash: self.first_block.read().as_ref().map(|x| x.0),
first_block_number: self.first_block.read().as_ref().map(|x| x.1),
ancient_block_hash: self.ancient_block.read().as_ref().map(|x| x.0),
ancient_block_number: self.ancient_block.read().as_ref().map(|x| x.1)
}
}
@ -635,4 +642,8 @@ impl BlockChainClient for TestBlockChainClient {
fn pending_transactions(&self) -> Vec<SignedTransaction> {
self.miner.pending_transactions(self.chain_info().best_block_number)
}
fn mode(&self) -> Mode { Mode::Active }
fn set_mode(&self, _: Mode) { unimplemented!(); }
}

View File

@ -16,6 +16,7 @@
use std::collections::BTreeMap;
use util::{U256, Address, H256, H2048, Bytes, Itertools};
use util::stats::Histogram;
use blockchain::TreeRoute;
use verification::queue::QueueInfo as BlockQueueInfo;
use block::{OpenBlock, SealedBlock};
@ -37,6 +38,7 @@ use block_import_error::BlockImportError;
use ipc::IpcConfig;
use types::blockchain_info::BlockChainInfo;
use types::block_status::BlockStatus;
use types::mode::Mode;
#[ipc(client_ident="RemoteClient")]
/// Blockchain database client. Owns and manages a blockchain and a block queue.
@ -190,8 +192,8 @@ pub trait BlockChainClient : Sync + Send {
/// list all transactions
fn pending_transactions(&self) -> Vec<SignedTransaction>;
/// Get the gas price distribution.
fn gas_price_statistics(&self, sample_size: usize, distribution_size: usize) -> Result<Vec<U256>, ()> {
/// Sorted list of transaction gas prices from at least last sample_size blocks.
fn gas_price_corpus(&self, sample_size: usize) -> Vec<U256> {
let mut h = self.chain_info().best_block_hash;
let mut corpus = Vec::new();
while corpus.is_empty() {
@ -200,26 +202,34 @@ pub trait BlockChainClient : Sync + Send {
let block = BlockView::new(&block_bytes);
let header = block.header_view();
if header.number() == 0 {
if corpus.is_empty() {
corpus.push(20_000_000_000u64.into()); // we have literally no information - it' as good a number as any.
}
break;
return corpus;
}
block.transaction_views().iter().foreach(|t| corpus.push(t.gas_price()));
h = header.parent_hash().clone();
}
}
corpus.sort();
let n = corpus.len();
if n > 0 {
Ok((0..(distribution_size + 1))
.map(|i| corpus[i * (n - 1) / distribution_size])
.collect::<Vec<_>>()
)
} else {
Err(())
}
corpus
}
/// Calculate median gas price from recent blocks if they have any transactions.
fn gas_price_median(&self, sample_size: usize) -> Option<U256> {
let corpus = self.gas_price_corpus(sample_size);
corpus.get(corpus.len()/2).cloned()
}
/// Get the gas price distribution based on recent blocks if they have any transactions.
fn gas_price_histogram(&self, sample_size: usize, bucket_number: usize) -> Option<Histogram> {
let raw_corpus = self.gas_price_corpus(sample_size);
let raw_len = raw_corpus.len();
// Throw out outliers.
let (corpus, _) = raw_corpus.split_at(raw_len-raw_len/40);
Histogram::new(corpus, bucket_number)
}
fn mode(&self) -> Mode;
fn set_mode(&self, mode: Mode);
}
/// Extended client interface used for mining

View File

@ -158,7 +158,7 @@ pub trait MinerService : Send + Sync {
fn is_sealing(&self) -> bool;
/// Suggested gas price.
fn sensible_gas_price(&self) -> U256 { 20000000000u64.into() }
fn sensible_gas_price(&self) -> U256;
/// Suggested gas limit.
fn sensible_gas_limit(&self) -> U256 { 21000.into() }

View File

@ -192,6 +192,8 @@ impl IoHandler<ClientIoMessage> for ClientIoHandler {
#[cfg_attr(feature="dev", allow(single_match))]
fn message(&self, _io: &IoContext<ClientIoMessage>, net_message: &ClientIoMessage) {
use std::thread;
match *net_message {
ClientIoMessage::BlockVerified => { self.client.import_verified_blocks(); }
ClientIoMessage::NewTransactions(ref transactions) => { self.client.import_queued_transactions(transactions); }
@ -203,8 +205,17 @@ impl IoHandler<ClientIoMessage> for ClientIoHandler {
ClientIoMessage::FeedStateChunk(ref hash, ref chunk) => self.snapshot.feed_state_chunk(*hash, chunk),
ClientIoMessage::FeedBlockChunk(ref hash, ref chunk) => self.snapshot.feed_block_chunk(*hash, chunk),
ClientIoMessage::TakeSnapshot(num) => {
if let Err(e) = self.snapshot.take_snapshot(&*self.client, num) {
warn!("Failed to take snapshot at block #{}: {}", num, e);
let client = self.client.clone();
let snapshot = self.snapshot.clone();
let res = thread::Builder::new().name("Periodic Snapshot".into()).spawn(move || {
if let Err(e) = snapshot.take_snapshot(&*client, num) {
warn!("Failed to take snapshot at block #{}: {}", num, e);
}
});
if let Err(e) = res {
debug!(target: "snapshot", "Failed to initialize periodic snapshot thread: {:?}", e);
}
},
ClientIoMessage::UpdateSealing => {

View File

@ -26,6 +26,7 @@ use miner::Miner;
use rlp::{Rlp, View};
use spec::Spec;
use views::BlockView;
use util::stats::Histogram;
#[test]
fn imports_from_empty() {
@ -198,19 +199,37 @@ fn can_collect_garbage() {
assert!(client.blockchain_cache_info().blocks < 100 * 1024);
}
#[test]
#[cfg_attr(feature="dev", allow(useless_vec))]
fn can_generate_gas_price_statistics() {
let client_result = generate_dummy_client_with_data(16, 1, &vec_into![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
fn can_generate_gas_price_median() {
let client_result = generate_dummy_client_with_data(3, 1, &vec_into![1, 2, 3]);
let client = client_result.reference();
let s = client.gas_price_statistics(8, 8).unwrap();
assert_eq!(s, vec_into![8, 8, 9, 10, 11, 12, 13, 14, 15]);
let s = client.gas_price_statistics(16, 8).unwrap();
assert_eq!(s, vec_into![0, 1, 3, 5, 7, 9, 11, 13, 15]);
let s = client.gas_price_statistics(32, 8).unwrap();
assert_eq!(s, vec_into![0, 1, 3, 5, 7, 9, 11, 13, 15]);
assert_eq!(Some(U256::from(2)), client.gas_price_median(3));
let client_result = generate_dummy_client_with_data(4, 1, &vec_into![1, 4, 3, 2]);
let client = client_result.reference();
assert_eq!(Some(U256::from(3)), client.gas_price_median(4));
}
#[test]
fn can_generate_gas_price_histogram() {
let client_result = generate_dummy_client_with_data(20, 1, &vec_into![6354,8593,6065,4842,7845,7002,689,4958,4250,6098,5804,4320,643,8895,2296,8589,7145,2000,2512,1408]);
let client = client_result.reference();
let hist = client.gas_price_histogram(20, 5).unwrap();
let correct_hist = Histogram { bucket_bounds: vec_into![643,2293,3943,5593,7243,8893], counts: vec![4,2,4,6,3] };
assert_eq!(hist, correct_hist);
}
#[test]
fn empty_gas_price_histogram() {
let client_result = generate_dummy_client_with_data(20, 0, &vec_into![]);
let client = client_result.reference();
assert!(client.gas_price_histogram(20, 5).is_none());
}
#[test]
fn can_handle_long_fork() {
let client_result = generate_dummy_client(1200);

View File

@ -33,3 +33,4 @@ pub mod transaction_import;
pub mod block_import_error;
pub mod restoration_status;
pub mod snapshot_manifest;
pub mod mode;

55
ethcore/src/types/mode.rs Normal file
View File

@ -0,0 +1,55 @@
// 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/>.
//! Mode type
pub use std::time::Duration;
use client::Mode as ClientMode;
/// IPC-capable shadow-type for client::config::Mode
#[derive(Clone, Binary)]
pub enum Mode {
/// Same as ClientMode::Off.
Off,
/// Same as ClientMode::Dark; values in seconds.
Dark(u64),
/// Same as ClientMode::Passive; values in seconds.
Passive(u64, u64),
/// Same as ClientMode::Active.
Active,
}
impl From<ClientMode> for Mode {
fn from(mode: ClientMode) -> Self {
match mode {
ClientMode::Off => Mode::Off,
ClientMode::Dark(timeout) => Mode::Dark(timeout.as_secs()),
ClientMode::Passive(timeout, alarm) => Mode::Passive(timeout.as_secs(), alarm.as_secs()),
ClientMode::Active => Mode::Active,
}
}
}
impl From<Mode> for ClientMode {
fn from(mode: Mode) -> Self {
match mode {
Mode::Off => ClientMode::Off,
Mode::Dark(timeout) => ClientMode::Dark(Duration::from_secs(timeout)),
Mode::Passive(timeout, alarm) => ClientMode::Passive(Duration::from_secs(timeout), Duration::from_secs(alarm)),
Mode::Active => ClientMode::Active,
}
}
}

View File

@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
use keccak::Keccak256;
use super::{KeyPair, Error, Generator, Secret};
use super::{KeyPair, Error, Generator};
/// Simple brainwallet.
pub struct Brain(String);
@ -38,9 +38,9 @@ impl Generator for Brain {
match i > 16384 {
false => i += 1,
true => {
let result = KeyPair::from_secret(Secret::from(secret.clone()));
if result.is_ok() {
return result
let result = KeyPair::from_secret(secret.clone().into());
if result.as_ref().ok().map_or(false, |r| r.address()[0] == 0) {
return result;
}
},
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -1,157 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Слой_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 83.609 73.184" enable-background="new 0 0 83.609 73.184" xml:space="preserve">
<g id="XMLID_2_">
<path id="XMLID_3_" fill="#213654" d="M44.782,73.184c-3.33,0-6.614-0.446-9.764-1.325l0.443-1.586
c3.004,0.84,6.141,1.265,9.32,1.265c2.181,0,4.902-0.338,7.314-0.791c-1.933-1.169-3.504-3.376-4.303-6.29
c-0.674-2.458-0.595-4.833,0.202-6.665c-2.754,0.904-5.73,1.375-8.768,1.375l-0.524-0.005l0.029-1.646l0.495,0.005
c3.953,0,7.791-0.843,11.107-2.439c0.515-0.302,1.085-0.521,1.702-0.653c0.459-0.099,0.942-0.142,1.381-0.143l-0.016,1.646
c-0.336,0.008-0.679,0.032-1.021,0.105c-0.449,0.096-0.857,0.252-1.224,0.468l0.002,0.005c-0.019,0.01-0.037,0.019-0.056,0.027
c-0.521,0.319-0.956,0.763-1.298,1.325c-0.927,1.523-1.082,3.769-0.426,6.159c0.997,3.64,3.34,5.964,5.905,6.012
c0.085-0.022,0.169-0.046,0.251-0.068l0.018,0.065c0.244-0.011,0.489-0.042,0.735-0.095c1.212-0.258,2.106-0.996,2.66-2.194
l1.494,0.689c-0.772,1.672-2.09,2.748-3.812,3.114c-0.383,0.082-0.764,0.127-1.141,0.136
C52.543,72.447,48.078,73.184,44.782,73.184z M23.554,66.171c-7.101-5.453-11.173-13.35-11.173-21.668
c0-2.19,0.281-4.376,0.835-6.497l1.592,0.416c-0.518,1.985-0.78,4.031-0.78,6.081c0,7.802,3.837,15.224,10.528,20.363
L23.554,66.171z M30.185,65.251c-0.496-3.824,1.038-4.895,2.392-5.841c0.542-0.378,1.054-0.735,1.486-1.276
c0.905-1.134,0.361-1.996-1.427-4.17c-0.342-0.416-0.699-0.852-1.054-1.314c-0.63-0.824-0.858-1.736-0.661-2.639
c0.43-1.96,2.681-3.202,2.936-3.338l0.772,1.454c-0.508,0.271-1.876,1.204-2.101,2.239c-0.092,0.425,0.026,0.845,0.362,1.283
c0.341,0.447,0.688,0.867,1.017,1.269c1.604,1.95,3.261,3.966,1.441,6.243c-0.581,0.728-1.244,1.19-1.829,1.599
c-1.246,0.87-2.069,1.445-1.701,4.28L30.185,65.251z M24.476,60.15c-0.498-3.825,1.037-4.896,2.391-5.842
c0.542-0.378,1.054-0.734,1.485-1.276c0.907-1.135,0.363-1.996-1.424-4.17c-0.342-0.416-0.7-0.852-1.055-1.314
c-0.63-0.824-0.859-1.737-0.661-2.64c0.199-0.909,0.79-1.664,1.393-2.226c-2.809-1.872-2.855-4.946-2.855-4.991h1.646h-0.823
l0.823-0.005c0.001,0.142,0.071,2.605,2.665,3.933c0.039-0.021,0.153,0.075,0.153,0.075c0.897,0.428,2.079,0.721,3.639,0.752
c6.379-0.128,6.453-4.563,6.453-4.755h1.646c0,0.016-0.006,0.413-0.14,1.004c0.722-0.037,1.959-0.263,2.47-0.519
c-0.36-1.032-2.216-4.104-3.907-6.63l0.244-1.153l0.581-0.368c-0.252-1.127-0.806-3.661-1.078-5.328
c-5.859-0.881-10.078-0.201-12.548,2.033c-2.386,2.157-2.244,5.016-2.237,5.136l-1.642,0.121c-0.031-0.38-0.297-0.778-0.617-0.928
c-0.284-0.133-0.617-0.067-0.991,0.195c-0.584,0.413-0.792,0.936-0.655,1.646c0.243,1.262,1.494,2.646,2.471,3.25
c0.137-0.083,0.236-0.137,0.279-0.16l0.215,0.406c0.048,0.017,0.102,0.191,0.102,0.191l0.454,0.856
c-0.182,0.097-0.473,0.278-0.782,0.519c0,0-0.058,0.066-0.077,0.062c-0.535,0.428-1.102,1.023-1.24,1.658
c-0.092,0.426,0.026,0.846,0.361,1.285c0.341,0.446,0.688,0.867,1.018,1.269c1.603,1.949,3.259,3.964,1.441,6.241
c-0.582,0.728-1.245,1.19-1.83,1.6c-1.246,0.87-2.069,1.444-1.7,4.279l-1.633,0.213c-0.498-3.826,1.037-4.896,2.391-5.842
c0.541-0.378,1.053-0.735,1.486-1.277c0.904-1.134,0.36-1.995-1.427-4.168c-0.342-0.416-0.7-0.853-1.055-1.316
c-0.629-0.825-0.857-1.737-0.66-2.64c0.188-0.854,0.722-1.573,1.285-2.123c-1.237-0.933-2.423-2.471-2.716-3.992
c-0.26-1.344,0.21-2.516,1.322-3.301c0.864-0.611,1.802-0.732,2.636-0.344c0.066,0.03,0.129,0.063,0.191,0.1
c0.322-1.246,1.014-2.798,2.479-4.134c2.843-2.591,7.506-3.422,13.866-2.472c2.637-3.356,0.348-5.941-0.428-6.66
c-2.225-2.067-6.116-2.676-8.784-0.119l-1.374-0.424c-0.45-2.123-2.957-3.178-5.154-3.457c-3.329-0.417-7.678,0.653-9.351,4.017
c-2.24,4.505,0.714,6.775,0.744,6.798l-0.536,1.481c-3.291-0.177-5.506,0.357-6.576,1.599c-1.38,1.599-0.814,4.36-0.36,6.58
c0.385,1.881,0.689,3.367-0.074,4.262c-1.182,1.387-2.969,1.769-4.556,0.97c-1.34-0.675-2.081-1.984-1.804-3.185l1.604,0.371
c-0.102,0.444,0.302,1.021,0.941,1.344c0.342,0.171,1.534,0.638,2.563-0.568c0.241-0.283-0.089-1.898-0.287-2.863
c-0.526-2.572-1.181-5.773,0.728-7.985c1.201-1.394,3.201-2.117,6.084-2.196c-0.891-1.452-1.64-3.93,0.056-7.339
c2.031-4.084,7.142-5.418,11.033-4.917c2.924,0.371,5.152,1.69,6.124,3.55c3.286-2.304,7.567-1.477,10.101,0.877
c2.02,1.876,3.364,5.275,0.674,8.79c0.277,1.952,1.246,6.197,1.257,6.242l-0.363,0.879l-0.359,0.228
c4.242,6.423,3.866,7.153,3.661,7.552c-0.375,0.73-1.675,1.153-2.877,1.336c1.418,0.983,2.757,2.646,2.659,5.126
c-0.078,2.006-1.592,3.617-3.057,5.175c-1.937,2.061-3.07,3.405-2.016,5.004l-1.375,0.906c-1.823-2.766,0.31-5.035,2.191-7.037
c1.257-1.338,2.557-2.721,2.611-4.112c0.108-2.769-2.197-3.966-3.157-4.343c-1.015,1.511-2.966,3.008-6.718,3.145v0.011
c-0.096,0-0.189-0.001-0.283-0.003c-0.094,0.002-0.188,0.003-0.283,0.003v-0.011c-1.332-0.048-2.438-0.269-3.354-0.6
c-0.576,0.434-1.244,1.082-1.395,1.778c-0.093,0.425,0.025,0.845,0.361,1.284c0.342,0.447,0.688,0.868,1.018,1.27
c1.603,1.949,3.259,3.965,1.439,6.242c-0.58,0.728-1.244,1.19-1.829,1.599c-1.246,0.87-2.069,1.445-1.7,4.279L24.476,60.15z
M5.457,42.863c-0.305,0-0.621-0.013-0.951-0.037l0.121-1.641c1.847,0.134,3.15-0.171,3.892-0.91
c1.213-1.21,1.039-3.611,0.871-5.934c-0.079-1.104-0.155-2.148-0.09-3.101c0.146-2.149,1.784-4.662,8.723-4.395L17.96,28.49
c-3.1-0.114-6.842,0.284-7.018,2.862c-0.058,0.838,0.014,1.825,0.089,2.871c0.186,2.566,0.396,5.475-1.35,7.217
C8.726,42.395,7.338,42.863,5.457,42.863z M29.865,32.328l-0.621-1.524l5.17-2.109l0.614-0.003l3.086,1.225l-0.607,1.529
l-2.778-1.102L29.865,32.328z M19.314,25.852c-0.91,0-1.826-0.459-2.441-1.283c-0.887-1.187-0.828-2.714,0.149-3.891l1.266,1.051
c-0.704,0.849-0.303,1.579-0.097,1.854c0.336,0.448,0.966,0.778,1.512,0.544c0.96-0.414,1.107-0.628,1.918-1.819
c0.443-0.65,1.051-1.541,2.038-2.816c1.016-1.312,2.184-2.004,3.472-2.055c2.058-0.094,3.574,1.559,3.639,1.63l-1.219,1.107
l0.609-0.554l-0.607,0.556c-0.012-0.011-1.09-1.126-2.367-1.095c-0.775,0.034-1.524,0.512-2.226,1.418
c-0.956,1.235-1.547,2.102-1.979,2.735c-0.868,1.274-1.228,1.802-2.628,2.404C20.019,25.782,19.667,25.852,19.314,25.852z"/>
</g>
<g id="XMLID_11_">
<path id="XMLID_12_" fill="#213654" d="M34.195,32.441c0-0.503,0.463-0.911,1.033-0.911s1.033,0.408,1.033,0.911
c0,0.503-0.463,0.911-1.033,0.911S34.195,32.944,34.195,32.441"/>
</g>
<g id="XMLID_13_">
<path id="XMLID_14_" fill="#213654" d="M69.862,50.537c-0.047,0-0.094,0-0.142-0.002l-1.418-0.026L44.59,50.51v-1.426l25.162,0.027
c0.772-0.012,1.068-0.171,1.119-0.285c0.074-0.167-0.056-0.563-0.394-0.913l-4.377-4.139c-1.043-1.025-2.743-1.046-3.803-0.055
l-3.212,3.01c-1.606,1.506-4.201,1.488-5.788-0.036l-3.071-2.951c-1.033-0.992-2.698-1.08-3.641-0.197l-0.975-1.039
c1.505-1.409,4.017-1.315,5.602,0.209l3.072,2.951c1.05,1.007,2.767,1.019,3.826,0.024l3.212-3.01c0.71-0.666,1.61-1.031,2.53-1.1
l-7.112-7.095l-3.018,2.734c-0.615,0.532-0.96,1.282-0.96,2.07c0,1.504,1.237,2.728,2.759,2.728c1.398,0,2.375-0.81,2.375-1.97
c0.007-0.102,0.052-0.603-0.312-1.005c-0.355-0.393-1.03-0.6-1.949-0.6v-1.426c1.37,0,2.391,0.369,3.031,1.098
c0.771,0.877,0.665,1.908,0.65,2.023c0.006,1.845-1.628,3.305-3.795,3.305c-2.308,0-4.185-1.863-4.185-4.153
c0-1.202,0.525-2.346,1.441-3.138l3.508-3.178l0.981,0.023l9.296,9.272l-0.023,0.024c0.193,0.133,0.377,0.284,0.55,0.453
l4.39,4.151c0.759,0.783,1.023,1.756,0.697,2.499C71.946,49.924,71.358,50.537,69.862,50.537z"/>
</g>
<g id="XMLID_15_">
<path id="XMLID_16_" fill="#213654" d="M58.721,60.635c-0.793-2.043-1.708-3.035-1.717-3.045c-0.073-0.081-1.451-1.592-3.732-1.491
l-0.08-1.645c3.064-0.155,4.947,1.936,5.026,2.024c0.025,0.026,1.116,1.186,2.038,3.561L58.721,60.635z"/>
</g>
<g id="XMLID_17_">
<path id="XMLID_18_" fill="#213654" d="M43.486,21.351c-0.696,0-1.263-0.585-1.263-1.304c0-0.72,0.566-1.305,1.263-1.305
c0.695,0,1.261,0.585,1.261,1.305C44.747,20.766,44.182,21.351,43.486,21.351z"/>
</g>
<g id="XMLID_20_">
<path id="XMLID_21_" fill="#213654" d="M61.776,17.014c-0.33,0-0.596-0.285-0.596-0.636c0-0.353,0.266-0.639,0.596-0.639
c0.327,0,0.594,0.286,0.594,0.639C62.369,16.729,62.103,17.014,61.776,17.014"/>
</g>
<g id="XMLID_22_">
<path id="XMLID_23_" fill="#213654" d="M70.143,25.702c-0.751,0-1.361-0.628-1.361-1.399s0.61-1.399,1.361-1.399
c0.749,0,1.357,0.627,1.357,1.399S70.892,25.702,70.143,25.702z M70.143,24.147c-0.105,0-0.197,0.072-0.197,0.155
c0.001,0.169,0.391,0.173,0.391,0C70.336,24.219,70.247,24.147,70.143,24.147z M61.871,17.871c-0.75,0-1.359-0.627-1.359-1.398
c0-0.773,0.609-1.4,1.359-1.4c0.749,0,1.358,0.628,1.358,1.4C63.23,17.244,62.62,17.871,61.871,17.871z M61.871,16.316
c-0.107,0-0.196,0.071-0.196,0.156c0,0.165,0.392,0.167,0.392,0C62.067,16.388,61.977,16.316,61.871,16.316z"/>
</g>
<g id="XMLID_28_">
<path id="XMLID_29_" fill="#213654" d="M63.998,31.065c-0.328,0-0.596-0.284-0.596-0.638c0-0.351,0.268-0.636,0.596-0.636
c0.328,0,0.594,0.285,0.594,0.636C64.592,30.781,64.326,31.065,63.998,31.065"/>
</g>
<g id="XMLID_30_">
<path id="XMLID_31_" fill="#213654" d="M63.998,31.732c-0.696,0-1.263-0.585-1.263-1.304c0-0.72,0.566-1.305,1.263-1.305
c0.696,0,1.262,0.585,1.262,1.305C65.26,31.147,64.694,31.732,63.998,31.732z M63.998,30.178c-0.159,0-0.293,0.115-0.293,0.251
c0,0.271,0.585,0.272,0.585,0C64.29,30.293,64.156,30.178,63.998,30.178z"/>
</g>
<g id="XMLID_34_">
<path id="XMLID_35_" fill="#213654" d="M59.842,22.463c-0.329,0-0.596-0.284-0.596-0.637c0-0.351,0.267-0.637,0.596-0.637
c0.328,0,0.595,0.285,0.595,0.637C60.437,22.179,60.17,22.463,59.842,22.463"/>
</g>
<g id="XMLID_36_">
<path id="XMLID_37_" fill="#213654" d="M59.842,23.13c-0.696,0-1.263-0.585-1.263-1.304c0-0.719,0.566-1.303,1.263-1.303
s1.262,0.584,1.262,1.303C61.104,22.545,60.538,23.13,59.842,23.13z M59.842,21.575c-0.159,0-0.293,0.115-0.293,0.251
c0,0.273,0.585,0.274,0.585,0C60.134,21.69,60,21.575,59.842,21.575z"/>
</g>
<g id="XMLID_40_">
<path id="XMLID_41_" fill="#213654" d="M49.209,32.226c-0.328,0-0.595-0.286-0.595-0.638c0-0.352,0.267-0.637,0.595-0.637
c0.328,0,0.596,0.285,0.596,0.637C49.805,31.939,49.537,32.226,49.209,32.226"/>
</g>
<g id="XMLID_42_">
<path id="XMLID_43_" fill="#213654" d="M49.209,32.893c-0.696,0-1.262-0.585-1.262-1.305c0-0.72,0.565-1.305,1.262-1.305
s1.263,0.585,1.263,1.305C50.472,32.308,49.905,32.893,49.209,32.893z M49.209,31.338c-0.158,0-0.292,0.114-0.292,0.25
c0,0.271,0.585,0.271,0.585,0C49.502,31.452,49.368,31.338,49.209,31.338z"/>
</g>
<g id="XMLID_46_">
<path id="XMLID_47_" fill="#213654" d="M53.801,27.296c-0.33,0-0.596-0.285-0.596-0.637c0-0.351,0.266-0.636,0.596-0.636
c0.328,0,0.595,0.284,0.595,0.636C54.396,27.011,54.129,27.296,53.801,27.296"/>
</g>
<g id="XMLID_48_">
<path id="XMLID_49_" fill="#213654" d="M53.801,27.963c-0.696,0-1.263-0.585-1.263-1.304c0-0.719,0.566-1.304,1.263-1.304
s1.262,0.585,1.262,1.304C55.063,27.378,54.497,27.963,53.801,27.963z M53.801,26.408c-0.159,0-0.293,0.115-0.293,0.251
c0,0.271,0.585,0.274,0.585,0C54.093,26.523,53.959,26.408,53.801,26.408z"/>
</g>
<g id="XMLID_52_">
<path id="XMLID_53_" fill="#213654" d="M43.29,19.365l10.143-4.444l0.385-0.054l7.977,1.116l-0.094,0.674l0.579-0.619l8.377,7.845
L70,25.095l-8.679-2.136l3.292,7.111l-0.882,0.973l-9.77-3.426l-4.181,4.392l-1.154-0.175l-5.636-11.392l0.489-0.242l0.106-0.159
M45.373,22.042l4.079,8.246l3.212-3.373L45.373,22.042z M55.202,26.542l7.41,2.599l-2.899-6.264L55.202,26.542z M45.083,20.135
l8.64,5.773l5.663-4.602l0.619-0.139l0.486,0.119l0.046-0.021l0.017,0.037l7.14,1.757l-6.091-5.703l-0.005,0.039l-7.777-1.089
L45.083,20.135z"/>
</g>
<g id="XMLID_58_">
<path id="XMLID_59_" fill="#213654" d="M65.19,67.118l-0.801-1.438c3.859-2.15,7.216-4.971,9.976-8.38
c4.899-6.054,7.598-13.684,7.598-21.486c0-18.841-15.324-34.168-34.161-34.168c-5.173,0-10.14,1.125-14.763,3.346l-0.713-1.484
C37.173,1.181,42.379,0,47.801,0c19.744,0,35.808,16.066,35.808,35.815c0,8.178-2.829,16.177-7.965,22.521
C72.751,61.91,69.235,64.865,65.19,67.118z M54.461,66.359L54.1,64.754c13.359-3.012,23.056-15.153,23.056-28.872
c0-16.319-13.274-29.596-29.59-29.596c-5.931,0-11.651,1.747-16.544,5.054L30.1,9.977C35.266,6.485,41.305,4.64,47.566,4.64
c17.224,0,31.236,14.016,31.236,31.242C78.802,50.363,68.566,63.181,54.461,66.359z"/>
</g>
<g id="XMLID_62_">
<polygon id="XMLID_63_" fill="#213654" points="59.634,22.086 53.083,16.162 45.122,11.763 45.812,10.515 53.978,15.05
60.589,21.029 "/>
</g>
<g id="XMLID_64_">
<path id="XMLID_65_" fill="#213654" d="M53.59,16.806c-0.696,0-1.263-0.584-1.263-1.303c0-0.72,0.567-1.305,1.263-1.305
c0.696,0,1.262,0.585,1.262,1.305C54.852,16.222,54.286,16.806,53.59,16.806z M53.59,15.251c-0.159,0-0.293,0.115-0.293,0.252
c0.001,0.271,0.586,0.272,0.585,0C53.882,15.366,53.748,15.251,53.59,15.251z"/>
</g>
<g id="XMLID_68_">
<path id="XMLID_69_" fill="#213654" d="M45.555,12.443c-0.695,0-1.262-0.584-1.262-1.303c0-0.72,0.566-1.305,1.262-1.305
c0.695,0,1.262,0.585,1.262,1.305C46.817,11.859,46.25,12.443,45.555,12.443z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 233 133.3" xml:space="preserve"><style type="text/css">
.st0{fill:#AA0E20;}
</style><polygon class="st0" points="137.3 74.6 116.5 114.9 89.6 63.9 89.7 63.7 84.2 53.8 78.2 63.9 116.5 133.3 154.8 63.9 148.8 53.8 "/><polygon class="st0" points="116.5 0 111.8 7.5 90.1 43.9 95.6 54.3 116.5 21 137 54.3 142.6 43.4 124.4 12.9 "/><path class="st0" d="M116.5 19.8C52.2 19.8 0 67.7 0 67.8c0 0 52.2 48 116.5 48s116.5-48 116.5-48C233 67.9 180.8 19.8 116.5 19.8zM116.5 105.2C66.4 105.2 9.8 67.8 9.8 67.8c0 0 56.6-37.4 106.7-37.4s106.7 36.5 106.7 37.4C223.2 68.7 166.6 105.2 116.5 105.2z"/></svg>

Before

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="446.1044"
height="258.56647"
viewBox="0 0 446.1044 258.56647"
enable-background="new 0 0 599 472"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="parity-logo-black-no-text.svg"><metadata
id="metadata3481"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs3479" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview3477"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.5"
inkscape:cx="272.073"
inkscape:cy="58.797264"
inkscape:window-x="20"
inkscape:window-y="42"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><path
d="m 445.076,88.583194 c 2.758,24.580996 0.085,41.594996 -9.431,59.368996 -14.124,26.375 -35.951,43.904 -64.072,53.619 -19.164,6.621 -38.881,7.435 -58.847,4.726 -17.481,-2.375 -34.171,-7.518 -50.403,-14.276 -0.498,-0.207 -0.934,-0.569 -1.399,-0.861 0.553,0.102 1.131,0.13 1.658,0.314 15.869,5.581 32.085,9.65 48.894,11.057 22.342,1.87 43.878,-0.855 63.853,-11.815 12.879,-7.064 23.693,-16.488 32.475,-28.32 9.335,-12.588 15.155,-26.567 17.114,-42.088 2.766,-21.789996 -3.615,-40.960996 -17.278,-57.818996 -12.042,-14.857 -27.016,-25.515 -45.747,-30.25 -13.109,-3.313 -25.863,-2.27 -38.048,3.993 -5.376,2.764 -11.137,4.87 -16.252,8.039 -11.578,7.184 -20.912,16.979 -29.243,27.612 -8.093,10.323 -15.713,21.02 -23.312,31.718996 -5.111,7.205 -9.932,14.623 -14.695,22.064 -14.297,22.335 -28.348,44.819 -42.791,67.059 -12.012,18.504 -24.866,36.422 -39.294,53.15 -3.297,3.823 -6.858,7.419 -10.323,11.092 -0.284,0.303 -0.768,0.413 -1.164,0.618 0.18,-0.372 0.296,-0.78 0.527,-1.111 3.705,-5.32 7.593,-10.52 11.101,-15.961 12.652,-19.634 23.312,-40.375 33.675,-61.275 11.782,-23.759 23.403,-47.594 35.301,-71.296 10.511,-20.933996 21.896,-41.393996 35.328,-60.611996 9.289,-13.287 19.608,-25.682 32.803,-35.415 15.046,-11.10199986 31.49,-12.07299986 50.114,-11.89799986 23.358,0.215 40.052,8.64399996 55.289,20.03999986 14.101,11.029 21.479,19.407 32.723,37.906 5.807,9.563 10.563,22.785 11.444,30.62 z"
id="path3469"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 105.138,224.44619 c -6.696,3.271 -13.862,5.131 -21.242,6.22 -15.885,2.35 -30.524,-0.357 -43.006,-11.177 -0.802,-0.696 -1.424,-1.589 -2.128,-2.391 0.85,0.616 1.717,1.207 2.544,1.848 10.317,7.949 22.148,10.616 34.907,10.028 11.801,-0.537 20.574,-3.503 31.22,-8.309 1.604,-0.723 5.122,-3.231 6.25,-4.62 9.183,-11.342 17.655,-22.783 24.918,-35.422 11.151,-19.417 22.103,-38.946 33.061,-58.467 10.799,-19.233 21.559,-38.490996 34.136,-56.642996 9.575,-13.811 20.079,-26.84 33.292,-37.421 9.45,-7.573 19.894,-13.174 31.854,-15.724 5.84,-1.247 11.629,-2.7329999 17.454,-4.0899999 0.341,-0.081 0.715,0.014 1.075,0.027 -0.278,0.181 -0.537,0.396 -0.837,0.538 -19.58,9.3609999 -34.218,24.4719999 -47.659,40.9739999 -10.808,13.277 -20.355,27.457 -29.294,42.019 -9.329,15.193996 -18.147,30.707996 -27.193,46.077996 -6.06,10.298 -11.988,20.676 -18.239,30.856 -6.477,10.538 -13.035,21.043 -19.989,31.272 -9.524,14.01 -19.969,27.3 -32.613,38.731 -10.294,9.313 -22.644,16.201 -34.545,18.714 -11.392,2.263 -23.047,0.876 -34.415,-3.306 -17.555,-6.459 -31.736,-17.446 -43.035,-32.267 -0.306,-0.4 -0.604,-0.813 -0.862,-1.241 -0.288,-0.495 -0.527,-1.012 -0.792,-1.521 0.411,0.378 0.856,0.719 1.218,1.129 10.842,12.341 23.84,21.479 39.555,26.548 20.167,6.502 37.77,1.897 54.265,-11.059 7.343,-5.768 10.1,-11.324 10.1,-11.324 z"
id="path3471"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 393.16,88.254194 c 2.925,13.411996 0.414,26.197996 -4.771,38.658996 -0.182,0.441 -0.544,0.805 -0.822,1.202 -0.061,-0.383 -0.206,-0.775 -0.173,-1.147 2.067,-23.399 -8.303,-40.934996 -26.038,-54.907996 -10.861,-8.562 -23.228,-13.804 -36.88,-16.02 -0.697,-0.115 -1.356,-0.452 -2.033,-0.687 0.561,-0.472 1.056,-1.066 1.686,-1.398 16.729,-8.902 32.991,-7.607 48.378,2.991 10.957,7.546 17.896,18.097 20.653,31.308 z"
id="path3473"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 333.73,242.84619 c -15.294,1.323 -30.865,-1.065 -46.192,-5.421 -17.569,-4.995 -34.205,-12.281 -50.317,-20.808 -0.446,-0.237 -0.793,-0.668 -1.182,-1.009 0.466,0.162 0.952,0.278 1.398,0.496 16.801,8.124 34.107,14.846 52.369,18.926 15.489,3.451 31.118,5.016 46.87,2.505 16.41,-2.615 31.281,-9.049 44.559,-19.121 6.878,-5.217 13.045,-11.14 18.482,-17.836 0.328,-0.398 0.83,-0.662 1.252,-0.991 -0.203,0.453 -0.368,0.924 -0.61,1.344 -6.534,11.047 -15.14,20.181 -25.722,27.397 -12.131,8.284 -25.608,12.958 -40.907,14.518 z"
id="path3475"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /></svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="599px" height="472px" viewBox="0 0 599 472" enable-background="new 0 0 599 472" xml:space="preserve">
<path fill-rule="evenodd" clip-rule="evenodd" d="M472.503,124.814c2.758,24.581,0.085,41.595-9.431,59.369
c-14.124,26.375-35.951,43.904-64.072,53.619c-19.164,6.621-38.881,7.435-58.847,4.726c-17.481-2.375-34.171-7.518-50.403-14.276
c-0.498-0.207-0.934-0.569-1.399-0.861c0.553,0.102,1.131,0.13,1.658,0.314c15.869,5.581,32.085,9.65,48.894,11.057
c22.342,1.87,43.878-0.855,63.853-11.815c12.879-7.064,23.693-16.488,32.475-28.32c9.335-12.588,15.155-26.567,17.114-42.088
c2.766-21.79-3.615-40.961-17.278-57.819c-12.042-14.857-27.016-25.515-45.747-30.25c-13.109-3.313-25.863-2.27-38.048,3.993
c-5.376,2.764-11.137,4.87-16.252,8.039c-11.578,7.184-20.912,16.979-29.243,27.612c-8.093,10.323-15.713,21.02-23.312,31.719
c-5.111,7.205-9.932,14.623-14.695,22.064c-14.297,22.335-28.348,44.819-42.791,67.059c-12.012,18.504-24.866,36.422-39.294,53.15
c-3.297,3.823-6.858,7.419-10.323,11.092c-0.284,0.303-0.768,0.413-1.164,0.618c0.18-0.372,0.296-0.78,0.527-1.111
c3.705-5.32,7.593-10.52,11.101-15.961c12.652-19.634,23.312-40.375,33.675-61.275c11.782-23.759,23.403-47.594,35.301-71.296
c10.511-20.934,21.896-41.394,35.328-60.612c9.289-13.287,19.608-25.682,32.803-35.415c15.046-11.102,31.49-12.073,50.114-11.898
c23.358,0.215,40.052,8.644,55.289,20.04c14.101,11.029,21.479,19.407,32.723,37.906
C466.866,103.757,471.622,116.979,472.503,124.814z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M132.565,260.677c-6.696,3.271-13.862,5.131-21.242,6.22
c-15.885,2.35-30.524-0.357-43.006-11.177c-0.802-0.696-1.424-1.589-2.128-2.391c0.85,0.616,1.717,1.207,2.544,1.848
c10.317,7.949,22.148,10.616,34.907,10.028c11.801-0.537,20.574-3.503,31.22-8.309c1.604-0.723,5.122-3.231,6.25-4.62
c9.183-11.342,17.655-22.783,24.918-35.422c11.151-19.417,22.103-38.946,33.061-58.467c10.799-19.233,21.559-38.491,34.136-56.643
c9.575-13.811,20.079-26.84,33.292-37.421c9.45-7.573,19.894-13.174,31.854-15.724c5.84-1.247,11.629-2.733,17.454-4.09
c0.341-0.081,0.715,0.014,1.075,0.027c-0.278,0.181-0.537,0.396-0.837,0.538c-19.58,9.361-34.218,24.472-47.659,40.974
c-10.808,13.277-20.355,27.457-29.294,42.019c-9.329,15.194-18.147,30.708-27.193,46.078c-6.06,10.298-11.988,20.676-18.239,30.856
c-6.477,10.538-13.035,21.043-19.989,31.272c-9.524,14.01-19.969,27.3-32.613,38.731c-10.294,9.313-22.644,16.201-34.545,18.714
c-11.392,2.263-23.047,0.876-34.415-3.306c-17.555-6.459-31.736-17.446-43.035-32.267c-0.306-0.4-0.604-0.813-0.862-1.241
c-0.288-0.495-0.527-1.012-0.792-1.521c0.411,0.378,0.856,0.719,1.218,1.129c10.842,12.341,23.84,21.479,39.555,26.548
c20.167,6.502,37.77,1.897,54.265-11.059C129.808,266.233,132.565,260.677,132.565,260.677z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M420.587,124.485c2.925,13.412,0.414,26.198-4.771,38.659
c-0.182,0.441-0.544,0.805-0.822,1.202c-0.061-0.383-0.206-0.775-0.173-1.147c2.067-23.399-8.303-40.935-26.038-54.908
c-10.861-8.562-23.228-13.804-36.88-16.02c-0.697-0.115-1.356-0.452-2.033-0.687c0.561-0.472,1.056-1.066,1.686-1.398
c16.729-8.902,32.991-7.607,48.378,2.991C410.891,100.723,417.83,111.274,420.587,124.485z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M361.157,279.077c-15.294,1.323-30.865-1.065-46.192-5.421
c-17.569-4.995-34.205-12.281-50.317-20.808c-0.446-0.237-0.793-0.668-1.182-1.009c0.466,0.162,0.952,0.278,1.398,0.496
c16.801,8.124,34.107,14.846,52.369,18.926c15.489,3.451,31.118,5.016,46.87,2.505c16.41-2.615,31.281-9.049,44.559-19.121
c6.878-5.217,13.045-11.14,18.482-17.836c0.328-0.398,0.83-0.662,1.252-0.991c-0.203,0.453-0.368,0.924-0.61,1.344
c-6.534,11.047-15.14,20.181-25.722,27.397C389.933,272.843,376.456,277.517,361.157,279.077z"/>
<g>
<path fill-rule="evenodd" clip-rule="evenodd" d="M163.555,443.355c-1.854,0-4.338,0.024-6.14,0.024
c-0.759,0-0.883-0.125-0.883-0.892c0-0.614,0.015-1.113,0.015-1.73c0-25.897,0-52.348,0-78.244c1.14,0,3.522-0.024,5.606-0.024
c1.408,0,1.413,1.108,1.441,2.145c0.036,1.226,0.109,2.448,0.167,3.676c0.823-0.895,1.624-1.812,2.474-2.678
c2.747-2.803,6.056-4.375,10.02-4.401c3.944-0.025,7.892-0.066,11.836,0.018c9.824,0.21,16.31,6.568,16.463,16.351
c0.145,9.141,0.133,18.285,0.005,27.429c-0.137,9.914-6.669,16.337-16.633,16.467c-7.314,0.094-14.63,0.018-21.944,0.037
c-2.347,0.006-2.372,0.032-2.38,2.354L163.555,443.355z M197.438,391.444h-0.01c0-4.131,0.113-8.267-0.025-12.395
c-0.224-6.682-3.787-10.315-10.407-10.609c-3.547-0.16-7.115-0.169-10.663,0c-7.71,0.365-12.46,4.891-12.638,12.544
c-0.247,10.563-0.071,21.138-0.116,31.707c-0.003,1.22,0.383,1.719,1.649,1.683c2.399-0.068,4.804-0.015,7.206-0.018
c4.709,0,9.419,0.085,14.123-0.022c6.92-0.16,10.592-3.868,10.872-10.782c0.025-0.672,0.01-1.343,0.01-2.018
C197.438,398.171,197.438,394.808,197.438,391.444z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M398.145,442.797c-1.209-1.208-1.22-2.509-1.22-4.547
c0-1.19,0.758-1.93,2.052-1.933c0.576-0.003,1.156,0.002,1.731-0.031c3.036-0.167,5.565-1.381,7.547-3.695
c2.608-3.043,4.278-6.616,5.56-10.354c0.291-0.852-0.098-2.062-0.461-2.994c-4.045-10.383-8.151-20.737-12.234-31.103
c-2.927-7.418-5.844-14.835-8.765-22.252c-0.178-0.447-0.389-0.884-0.521-1.342c-0.421-1.462-0.103-1.961,1.343-2.151
c0.284-0.039,0.578-0.012,0.866-0.021c4.704-0.162,4.709-0.164,6.454,4.309c5.351,13.686,10.696,27.373,16.043,41.061
c0.212,0.536,0.397,1.084,0.635,1.608c0.27,0.591,0.581,1.162,0.877,1.741c0.379-0.623,0.853-1.21,1.116-1.879
c1.193-3.037,2.331-6.098,3.484-9.155c4.274-11.317,8.54-22.641,12.834-33.953c0.499-1.312,0.687-3.534,2.327-3.534
c1.709,0,3.536-0.014,5.345-0.014c0.848,0,0.833,0.972,0.833,1.494c0,0.421-0.221,0.916-0.395,1.362
c-7.828,20.241-15.62,40.499-23.548,60.7c-1.185,3.014-2.918,5.835-4.587,8.632c-2.562,4.291-6.279,7.338-11.113,8.61
C400.467,444.378,398.602,443.254,398.145,442.797z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M334.455,340.54c1.253,1.932,0.604,4.066,0.594,6.117
c-0.006,1.009-0.817,1.457-1.776,1.475c-1.522,0.028-3.046,0.028-4.568,0c-0.959-0.018-1.772-0.466-1.775-1.475
c-0.01-2.051-0.658-4.186,0.594-6.117C329.833,340.54,332.145,340.54,334.455,340.54z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M266.991,397.813c0,6.639,0.006,13.278-0.002,19.918
c-0.004,3.707-0.155,3.843-3.946,3.794c-0.287-0.004-0.578,0.012-0.866-0.008c-1.827-0.129-2.211-0.465-2.335-2.205
c-0.089-1.241-0.089-2.486-0.129-3.729c-0.825,0.88-1.636,1.778-2.48,2.642c-2.821,2.881-6.214,4.459-10.286,4.451
c-3.563-0.002-7.124,0.041-10.683-0.018c-9.792-0.165-16.153-6.573-16.26-16.436c-0.021-2.1,0.057-4.242,0.433-6.301
c1.524-8.328,7.822-12.42,15.293-12.644c6.923-0.213,13.854-0.06,20.782-0.068c0.674-0.003,1.348-0.025,2.021-0.007
c0.796,0.02,1.318-0.248,1.275-1.135c-0.168-3.45-0.068-6.94-0.592-10.333c-0.562-3.646-3.051-5.94-6.648-6.78
c-4.363-1.02-8.826-0.847-13.203-0.297c-5.176,0.651-7.679,3.432-8.587,8.657c-0.688,3.955-0.688,3.955-4.701,3.774
c-2.256-0.104-2.652-0.445-2.614-2.789c0.143-9.463,5.187-16.407,16.065-17.023c3.644-0.205,7.311-0.109,10.966-0.032
c9.804,0.205,16.27,6.584,16.454,16.361c0.127,6.734,0.024,13.472,0.024,20.207H266.991z M247.759,394.382c0,0,0,0.023,0,0.035
c-3.658,0-7.325-0.157-10.972,0.036c-5.828,0.309-9.347,4.026-9.617,9.832c-0.278,5.983,2.694,10.264,8.319,10.955
c4.945,0.609,10.004,0.773,14.942-0.307c4.769-1.044,7.935-4.068,8.77-8.872c0.591-3.379,0.421-6.888,0.62-10.338
c0.072-1.276-0.712-1.355-1.665-1.351C254.69,394.39,251.223,394.382,247.759,394.382z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M359.751,388.471c0-5.486-0.003-10.972,0.003-16.459
c0.003-2.656,0.037-2.469-2.565-2.473c-2.215-0.003-4.43,0.048-6.641-0.022c-1.827-0.057-2.271-0.451-2.324-2.198
c-0.16-5.277,0.016-4.997,4.506-4.948c1.731,0.017,3.468-0.066,5.196,0.021c1.353,0.068,1.894-0.367,1.85-1.787
c-0.088-2.885-0.037-5.775-0.02-8.662c0.018-3.273,0.174-3.419,3.441-3.432c0.48-0.003,0.965-0.027,1.442,0.011
c1.78,0.135,2.213,0.488,2.254,2.275c0.071,3.176,0.001,6.354,0.035,9.53c0.02,1.989,0.054,2.018,2.117,2.037
c2.885,0.028,5.773-0.016,8.661,0.015c2.731,0.028,3.006,0.314,3.074,2.93c0.107,4.09-0.021,4.225-4.089,4.23
c-2.407,0.003-4.812-0.003-7.222,0.002c-2.599,0.002-2.556-0.188-2.553,2.48c0.004,9.144,0,18.289,0.004,27.436
c0,1.635-0.068,3.278,0.061,4.905c0.491,6.126,3.794,9.413,9.925,9.926c1.052,0.088,2.115,0.064,3.175,0.068
c4.162,0.015,4.335,0.192,4.165,4.444c-0.095,2.331-0.387,2.687-2.71,2.707c-2.5,0.02-5.037,0.168-7.496-0.188
c-8.999-1.311-14.115-7.236-14.259-16.388c-0.087-5.486-0.014-10.974-0.014-16.461H359.751z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M286.393,391.917c0-8.468,0-16.932,0.001-25.396c0-0.771-0.055-1.551,0.041-2.308
c0.211-1.634,0.661-1.843,3.55-1.843c2.883,0.002,3.344,0.209,3.527,1.857c0.115,1.046,0.017,2.114,0.065,3.172
c0.014,0.309,0.202,0.605,0.31,0.909c0.201-0.188,0.408-0.367,0.598-0.562c1.337-1.364,2.528-2.929,4.045-4.051
c2.278-1.684,4.941-2.525,7.838-2.482c2.212,0.034,4.425-0.018,6.64,0.01c2.732,0.033,3.009,0.313,3.078,2.92
c0.109,4.096-0.022,4.249-4.075,4.249c-2.624,0-5.029-0.102-7.483,0.266c-6.56,0.98-10.189,4.94-10.854,11.543
c-0.126,1.239-0.108,2.498-0.109,3.75c-0.008,11.06-0.006,22.123-0.006,33.186c0,0.771,0.045,1.546-0.025,2.308
c-0.18,1.903-0.616,2.121-3.902,2.081c-2.676-0.033-3.059-0.281-3.219-2.193c-0.057-0.669-0.02-1.346-0.02-2.021
C286.393,408.848,286.393,400.381,286.393,391.917z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M334.571,391.899c0,8.742,0.01,17.484-0.004,26.226
c-0.005,3.236-0.184,3.389-3.459,3.397c-0.673,0.003-1.347,0.015-2.016-0.047c-0.999-0.089-1.565-0.678-1.646-1.673
c-0.054-0.669-0.041-1.343-0.041-2.015c-0.001-17.194-0.001-34.389-0.001-51.584c0-0.48-0.012-0.961,0.01-1.439
c0.016-0.383-0.044-0.825,0.123-1.137c1.173-2.185,3.239-1.004,4.919-1.212c1.22-0.15,2.021,0.507,2.083,1.821
c0.037,0.767,0.031,1.536,0.031,2.304C334.572,374.994,334.572,383.447,334.571,391.899z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="none" d="M197.438,391.444c0,3.363,0,6.727,0,10.09
c0,0.675,0.016,1.346-0.01,2.018c-0.279,6.914-3.952,10.622-10.872,10.782c-4.704,0.107-9.413,0.022-14.123,0.022
c-2.402,0.003-4.807-0.051-7.206,0.018c-1.267,0.036-1.652-0.463-1.649-1.683c0.045-10.569-0.13-21.144,0.116-31.707
c0.178-7.653,4.928-12.179,12.638-12.544c3.548-0.169,7.116-0.16,10.663,0c6.62,0.294,10.183,3.928,10.407,10.609
c0.139,4.128,0.025,8.264,0.025,12.395H197.438z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="none" d="M247.759,394.382c3.464,0,6.931,0.008,10.397-0.009
c0.953-0.005,1.737,0.074,1.665,1.351c-0.199,3.45-0.029,6.959-0.62,10.338c-0.835,4.804-4.001,7.828-8.77,8.872
c-4.938,1.08-9.997,0.916-14.942,0.307c-5.625-0.691-8.598-4.972-8.319-10.955c0.271-5.806,3.79-9.523,9.617-9.832
c3.647-0.193,7.313-0.036,10.972-0.036C247.759,394.405,247.759,394.394,247.759,394.382z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="446.1044"
height="258.56647"
viewBox="0 0 446.1044 258.56647"
enable-background="new 0 0 599 472"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="parity-logo-white-no-text.svg"
style="fill:#ffffff"><metadata
id="metadata3442"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs3440" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1363"
inkscape:window-height="856"
id="namedview3438"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.375"
inkscape:cx="272.073"
inkscape:cy="58.797248"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><path
d="m 445.076,88.583194 c 2.758,24.580996 0.085,41.594996 -9.431,59.368996 -14.124,26.375 -35.951,43.904 -64.072,53.619 -19.164,6.621 -38.881,7.435 -58.847,4.726 -17.481,-2.375 -34.171,-7.518 -50.403,-14.276 -0.498,-0.207 -0.934,-0.569 -1.399,-0.861 0.553,0.102 1.131,0.13 1.658,0.314 15.869,5.581 32.085,9.65 48.894,11.057 22.342,1.87 43.878,-0.855 63.853,-11.815 12.879,-7.064 23.693,-16.488 32.475,-28.32 9.335,-12.588 15.155,-26.567 17.114,-42.088 2.766,-21.789996 -3.615,-40.960996 -17.278,-57.818996 -12.042,-14.857 -27.016,-25.515 -45.747,-30.25 -13.109,-3.313 -25.863,-2.27 -38.048,3.993 -5.376,2.764 -11.137,4.87 -16.252,8.039 -11.578,7.184 -20.912,16.979 -29.243,27.612 -8.093,10.323 -15.713,21.02 -23.312,31.718996 -5.111,7.205 -9.932,14.623 -14.695,22.064 -14.297,22.335 -28.348,44.819 -42.791,67.059 -12.012,18.504 -24.866,36.422 -39.294,53.15 -3.297,3.823 -6.858,7.419 -10.323,11.092 -0.284,0.303 -0.768,0.413 -1.164,0.618 0.18,-0.372 0.296,-0.78 0.527,-1.111 3.705,-5.32 7.593,-10.52 11.101,-15.961 12.652,-19.634 23.312,-40.375 33.675,-61.275 11.782,-23.759 23.403,-47.594 35.301,-71.296 10.511,-20.933996 21.896,-41.393996 35.328,-60.611996 9.289,-13.287 19.608,-25.682 32.803,-35.415 15.046,-11.10199986 31.49,-12.07299986 50.114,-11.89799986 23.358,0.215 40.052,8.64399996 55.289,20.03999986 14.101,11.029 21.479,19.407 32.723,37.906 5.807,9.563 10.563,22.785 11.444,30.62 z"
id="path3410"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 105.138,224.44619 c -6.696,3.271 -13.862,5.131 -21.242,6.22 -15.885,2.35 -30.524,-0.357 -43.006,-11.177 -0.802,-0.696 -1.424,-1.589 -2.128,-2.391 0.85,0.616 1.717,1.207 2.544,1.848 10.317,7.949 22.148,10.616 34.907,10.028 11.801,-0.537 20.574,-3.503 31.22,-8.309 1.604,-0.723 5.122,-3.231 6.25,-4.62 9.183,-11.342 17.655,-22.783 24.918,-35.422 11.151,-19.417 22.103,-38.946 33.061,-58.467 10.799,-19.233 21.559,-38.490996 34.136,-56.642996 9.575,-13.811 20.079,-26.84 33.292,-37.421 9.45,-7.573 19.894,-13.174 31.854,-15.724 5.84,-1.247 11.629,-2.7329999 17.454,-4.0899999 0.341,-0.081 0.715,0.014 1.075,0.027 -0.278,0.181 -0.537,0.396 -0.837,0.538 -19.58,9.3609999 -34.218,24.4719999 -47.659,40.9739999 -10.808,13.277 -20.355,27.457 -29.294,42.019 -9.329,15.193996 -18.147,30.707996 -27.193,46.077996 -6.06,10.298 -11.988,20.676 -18.239,30.856 -6.477,10.538 -13.035,21.043 -19.989,31.272 -9.524,14.01 -19.969,27.3 -32.613,38.731 -10.294,9.313 -22.644,16.201 -34.545,18.714 -11.392,2.263 -23.047,0.876 -34.415,-3.306 -17.555,-6.459 -31.736,-17.446 -43.035,-32.267 -0.306,-0.4 -0.604,-0.813 -0.862,-1.241 -0.288,-0.495 -0.527,-1.012 -0.792,-1.521 0.411,0.378 0.856,0.719 1.218,1.129 10.842,12.341 23.84,21.479 39.555,26.548 20.167,6.502 37.77,1.897 54.265,-11.059 7.343,-5.768 10.1,-11.324 10.1,-11.324 z"
id="path3412"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 393.16,88.254194 c 2.925,13.411996 0.414,26.197996 -4.771,38.658996 -0.182,0.441 -0.544,0.805 -0.822,1.202 -0.061,-0.383 -0.206,-0.775 -0.173,-1.147 2.067,-23.399 -8.303,-40.934996 -26.038,-54.907996 -10.861,-8.562 -23.228,-13.804 -36.88,-16.02 -0.697,-0.115 -1.356,-0.452 -2.033,-0.687 0.561,-0.472 1.056,-1.066 1.686,-1.398 16.729,-8.902 32.991,-7.607 48.378,2.991 10.957,7.546 17.896,18.097 20.653,31.308 z"
id="path3414"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 333.73,242.84619 c -15.294,1.323 -30.865,-1.065 -46.192,-5.421 -17.569,-4.995 -34.205,-12.281 -50.317,-20.808 -0.446,-0.237 -0.793,-0.668 -1.182,-1.009 0.466,0.162 0.952,0.278 1.398,0.496 16.801,8.124 34.107,14.846 52.369,18.926 15.489,3.451 31.118,5.016 46.87,2.505 16.41,-2.615 31.281,-9.049 44.559,-19.121 6.878,-5.217 13.045,-11.14 18.482,-17.836 0.328,-0.398 0.83,-0.662 1.252,-0.991 -0.203,0.453 -0.368,0.924 -0.61,1.344 -6.534,11.047 -15.14,20.181 -25.722,27.397 -12.131,8.284 -25.608,12.958 -40.907,14.518 z"
id="path3416"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /></svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="446.1044"
height="407.54163"
fill='#ffffff'
viewBox="0 0 446.1044 407.54163"
enable-background="new 0 0 599 472"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="parity-logo-white.svg"><metadata
id="metadata3442"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs3440" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1363"
inkscape:window-height="862"
id="namedview3438"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.375"
inkscape:cx="272.073"
inkscape:cy="207.77242"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><path
d="m 445.076,88.583194 c 2.758,24.580996 0.085,41.594996 -9.431,59.368996 -14.124,26.375 -35.951,43.904 -64.072,53.619 -19.164,6.621 -38.881,7.435 -58.847,4.726 -17.481,-2.375 -34.171,-7.518 -50.403,-14.276 -0.498,-0.207 -0.934,-0.569 -1.399,-0.861 0.553,0.102 1.131,0.13 1.658,0.314 15.869,5.581 32.085,9.65 48.894,11.057 22.342,1.87 43.878,-0.855 63.853,-11.815 12.879,-7.064 23.693,-16.488 32.475,-28.32 9.335,-12.588 15.155,-26.567 17.114,-42.088 2.766,-21.789996 -3.615,-40.960996 -17.278,-57.818996 -12.042,-14.857 -27.016,-25.515 -45.747,-30.25 -13.109,-3.313 -25.863,-2.27 -38.048,3.993 -5.376,2.764 -11.137,4.87 -16.252,8.039 -11.578,7.184 -20.912,16.979 -29.243,27.612 -8.093,10.323 -15.713,21.02 -23.312,31.718996 -5.111,7.205 -9.932,14.623 -14.695,22.064 -14.297,22.335 -28.348,44.819 -42.791,67.059 -12.012,18.504 -24.866,36.422 -39.294,53.15 -3.297,3.823 -6.858,7.419 -10.323,11.092 -0.284,0.303 -0.768,0.413 -1.164,0.618 0.18,-0.372 0.296,-0.78 0.527,-1.111 3.705,-5.32 7.593,-10.52 11.101,-15.961 12.652,-19.634 23.312,-40.375 33.675,-61.275 11.782,-23.759 23.403,-47.594 35.301,-71.296 10.511,-20.933996 21.896,-41.393996 35.328,-60.611996 9.289,-13.287 19.608,-25.682 32.803,-35.415 15.046,-11.10199986 31.49,-12.07299986 50.114,-11.89799986 23.358,0.215 40.052,8.64399996 55.289,20.03999986 14.101,11.029 21.479,19.407 32.723,37.906 5.807,9.563 10.563,22.785 11.444,30.62 z"
id="path3410"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 105.138,224.44619 c -6.696,3.271 -13.862,5.131 -21.242,6.22 -15.885,2.35 -30.524,-0.357 -43.006,-11.177 -0.802,-0.696 -1.424,-1.589 -2.128,-2.391 0.85,0.616 1.717,1.207 2.544,1.848 10.317,7.949 22.148,10.616 34.907,10.028 11.801,-0.537 20.574,-3.503 31.22,-8.309 1.604,-0.723 5.122,-3.231 6.25,-4.62 9.183,-11.342 17.655,-22.783 24.918,-35.422 11.151,-19.417 22.103,-38.946 33.061,-58.467 10.799,-19.233 21.559,-38.490996 34.136,-56.642996 9.575,-13.811 20.079,-26.84 33.292,-37.421 9.45,-7.573 19.894,-13.174 31.854,-15.724 5.84,-1.247 11.629,-2.7329999 17.454,-4.0899999 0.341,-0.081 0.715,0.014 1.075,0.027 -0.278,0.181 -0.537,0.396 -0.837,0.538 -19.58,9.3609999 -34.218,24.4719999 -47.659,40.9739999 -10.808,13.277 -20.355,27.457 -29.294,42.019 -9.329,15.193996 -18.147,30.707996 -27.193,46.077996 -6.06,10.298 -11.988,20.676 -18.239,30.856 -6.477,10.538 -13.035,21.043 -19.989,31.272 -9.524,14.01 -19.969,27.3 -32.613,38.731 -10.294,9.313 -22.644,16.201 -34.545,18.714 -11.392,2.263 -23.047,0.876 -34.415,-3.306 -17.555,-6.459 -31.736,-17.446 -43.035,-32.267 -0.306,-0.4 -0.604,-0.813 -0.862,-1.241 -0.288,-0.495 -0.527,-1.012 -0.792,-1.521 0.411,0.378 0.856,0.719 1.218,1.129 10.842,12.341 23.84,21.479 39.555,26.548 20.167,6.502 37.77,1.897 54.265,-11.059 7.343,-5.768 10.1,-11.324 10.1,-11.324 z"
id="path3412"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 393.16,88.254194 c 2.925,13.411996 0.414,26.197996 -4.771,38.658996 -0.182,0.441 -0.544,0.805 -0.822,1.202 -0.061,-0.383 -0.206,-0.775 -0.173,-1.147 2.067,-23.399 -8.303,-40.934996 -26.038,-54.907996 -10.861,-8.562 -23.228,-13.804 -36.88,-16.02 -0.697,-0.115 -1.356,-0.452 -2.033,-0.687 0.561,-0.472 1.056,-1.066 1.686,-1.398 16.729,-8.902 32.991,-7.607 48.378,2.991 10.957,7.546 17.896,18.097 20.653,31.308 z"
id="path3414"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 333.73,242.84619 c -15.294,1.323 -30.865,-1.065 -46.192,-5.421 -17.569,-4.995 -34.205,-12.281 -50.317,-20.808 -0.446,-0.237 -0.793,-0.668 -1.182,-1.009 0.466,0.162 0.952,0.278 1.398,0.496 16.801,8.124 34.107,14.846 52.369,18.926 15.489,3.451 31.118,5.016 46.87,2.505 16.41,-2.615 31.281,-9.049 44.559,-19.121 6.878,-5.217 13.045,-11.14 18.482,-17.836 0.328,-0.398 0.83,-0.662 1.252,-0.991 -0.203,0.453 -0.368,0.924 -0.61,1.344 -6.534,11.047 -15.14,20.181 -25.722,27.397 -12.131,8.284 -25.608,12.958 -40.907,14.518 z"
id="path3416"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><g
id="g3418"
transform="translate(-27.427,-36.230806)"><path
d="m 163.555,443.355 c -1.854,0 -4.338,0.024 -6.14,0.024 -0.759,0 -0.883,-0.125 -0.883,-0.892 0,-0.614 0.015,-1.113 0.015,-1.73 0,-25.897 0,-52.348 0,-78.244 1.14,0 3.522,-0.024 5.606,-0.024 1.408,0 1.413,1.108 1.441,2.145 0.036,1.226 0.109,2.448 0.167,3.676 0.823,-0.895 1.624,-1.812 2.474,-2.678 2.747,-2.803 6.056,-4.375 10.02,-4.401 3.944,-0.025 7.892,-0.066 11.836,0.018 9.824,0.21 16.31,6.568 16.463,16.351 0.145,9.141 0.133,18.285 0.005,27.429 -0.137,9.914 -6.669,16.337 -16.633,16.467 -7.314,0.094 -14.63,0.018 -21.944,0.037 -2.347,0.006 -2.372,0.032 -2.38,2.354 l -0.047,19.468 z m 33.883,-51.911 -0.01,0 c 0,-4.131 0.113,-8.267 -0.025,-12.395 -0.224,-6.682 -3.787,-10.315 -10.407,-10.609 -3.547,-0.16 -7.115,-0.169 -10.663,0 -7.71,0.365 -12.46,4.891 -12.638,12.544 -0.247,10.563 -0.071,21.138 -0.116,31.707 -0.003,1.22 0.383,1.719 1.649,1.683 2.399,-0.068 4.804,-0.015 7.206,-0.018 4.709,0 9.419,0.085 14.123,-0.022 6.92,-0.16 10.592,-3.868 10.872,-10.782 0.025,-0.672 0.01,-1.343 0.01,-2.018 -0.001,-3.363 -0.001,-6.726 -0.001,-10.09 z"
id="path3420"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 398.145,442.797 c -1.209,-1.208 -1.22,-2.509 -1.22,-4.547 0,-1.19 0.758,-1.93 2.052,-1.933 0.576,-0.003 1.156,0.002 1.731,-0.031 3.036,-0.167 5.565,-1.381 7.547,-3.695 2.608,-3.043 4.278,-6.616 5.56,-10.354 0.291,-0.852 -0.098,-2.062 -0.461,-2.994 -4.045,-10.383 -8.151,-20.737 -12.234,-31.103 -2.927,-7.418 -5.844,-14.835 -8.765,-22.252 -0.178,-0.447 -0.389,-0.884 -0.521,-1.342 -0.421,-1.462 -0.103,-1.961 1.343,-2.151 0.284,-0.039 0.578,-0.012 0.866,-0.021 4.704,-0.162 4.709,-0.164 6.454,4.309 5.351,13.686 10.696,27.373 16.043,41.061 0.212,0.536 0.397,1.084 0.635,1.608 0.27,0.591 0.581,1.162 0.877,1.741 0.379,-0.623 0.853,-1.21 1.116,-1.879 1.193,-3.037 2.331,-6.098 3.484,-9.155 4.274,-11.317 8.54,-22.641 12.834,-33.953 0.499,-1.312 0.687,-3.534 2.327,-3.534 1.709,0 3.536,-0.014 5.345,-0.014 0.848,0 0.833,0.972 0.833,1.494 0,0.421 -0.221,0.916 -0.395,1.362 -7.828,20.241 -15.62,40.499 -23.548,60.7 -1.185,3.014 -2.918,5.835 -4.587,8.632 -2.562,4.291 -6.279,7.338 -11.113,8.61 -3.881,1.022 -5.746,-0.102 -6.203,-0.559 z"
id="path3422"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 334.455,340.54 c 1.253,1.932 0.604,4.066 0.594,6.117 -0.006,1.009 -0.817,1.457 -1.776,1.475 -1.522,0.028 -3.046,0.028 -4.568,0 -0.959,-0.018 -1.772,-0.466 -1.775,-1.475 -0.01,-2.051 -0.658,-4.186 0.594,-6.117 2.309,0 4.621,0 6.931,0 z"
id="path3424"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 266.991,397.813 c 0,6.639 0.006,13.278 -0.002,19.918 -0.004,3.707 -0.155,3.843 -3.946,3.794 -0.287,-0.004 -0.578,0.012 -0.866,-0.008 -1.827,-0.129 -2.211,-0.465 -2.335,-2.205 -0.089,-1.241 -0.089,-2.486 -0.129,-3.729 -0.825,0.88 -1.636,1.778 -2.48,2.642 -2.821,2.881 -6.214,4.459 -10.286,4.451 -3.563,-0.002 -7.124,0.041 -10.683,-0.018 -9.792,-0.165 -16.153,-6.573 -16.26,-16.436 -0.021,-2.1 0.057,-4.242 0.433,-6.301 1.524,-8.328 7.822,-12.42 15.293,-12.644 6.923,-0.213 13.854,-0.06 20.782,-0.068 0.674,-0.003 1.348,-0.025 2.021,-0.007 0.796,0.02 1.318,-0.248 1.275,-1.135 -0.168,-3.45 -0.068,-6.94 -0.592,-10.333 -0.562,-3.646 -3.051,-5.94 -6.648,-6.78 -4.363,-1.02 -8.826,-0.847 -13.203,-0.297 -5.176,0.651 -7.679,3.432 -8.587,8.657 -0.688,3.955 -0.688,3.955 -4.701,3.774 -2.256,-0.104 -2.652,-0.445 -2.614,-2.789 0.143,-9.463 5.187,-16.407 16.065,-17.023 3.644,-0.205 7.311,-0.109 10.966,-0.032 9.804,0.205 16.27,6.584 16.454,16.361 0.127,6.734 0.024,13.472 0.024,20.207 l 0.019,0 z m -19.232,-3.431 c 0,0 0,0.023 0,0.035 -3.658,0 -7.325,-0.157 -10.972,0.036 -5.828,0.309 -9.347,4.026 -9.617,9.832 -0.278,5.983 2.694,10.264 8.319,10.955 4.945,0.609 10.004,0.773 14.942,-0.307 4.769,-1.044 7.935,-4.068 8.77,-8.872 0.591,-3.379 0.421,-6.888 0.62,-10.338 0.072,-1.276 -0.712,-1.355 -1.665,-1.351 -3.466,0.018 -6.933,0.01 -10.397,0.01 z"
id="path3426"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 359.751,388.471 c 0,-5.486 -0.003,-10.972 0.003,-16.459 0.003,-2.656 0.037,-2.469 -2.565,-2.473 -2.215,-0.003 -4.43,0.048 -6.641,-0.022 -1.827,-0.057 -2.271,-0.451 -2.324,-2.198 -0.16,-5.277 0.016,-4.997 4.506,-4.948 1.731,0.017 3.468,-0.066 5.196,0.021 1.353,0.068 1.894,-0.367 1.85,-1.787 -0.088,-2.885 -0.037,-5.775 -0.02,-8.662 0.018,-3.273 0.174,-3.419 3.441,-3.432 0.48,-0.003 0.965,-0.027 1.442,0.011 1.78,0.135 2.213,0.488 2.254,2.275 0.071,3.176 0.001,6.354 0.035,9.53 0.02,1.989 0.054,2.018 2.117,2.037 2.885,0.028 5.773,-0.016 8.661,0.015 2.731,0.028 3.006,0.314 3.074,2.93 0.107,4.09 -0.021,4.225 -4.089,4.23 -2.407,0.003 -4.812,-0.003 -7.222,0.002 -2.599,0.002 -2.556,-0.188 -2.553,2.48 0.004,9.144 0,18.289 0.004,27.436 0,1.635 -0.068,3.278 0.061,4.905 0.491,6.126 3.794,9.413 9.925,9.926 1.052,0.088 2.115,0.064 3.175,0.068 4.162,0.015 4.335,0.192 4.165,4.444 -0.095,2.331 -0.387,2.687 -2.71,2.707 -2.5,0.02 -5.037,0.168 -7.496,-0.188 -8.999,-1.311 -14.115,-7.236 -14.259,-16.388 -0.087,-5.486 -0.014,-10.974 -0.014,-16.461 l -0.016,0 z"
id="path3428"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 286.393,391.917 c 0,-8.468 0,-16.932 0.001,-25.396 0,-0.771 -0.055,-1.551 0.041,-2.308 0.211,-1.634 0.661,-1.843 3.55,-1.843 2.883,0.002 3.344,0.209 3.527,1.857 0.115,1.046 0.017,2.114 0.065,3.172 0.014,0.309 0.202,0.605 0.31,0.909 0.201,-0.188 0.408,-0.367 0.598,-0.562 1.337,-1.364 2.528,-2.929 4.045,-4.051 2.278,-1.684 4.941,-2.525 7.838,-2.482 2.212,0.034 4.425,-0.018 6.64,0.01 2.732,0.033 3.009,0.313 3.078,2.92 0.109,4.096 -0.022,4.249 -4.075,4.249 -2.624,0 -5.029,-0.102 -7.483,0.266 -6.56,0.98 -10.189,4.94 -10.854,11.543 -0.126,1.239 -0.108,2.498 -0.109,3.75 -0.008,11.06 -0.006,22.123 -0.006,33.186 0,0.771 0.045,1.546 -0.025,2.308 -0.18,1.903 -0.616,2.121 -3.902,2.081 -2.676,-0.033 -3.059,-0.281 -3.219,-2.193 -0.057,-0.669 -0.02,-1.346 -0.02,-2.021 0,-8.464 0,-16.931 0,-25.395 z"
id="path3430"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 334.571,391.899 c 0,8.742 0.01,17.484 -0.004,26.226 -0.005,3.236 -0.184,3.389 -3.459,3.397 -0.673,0.003 -1.347,0.015 -2.016,-0.047 -0.999,-0.089 -1.565,-0.678 -1.646,-1.673 -0.054,-0.669 -0.041,-1.343 -0.041,-2.015 -10e-4,-17.194 -10e-4,-34.389 -10e-4,-51.584 0,-0.48 -0.012,-0.961 0.01,-1.439 0.016,-0.383 -0.044,-0.825 0.123,-1.137 1.173,-2.185 3.239,-1.004 4.919,-1.212 1.22,-0.15 2.021,0.507 2.083,1.821 0.037,0.767 0.031,1.536 0.031,2.304 0.002,8.454 0.002,16.907 0.001,25.359 z"
id="path3432"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill-rule:evenodd" /><path
d="m 197.438,391.444 c 0,3.363 0,6.727 0,10.09 0,0.675 0.016,1.346 -0.01,2.018 -0.279,6.914 -3.952,10.622 -10.872,10.782 -4.704,0.107 -9.413,0.022 -14.123,0.022 -2.402,0.003 -4.807,-0.051 -7.206,0.018 -1.267,0.036 -1.652,-0.463 -1.649,-1.683 0.045,-10.569 -0.13,-21.144 0.116,-31.707 0.178,-7.653 4.928,-12.179 12.638,-12.544 3.548,-0.169 7.116,-0.16 10.663,0 6.62,0.294 10.183,3.928 10.407,10.609 0.139,4.128 0.025,8.264 0.025,12.395 l 0.011,0 z"
id="path3434"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill:none;fill-rule:evenodd" /></g></svg>

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

View File

@ -1,6 +1,6 @@
{
"name": "parity.js",
"version": "0.1.5",
"version": "0.1.35",
"main": "release/index.js",
"jsnext:main": "src/index.js",
"author": "Parity Team <admin@parity.io>",
@ -75,12 +75,13 @@
"eslint-plugin-promise": "^2.0.0",
"eslint-plugin-react": "^5.1.1",
"eslint-plugin-standard": "^2.0.0",
"extract-loader": "0.0.2",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
"fs-extra": "^0.30.0",
"happypack": "^2.2.1",
"history": "^2.0.0",
"html-loader": "^0.4.3",
"html-loader": "^0.4.4",
"ignore-styles": "2.0.0",
"image-webpack-loader": "^1.8.0",
"istanbul": "^1.0.0-alpha.2",
@ -92,6 +93,7 @@
"nock": "^8.0.0",
"postcss-import": "^8.1.2",
"postcss-loader": "^0.8.1",
"postcss-nested": "^1.0.0",
"postcss-simple-vars": "^3.0.0",
"react-addons-test-utils": "^15.3.0",
"react-copy-to-clipboard": "^4.2.3",
@ -112,6 +114,7 @@
"bignumber.js": "^2.3.0",
"blockies": "0.0.2",
"bytes": "^2.4.0",
"chart.js": "^2.3.0",
"es6-promise": "^3.2.1",
"file-saver": "^1.3.3",
"format-json": "^1.0.3",
@ -127,12 +130,14 @@
"qs": "^6.3.0",
"react": "^15.2.1",
"react-addons-css-transition-group": "^15.2.1",
"react-chartjs-2": "^1.5.0",
"react-dom": "^15.2.1",
"react-redux": "^4.4.5",
"react-router": "^2.6.1",
"react-router-redux": "^4.0.5",
"react-tap-event-plugin": "^1.0.0",
"react-tooltip": "^2.0.3",
"recharts": "^0.15.2",
"redux": "^3.5.2",
"redux-actions": "^0.10.1",
"redux-thunk": "^2.1.0",

View File

@ -6,6 +6,8 @@ cd ..
# install deps and store the exit code
EXITCODE=0
node --version
npm --version
npm install --progress=false || EXITCODE=1
# back to root

View File

@ -70,6 +70,20 @@ export function outDate (date) {
return new Date(outNumber(date).toNumber() * 1000);
}
export function outHistogram (histogram) {
if (histogram) {
Object.keys(histogram).forEach((key) => {
switch (key) {
case 'bucketBounds':
case 'counts':
histogram[key] = histogram[key].map(outNumber);
}
});
}
return histogram;
}
export function outLog (log) {
Object.keys(log).forEach((key) => {
switch (key) {
@ -139,6 +153,28 @@ export function outSignerRequest (request) {
return request;
}
export function outSyncing (syncing) {
if (syncing && syncing !== 'false') {
Object.keys(syncing).forEach((key) => {
switch (key) {
case 'currentBlock':
case 'highestBlock':
case 'startingBlock':
case 'warpChunksAmount':
case 'warpChunksProcessed':
syncing[key] = outNumber(syncing[key]);
break;
case 'blockGap':
syncing[key] = syncing[key] ? syncing[key].map(outNumber) : syncing[key];
break;
}
});
}
return syncing;
}
export function outTransaction (tx) {
if (tx) {
Object.keys(tx).forEach((key) => {

View File

@ -16,7 +16,7 @@
import BigNumber from 'bignumber.js';
import { outBlock, outAccountInfo, outAddress, outDate, outNumber, outPeers, outReceipt, outTransaction, outTrace } from './output';
import { outBlock, outAccountInfo, outAddress, outDate, outHistogram, outNumber, outPeers, outReceipt, outSyncing, outTransaction, outTrace } from './output';
import { isAddress, isBigNumber, isInstanceOf } from '../../../test/types';
describe('api/format/output', () => {
@ -120,6 +120,18 @@ describe('api/format/output', () => {
});
});
describe('outHistogram', () => {
['bucketBounds', 'counts'].forEach((type) => {
it(`formats ${type} as number arrays`, () => {
expect(
outHistogram({ [type]: [0x123, 0x456, 0x789] })
).to.deep.equal({
[type]: [new BigNumber(0x123), new BigNumber(0x456), new BigNumber(0x789)]
});
});
});
});
describe('outNumber', () => {
it('returns a BigNumber equalling the value', () => {
const bn = outNumber('0x123456');
@ -191,6 +203,22 @@ describe('api/format/output', () => {
});
});
describe('outSyncing', () => {
['currentBlock', 'highestBlock', 'startingBlock', 'warpChunksAmount', 'warpChunksProcessed'].forEach((input) => {
it(`formats ${input} numbers as a number`, () => {
expect(outSyncing({ [input]: '0x123' })).to.deep.equal({
[input]: new BigNumber('0x123')
});
});
});
it('formats blockGap properly', () => {
expect(outSyncing({ blockGap: [0x123, 0x456] })).to.deep.equal({
blockGap: [new BigNumber(0x123), new BigNumber(0x456)]
});
});
});
describe('outTransaction', () => {
['from', 'to'].forEach((input) => {
it(`formats ${input} address as address`, () => {

View File

@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import { inAddress, inBlockNumber, inData, inFilter, inHash, inHex, inNumber16, inOptions } from '../../format/input';
import { outAddress, outBlock, outLog, outNumber, outReceipt, outTransaction } from '../../format/output';
import { outAddress, outBlock, outLog, outNumber, outReceipt, outSyncing, outTransaction } from '../../format/output';
export default class Eth {
constructor (transport) {
@ -314,7 +314,8 @@ export default class Eth {
syncing () {
return this._transport
.execute('eth_syncing');
.execute('eth_syncing')
.then(outSyncing);
}
uninstallFilter (filterId) {

View File

@ -27,6 +27,16 @@ describe('ethapi.ethcore', () => {
});
});
describe('gasPriceHistogram', () => {
it('returns and translates the target', () => {
return ethapi.ethcore.gasPriceHistogram().then((result) => {
expect(Object.keys(result)).to.deep.equal(['bucketBounds', 'counts']);
expect(result.bucketBounds.length > 0).to.be.true;
expect(result.counts.length > 0).to.be.true;
});
});
});
describe('netChain', () => {
it('returns and the chain', () => {
return ethapi.ethcore.netChain().then((value) => {

View File

@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import { inAddress, inData, inNumber16 } from '../../format/input';
import { outAddress, outNumber, outPeers } from '../../format/output';
import { outAddress, outHistogram, outNumber, outPeers } from '../../format/output';
export default class Ethcore {
constructor (transport) {
@ -69,6 +69,12 @@ export default class Ethcore {
.then(outNumber);
}
gasPriceHistogram () {
return this._transport
.execute('ethcore_gasPriceHistogram')
.then(outHistogram);
}
generateSecretPhrase () {
return this._transport
.execute('ethcore_generateSecretPhrase');
@ -85,6 +91,11 @@ export default class Ethcore {
.then(outNumber);
}
mode () {
return this._transport
.execute('ethcore_mode');
}
netChain () {
return this._transport
.execute('ethcore_netChain');
@ -155,6 +166,11 @@ export default class Ethcore {
.execute('ethcore_setMinGasPrice', inNumber16(quantity));
}
setMode (mode) {
return this._transport
.execute('ethcore_setMode', mode);
}
setTransactionsLimit (quantity) {
return this._transport
.execute('ethcore_setTransactionsLimit', inNumber16(quantity));

View File

@ -14,22 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
// 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/>.
export default class DappReg {
constructor (api, registry) {
this._api = api;
@ -69,4 +53,8 @@ export default class DappReg {
getImage (id) {
return this.meta(id, 'IMG');
}
getContent (id) {
return this.meta(id, 'CONTENT');
}
}

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" href="parity.ico" type="image/x-icon">
<link rel="icon" href="/parity-logo-black-no-text.png" type="image/png">
<title>Basic Token Deployment</title>
</head>
<body>

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" href="parity.ico" type="image/x-icon">
<title>GAVcoin</title>
</head>
<body>
<div id="container"></div>
<script src="vendor.js"></script>
<script src="commons.js"></script>
<script src="/parity-utils/parity.js"></script>
<script src="gavcoin.js"></script>
</body>
</html>

View File

@ -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/>.
import ReactDOM from 'react-dom';
import React from 'react';
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
import Application from './gavcoin/Application';
import '../../assets/fonts/Roboto/font.css';
import '../../assets/fonts/RobotoMono/font.css';
import './style.css';
import './gavcoin.html';
ReactDOM.render(
<Application />,
document.querySelector('#container')
);

View File

@ -1,45 +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/>.
*/
.account {
padding: 4px 0 !important;
display: inline-block;
}
.name {
display: inline-block;
margin-right: 1em;
text-transform: uppercase;
}
.balance {
display: inline-block;
text-align: right;
color: #aaa;
font-family: 'Roboto Mono', monospace;
}
.details {
display: inline-block;
}
.image {
display: inline-block;
}
.image img {
margin: 0 1em -11px 0;
}

View File

@ -1,63 +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/>.
import React, { Component, PropTypes } from 'react';
import IdentityIcon from '../../IdentityIcon';
import styles from './accountItem.css';
export default class AccountItem extends Component {
static propTypes = {
account: PropTypes.object,
gavBalance: PropTypes.bool
};
render () {
const { account, gavBalance } = this.props;
let balance;
let token;
if (gavBalance) {
if (account.gavBalance) {
balance = account.gavBalance;
token = 'GAV';
}
} else {
if (account.ethBalance) {
balance = account.ethBalance;
token = 'ETH';
}
}
return (
<div className={ styles.account }>
<div className={ styles.image }>
<IdentityIcon address={ account.address } />
</div>
<div className={ styles.details }>
<div className={ styles.name }>
{ account.name || account.address }
</div>
<div className={ styles.balance }>
{ balance }<small> { token }</small>
</div>
</div>
</div>
);
}
}

View File

@ -1,17 +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/>.
export default from './accountItem';

View File

@ -1,102 +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/>.
import BigNumber from 'bignumber.js';
import React, { Component, PropTypes } from 'react';
import { MenuItem, SelectField } from 'material-ui';
import AccountItem from './AccountItem';
const NAME_ID = ' ';
let lastSelectedAccount = {};
export default class AccountSelect extends Component {
static propTypes = {
accounts: PropTypes.array,
account: PropTypes.object,
anyAccount: PropTypes.bool,
gavBalance: PropTypes.bool,
onSelect: PropTypes.func,
errorText: PropTypes.string,
floatingLabelText: PropTypes.string,
hintText: PropTypes.string
}
componentDidMount () {
this.props.onSelect(lastSelectedAccount);
}
render () {
const { account, accounts, anyAccount, errorText, floatingLabelText, gavBalance, hintText } = this.props;
return (
<SelectField
autoComplete='off'
floatingLabelFixed
floatingLabelText={ floatingLabelText }
fullWidth
hintText={ hintText }
errorText={ errorText }
name={ NAME_ID }
id={ NAME_ID }
value={ account }
onChange={ this.onSelect }>
{ renderAccounts(accounts, { anyAccount, gavBalance }) }
</SelectField>
);
}
onSelect = (event, idx, account) => {
lastSelectedAccount = account || {};
this.props.onSelect(lastSelectedAccount);
}
}
function isPositive (numberStr) {
return new BigNumber(numberStr.replace(',', '')).gt(0);
}
export function renderAccounts (accounts, options = {}) {
return accounts
.filter((account) => {
if (options.anyAccount) {
return true;
}
if (account.uuid) {
return isPositive(account[options.gavBalance ? 'gavBalance' : 'ethBalance']);
}
return false;
})
.map((account) => {
const item = (
<AccountItem
account={ account }
key={ account.address }
gavBalance={ options.gavBalance || false } />
);
return (
<MenuItem
key={ account.address }
value={ account }
label={ item }>
{ item }
</MenuItem>
);
});
}

View File

@ -1,22 +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/>.
import { renderAccounts } from './accountSelector';
export default from './accountSelector';
export {
renderAccounts
};

View File

@ -1,106 +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/>.
import React, { Component, PropTypes } from 'react';
import { TextField } from 'material-ui';
import IdentityIcon from '../IdentityIcon';
import AccountSelector from '../AccountSelector';
import styles from './accountSelectorText.css';
const NAME_ID = ' ';
export default class AccountSelectorText extends Component {
static propTypes = {
accounts: PropTypes.array,
account: PropTypes.object,
errorText: PropTypes.string,
gavBalance: PropTypes.bool,
anyAccount: PropTypes.bool,
floatingLabelText: PropTypes.string,
hintText: PropTypes.string,
selector: PropTypes.bool,
onChange: PropTypes.func
}
render () {
const { selector } = this.props;
return selector
? this.renderDropDown()
: this.renderTextField();
}
renderDropDown () {
const { account, accounts, anyAccount, errorText, gavBalance, hintText, floatingLabelText, onChange } = this.props;
return (
<AccountSelector
anyAccount={ anyAccount }
gavBalance={ gavBalance }
accounts={ accounts }
account={ account }
errorText={ errorText }
floatingLabelText={ floatingLabelText }
hintText={ hintText }
onSelect={ onChange } />
);
}
renderTextField () {
const { account, errorText, hintText, floatingLabelText } = this.props;
return (
<div className={ styles.addrtext }>
<TextField
className={ styles.input }
autoComplete='off'
floatingLabelFixed
floatingLabelText={ floatingLabelText }
fullWidth
hintText={ hintText }
errorText={ errorText }
name={ NAME_ID }
id={ NAME_ID }
value={ account.address || '' }
onChange={ this.onChangeAddress } />
{ this.renderAddressIcon() }
</div>
);
}
renderAddressIcon () {
const { account } = this.props;
if (!account.address) {
return null;
}
return (
<div className={ styles.addricon }>
<IdentityIcon address={ account.address } />
</div>
);
}
onChangeAddress = (event, address) => {
const lower = address.toLowerCase();
const account = this.props.accounts.find((_account) => _account.address.toLowerCase() === lower);
this.props.onChange(account || { address });
}
}

View File

@ -1,17 +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/>.
export default from './accountSelectorText';

View File

@ -1,47 +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/>.
*/
.accounts {
padding: 4em 2em 0 2em;
text-align: center;
width: 100%;
}
.account {
margin: 0.5em !important;
background: #430 !important;
display: inline-block !important;
}
.account img {
margin-bottom: -11px;
margin-left: -11px;
}
.balance {
font-family: 'Roboto Mono', monospace;
color: rgba(255, 255, 255, 1) !important;
}
.name {
color: rgba(255, 255, 255, 0.7) !important;
margin-right: 1em;
text-transform: uppercase;
}
.none {
color: rgba(255, 255, 255, 0.7);
}

View File

@ -1,83 +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/>.
import React, { Component, PropTypes } from 'react';
import { Chip } from 'material-ui';
import IdentityIcon from '../IdentityIcon';
import styles from './accounts.css';
export default class Accounts extends Component {
static contextTypes = {
api: PropTypes.object.isRequired,
instance: PropTypes.object.isRequired
}
static propTypes = {
accounts: PropTypes.array
}
render () {
const has = this._hasAccounts();
return (
<div className={ styles.accounts }>
{ has ? this.renderAccounts() : this.renderEmpty() }
</div>
);
}
renderEmpty () {
return (
<div className={ styles.none }>
You currently do not have any GAVcoin in any of your addresses, buy some
</div>
);
}
renderAccounts () {
const { accounts } = this.props;
return accounts
.filter((account) => account.hasGav)
.map((account) => {
return (
<Chip
className={ styles.account }
key={ account.address }>
<IdentityIcon address={ account.address } />
<span className={ styles.name }>
{ account.name }
</span>
<span className={ styles.balance }>
{ account.gavBalance }
</span>
</Chip>
);
});
}
_hasAccounts () {
const { accounts } = this.props;
if (!accounts || !accounts.length) {
return false;
}
return accounts.filter((account) => account.hasGav).length !== 0;
}
}

View File

@ -1,209 +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/>.
import BigNumber from 'bignumber.js';
import React, { Component, PropTypes } from 'react';
import { Dialog, FlatButton, TextField } from 'material-ui';
import { api } from '../../parity';
import AccountSelector from '../../AccountSelector';
import { ERRORS, validateAccount, validatePositiveNumber } from '../validation';
import styles from '../actions.css';
const NAME_ID = ' ';
export default class ActionBuyIn extends Component {
static contextTypes = {
instance: PropTypes.object.isRequired
}
static propTypes = {
accounts: PropTypes.array,
price: PropTypes.object,
onClose: PropTypes.func
}
state = {
account: {},
accountError: ERRORS.invalidAccount,
amount: 0,
amountError: ERRORS.invalidAmount,
maxPrice: api.util.fromWei(this.props.price.mul(1.2)).toFixed(0),
maxPriceError: null,
sending: false,
complete: false
}
render () {
const { complete } = this.state;
if (complete) {
return null;
}
return (
<Dialog
title='buy coins for a specific account'
modal open
className={ styles.dialog }
actions={ this.renderActions() }>
{ this.renderFields() }
</Dialog>
);
}
renderActions () {
const { complete } = this.state;
if (complete) {
return (
<FlatButton
className={ styles.dlgbtn }
label='Done'
primary
onTouchTap={ this.props.onClose } />
);
}
const { accountError, amountError, maxPriceError, sending } = this.state;
const hasError = !!(amountError || accountError || maxPriceError);
return ([
<FlatButton
className={ styles.dlgbtn }
label='Cancel'
primary
onTouchTap={ this.props.onClose } />,
<FlatButton
className={ styles.dlgbtn }
label='Buy'
primary
disabled={ hasError || sending }
onTouchTap={ this.onSend } />
]);
}
renderFields () {
const maxPriceLabel = `maximum price in ETH (current ${api.util.fromWei(this.props.price).toFormat(3)})`;
return (
<div>
<AccountSelector
accounts={ this.props.accounts }
account={ this.state.account }
errorText={ this.state.accountError }
floatingLabelText='from account'
hintText='the account the transaction will be made from'
onSelect={ this.onChangeAddress } />
<TextField
autoComplete='off'
floatingLabelFixed
floatingLabelText='amount in ETH'
fullWidth
hintText='the amount of ETH you wish to spend'
errorText={ this.state.amountError }
name={ NAME_ID }
id={ NAME_ID }
value={ this.state.amount }
onChange={ this.onChangeAmount } />
<TextField
autoComplete='off'
floatingLabelFixed
floatingLabelText={ maxPriceLabel }
fullWidth
hintText='the maxium price allowed for buying'
errorText={ this.state.maxPriceError }
name={ NAME_ID }
id={ NAME_ID }
value={ this.state.maxPrice }
onChange={ this.onChangeMaxPrice } />
</div>
);
}
onChangeAddress = (account) => {
this.setState({
account,
accountError: validateAccount(account)
}, this.validateTotal);
}
onChangeAmount = (event, amount) => {
this.setState({
amount,
amountError: validatePositiveNumber(amount)
}, this.validateTotal);
}
onChangeMaxPrice = (event, maxPrice) => {
this.setState({
maxPrice,
maxPriceError: validatePositiveNumber(maxPrice)
});
}
validateTotal = () => {
const { account, accountError, amount, amountError } = this.state;
if (accountError || amountError) {
return;
}
if (new BigNumber(amount).gt(account.ethBalance.replace(',', ''))) {
this.setState({
amountError: ERRORS.invalidTotal
});
}
}
onSend = () => {
const { instance } = this.context;
const maxPrice = api.util.toWei(this.state.maxPrice);
const values = [this.state.account.address, maxPrice.toString()];
const options = {
from: this.state.account.address,
value: api.util.toWei(this.state.amount).toString()
};
this.setState({
sending: true
});
instance.buyin
.estimateGas(options, values)
.then((gasEstimate) => {
options.gas = gasEstimate.mul(1.2).toFixed(0);
console.log(`buyin: gas estimated as ${gasEstimate.toFixed(0)} setting to ${options.gas}`);
return instance.buyin.postTransaction(options, values);
})
.then(() => {
this.props.onClose();
this.setState({
sending: false,
complete: true
});
})
.catch((error) => {
console.error('error', error);
this.setState({
sending: false
});
});
}
}

View File

@ -1,17 +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/>.
export default from './actionBuyIn';

View File

@ -1,194 +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/>.
import BigNumber from 'bignumber.js';
import React, { Component, PropTypes } from 'react';
import { Dialog, FlatButton, TextField } from 'material-ui';
import { api } from '../../parity';
import AccountSelector from '../../AccountSelector';
import { ERRORS, validateAccount, validatePositiveNumber } from '../validation';
import styles from '../actions.css';
const DIVISOR = 10 ** 6;
const NAME_ID = ' ';
export default class ActionRefund extends Component {
static contextTypes = {
instance: PropTypes.object.isRequired
}
static propTypes = {
accounts: PropTypes.array,
price: PropTypes.object,
onClose: PropTypes.func
}
state = {
account: {},
accountError: ERRORS.invalidAccount,
complete: false,
sending: false,
amount: 0,
amountError: ERRORS.invalidAmount,
price: api.util.fromWei(this.props.price).toString(),
priceError: null
}
render () {
const { complete } = this.state;
if (complete) {
return null;
}
return (
<Dialog
title='return coins for a refund'
modal open
className={ styles.dialog }
actions={ this.renderActions() }>
{ this.renderFields() }
</Dialog>
);
}
renderActions () {
if (this.state.complete) {
return (
<FlatButton
className={ styles.dlgbtn }
label='Done'
primary
onTouchTap={ this.props.onClose } />
);
}
const hasError = !!(this.state.priceError || this.state.amountError || this.state.accountError);
return ([
<FlatButton
className={ styles.dlgbtn }
label='Cancel'
primary
onTouchTap={ this.props.onClose } />,
<FlatButton
className={ styles.dlgbtn }
label='Refund'
primary
disabled={ hasError || this.state.sending }
onTouchTap={ this.onSend } />
]);
}
renderFields () {
const priceLabel = `price in ETH (current ${api.util.fromWei(this.props.price).toFormat(3)})`;
return (
<div>
<AccountSelector
gavBalance
accounts={ this.props.accounts }
account={ this.state.account }
errorText={ this.state.accountError }
floatingLabelText='from account'
hintText='the account the transaction will be made from'
onSelect={ this.onChangeAddress } />
<TextField
autoComplete='off'
floatingLabelFixed
floatingLabelText='number of coins'
fullWidth
hintText='the number of coins to exchange for an ETH refund'
errorText={ this.state.amountError }
name={ NAME_ID }
id={ NAME_ID }
value={ this.state.amount }
onChange={ this.onChangeAmount } />
<TextField
autoComplete='off'
floatingLabelFixed
floatingLabelText={ priceLabel }
fullWidth
hintText='the price the refund is requested at'
errorText={ this.state.priceError }
name={ NAME_ID }
id={ NAME_ID }
value={ this.state.price }
onChange={ this.onChangePrice } />
</div>
);
}
onChangeAddress = (account) => {
this.setState({
account,
accountError: validateAccount(account)
});
}
onChangeAmount = (event, amount) => {
this.setState({
amount,
amountError: validatePositiveNumber(amount)
});
}
onChangePrice = (event, price) => {
this.setState({
price,
priceError: validatePositiveNumber(price)
});
}
onSend = () => {
const { instance } = this.context;
const price = api.util.toWei(this.state.price);
const amount = new BigNumber(this.state.amount).mul(DIVISOR);
const values = [price.toString(), amount.toFixed(0)];
const options = {
from: this.state.account.address
};
this.setState({
sending: true
});
instance.refund
.estimateGas(options, values)
.then((gasEstimate) => {
options.gas = gasEstimate.mul(1.2).toFixed(0);
console.log(`refund: gas estimated as ${gasEstimate.toFixed(0)} setting to ${options.gas}`);
return instance.refund.postTransaction(options, values);
})
.then(() => {
this.props.onClose();
this.setState({
sending: false,
complete: true
});
})
.catch((error) => {
console.error('error', error);
this.setState({
sending: false
});
});
}
}

View File

@ -1,223 +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/>.
import BigNumber from 'bignumber.js';
import React, { Component, PropTypes } from 'react';
import { Dialog, FlatButton, TextField, Toggle } from 'material-ui';
import AccountSelector from '../../AccountSelector';
import AccountSelectorText from '../../AccountSelectorText';
import { ERRORS, validateAccount, validatePositiveNumber } from '../validation';
import styles from '../actions.css';
const DIVISOR = 10 ** 6;
const NAME_ID = ' ';
export default class ActionTransfer extends Component {
static contextTypes = {
instance: PropTypes.object.isRequired
}
static propTypes = {
accounts: PropTypes.array,
price: PropTypes.object,
onClose: PropTypes.func
}
state = {
fromAccount: {},
fromAccountError: ERRORS.invalidAccount,
toAccount: {},
toAccountError: ERRORS.invalidRecipient,
inputAccount: false,
complete: false,
sending: false,
amount: 0,
amountError: ERRORS.invalidAmount
}
render () {
const { complete } = this.state;
if (complete) {
return null;
}
return (
<Dialog
title='send coins to another account'
modal open
className={ styles.dialog }
actions={ this.renderActions() }>
{ this.renderFields() }
</Dialog>
);
}
renderActions () {
const { complete, sending, amountError, fromAccountError, toAccountError } = this.state;
if (complete) {
return (
<FlatButton
className={ styles.dlgbtn }
label='Done'
primary
onTouchTap={ this.props.onClose } />
);
}
const hasError = !!(amountError || fromAccountError || toAccountError);
return ([
<FlatButton
className={ styles.dlgbtn }
label='Cancel'
primary
onTouchTap={ this.props.onClose } />,
<FlatButton
className={ styles.dlgbtn }
label='Transfer'
primary
disabled={ hasError || sending }
onTouchTap={ this.onSend } />
]);
}
renderFields () {
const { accounts } = this.props;
const { fromAccount, fromAccountError, toAccount, toAccountError, inputAccount, amount, amountError } = this.state;
return (
<div>
<AccountSelector
gavBalance
accounts={ accounts }
account={ fromAccount }
errorText={ fromAccountError }
floatingLabelText='from account'
hintText='the account the transaction will be made from'
onSelect={ this.onChangeFromAccount } />
<div className={ styles.overlay }>
<AccountSelectorText
gavBalance anyAccount
selector={ !inputAccount }
accounts={ accounts }
account={ toAccount }
errorText={ toAccountError }
floatingLabelText='to account'
hintText='the account the coins will be sent to'
onChange={ this.onChangeToAccount } />
<Toggle
className={ styles.overlaytoggle }
label='Edit'
labelPosition='right'
toggled={ inputAccount }
onToggle={ this.onChangeToInput } />
</div>
<TextField
autoComplete='off'
floatingLabelFixed
floatingLabelText='number of coins'
fullWidth
hintText='the number of coins to transfer'
errorText={ amountError }
name={ NAME_ID }
id={ NAME_ID }
value={ amount }
onChange={ this.onChangeAmount } />
</div>
);
}
onChangeFromAccount = (fromAccount) => {
this.setState({
fromAccount,
fromAccountError: validateAccount(fromAccount)
}, this.validateTotal);
}
onChangeToAccount = (toAccount) => {
this.setState({
toAccount,
toAccountError: validateAccount(toAccount)
});
}
onChangeToInput = () => {
this.setState({
inputAccount: !this.state.inputAccount
});
}
onChangeAmount = (event, amount) => {
this.setState({
amount,
amountError: validatePositiveNumber(amount)
}, this.validateTotal);
}
validateTotal = () => {
const { fromAccount, fromAccountError, amount, amountError } = this.state;
if (fromAccountError || amountError) {
return;
}
if (new BigNumber(amount).gt(fromAccount.gavBalance.replace(',', ''))) {
this.setState({
amountError: ERRORS.invalidTotal
});
}
}
onSend = () => {
const { instance } = this.context;
const amount = new BigNumber(this.state.amount).mul(DIVISOR);
const values = [this.state.toAccount.address, amount.toFixed(0)];
const options = {
from: this.state.fromAccount.address
};
this.setState({
sending: true
});
instance.transfer
.estimateGas(options, values)
.then((gasEstimate) => {
options.gas = gasEstimate.mul(1.2).toFixed(0);
console.log(`transfer: gas estimated as ${gasEstimate.toFixed(0)} setting to ${options.gas}`);
return instance.transfer.postTransaction(options, values);
})
.then(() => {
this.props.onClose();
this.setState({
sending: false,
complete: true
});
})
.catch((error) => {
console.error('error', error);
this.setState({
sending: false
});
});
}
}

View File

@ -1,17 +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/>.
export default from './actionTransfer';

View File

@ -1,17 +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/>.
export default from './stepComplete';

View File

@ -1,29 +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/>.
import React, { Component } from 'react';
import styles from '../actions.css';
export default class StepComplete extends Component {
render () {
return (
<div className={ styles.dialogtext }>
Your transaction has been posted. Please visit the <a href='http://127.0.0.1:8080/#/signer' className={ styles.link } target='_blank'>Parity Signer</a> to authenticate the transfer.
</div>
);
}
}

View File

@ -1,83 +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/>.
*/
.actions {
text-align: center;
padding: 2em 0 0 0;
width: 100%;
}
.button {
margin: 0 0.5em;
}
.button button {
background-color: #430 !important;
height: 56px !important;
padding: 0 10px !important;
}
.button button[disabled] {
opacity: 0.25;
}
.dlgbtn {
}
.dlgbtn span {
color: #430 !important;
}
.dlgbtn[disabled] {
opacity: 0.25;
}
.dialog {
}
.dialog h3 {
color: #430 !important;
text-transform: uppercase;
}
.dialogtext {
padding-top: 1em;
}
.link, .link:hover, .link:visited {
color: rgb(0, 188, 212);
text-decoration: none;
}
.overlay {
position: relative;
}
.overlay svg {
opacity: 0;
}
.toggle {
text-align: right;
}
.overlaytoggle {
position: absolute !important;
top: 40px;
right: 0;
display: inline-block !important;
width: auto !important;
}

View File

@ -1,76 +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/>.
import React, { Component, PropTypes } from 'react';
import { RaisedButton } from 'material-ui';
import ActionAddShoppingCart from 'material-ui/svg-icons/action/add-shopping-cart';
// import AvReplay from 'material-ui/svg-icons/av/replay';
import ContentSend from 'material-ui/svg-icons/content/send';
import styles from './actions.css';
export default class Actions extends Component {
static propTypes = {
onAction: PropTypes.func.isRequired,
gavBalance: PropTypes.object.isRequired
}
render () {
const { gavBalance } = this.props;
return (
<div className={ styles.actions }>
<RaisedButton
className={ styles.button }
icon={ <ActionAddShoppingCart /> }
label='buy coins'
primary
onTouchTap={ this.onBuyIn } />
<RaisedButton
disabled={ !gavBalance || gavBalance.eq(0) }
className={ styles.button }
icon={ <ContentSend /> }
label='send coins'
primary
onTouchTap={ this.onTransfer } />
</div>
);
// <RaisedButton
// className={ styles.button }
// icon={ <AvReplay /> }
// label='claim refund'
// primary
// onTouchTap={ this.onRefund } />
}
onBuyIn = () => {
this.props.onAction('BuyIn');
}
onTransfer = () => {
const { gavBalance } = this.props;
if (gavBalance && gavBalance.gt(0)) {
this.props.onAction('Transfer');
}
}
onRefund = () => {
this.props.onAction('Refund');
}
}

View File

@ -1,27 +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/>.
import ActionBuyIn from './ActionBuyIn';
import ActionRefund from './ActionRefund';
import ActionTransfer from './ActionTransfer';
export default from './actions';
export {
ActionBuyIn,
ActionRefund,
ActionTransfer
};

View File

@ -1,56 +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/>.
import BigNumber from 'bignumber.js';
import { api } from '../parity';
export const ERRORS = {
invalidAccount: 'please select an account to transact with',
invalidRecipient: 'please select an account to send to',
invalidAddress: 'the address is not in the correct format',
invalidAmount: 'please enter a positive amount > 0',
invalidTotal: 'the amount is greater than the availale balance'
};
export function validatePositiveNumber (value) {
let bn = null;
try {
bn = new BigNumber(value);
} catch (e) {
}
if (!bn || !bn.gt(0)) {
return ERRORS.invalidAmount;
}
return null;
}
export function validateAccount (account) {
if (!account || !account.address) {
return ERRORS.invalidAccount;
}
if (!api.util.isAddressValid(account.address)) {
return ERRORS.invalidAddress;
}
account.address = api.util.toChecksumAddress(account.address);
return null;
}

Some files were not shown because too many files have changed in this diff Show More