Skip to content

Commit

Permalink
Merge ed1a684 into e06d540
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 21, 2024
2 parents e06d540 + ed1a684 commit b0f4759
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 7 deletions.
44 changes: 39 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ on:
- "release/*"
- "feature/*"
- "features/*"
- "implement-feature/**"
- "implement-feature/**/**"
pull_request:
branches:
- mainnet
- testnet
- "release/*"
- "feature/*"
- "features/*"
- "feature/ci"

env:
FOUNDRY_PROFILE: ci
Expand All @@ -30,7 +33,7 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
Expand All @@ -48,10 +51,41 @@ jobs:
- name: Run Forge build
run: |
forge --version
forge build
forge build --skip scripts
id: build

- name: Run Forge tests
# - name: Run Forge tests
# run: |
# forge test --no-match-path '*forking/*' -vvv
# # id: test

- name: "Setup Node"
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 #v3.4.1
with:
node-version: v16.16.0

- name: Storage Layout Check
run: |
echo "Checking storage layout..."
echo "Current branch: ${{ github.head_ref || github.ref_name }}"
echo "BASE_BRANCH: ${{ github.event.pull_request.base.ref }}"
echo "CURRENT_COMMIT_HASH: ${{ github.sha }}"
git fetch --unshallow || git fetch --all
dependencies/@storage-delta-0.3.1/run.sh ${{ github.event.pull_request.base.sha }} --omit new --contracts contracts
- name: Check for storage_delta folder
if: github.event_name == 'pull_request'
id: check-folder
run: |
if [ -d "storage_delta" ]; then
echo "storage_delta_exists=true" >> $GITHUB_OUTPUT
fi
- name: Commit and changes
if: steps.check-folder.outputs.storage_delta_exists == 'true'
run: |
forge test --no-match-path '*forking/*' -vvv
id: test
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add storage_delta
git commit -m "Add contract layout changes [CI]"
git push origin HEAD:${{ github.head_ref || github.ref_name }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ deployments/**/exported_address
config/config.json
config/config.yaml
dependencies
deployments/ronin-mainnet-shadow
deployments/ronin-mainnet-shadow
.storage_delta_cache
3 changes: 3 additions & 0 deletions contracts/mocks/MockBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol"
import "../interfaces/IBridge.sol";

contract MockBridge is IBridge {
uint256 private _collisionVariable;
uint256 private _collisionVariable1;
uint256 private _collisionVariable2;
/// @dev Mapping from validator address => last block that the bridge operator is added
mapping(address => uint256) public bridgeOperatorAddedBlock;
/// @dev Bridge operators array
Expand Down
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ ronin-mainnet-shadow = "http://35.192.217.237:8545"
"@openzeppelin-v5" = { version = "5.0.2", url = "https://github.com/OpenZeppelin/openzeppelin-contracts/archive/refs/tags/v5.0.2.zip" }
"@chainlink" = { version = "1.6.0", url = "https://github.com/smartcontractkit/chainlink/archive/refs/tags/v1.6.0.zip" }
safe-smart-account = { version = "1.4.1", url = "https://github.com/safe-global/safe-smart-account/archive/refs/tags/v1.4.1.zip" }
"@storage-delta" = { version = "0.3.1", url = "https://github.com/tringuyenskymavis/storage-delta/archive/refs/tags/0.3.1.zip" }
3 changes: 2 additions & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ hardhat/=./node_modules/hardhat/
@fdk/=dependencies/@fdk-0.3.0-beta/script/
@contract-libs/=lib/foundry-deployment-kit/lib/contract-libs/src/
@chainlink/contracts/=dependencies/@chainlink-1.6.0/contracts/
safe-smart-account/contracts/=dependencies/safe-smart-account-1.4.1/contracts/
safe-smart-account/contracts/=dependencies/safe-smart-account-1.4.1/contracts/
@storage-delta-0.3.1=dependencies/@storage-delta-0.3.1
6 changes: 6 additions & 0 deletions soldeer.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ name = "safe-smart-account"
version = "1.4.1"
source = "https://github.com/safe-global/safe-smart-account/archive/refs/tags/v1.4.1.zip"
checksum = "84348d4a1cf975f5d013cf8bdb74b8713bcccb40fceb5a1e7fc9debd27489e99"

[[dependencies]]
name = "@storage-delta"
version = "0.3.1"
source = "https://github.com/TuDo1403/storage-delta/archive/refs/tags/0.3.1.zip"
checksum = "6ff6dad83b29fcec375d314c876c8731f37742363576b883d146824a7a57ab52"

0 comments on commit b0f4759

Please sign in to comment.