Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
g-r-a-n-t committed Jun 30, 2021
1 parent 64241fb commit 0403161
Show file tree
Hide file tree
Showing 31 changed files with 565 additions and 568 deletions.
124 changes: 1 addition & 123 deletions Cargo.lock

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

4 changes: 0 additions & 4 deletions crates/analyzer/src/namespace/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ impl AbiType {
}
}

pub fn ceil_32(n: usize) -> usize {
((n + 31) / 32) * 32
}

/// Data can be decoded from memory or calldata.
#[derive(Clone, Debug, PartialEq, PartialOrd, Ord, Eq, Copy)]
pub enum AbiDecodeLocation {
Expand Down
8 changes: 4 additions & 4 deletions crates/analyzer/tests/snapshots/analysis__assert.snap
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ note:
2 │ ╭ pub def bar(baz: u256):
3 │ │ assert baz > 5
│ ╰──────────────────────^ attributes hash: 15822262529719405181
│ ╰──────────────────────^ attributes hash: 10099444286773984657
= FunctionAttributes {
is_public: true,
Expand All @@ -274,7 +274,7 @@ note:
5 │ ╭ pub def revert_with_static_string(baz: u256):
6 │ │ assert baz > 5, "Must be greater than five"
│ ╰───────────────────────────────────────────────────^ attributes hash: 17432662740340635293
│ ╰───────────────────────────────────────────────────^ attributes hash: 5022511224749644990
= FunctionAttributes {
is_public: true,
Expand All @@ -299,7 +299,7 @@ note:
8 │ ╭ pub def revert_with(baz: u256, reason: String<1000>):
9 │ │ assert baz > 5, reason
│ ╰──────────────────────────────^ attributes hash: 15346937376382820850
│ ╰──────────────────────────────^ attributes hash: 7270738123661022492
= FunctionAttributes {
is_public: true,
Expand Down Expand Up @@ -337,7 +337,7 @@ note:
· │
8 │ │ pub def revert_with(baz: u256, reason: String<1000>):
9 │ │ assert baz > 5, reason
│ ╰──────────────────────────────^ attributes hash: 7910349604985706298
│ ╰──────────────────────────────^ attributes hash: 7767111938691910304
= ContractAttributes {
public_functions: [
Expand Down
12 changes: 6 additions & 6 deletions crates/analyzer/tests/snapshots/analysis__create2_contract.snap
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ note:
┌─ features/create2_contract.fe:9:16
9return address(foo)
^^^^^^^^^^^^ attributes hash: 513065555763557710
^^^^^^^^^^^^ attributes hash: 16366719240912622931
= ExpressionAttributes {
typ: Base(
Expand Down Expand Up @@ -183,7 +183,7 @@ note:
7 │ │ # value and salt
8 │ │ foo: Foo = Foo.create2(0, 52)
9 │ │ return address(foo)
│ ╰───────────────────────────^ attributes hash: 11270695810756310777
│ ╰───────────────────────────^ attributes hash: 15788904857074118116
= FunctionAttributes {
is_public: true,
Expand Down Expand Up @@ -224,7 +224,7 @@ note:
1 │ ╭ contract Foo:
2 │ │ pub def get_my_num() -> u256:
3 │ │ return 42
│ ╰─────────────────^ attributes hash: 8309658977386373707
│ ╰─────────────────^ attributes hash: 10466279856294948272
= ContractAttributes {
public_functions: [
Expand Down Expand Up @@ -267,7 +267,7 @@ note:
7 │ │ # value and salt
8 │ │ foo: Foo = Foo.create2(0, 52)
9 │ │ return address(foo)
│ ╰───────────────────────────^ attributes hash: 11718874792159837218
│ ╰───────────────────────────^ attributes hash: 9489720864976305437
= ContractAttributes {
public_functions: [
Expand Down Expand Up @@ -333,7 +333,7 @@ note:
┌─ features/create2_contract.fe:9:16
9return address(foo)
^^^^^^^ attributes hash: 6114858510168753394
^^^^^^^ attributes hash: 12543456546113081273
= TypeConstructor {
typ: Base(
Expand All @@ -357,7 +357,7 @@ note:
┌─ features/create2_contract.fe:6:30
6pub def create2_foo() -> address:
^^^^^^^ attributes hash: 574436082528610497
^^^^^^^ attributes hash: 16931239362436195516
= Base(
Address,
Expand Down
12 changes: 6 additions & 6 deletions crates/analyzer/tests/snapshots/analysis__create_contract.snap
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ note:
┌─ features/create_contract.fe:8:16
8return address(foo)
^^^^^^^^^^^^ attributes hash: 513065555763557710
^^^^^^^^^^^^ attributes hash: 16366719240912622931
= ExpressionAttributes {
typ: Base(
Expand Down Expand Up @@ -166,7 +166,7 @@ note:
6 │ ╭ pub def create_foo() -> address:
7 │ │ foo: Foo = Foo.create(0)
8 │ │ return address(foo)
│ ╰───────────────────────────^ attributes hash: 15105527221342038630
│ ╰───────────────────────────^ attributes hash: 11307555315188767880
= FunctionAttributes {
is_public: true,
Expand Down Expand Up @@ -207,7 +207,7 @@ note:
1 │ ╭ contract Foo:
2 │ │ pub def get_my_num() -> u256:
3 │ │ return 42
│ ╰─────────────────^ attributes hash: 1249068046238630911
│ ╰─────────────────^ attributes hash: 16252373182675216901
= ContractAttributes {
public_functions: [
Expand Down Expand Up @@ -249,7 +249,7 @@ note:
6 │ │ pub def create_foo() -> address:
7 │ │ foo: Foo = Foo.create(0)
8 │ │ return address(foo)
│ ╰───────────────────────────^ attributes hash: 1619027558401104719
│ ╰───────────────────────────^ attributes hash: 15817588436725138336
= ContractAttributes {
public_functions: [
Expand Down Expand Up @@ -315,7 +315,7 @@ note:
┌─ features/create_contract.fe:8:16
8return address(foo)
^^^^^^^ attributes hash: 6114858510168753394
^^^^^^^ attributes hash: 12543456546113081273
= TypeConstructor {
typ: Base(
Expand All @@ -339,7 +339,7 @@ note:
┌─ features/create_contract.fe:6:29
6pub def create_foo() -> address:
^^^^^^^ attributes hash: 574436082528610497
^^^^^^^ attributes hash: 16931239362436195516
= Base(
Address,
Expand Down
Loading

0 comments on commit 0403161

Please sign in to comment.