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

CI test for forge clone #13

Closed
wants to merge 97 commits into from
Closed

CI test for forge clone #13

wants to merge 97 commits into from

Conversation

ZhangZhuoSJTU
Copy link
Collaborator

No description provided.

DaniPopes and others added 30 commits March 28, 2024 03:41
* feat: vm.sign for script wallets

* more tests

* clippy

* if let some else

* review fixes
* fix(anvil): clean up eth_estimateGas

* fix doc

* fix doc

* fix doc

* review fixes
* fix: coverage for internal libraries

* optimize

* optimize

* doc

* rm tests

* clippy

* clippy + fmt

* clean up

* for loop

* review fixes
…-rs#7518)

* feat: allow supplying fn name via forge script --sig

* fmt

* clippy

* add test
* feat: print ipc path

* moved if check

* moved println
* add TestContract

* use TestContract

* wip

* fix

* clippy + fmt

* smaller diff
* feat(verify): multichain verification for etherscan

* fix: bump reqwest

* fix: ci cargo deny
…ns (foundry-rs#7550)

* fix contracts sources

Co-authored-by: lazymio <mio@lazym.io>

* fix doc

* fmt

---------

Co-authored-by: lazymio <mio@lazym.io>
…7557)

* fix(fmt): fix indent closing parenthesis enclosed in { }

* Fix testdata bad formatting
* feat(forge test): only compile files needed for tests

* remove comment

* clippy

* update fixtures

* getCode + getDeployedCode updates

* fixes

* fix path matching

* clippy

* add config flag

* fix

* docs

* fmt

* patch compilers

* fix Cargo.toml

* update patch

* update patch

* doc

* rm space

* cargo cheats

* new output selection fn

* log compiler errors on failure

* fixes
* feat: index cheatcode

* some nits to make it work

* nit: use as_str()

* final changes

* chore: reviewed changes
* fix: --match-path is broken

* rm docs
* batch size as a option

* Update crates/script/src/broadcast.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Update crates/script/src/broadcast.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Update crates/script/src/lib.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Update crates/script/src/lib.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Update crates/script/src/lib.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
* use alloy-trie for eth_getProof

* fmt

* collect proofs via single pass

* fixes and test

* tests

* add files

* ordered_trie_root

* clippy

* move to workspace
* fix: smarter getCode validation

* clippy + doc fix

* fix

* multi-version profile and tests

* fmt

* add more parsing options

* clippy + fmt
* add `gasUsed and lastGasUsed methods to Vm

* reorder

* basic sketching of idea, planning to use Gas struct to deliver as much gas related information rather than a uint256

* add transformation

* to prevent recording gas by default, only enable after recordGas is enabled

* update struct layout, implementation builds, now connecting to cheatcodes

* fix cheatcodes

* refactor to use simple u64 as Gas struct doesnt have a default

* change from Gas struct to simple u64 as I ran into issues with cache being reset to 0

* it appears cheatcodes are resolved before the actual function calls are therefore it doesnt actually remember the correct value from the previous execution but only of the previous executed cheatcode

* still not working

* finally works, stupid me didnt realize i had to cross call frames

* emit gas record

* test convenient single field access

* add gas record struct back

* pass down isolate bool, only enable gas tracing if enabled

* raise error if cheatcode is used outside of isolation mode

* mark as view

* show gas refund and memory expansion

* improve example

* add isolation test, currently does not run as expected

* fix fmt

* avoid formatting changes

* avoid commiting formatting changes, editor now configured correctly

* lastGasUsed -> lastCallGas

* small name fix

* remove separate isolation profile, just configure on the runner

* fix forge fmt

* note on why path should never happen

* remove separate isolated param, inherit from config

* add support for non-isolation mode

* remove isolate standalone, create additional entry in cheats and document subset of cheats that require to be tested in isolation mode as well

* improve tests, use asserts and add option to exclude contracts from test filter, not just individual tests or paths

* typo, no need to define path exclusion of forks in isolated tests as it is not relevant
…y-rs#7559)

* fix(invariant): decode custom error with target contract abis

* Changes after review: don't collect
klkvr and others added 26 commits April 16, 2024 19:49
…rs#7684)

* add `no_metadata`, equivalent to adding `bytecode_hash = "none" and cbor_metadata = false`

* add basic smoke test for --no-metadata setting cbor_metadata to false, bytecode_hash to none

* Update core.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
* feat(debugger): update ratatui, use `List`

* refactor(debugger): event handlers

* fmt
…-rs#7686)

* fix(cheatcodes): `expectSafeMemory` w/ new `forge-std`

Fixes the `stopExpectSafeMemory` by allowing for the memory allocation
of the `stopExpectSafeMemory` selector as well as the potentially
out-of-bounds read performed in the `CALL` operation.

Currently, forge reports incorrectly that memory safety was violated in
a memory safe region of a test, if the free memory pointer was updated
to `[exclusiveUpperBound-31, exclusiveUpperBound]`.

To fix this, we allow for `MSTORE` operations that store the selector
bytes for `stopExpectSafeMemory` outside of the allowed region, as well
as `CALL` operations that are to the cheatcode address and contain the
`stopExpectSafeMemory` selector in the first 4 bytes of the call
arguments.

* use `SELECTOR_LEN` const
* fix: hotfix cast logs subscribe

* fix features
* feat: optimize compiler runs by reading AST

* clippy

* fallback to solc

* fmt

* clippy

* update fixtures

* fix for windows

* wip

* bump compilers

* clippy + fmt

* fix
* fix: better artifacts management

* simplify

* Update crates/common/src/contracts.rs

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* Arc<Config>

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
…oundry-rs#7653)

* wip

* wip

* add docs

* clippy

* update doc

* simplify logic

* review fixes

* doc

* review fixes

* fix
@ZhangZhuoSJTU ZhangZhuoSJTU changed the title CI for forge clone CI test for forge clone Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.