Skip to content

Commit 2ab31b7

Browse files
committed
edit github actions
1 parent b67cbc1 commit 2ab31b7

File tree

4 files changed

+68
-21
lines changed

4 files changed

+68
-21
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,34 @@ env:
1414
POLYGON_RPC_URL: 'https://polygon.gateway.tenderly.co'
1515

1616
jobs:
17-
check:
17+
tests:
18+
name: Tests
19+
runs-on: ubuntu-latest
20+
1821
strategy:
19-
fail-fast: true
22+
matrix:
23+
node-version: [20.x]
2024

21-
name: Foundry project
22-
runs-on: ubuntu-latest
2325
steps:
24-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v3
2527
with:
2628
submodules: recursive
2729

30+
- name: Use Node.js ${{ matrix.node-version }}
31+
uses: actions/setup-node@v3
32+
with:
33+
node-version: ${{ matrix.node-version }}
34+
35+
- name: Install yarn and dependencies
36+
run: npm install -g yarn && yarn
37+
2838
- name: Install Foundry
2939
uses: foundry-rs/foundry-toolchain@v1
3040
with:
3141
version: nightly
3242

33-
- name: Run Forge build
34-
run: |
35-
forge --version
36-
forge build --sizes
37-
id: build
43+
- name: Run Solhint linter
44+
run: npx solhint "src/*.sol"
3845

39-
- name: Run Forge tests
40-
run: |
41-
forge test -vvv
42-
id: test
46+
- name: Test
47+
run: yarn test

.solhint.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"extends": "solhint:recommended",
3+
"rules": {
4+
"max-line-length": "off",
5+
"no-inline-assembly": "off",
6+
"reason-string": ["warn", { "maxLength": 160 }],
7+
"func-visibility": ["warn", { "ignoreConstructors": true }],
8+
"explicit-types": ["warn", "explicit"],
9+
"quotes": ["warn", "double"],
10+
"const-name-snakecase": "warn",
11+
"not-rely-on-time": "off",
12+
"avoid-low-level-calls": "off",
13+
"contract-name-camelcase": "off",
14+
"func-name-mixedcase": "off",
15+
"var-name-mixedcase": "off",
16+
"compiler-version": "off",
17+
"custom-errors": "warn",
18+
"no-global-import": "off",
19+
"immutable-vars-naming": "off",
20+
"no-console": "warn",
21+
"named-parameters-mapping": "off",
22+
"use-forbidden-name": "warn",
23+
"imports-on-top": "warn",
24+
"ordering": "off",
25+
"comprehensive-interface": "off"
26+
}
27+
}

package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "cross-chain-deposit-module",
3+
"version": "1.0.0",
4+
"description": "A system for facilitating cross-chain deposit campaigns through Royco",
5+
"scripts": {
6+
"build": "forge build",
7+
"test": "forge test -vvv",
8+
"coverage": "forge coverage",
9+
"hint": "solhint 'src/*.sol'",
10+
"sizes": "forge --version && forge build --sizes --optimize --optimizer-runs 200 --skip test --force"
11+
},
12+
"devDependencies": {
13+
"solhint": "^5.0.3"
14+
}
15+
}

src/PredepositExecutor.sol

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,29 +198,29 @@ contract PredepositExecutor is ILayerZeroComposer, Ownable2Step, ReentrancyGuard
198198
}
199199

200200
/// @notice Sets a new owner for the specified campaign.
201-
/// @param _sourceMarketHash The unique identifier for the campaign.
201+
/// @param _sourceMarketHash The market hash on the source chain used to identify the corresponding campaign on the destination.
202202
/// @param _newOwner The address of the new campaign owner.
203203
function setPredepositCampaignOwner(bytes32 _sourceMarketHash, address _newOwner) external onlyOwnerOfPredepositCampaign(_sourceMarketHash) {
204204
sourceMarketHashToOwner[_sourceMarketHash] = _newOwner;
205205
}
206206

207207
/// @notice Sets a new owner for the specified campaign.
208-
/// @param _sourceMarketHash The unique identifier for the campaign.
209-
/// @param _unlockTimestamp The ABSOLUTE timestamp until deposits will be locked for this campaign.
208+
/// @param _sourceMarketHash The market hash on the source chain used to identify the corresponding campaign on the destination.
209+
/// @param _unlockTimestamp The ABSOLUTE timestamp until deposits will be locked for this campaign on destination.
210210
function setPredepositCampaignLocktime(bytes32 _sourceMarketHash, uint256 _unlockTimestamp) external onlyOwnerOfPredepositCampaign(_sourceMarketHash) {
211211
sourceMarketHashToPredepositCampaign[_sourceMarketHash].unlockTimestamp = _unlockTimestamp;
212212
}
213213

214214
/// @notice Sets the deposit recipe for a campaign.
215-
/// @param _sourceMarketHash The unique identifier for the campaign.
216-
/// @param _depositRecipe The deposit recipe for the source market on the destination chain
215+
/// @param _sourceMarketHash The market hash on the source chain used to identify the corresponding campaign on the destination.
216+
/// @param _depositRecipe The deposit recipe for the campaign on the destination chain
217217
function setDepositRecipe(bytes32 _sourceMarketHash, Recipe calldata _depositRecipe) external onlyOwnerOfPredepositCampaign(_sourceMarketHash) {
218218
sourceMarketHashToPredepositCampaign[_sourceMarketHash].depositRecipe = _depositRecipe;
219219
}
220220

221221
/// @notice Sets the withdrawal recipe for a campaign.
222-
/// @param _sourceMarketHash The unique identifier for the campaign.
223-
/// @param _withdrawalRecipe The withdrawal recipe for the source market on the destination chain
222+
/// @param _sourceMarketHash The market hash on the source chain used to identify the corresponding campaign on the destination.
223+
/// @param _withdrawalRecipe The withdrawal recipe for the campaign on the destination chain
224224
function setWithdrawalRecipe(bytes32 _sourceMarketHash, Recipe calldata _withdrawalRecipe) external onlyOwnerOfPredepositCampaign(_sourceMarketHash) {
225225
sourceMarketHashToPredepositCampaign[_sourceMarketHash].withdrawalRecipe = _withdrawalRecipe;
226226
}

0 commit comments

Comments
 (0)