Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
fix(core): fix abi tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gakonst committed Jun 16, 2020
1 parent 9ecfd8a commit a2f6edd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ethers-contract/ethers-contract-derive/src/abigen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use crate::spanned::{ParseInner, Spanned};

use ethers_contract_abigen::Abigen;
use ethers_core::abi::{Function, StateMutability, FunctionExt, Param};
use ethers_core::abi::{Function, FunctionExt, Param, StateMutability};

use proc_macro2::{Span, TokenStream as TokenStream2};
use quote::ToTokens;
Expand Down
8 changes: 4 additions & 4 deletions ethers-core/src/abi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ mod tests {
#[test]
fn format_function_signature() {
for (f, expected) in &[
(r#"{"name":"foo","inputs":[],"outputs":[]}"#, "foo()"),
(r#"{"name":"foo","inputs":[],"outputs":[], "stateMutability": "nonpayable"}"#, "foo()"),
(
r#"{"name":"bar","inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"bool"}],"outputs":[]}"#,
r#"{"name":"bar","inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"bool"}],"outputs":[], "stateMutability": "nonpayable"}"#,
"bar(uint256,bool)",
),
(
r#"{"name":"baz","inputs":[{"name":"a","type":"uint256"}],"outputs":[{"name":"b","type":"bool"}]}"#,
r#"{"name":"baz","inputs":[{"name":"a","type":"uint256"}],"outputs":[{"name":"b","type":"bool"}], "stateMutability": "nonpayable"}"#,
"baz(uint256)",
),
(
r#"{"name":"bax","inputs":[],"outputs":[{"name":"a","type":"uint256"},{"name":"b","type":"bool"}]}"#,
r#"{"name":"bax","inputs":[],"outputs":[{"name":"a","type":"uint256"},{"name":"b","type":"bool"}], "stateMutability": "nonpayable"}"#,
"bax()",
),
] {
Expand Down
2 changes: 1 addition & 1 deletion ethers/examples/abigen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use ethers::{utils::Solc, contract::Abigen};
use ethers::{contract::Abigen, utils::Solc};

fn main() -> anyhow::Result<()> {
let mut args = std::env::args();
Expand Down

0 comments on commit a2f6edd

Please sign in to comment.