Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning [Security] Socket has found a problem with the dependencies from this PR. Check the details below to solve the issue. If the affected dependency is unreachable, we still recommend you to use a patched version. Remember: according to Parity's Security Policy, you must resolve all "Block" alerts before proceeding. It is recommended to resolve "Warn" alerts too. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
The contract is from polkavm-hardhat-examples.
xermicus
left a comment
There was a problem hiding this comment.
Thanks! Looks good in isolation but I left some QoL improvements.
| - name: Set Up Rust Toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| # without this it will override our rust flags | ||
| rustflags: "" | ||
|
|
||
| - name: Download LLVM | ||
| uses: ./.github/actions/get-llvm | ||
| with: | ||
| target: x86_64-unknown-linux-gnu | ||
|
|
||
| - name: Set LLVM Environment Variables | ||
| run: echo "LLVM_SYS_221_PREFIX=$(pwd)/llvm-x86_64-unknown-linux-gnu" >> $GITHUB_ENV | ||
|
|
||
| - name: Build resolc | ||
| run: | | ||
| make install-bin | ||
| # This env is used by `hardhat.config.js`. | ||
| echo "RESOLC_PATH=$(pwd)/target/release/resolc" >> $GITHUB_ENV |
There was a problem hiding this comment.
This is kinda costly but I think entirely avoidable if we move this past the differential tests so that we can re-use the MUSL build.
| set -x | ||
| shopt -s nullglob | ||
| build_info_files=(artifacts/build-info/*.json) | ||
| test "${#build_info_files[@]}" -eq 1 | ||
|
|
||
| BUILD_INFO="${build_info_files[0]}" | ||
| CONTRACT='.output.contracts["contracts/MyToken.sol"].MyToken' | ||
| SOURCE='.output.sources["contracts/MyToken.sol"]' | ||
|
|
||
| jq -er "$CONTRACT.evm.bytecode.object" "$BUILD_INFO" | grep -q '^50564d' | ||
| jq -er "$CONTRACT.evm.deployedBytecode.object" "$BUILD_INFO" | grep -q '^50564d' | ||
| jq -e "$CONTRACT.evm.methodIdentifiers | length > 0" "$BUILD_INFO" > /dev/null | ||
| jq -e "$CONTRACT.abi | length > 0" "$BUILD_INFO" > /dev/null | ||
| jq -e "$CONTRACT.storageLayout.storage | length > 0" "$BUILD_INFO" > /dev/null | ||
| jq -e "$CONTRACT.metadata | length > 0" "$BUILD_INFO" > /dev/null | ||
| jq -e "$SOURCE.ast | length > 0" "$BUILD_INFO" > /dev/null | ||
| jq -e '.output.sources | length > 1' "$BUILD_INFO" > /dev/null |
There was a problem hiding this comment.
Can you please extract this into a dedicated .sh into tooling-projects/hardhat/eerc20 so that we can run this locally more easily?
Description
Adds a CI workflow that builds a small Hardhat project with
hardhat-polkadot, exercising the standard JSON interface betweenresolcandhardhat-polkadotend-to-end.Resolved Issues
Closes #514