Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cast): improve cast wallet new #1713

Merged
merged 3 commits into from
May 28, 2022

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented May 24, 2022

Motivation

Close #1712
the previous --password --unsafe-password options didn't actually require either to be set which could result in a panic.

Solution

  • move Walletcommand to its own module
  • deprecate --password and make this the default behaviour
  • error if the path is not a directory and update path help

Perhaps we should also support paths to a non-existing file, as in #1712. But only accepting dirs is same behaviour as geth account new

@mattsse mattsse added T-bug Type: bug C-cast Command: cast labels May 24, 2022
@onbjerg
Copy link
Member

onbjerg commented May 27, 2022

Might close #926?

@onbjerg onbjerg linked an issue May 27, 2022 that may be closed by this pull request
@mattsse mattsse merged commit 4001a84 into foundry-rs:master May 28, 2022
mattsse added a commit that referenced this pull request May 28, 2022
* keep tack of emitter of logs (#1669)

* [not compiling] keep tack of emitter of logs

by switching from RawLog to Log

* ugly fix

* cargo +nightly fmt

* Add comment

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

* fix variable name

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* provide default impls for remaining visitor methods (#1706)

* chore(clippy): make clippy happy (#1707)

* chore: bump ethers

* feat(bind): option to skip Cargo.toml from consistency checks (#1702)

* feat(bind): option to skip Cargo.toml from consistency checks

* chore: cargo fmt

* Update cli/src/cmd/forge/bind.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* chore: clippy lints

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix(verify): encode constructor arguments correctly (#1711)

* fix(verify): encode constructor arguments correctly

* chore: rotate api keys

* Update cli/tests/it/verify.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat: use rotating api keys in fork unit tests (#1693)

* feat: use rotating api keys in fork unit tests

* fix: use correct path

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* refactor: spawn backendhandler on background thread (#1704)

* fix(watch): only watch dirs that exists (#1710)

* Switch selector database to sig.eth.samczsun.com (#1674)

* feat(utils): use samczsun selector directory

This commit switches the utils crate to use samczsun's new function
selector over 4byte for an improved interface and better stability

* feat(cast): update cli to use new 4byte interface

The util bindings were changed to use samczsun's selector library in the
previous commit; this commit updates the cast cli to properly use the
slightly changed interface.

Also ran cargo fmt which updated some unrelated formatting

* fix: review comments

- undo unrelated cargo fmt changes
- rename fourbyte_* -> decode_* in utils

* fix: remove fourbyte test helper

No longer necessary with sig.eth.samczsun.com

* Add `forge upload-selectors` command (#1676)

* feat: add upload selectors command to forge

This commit adds a new command to forge to upload a contract's abi to
sig.eth.samczsun.com selector database

* fix: review comments

- added default for CoreBuildArgs
- cleaned up code ordering
- moved url to constant

* fix: derive CoreBuildArgs::Default

* test: rotate rinkeby keys

* fix(forge/install): add git status check before commit (#1696)

* fix(forge/install): add git status check before commit

* move logic to git_status_clean function

Co-authored-by: test <test@test.com>

* write chunk

* restore original

* write chunks w/ paren

* semicolon cleanup

* write_semicolon

* feat: add `cast upload-signature` (#1716)

* feat: add `cast upload-signature`

This commit adds a new cast command to upload a raw function signature
to the https://sig.eth.samczsun.com 4byte database.

It also moves some of the original signature upload logic from `forge
upload-selectors` to a helper in foundry_utils

API looks like:
```
❯ cast upload-signature 'function approve(address,uint256)' 'transfer(uint256)' 'event Transfer(uint256,address)'
Duplicated: Function approve(address,uint256): 0x095ea7b3
Duplicated: Function transfer(uint256): 0x12514bba
Duplicated: Event Transfer(uint256,address): 0xabe1dcf9fcb8e5fb309db76bcab112a217aa5754d0f038921282bfe7907aa516
```

* fix: move selectors utils to separate module

* fix: add examples to cli help

* test(cast): add integration test for `cast upload-signature`

* feat(cast): allow uploading contract artifacts

This commit enables the `cast upload-signatures` tool to take contract
artifact files and upload the entire json to sig.eth.samczsun.com

* test: update failing tests (#1714)

* test: fix flaky timestamp test (#1727)

* fix: expressive value_name in clap annotations (#1700)

* value_name in forge test

* test debug help

* remove help and revert debug value_name to TEST FUNCTION

* forge test value_name

* forge value_name

* forge args add value_name

* all cast value_name

* Update cli/src/cmd/cast/run.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* cast FourByteDecode merge conflict

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* ClapChain value_name (#1731)

* utils & cleanup

* fix(forge/install): git status check (#1732)

* fix(cli): can_update_libs_section test (#1733)

* write_chunk! where possible

* func def fmt

* fix attrs

* tests

* linter

* anvil value_name (#1743)

* docs

* indented & indented_if

* unused import

* cleanup

* ci: add additional ci jobs for forks (#1728)

* ci: add additional ci jobs for forks

* test: fix flaky anvil test

* ci: setup git config

* ci: setup git config

* ci: setup git config global

* chore: fix flaky snapshot test

* fix: enable tokio time feature (#1750)

* chore(deps): replace colored with yansi (#1722)

* feat(config): add allow paths setting (#1751)

* ci: set git config global in cross platform ci (#1754)

* ci: set git config global in cross platform ci

* fix: flaky tests

* fix: use proper types

* fix(cast): improve cast wallet new (#1713)

* fix(cast): improve cast wallet new

* chore: cleanup imports

Co-authored-by: jole <jolejonaseh@gmail.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Meet Mangukiya <meet123mangukiya@gmail.com>
Co-authored-by: marktoda <40770586+marktoda@users.noreply.github.com>
Co-authored-by: 0xYYY <0xYYY@protonmail.com>
Co-authored-by: test <test@test.com>
Co-authored-by: Shawn Harmsen <shawn@zksnarks.xyz>
jpopesculian pushed a commit to jpopesculian/foundry that referenced this pull request Jun 3, 2022
* keep tack of emitter of logs (foundry-rs#1669)

* [not compiling] keep tack of emitter of logs

by switching from RawLog to Log

* ugly fix

* cargo +nightly fmt

* Add comment

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

* fix variable name

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* provide default impls for remaining visitor methods (foundry-rs#1706)

* chore(clippy): make clippy happy (foundry-rs#1707)

* chore: bump ethers

* feat(bind): option to skip Cargo.toml from consistency checks (foundry-rs#1702)

* feat(bind): option to skip Cargo.toml from consistency checks

* chore: cargo fmt

* Update cli/src/cmd/forge/bind.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* chore: clippy lints

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix(verify): encode constructor arguments correctly (foundry-rs#1711)

* fix(verify): encode constructor arguments correctly

* chore: rotate api keys

* Update cli/tests/it/verify.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat: use rotating api keys in fork unit tests (foundry-rs#1693)

* feat: use rotating api keys in fork unit tests

* fix: use correct path

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* refactor: spawn backendhandler on background thread (foundry-rs#1704)

* fix(watch): only watch dirs that exists (foundry-rs#1710)

* Switch selector database to sig.eth.samczsun.com (foundry-rs#1674)

* feat(utils): use samczsun selector directory

This commit switches the utils crate to use samczsun's new function
selector over 4byte for an improved interface and better stability

* feat(cast): update cli to use new 4byte interface

The util bindings were changed to use samczsun's selector library in the
previous commit; this commit updates the cast cli to properly use the
slightly changed interface.

Also ran cargo fmt which updated some unrelated formatting

* fix: review comments

- undo unrelated cargo fmt changes
- rename fourbyte_* -> decode_* in utils

* fix: remove fourbyte test helper

No longer necessary with sig.eth.samczsun.com

* Add `forge upload-selectors` command (foundry-rs#1676)

* feat: add upload selectors command to forge

This commit adds a new command to forge to upload a contract's abi to
sig.eth.samczsun.com selector database

* fix: review comments

- added default for CoreBuildArgs
- cleaned up code ordering
- moved url to constant

* fix: derive CoreBuildArgs::Default

* test: rotate rinkeby keys

* fix(forge/install): add git status check before commit (foundry-rs#1696)

* fix(forge/install): add git status check before commit

* move logic to git_status_clean function

Co-authored-by: test <test@test.com>

* write chunk

* restore original

* write chunks w/ paren

* semicolon cleanup

* write_semicolon

* feat: add `cast upload-signature` (foundry-rs#1716)

* feat: add `cast upload-signature`

This commit adds a new cast command to upload a raw function signature
to the https://sig.eth.samczsun.com 4byte database.

It also moves some of the original signature upload logic from `forge
upload-selectors` to a helper in foundry_utils

API looks like:
```
❯ cast upload-signature 'function approve(address,uint256)' 'transfer(uint256)' 'event Transfer(uint256,address)'
Duplicated: Function approve(address,uint256): 0x095ea7b3
Duplicated: Function transfer(uint256): 0x12514bba
Duplicated: Event Transfer(uint256,address): 0xabe1dcf9fcb8e5fb309db76bcab112a217aa5754d0f038921282bfe7907aa516
```

* fix: move selectors utils to separate module

* fix: add examples to cli help

* test(cast): add integration test for `cast upload-signature`

* feat(cast): allow uploading contract artifacts

This commit enables the `cast upload-signatures` tool to take contract
artifact files and upload the entire json to sig.eth.samczsun.com

* test: update failing tests (foundry-rs#1714)

* test: fix flaky timestamp test (foundry-rs#1727)

* fix: expressive value_name in clap annotations (foundry-rs#1700)

* value_name in forge test

* test debug help

* remove help and revert debug value_name to TEST FUNCTION

* forge test value_name

* forge value_name

* forge args add value_name

* all cast value_name

* Update cli/src/cmd/cast/run.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* cast FourByteDecode merge conflict

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* ClapChain value_name (foundry-rs#1731)

* utils & cleanup

* fix(forge/install): git status check (foundry-rs#1732)

* fix(cli): can_update_libs_section test (foundry-rs#1733)

* write_chunk! where possible

* func def fmt

* fix attrs

* tests

* linter

* anvil value_name (foundry-rs#1743)

* docs

* indented & indented_if

* unused import

* cleanup

* ci: add additional ci jobs for forks (foundry-rs#1728)

* ci: add additional ci jobs for forks

* test: fix flaky anvil test

* ci: setup git config

* ci: setup git config

* ci: setup git config global

* chore: fix flaky snapshot test

* fix: enable tokio time feature (foundry-rs#1750)

* chore(deps): replace colored with yansi (foundry-rs#1722)

* feat(config): add allow paths setting (foundry-rs#1751)

* ci: set git config global in cross platform ci (foundry-rs#1754)

* ci: set git config global in cross platform ci

* fix: flaky tests

* fix: use proper types

* fix(cast): improve cast wallet new (foundry-rs#1713)

* fix(cast): improve cast wallet new

* chore: cleanup imports

Co-authored-by: jole <jolejonaseh@gmail.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Meet Mangukiya <meet123mangukiya@gmail.com>
Co-authored-by: marktoda <40770586+marktoda@users.noreply.github.com>
Co-authored-by: 0xYYY <0xYYY@protonmail.com>
Co-authored-by: test <test@test.com>
Co-authored-by: Shawn Harmsen <shawn@zksnarks.xyz>
jpopesculian pushed a commit to jpopesculian/foundry that referenced this pull request Jun 6, 2022
* keep tack of emitter of logs (foundry-rs#1669)

* [not compiling] keep tack of emitter of logs

by switching from RawLog to Log

* ugly fix

* cargo +nightly fmt

* Add comment

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

* fix variable name

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* provide default impls for remaining visitor methods (foundry-rs#1706)

* chore(clippy): make clippy happy (foundry-rs#1707)

* chore: bump ethers

* feat(bind): option to skip Cargo.toml from consistency checks (foundry-rs#1702)

* feat(bind): option to skip Cargo.toml from consistency checks

* chore: cargo fmt

* Update cli/src/cmd/forge/bind.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* chore: clippy lints

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix(verify): encode constructor arguments correctly (foundry-rs#1711)

* fix(verify): encode constructor arguments correctly

* chore: rotate api keys

* Update cli/tests/it/verify.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat: use rotating api keys in fork unit tests (foundry-rs#1693)

* feat: use rotating api keys in fork unit tests

* fix: use correct path

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* refactor: spawn backendhandler on background thread (foundry-rs#1704)

* fix(watch): only watch dirs that exists (foundry-rs#1710)

* Switch selector database to sig.eth.samczsun.com (foundry-rs#1674)

* feat(utils): use samczsun selector directory

This commit switches the utils crate to use samczsun's new function
selector over 4byte for an improved interface and better stability

* feat(cast): update cli to use new 4byte interface

The util bindings were changed to use samczsun's selector library in the
previous commit; this commit updates the cast cli to properly use the
slightly changed interface.

Also ran cargo fmt which updated some unrelated formatting

* fix: review comments

- undo unrelated cargo fmt changes
- rename fourbyte_* -> decode_* in utils

* fix: remove fourbyte test helper

No longer necessary with sig.eth.samczsun.com

* Add `forge upload-selectors` command (foundry-rs#1676)

* feat: add upload selectors command to forge

This commit adds a new command to forge to upload a contract's abi to
sig.eth.samczsun.com selector database

* fix: review comments

- added default for CoreBuildArgs
- cleaned up code ordering
- moved url to constant

* fix: derive CoreBuildArgs::Default

* test: rotate rinkeby keys

* fix(forge/install): add git status check before commit (foundry-rs#1696)

* fix(forge/install): add git status check before commit

* move logic to git_status_clean function

Co-authored-by: test <test@test.com>

* write chunk

* restore original

* write chunks w/ paren

* semicolon cleanup

* write_semicolon

* feat: add `cast upload-signature` (foundry-rs#1716)

* feat: add `cast upload-signature`

This commit adds a new cast command to upload a raw function signature
to the https://sig.eth.samczsun.com 4byte database.

It also moves some of the original signature upload logic from `forge
upload-selectors` to a helper in foundry_utils

API looks like:
```
❯ cast upload-signature 'function approve(address,uint256)' 'transfer(uint256)' 'event Transfer(uint256,address)'
Duplicated: Function approve(address,uint256): 0x095ea7b3
Duplicated: Function transfer(uint256): 0x12514bba
Duplicated: Event Transfer(uint256,address): 0xabe1dcf9fcb8e5fb309db76bcab112a217aa5754d0f038921282bfe7907aa516
```

* fix: move selectors utils to separate module

* fix: add examples to cli help

* test(cast): add integration test for `cast upload-signature`

* feat(cast): allow uploading contract artifacts

This commit enables the `cast upload-signatures` tool to take contract
artifact files and upload the entire json to sig.eth.samczsun.com

* test: update failing tests (foundry-rs#1714)

* test: fix flaky timestamp test (foundry-rs#1727)

* fix: expressive value_name in clap annotations (foundry-rs#1700)

* value_name in forge test

* test debug help

* remove help and revert debug value_name to TEST FUNCTION

* forge test value_name

* forge value_name

* forge args add value_name

* all cast value_name

* Update cli/src/cmd/cast/run.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* cast FourByteDecode merge conflict

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* ClapChain value_name (foundry-rs#1731)

* utils & cleanup

* fix(forge/install): git status check (foundry-rs#1732)

* fix(cli): can_update_libs_section test (foundry-rs#1733)

* write_chunk! where possible

* func def fmt

* fix attrs

* tests

* linter

* anvil value_name (foundry-rs#1743)

* docs

* indented & indented_if

* unused import

* cleanup

* ci: add additional ci jobs for forks (foundry-rs#1728)

* ci: add additional ci jobs for forks

* test: fix flaky anvil test

* ci: setup git config

* ci: setup git config

* ci: setup git config global

* chore: fix flaky snapshot test

* fix: enable tokio time feature (foundry-rs#1750)

* chore(deps): replace colored with yansi (foundry-rs#1722)

* feat(config): add allow paths setting (foundry-rs#1751)

* ci: set git config global in cross platform ci (foundry-rs#1754)

* ci: set git config global in cross platform ci

* fix: flaky tests

* fix: use proper types

* fix(cast): improve cast wallet new (foundry-rs#1713)

* fix(cast): improve cast wallet new

* chore: cleanup imports

Co-authored-by: jole <jolejonaseh@gmail.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Meet Mangukiya <meet123mangukiya@gmail.com>
Co-authored-by: marktoda <40770586+marktoda@users.noreply.github.com>
Co-authored-by: 0xYYY <0xYYY@protonmail.com>
Co-authored-by: test <test@test.com>
Co-authored-by: Shawn Harmsen <shawn@zksnarks.xyz>
jpopesculian pushed a commit that referenced this pull request Jun 8, 2022
* keep tack of emitter of logs (#1669)

* [not compiling] keep tack of emitter of logs

by switching from RawLog to Log

* ugly fix

* cargo +nightly fmt

* Add comment

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

* fix variable name

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* provide default impls for remaining visitor methods (#1706)

* chore(clippy): make clippy happy (#1707)

* chore: bump ethers

* feat(bind): option to skip Cargo.toml from consistency checks (#1702)

* feat(bind): option to skip Cargo.toml from consistency checks

* chore: cargo fmt

* Update cli/src/cmd/forge/bind.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* chore: clippy lints

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix(verify): encode constructor arguments correctly (#1711)

* fix(verify): encode constructor arguments correctly

* chore: rotate api keys

* Update cli/tests/it/verify.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat: use rotating api keys in fork unit tests (#1693)

* feat: use rotating api keys in fork unit tests

* fix: use correct path

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* refactor: spawn backendhandler on background thread (#1704)

* fix(watch): only watch dirs that exists (#1710)

* Switch selector database to sig.eth.samczsun.com (#1674)

* feat(utils): use samczsun selector directory

This commit switches the utils crate to use samczsun's new function
selector over 4byte for an improved interface and better stability

* feat(cast): update cli to use new 4byte interface

The util bindings were changed to use samczsun's selector library in the
previous commit; this commit updates the cast cli to properly use the
slightly changed interface.

Also ran cargo fmt which updated some unrelated formatting

* fix: review comments

- undo unrelated cargo fmt changes
- rename fourbyte_* -> decode_* in utils

* fix: remove fourbyte test helper

No longer necessary with sig.eth.samczsun.com

* Add `forge upload-selectors` command (#1676)

* feat: add upload selectors command to forge

This commit adds a new command to forge to upload a contract's abi to
sig.eth.samczsun.com selector database

* fix: review comments

- added default for CoreBuildArgs
- cleaned up code ordering
- moved url to constant

* fix: derive CoreBuildArgs::Default

* test: rotate rinkeby keys

* fix(forge/install): add git status check before commit (#1696)

* fix(forge/install): add git status check before commit

* move logic to git_status_clean function

Co-authored-by: test <test@test.com>

* write chunk

* restore original

* write chunks w/ paren

* semicolon cleanup

* write_semicolon

* feat: add `cast upload-signature` (#1716)

* feat: add `cast upload-signature`

This commit adds a new cast command to upload a raw function signature
to the https://sig.eth.samczsun.com 4byte database.

It also moves some of the original signature upload logic from `forge
upload-selectors` to a helper in foundry_utils

API looks like:
```
❯ cast upload-signature 'function approve(address,uint256)' 'transfer(uint256)' 'event Transfer(uint256,address)'
Duplicated: Function approve(address,uint256): 0x095ea7b3
Duplicated: Function transfer(uint256): 0x12514bba
Duplicated: Event Transfer(uint256,address): 0xabe1dcf9fcb8e5fb309db76bcab112a217aa5754d0f038921282bfe7907aa516
```

* fix: move selectors utils to separate module

* fix: add examples to cli help

* test(cast): add integration test for `cast upload-signature`

* feat(cast): allow uploading contract artifacts

This commit enables the `cast upload-signatures` tool to take contract
artifact files and upload the entire json to sig.eth.samczsun.com

* test: update failing tests (#1714)

* test: fix flaky timestamp test (#1727)

* fix: expressive value_name in clap annotations (#1700)

* value_name in forge test

* test debug help

* remove help and revert debug value_name to TEST FUNCTION

* forge test value_name

* forge value_name

* forge args add value_name

* all cast value_name

* Update cli/src/cmd/cast/run.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* cast FourByteDecode merge conflict

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* ClapChain value_name (#1731)

* utils & cleanup

* fix(forge/install): git status check (#1732)

* fix(cli): can_update_libs_section test (#1733)

* write_chunk! where possible

* func def fmt

* fix attrs

* tests

* linter

* anvil value_name (#1743)

* docs

* indented & indented_if

* unused import

* cleanup

* ci: add additional ci jobs for forks (#1728)

* ci: add additional ci jobs for forks

* test: fix flaky anvil test

* ci: setup git config

* ci: setup git config

* ci: setup git config global

* chore: fix flaky snapshot test

* fix: enable tokio time feature (#1750)

* chore(deps): replace colored with yansi (#1722)

* feat(config): add allow paths setting (#1751)

* ci: set git config global in cross platform ci (#1754)

* ci: set git config global in cross platform ci

* fix: flaky tests

* fix: use proper types

* fix(cast): improve cast wallet new (#1713)

* fix(cast): improve cast wallet new

* chore: cleanup imports

Co-authored-by: jole <jolejonaseh@gmail.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Meet Mangukiya <meet123mangukiya@gmail.com>
Co-authored-by: marktoda <40770586+marktoda@users.noreply.github.com>
Co-authored-by: 0xYYY <0xYYY@protonmail.com>
Co-authored-by: test <test@test.com>
Co-authored-by: Shawn Harmsen <shawn@zksnarks.xyz>
jpopesculian pushed a commit that referenced this pull request Jun 8, 2022
* keep tack of emitter of logs (#1669)

* [not compiling] keep tack of emitter of logs

by switching from RawLog to Log

* ugly fix

* cargo +nightly fmt

* Add comment

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

* fix variable name

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* provide default impls for remaining visitor methods (#1706)

* chore(clippy): make clippy happy (#1707)

* chore: bump ethers

* feat(bind): option to skip Cargo.toml from consistency checks (#1702)

* feat(bind): option to skip Cargo.toml from consistency checks

* chore: cargo fmt

* Update cli/src/cmd/forge/bind.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* chore: clippy lints

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix(verify): encode constructor arguments correctly (#1711)

* fix(verify): encode constructor arguments correctly

* chore: rotate api keys

* Update cli/tests/it/verify.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat: use rotating api keys in fork unit tests (#1693)

* feat: use rotating api keys in fork unit tests

* fix: use correct path

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* refactor: spawn backendhandler on background thread (#1704)

* fix(watch): only watch dirs that exists (#1710)

* Switch selector database to sig.eth.samczsun.com (#1674)

* feat(utils): use samczsun selector directory

This commit switches the utils crate to use samczsun's new function
selector over 4byte for an improved interface and better stability

* feat(cast): update cli to use new 4byte interface

The util bindings were changed to use samczsun's selector library in the
previous commit; this commit updates the cast cli to properly use the
slightly changed interface.

Also ran cargo fmt which updated some unrelated formatting

* fix: review comments

- undo unrelated cargo fmt changes
- rename fourbyte_* -> decode_* in utils

* fix: remove fourbyte test helper

No longer necessary with sig.eth.samczsun.com

* Add `forge upload-selectors` command (#1676)

* feat: add upload selectors command to forge

This commit adds a new command to forge to upload a contract's abi to
sig.eth.samczsun.com selector database

* fix: review comments

- added default for CoreBuildArgs
- cleaned up code ordering
- moved url to constant

* fix: derive CoreBuildArgs::Default

* test: rotate rinkeby keys

* fix(forge/install): add git status check before commit (#1696)

* fix(forge/install): add git status check before commit

* move logic to git_status_clean function

Co-authored-by: test <test@test.com>

* write chunk

* restore original

* write chunks w/ paren

* semicolon cleanup

* write_semicolon

* feat: add `cast upload-signature` (#1716)

* feat: add `cast upload-signature`

This commit adds a new cast command to upload a raw function signature
to the https://sig.eth.samczsun.com 4byte database.

It also moves some of the original signature upload logic from `forge
upload-selectors` to a helper in foundry_utils

API looks like:
```
❯ cast upload-signature 'function approve(address,uint256)' 'transfer(uint256)' 'event Transfer(uint256,address)'
Duplicated: Function approve(address,uint256): 0x095ea7b3
Duplicated: Function transfer(uint256): 0x12514bba
Duplicated: Event Transfer(uint256,address): 0xabe1dcf9fcb8e5fb309db76bcab112a217aa5754d0f038921282bfe7907aa516
```

* fix: move selectors utils to separate module

* fix: add examples to cli help

* test(cast): add integration test for `cast upload-signature`

* feat(cast): allow uploading contract artifacts

This commit enables the `cast upload-signatures` tool to take contract
artifact files and upload the entire json to sig.eth.samczsun.com

* test: update failing tests (#1714)

* test: fix flaky timestamp test (#1727)

* fix: expressive value_name in clap annotations (#1700)

* value_name in forge test

* test debug help

* remove help and revert debug value_name to TEST FUNCTION

* forge test value_name

* forge value_name

* forge args add value_name

* all cast value_name

* Update cli/src/cmd/cast/run.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* cast FourByteDecode merge conflict

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* ClapChain value_name (#1731)

* utils & cleanup

* fix(forge/install): git status check (#1732)

* fix(cli): can_update_libs_section test (#1733)

* write_chunk! where possible

* func def fmt

* fix attrs

* tests

* linter

* anvil value_name (#1743)

* docs

* indented & indented_if

* unused import

* cleanup

* ci: add additional ci jobs for forks (#1728)

* ci: add additional ci jobs for forks

* test: fix flaky anvil test

* ci: setup git config

* ci: setup git config

* ci: setup git config global

* chore: fix flaky snapshot test

* fix: enable tokio time feature (#1750)

* chore(deps): replace colored with yansi (#1722)

* feat(config): add allow paths setting (#1751)

* ci: set git config global in cross platform ci (#1754)

* ci: set git config global in cross platform ci

* fix: flaky tests

* fix: use proper types

* fix(cast): improve cast wallet new (#1713)

* fix(cast): improve cast wallet new

* chore: cleanup imports

Co-authored-by: jole <jolejonaseh@gmail.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Meet Mangukiya <meet123mangukiya@gmail.com>
Co-authored-by: marktoda <40770586+marktoda@users.noreply.github.com>
Co-authored-by: 0xYYY <0xYYY@protonmail.com>
Co-authored-by: test <test@test.com>
Co-authored-by: Shawn Harmsen <shawn@zksnarks.xyz>
jpopesculian pushed a commit that referenced this pull request Jun 9, 2022
* keep tack of emitter of logs (#1669)

* [not compiling] keep tack of emitter of logs

by switching from RawLog to Log

* ugly fix

* cargo +nightly fmt

* Add comment

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

* fix variable name

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* provide default impls for remaining visitor methods (#1706)

* chore(clippy): make clippy happy (#1707)

* chore: bump ethers

* feat(bind): option to skip Cargo.toml from consistency checks (#1702)

* feat(bind): option to skip Cargo.toml from consistency checks

* chore: cargo fmt

* Update cli/src/cmd/forge/bind.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* chore: clippy lints

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix(verify): encode constructor arguments correctly (#1711)

* fix(verify): encode constructor arguments correctly

* chore: rotate api keys

* Update cli/tests/it/verify.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat: use rotating api keys in fork unit tests (#1693)

* feat: use rotating api keys in fork unit tests

* fix: use correct path

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* refactor: spawn backendhandler on background thread (#1704)

* fix(watch): only watch dirs that exists (#1710)

* Switch selector database to sig.eth.samczsun.com (#1674)

* feat(utils): use samczsun selector directory

This commit switches the utils crate to use samczsun's new function
selector over 4byte for an improved interface and better stability

* feat(cast): update cli to use new 4byte interface

The util bindings were changed to use samczsun's selector library in the
previous commit; this commit updates the cast cli to properly use the
slightly changed interface.

Also ran cargo fmt which updated some unrelated formatting

* fix: review comments

- undo unrelated cargo fmt changes
- rename fourbyte_* -> decode_* in utils

* fix: remove fourbyte test helper

No longer necessary with sig.eth.samczsun.com

* Add `forge upload-selectors` command (#1676)

* feat: add upload selectors command to forge

This commit adds a new command to forge to upload a contract's abi to
sig.eth.samczsun.com selector database

* fix: review comments

- added default for CoreBuildArgs
- cleaned up code ordering
- moved url to constant

* fix: derive CoreBuildArgs::Default

* test: rotate rinkeby keys

* fix(forge/install): add git status check before commit (#1696)

* fix(forge/install): add git status check before commit

* move logic to git_status_clean function

Co-authored-by: test <test@test.com>

* write chunk

* restore original

* write chunks w/ paren

* semicolon cleanup

* write_semicolon

* feat: add `cast upload-signature` (#1716)

* feat: add `cast upload-signature`

This commit adds a new cast command to upload a raw function signature
to the https://sig.eth.samczsun.com 4byte database.

It also moves some of the original signature upload logic from `forge
upload-selectors` to a helper in foundry_utils

API looks like:
```
❯ cast upload-signature 'function approve(address,uint256)' 'transfer(uint256)' 'event Transfer(uint256,address)'
Duplicated: Function approve(address,uint256): 0x095ea7b3
Duplicated: Function transfer(uint256): 0x12514bba
Duplicated: Event Transfer(uint256,address): 0xabe1dcf9fcb8e5fb309db76bcab112a217aa5754d0f038921282bfe7907aa516
```

* fix: move selectors utils to separate module

* fix: add examples to cli help

* test(cast): add integration test for `cast upload-signature`

* feat(cast): allow uploading contract artifacts

This commit enables the `cast upload-signatures` tool to take contract
artifact files and upload the entire json to sig.eth.samczsun.com

* test: update failing tests (#1714)

* test: fix flaky timestamp test (#1727)

* fix: expressive value_name in clap annotations (#1700)

* value_name in forge test

* test debug help

* remove help and revert debug value_name to TEST FUNCTION

* forge test value_name

* forge value_name

* forge args add value_name

* all cast value_name

* Update cli/src/cmd/cast/run.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* cast FourByteDecode merge conflict

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* ClapChain value_name (#1731)

* utils & cleanup

* fix(forge/install): git status check (#1732)

* fix(cli): can_update_libs_section test (#1733)

* write_chunk! where possible

* func def fmt

* fix attrs

* tests

* linter

* anvil value_name (#1743)

* docs

* indented & indented_if

* unused import

* cleanup

* ci: add additional ci jobs for forks (#1728)

* ci: add additional ci jobs for forks

* test: fix flaky anvil test

* ci: setup git config

* ci: setup git config

* ci: setup git config global

* chore: fix flaky snapshot test

* fix: enable tokio time feature (#1750)

* chore(deps): replace colored with yansi (#1722)

* feat(config): add allow paths setting (#1751)

* ci: set git config global in cross platform ci (#1754)

* ci: set git config global in cross platform ci

* fix: flaky tests

* fix: use proper types

* fix(cast): improve cast wallet new (#1713)

* fix(cast): improve cast wallet new

* chore: cleanup imports

Co-authored-by: jole <jolejonaseh@gmail.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Meet Mangukiya <meet123mangukiya@gmail.com>
Co-authored-by: marktoda <40770586+marktoda@users.noreply.github.com>
Co-authored-by: 0xYYY <0xYYY@protonmail.com>
Co-authored-by: test <test@test.com>
Co-authored-by: Shawn Harmsen <shawn@zksnarks.xyz>
jpopesculian pushed a commit that referenced this pull request Jun 10, 2022
* keep tack of emitter of logs (#1669)

* [not compiling] keep tack of emitter of logs

by switching from RawLog to Log

* ugly fix

* cargo +nightly fmt

* Add comment

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

* fix variable name

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* provide default impls for remaining visitor methods (#1706)

* chore(clippy): make clippy happy (#1707)

* chore: bump ethers

* feat(bind): option to skip Cargo.toml from consistency checks (#1702)

* feat(bind): option to skip Cargo.toml from consistency checks

* chore: cargo fmt

* Update cli/src/cmd/forge/bind.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* chore: clippy lints

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix(verify): encode constructor arguments correctly (#1711)

* fix(verify): encode constructor arguments correctly

* chore: rotate api keys

* Update cli/tests/it/verify.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat: use rotating api keys in fork unit tests (#1693)

* feat: use rotating api keys in fork unit tests

* fix: use correct path

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* refactor: spawn backendhandler on background thread (#1704)

* fix(watch): only watch dirs that exists (#1710)

* Switch selector database to sig.eth.samczsun.com (#1674)

* feat(utils): use samczsun selector directory

This commit switches the utils crate to use samczsun's new function
selector over 4byte for an improved interface and better stability

* feat(cast): update cli to use new 4byte interface

The util bindings were changed to use samczsun's selector library in the
previous commit; this commit updates the cast cli to properly use the
slightly changed interface.

Also ran cargo fmt which updated some unrelated formatting

* fix: review comments

- undo unrelated cargo fmt changes
- rename fourbyte_* -> decode_* in utils

* fix: remove fourbyte test helper

No longer necessary with sig.eth.samczsun.com

* Add `forge upload-selectors` command (#1676)

* feat: add upload selectors command to forge

This commit adds a new command to forge to upload a contract's abi to
sig.eth.samczsun.com selector database

* fix: review comments

- added default for CoreBuildArgs
- cleaned up code ordering
- moved url to constant

* fix: derive CoreBuildArgs::Default

* test: rotate rinkeby keys

* fix(forge/install): add git status check before commit (#1696)

* fix(forge/install): add git status check before commit

* move logic to git_status_clean function

Co-authored-by: test <test@test.com>

* write chunk

* restore original

* write chunks w/ paren

* semicolon cleanup

* write_semicolon

* feat: add `cast upload-signature` (#1716)

* feat: add `cast upload-signature`

This commit adds a new cast command to upload a raw function signature
to the https://sig.eth.samczsun.com 4byte database.

It also moves some of the original signature upload logic from `forge
upload-selectors` to a helper in foundry_utils

API looks like:
```
❯ cast upload-signature 'function approve(address,uint256)' 'transfer(uint256)' 'event Transfer(uint256,address)'
Duplicated: Function approve(address,uint256): 0x095ea7b3
Duplicated: Function transfer(uint256): 0x12514bba
Duplicated: Event Transfer(uint256,address): 0xabe1dcf9fcb8e5fb309db76bcab112a217aa5754d0f038921282bfe7907aa516
```

* fix: move selectors utils to separate module

* fix: add examples to cli help

* test(cast): add integration test for `cast upload-signature`

* feat(cast): allow uploading contract artifacts

This commit enables the `cast upload-signatures` tool to take contract
artifact files and upload the entire json to sig.eth.samczsun.com

* test: update failing tests (#1714)

* test: fix flaky timestamp test (#1727)

* fix: expressive value_name in clap annotations (#1700)

* value_name in forge test

* test debug help

* remove help and revert debug value_name to TEST FUNCTION

* forge test value_name

* forge value_name

* forge args add value_name

* all cast value_name

* Update cli/src/cmd/cast/run.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* cast FourByteDecode merge conflict

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* ClapChain value_name (#1731)

* utils & cleanup

* fix(forge/install): git status check (#1732)

* fix(cli): can_update_libs_section test (#1733)

* write_chunk! where possible

* func def fmt

* fix attrs

* tests

* linter

* anvil value_name (#1743)

* docs

* indented & indented_if

* unused import

* cleanup

* ci: add additional ci jobs for forks (#1728)

* ci: add additional ci jobs for forks

* test: fix flaky anvil test

* ci: setup git config

* ci: setup git config

* ci: setup git config global

* chore: fix flaky snapshot test

* fix: enable tokio time feature (#1750)

* chore(deps): replace colored with yansi (#1722)

* feat(config): add allow paths setting (#1751)

* ci: set git config global in cross platform ci (#1754)

* ci: set git config global in cross platform ci

* fix: flaky tests

* fix: use proper types

* fix(cast): improve cast wallet new (#1713)

* fix(cast): improve cast wallet new

* chore: cleanup imports

Co-authored-by: jole <jolejonaseh@gmail.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Meet Mangukiya <meet123mangukiya@gmail.com>
Co-authored-by: marktoda <40770586+marktoda@users.noreply.github.com>
Co-authored-by: 0xYYY <0xYYY@protonmail.com>
Co-authored-by: test <test@test.com>
Co-authored-by: Shawn Harmsen <shawn@zksnarks.xyz>
gakonst added a commit that referenced this pull request Jun 11, 2022
* squashed WIP initial comments implementation

* Use FormatBuffer for both main buf and temp bufs

The FormatBuffer now implements fmt::Write and handles the indentation
logic, tracking characters and line length. Formatter continues to
control the rest of the logic for how to build strings

* add idempotency test

* try to correctly prefix/postfix given indentation grouping

* [wip] fix(forge): `fmt` write chunk (#1717)

* keep tack of emitter of logs (#1669)

* [not compiling] keep tack of emitter of logs

by switching from RawLog to Log

* ugly fix

* cargo +nightly fmt

* Add comment

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

* fix variable name

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* provide default impls for remaining visitor methods (#1706)

* chore(clippy): make clippy happy (#1707)

* chore: bump ethers

* feat(bind): option to skip Cargo.toml from consistency checks (#1702)

* feat(bind): option to skip Cargo.toml from consistency checks

* chore: cargo fmt

* Update cli/src/cmd/forge/bind.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* chore: clippy lints

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix(verify): encode constructor arguments correctly (#1711)

* fix(verify): encode constructor arguments correctly

* chore: rotate api keys

* Update cli/tests/it/verify.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat: use rotating api keys in fork unit tests (#1693)

* feat: use rotating api keys in fork unit tests

* fix: use correct path

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* refactor: spawn backendhandler on background thread (#1704)

* fix(watch): only watch dirs that exists (#1710)

* Switch selector database to sig.eth.samczsun.com (#1674)

* feat(utils): use samczsun selector directory

This commit switches the utils crate to use samczsun's new function
selector over 4byte for an improved interface and better stability

* feat(cast): update cli to use new 4byte interface

The util bindings were changed to use samczsun's selector library in the
previous commit; this commit updates the cast cli to properly use the
slightly changed interface.

Also ran cargo fmt which updated some unrelated formatting

* fix: review comments

- undo unrelated cargo fmt changes
- rename fourbyte_* -> decode_* in utils

* fix: remove fourbyte test helper

No longer necessary with sig.eth.samczsun.com

* Add `forge upload-selectors` command (#1676)

* feat: add upload selectors command to forge

This commit adds a new command to forge to upload a contract's abi to
sig.eth.samczsun.com selector database

* fix: review comments

- added default for CoreBuildArgs
- cleaned up code ordering
- moved url to constant

* fix: derive CoreBuildArgs::Default

* test: rotate rinkeby keys

* fix(forge/install): add git status check before commit (#1696)

* fix(forge/install): add git status check before commit

* move logic to git_status_clean function

Co-authored-by: test <test@test.com>

* write chunk

* restore original

* write chunks w/ paren

* semicolon cleanup

* write_semicolon

* feat: add `cast upload-signature` (#1716)

* feat: add `cast upload-signature`

This commit adds a new cast command to upload a raw function signature
to the https://sig.eth.samczsun.com 4byte database.

It also moves some of the original signature upload logic from `forge
upload-selectors` to a helper in foundry_utils

API looks like:
```
❯ cast upload-signature 'function approve(address,uint256)' 'transfer(uint256)' 'event Transfer(uint256,address)'
Duplicated: Function approve(address,uint256): 0x095ea7b3
Duplicated: Function transfer(uint256): 0x12514bba
Duplicated: Event Transfer(uint256,address): 0xabe1dcf9fcb8e5fb309db76bcab112a217aa5754d0f038921282bfe7907aa516
```

* fix: move selectors utils to separate module

* fix: add examples to cli help

* test(cast): add integration test for `cast upload-signature`

* feat(cast): allow uploading contract artifacts

This commit enables the `cast upload-signatures` tool to take contract
artifact files and upload the entire json to sig.eth.samczsun.com

* test: update failing tests (#1714)

* test: fix flaky timestamp test (#1727)

* fix: expressive value_name in clap annotations (#1700)

* value_name in forge test

* test debug help

* remove help and revert debug value_name to TEST FUNCTION

* forge test value_name

* forge value_name

* forge args add value_name

* all cast value_name

* Update cli/src/cmd/cast/run.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* cast FourByteDecode merge conflict

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* ClapChain value_name (#1731)

* utils & cleanup

* fix(forge/install): git status check (#1732)

* fix(cli): can_update_libs_section test (#1733)

* write_chunk! where possible

* func def fmt

* fix attrs

* tests

* linter

* anvil value_name (#1743)

* docs

* indented & indented_if

* unused import

* cleanup

* ci: add additional ci jobs for forks (#1728)

* ci: add additional ci jobs for forks

* test: fix flaky anvil test

* ci: setup git config

* ci: setup git config

* ci: setup git config global

* chore: fix flaky snapshot test

* fix: enable tokio time feature (#1750)

* chore(deps): replace colored with yansi (#1722)

* feat(config): add allow paths setting (#1751)

* ci: set git config global in cross platform ci (#1754)

* ci: set git config global in cross platform ci

* fix: flaky tests

* fix: use proper types

* fix(cast): improve cast wallet new (#1713)

* fix(cast): improve cast wallet new

* chore: cleanup imports

Co-authored-by: jole <jolejonaseh@gmail.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Meet Mangukiya <meet123mangukiya@gmail.com>
Co-authored-by: marktoda <40770586+marktoda@users.noreply.github.com>
Co-authored-by: 0xYYY <0xYYY@protonmail.com>
Co-authored-by: test <test@test.com>
Co-authored-by: Shawn Harmsen <shawn@zksnarks.xyz>

* [wip] feat(fmt): format buffer groups (#1780)

* fmt groups

* reset to init start group functionality & use where needed

* expand test case

* [wip] feat(fmt): intermediate chunk struct (#1831)

* wip: use a struct for managing an intermediate representation

* cleanup visit function definition

* fix import statements

* restrict temp bufs to the current line restriction and simplify visit contract

* consistent ordering of parameters in chunk operations

* fix up using list formatting for multiline support

* convert to second iteration of write_chunk_separated

Co-authored-by: Julian Popescu <hi@julian.dev>

* [wip] feat(fmt): expressions (#1809)

* add an Operator trait for implementing Expression formatting

* basic implementation of write operator expression

* add grouping of expression parts by precedence

* Add tests back and fix unnecessary indent

Chunks were being unnecessarily indented because writing source to a
temp buffer wasn't accounting the indent already existing, thereby
essentially adding extra indent where not needed when being written
again to the underlying buffer

* Add custom error to fmt (#1852)

* feat(fmt): Add single line helpers (#1860)

* Add single line helpers and reimplement surrounds and function definition with helpers

* feat(fmt): `for`, `while` & `do while` statements (#1864)

* for while statements

* rm comments

* for loop header

* do while support

* uncomment tests

* rm comments

* address comments

* feat(fmt): Expression multiline formatting (#1879)

* Basic flat expressions

* Add expression formatting

* fix var definition to handle multiline declaration appropriately

* Add assignment expressions

* fix tests

* simplify result handling

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>

* add information about chunks and comments

* fix unit tests

* fix(fmt): comment indent (#1888)

* fix comment indent

* Fix postfix categorization for multiline comments

Postfix comments try to see if they sit on an indent greater
than the next code block. However the code was splitting the src into
lines before removing comments to check for the next code point causing
it to break on multiline comments

* Fix write_raw indent len

`write_raw` wasn't appropriately trimming base_indent_len and was off by
one in special cases. In addition `write_raw` was not setting
is_beginning_of_line correctly

Co-authored-by: Julian Popescu <hi@julian.dev>

* fix spacing in source unit parts

* fix spacing in contract parts with comments

* fix statement spacing

* make lined statements dryer

* fix duplicated prefix statement in visit_src block

* fix event multiline edge cases

* convert attributes to chunks after newline to account for line length

* better function ordering and Transact helpers

* add doc comments to visit helpers

* add doc comments to other helper traits and structs

* add location info to break and continue

* trim the end of comments where necessary

* fix expression lists

* fix the case of a missing list param

* dep(fmt): update ethers & solang (#1909)

* upd solang

* remove helpers

* attr override

* fix

* remove

* group ident path

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
Co-authored-by: jole <jolejonaseh@gmail.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Meet Mangukiya <meet123mangukiya@gmail.com>
Co-authored-by: marktoda <40770586+marktoda@users.noreply.github.com>
Co-authored-by: 0xYYY <0xYYY@protonmail.com>
Co-authored-by: test <test@test.com>
Co-authored-by: Shawn Harmsen <shawn@zksnarks.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast T-bug Type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cast wallet new keystore.json panics Keystore
2 participants