Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sbillig committed May 18, 2022
1 parent 2f57a1f commit 64c0d74
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions crates/abi/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,23 @@ mod tests {
#[test]
fn build_contract_abi() {
let contract = r#"
pub fn add(_ x: u256, _ y: u256) -> u256:
pub fn add(_ x: u256, _ y: u256) -> u256 {
return x + y
contract Foo:
event Food:
}
contract Foo {
event Food {
idx barge: u256
pub fn __init__(x: address):
pass
fn baz(_ x: address) -> u256:
}
pub fn __init__(x: address) {
}
fn baz(_ x: address) -> u256 {
add(10, 20)
revert
pub fn bar(_ x: u256) -> Array<u256, 10>:
revert"#;
}
pub fn bar(_ x: u256) -> Array<u256, 10> {
revert
}
}"#;

let mut db = TestDb::default();
let module = ModuleId::new_standalone(&mut db, "test_module", contract);
Expand Down

0 comments on commit 64c0d74

Please sign in to comment.