Skip to content

Commit

Permalink
Merge pull request #9 from ethcore/fallback_for_fallback
Browse files Browse the repository at this point in the history
fallback for fallback, version 0.2.3
  • Loading branch information
debris authored Nov 21, 2016
2 parents cfc591b + 65f6525 commit 3b7284b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
35 changes: 18 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ethabi"
version = "0.2.2"
version = "0.2.3"
authors = ["debris <[email protected]>"]
build = "build.rs"
homepage = "https://github.com/ethcore/ethabi"
Expand Down
3 changes: 3 additions & 0 deletions src/spec/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ pub enum Operation {
Function(Function),
/// Contract event.
Event(Event),
/// Fallback, ignored.
Fallback,
}

impl Deserialize for Operation {
Expand All @@ -27,6 +29,7 @@ impl Deserialize for Operation {
"constructor" => from_value(v).map(Operation::Constructor),
"function" => from_value(v).map(Operation::Function),
"event" => from_value(v).map(Operation::Event),
"fallback" => Ok(Operation::Fallback),
_ => Err(SerdeError::custom("Invalid operation type.")),
};
result.map_err(|e| D::Error::custom(e.to_string()))
Expand Down

0 comments on commit 3b7284b

Please sign in to comment.