@@ -35,65 +35,32 @@ Ensure you have the following tools installed:
3535- [ Foundry] ( https://book.getfoundry.sh/getting-started/installation )
3636- [ Node.js] ( https://nodejs.org/en/download/ )
3737
38- ## Create a Foundry project
38+ ## Start with flare template of a Foundry project
3939
40- 1 . Create a new directory to hold your app and navigate inside it :
40+ Clone the [ flare template ] ( https://github.com/flare-foundation/flare-foundry-starter ) and navigate into the project directory :
4141
42- ``` bash
43- mkdir ftsov2-app && cd ftsov2-app
44- ```
45-
46- 2 . Initialize an empty Foundry project:
47-
48- ``` bash
49- forge init
50- ```
51-
52- This creates several subdirectories like ` src ` and ` test ` , with some sample contracts in them.
42+ ``` bash
43+ git clone https://github.com/flare-foundation/flare-foundry-starter.git
44+ cd flare-foundry-starter
45+ ```
5346
54- 3 . Verify the setup by running the sample test:
47+ Install the project dependencies.
5548
56- ``` bash
57- forge test
58- ```
49+ ``` bash
50+ forge soldeer install
51+ ```
5952
60- The output should look similar to this:
53+ You might have to modify the ` remappings.txt ` so that ` /src ` part of path is before the non src part
54+ Like this
6155
62- ``` plaintext
63- [⠢] Compiling...
64- No files changed, compilation skipped
65-
66- Running 2 tests for test/Counter.t.sol:CounterTest
67- [PASS] testFuzz_SetNumber(uint256) (runs: 256, μ: 27864, ~: 28409)
68- [PASS] test_Increment() (gas: 28379)
69- Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 12.30ms
70-
71- Ran 1 test suites: 2 tests passed, 0 failed, 0 skipped (2 total tests)
72- ```
73-
74- 4 . Clean up by deleting the sample contracts and tests:
75-
76- ``` bash
77- rm -r src/* test/*
78- ```
79-
80- ## Install the Flare periphery
81-
82- Install the Flare periphery package to interact with [ FTSOv2 contracts] ( /ftso/solidity-reference ) .
83-
84- 1 . Initialize an npm project and install the Flare periphery package:
85-
86- ``` bash
87- npm init -y
88- npm i @flarenetwork/flare-periphery-contracts
89- ```
90-
91- 2 . Create a file ` remappings.txt ` in the main directory, and add the following remappings to ensure Foundry can locate the installed packages:
92-
93- ``` plaintext title="remappings.txt"
94- @flarenetwork/flare-periphery-contracts/=node_modules/@flarenetwork/flare-periphery-contracts/
95- @openzeppelin/contracts/=node_modules/@openzeppelin/contracts
96- ```
56+ ``` bash
57+ @openzeppelin-contracts/=dependencies/@openzeppelin-contracts-5.2.0-rc.1/
58+ flare-periphery/=dependencies/flare-periphery-0.0.1/
59+ forge-std/=dependencies/forge-std-1.9.5/src/
60+ forge-std/=dependencies/forge-std-1.9.5/
61+ surl/=dependencies/surl-0.0.0/src/
62+ surl/=dependencies/surl-0.0.0/
63+ ```
9764
9865## Create and compile a contract
9966
0 commit comments