mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-11-03 17:31:11 +00:00
ci: Add Foundry tooling integration test (#511)
## Description Adds a CI workflow that builds and tests a small Foundry project with `foundry-polkadot`'s `forge`, exercising the standard JSON interface between `resolc` and `foundry-polkadot` end-to-end. ## Resolved Issues Closes #513
This commit is contained in:
10 files changed
+239
-12
No files matched your search
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Asserts that the compiled project contains the expected compiler output.
|
||||
# Requires `forge` in PATH. Run from the project's root.
|
||||
#
|
||||
# Usage: verify-compiler-output.sh <resolc-path>
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "usage: $(basename "$0") <resolc-path>" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
resolc=$1
|
||||
|
||||
inspect() {
|
||||
forge inspect --use-resolc "$resolc" MyToken "$@"
|
||||
}
|
||||
|
||||
inspect bytecode | grep '^0x50564d' > /dev/null
|
||||
inspect deployedBytecode | grep '^0x50564d' > /dev/null
|
||||
inspect irOptimized | grep . > /dev/null
|
||||
inspect ir | grep . > /dev/null
|
||||
inspect assembly | grep . > /dev/null
|
||||
inspect abi --json | jq -e 'length > 0' > /dev/null
|
||||
inspect methodIdentifiers --json | jq -e 'length > 0' > /dev/null
|
||||
inspect storageLayout --json | jq -e '.storage | length > 0' > /dev/null
|
||||
inspect metadata --json | jq -e 'length > 0' > /dev/null
|
||||
inspect devdoc --json | jq -e 'length > 0' > /dev/null
|
||||
inspect userdoc --json | jq -e 'length > 0' > /dev/null
|
||||
|
||||
echo "all checks passed"
|
||||
Reference in new issue
Block a user