Skip to content

Commit

Permalink
Merge pull request #2 from open-dollar/update-setup
Browse files Browse the repository at this point in the history
Update setup
  • Loading branch information
daopunk authored Jun 6, 2024
2 parents 45cbfe5 + cc6a810 commit 7c015be
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 27 deletions.
1 change: 1 addition & 0 deletions lib/ds-test
Submodule ds-test added at e28215
1 change: 1 addition & 0 deletions lib/forge-std
Submodule forge-std added at 52715a
4 changes: 3 additions & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

@script/=script/
@contracts/=src/contracts/
@test/=test/
@interfaces/=src/interfaces/
@libraries/=src/libraries/
@test/=test/

12 changes: 12 additions & 0 deletions src/contracts/Starter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.20;

import {IStarter} from '@interfaces/IStarter.sol';

contract Starter is IStarter {
constructor() {}

function getNum() external pure returns (uint256 _num) {
_num = 1;
}
}
18 changes: 0 additions & 18 deletions src/contracts/Test.sol

This file was deleted.

4 changes: 2 additions & 2 deletions src/interfaces/ITest.sol → src/interfaces/IStarter.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.20;

interface ITest {
struct TestState {
interface IStarter {
struct State {
uint256 foo;
}
}
17 changes: 17 additions & 0 deletions test/TestStarter.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.20;

import 'forge-std/Test.sol';

Check warning on line 4 in test/TestStarter.t.sol

View workflow job for this annotation

GitHub Actions / Run Linters (18.x)

global import of path forge-std/Test.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)

Check warning on line 4 in test/TestStarter.t.sol

View workflow job for this annotation

GitHub Actions / Run Linters (18.x)

Import 'forge-std/Test.sol' in contract TestStarter should be declared as import {contract_to_import} from 'forge-std/Test.sol';
import {Starter} from '@contracts/Starter.sol';

contract TestStarter is Test {
Starter public starter;

function setUp() public virtual {
starter = new Starter();
}

function testGetNum() public {
assertEq(starter.getNum(), 1);
}
}
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,9 @@ dotenv@^16.4.5:
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==

"ds-test@git+https://github.com/dapphub/ds-test.git":
"ds-test@https://github.com/dapphub/ds-test":
version "1.0.0"
resolved "git+https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0"
resolved "https://github.com/dapphub/ds-test#e282159d5170298eb2455a6c05280ab5a73a4ef0"

emoji-regex@^7.0.1:
version "7.0.3"
Expand Down Expand Up @@ -746,13 +746,13 @@ flatted@^2.0.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==

"forge-std@git+https://github.com/foundry-rs/forge-std.git":
"forge-std@https://github.com/foundry-rs/forge-std":
version "1.8.2"
resolved "git+https://github.com/foundry-rs/forge-std.git#52715a217dc51d0de15877878ab8213f6cbbbab5"
resolved "https://github.com/foundry-rs/forge-std#52715a217dc51d0de15877878ab8213f6cbbbab5"

"forge-std@git+https://github.com/foundry-rs/forge-std.git#e8a047e3f40f13fa37af6fe14e6e06283d9a060e":
"forge-std@https://github.com/foundry-rs/forge-std.git#e8a047e3f40f13fa37af6fe14e6e06283d9a060e":
version "1.5.6"
resolved "git+https://github.com/foundry-rs/forge-std.git#e8a047e3f40f13fa37af6fe14e6e06283d9a060e"
resolved "https://github.com/foundry-rs/forge-std.git#e8a047e3f40f13fa37af6fe14e6e06283d9a060e"

form-data-encoder@^2.1.2:
version "2.1.4"
Expand Down

0 comments on commit 7c015be

Please sign in to comment.