@@ -35,64 +35,30 @@ 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+ ## Clone the Foundry template
3939
40- 1 . Create a new directory to hold your app and navigate inside it :
40+ 1 . Clone the [ flare-foundry-starter ] ( https://github.com/flare-foundation/flare-foundry-starter ) and navigate into the project directory :
4141
4242 ``` bash
43- mkdir ftsov2-app && cd ftsov2-app
43+ git clone https://github.com/flare-foundation/flare-foundry-starter.git
44+ cd flare-foundry-starter
4445 ```
4546
46- 2 . Initialize an empty Foundry project:
47+ 2 . Install the project dependencies :
4748
4849 ``` bash
49- forge init
50+ forge soldeer install
5051 ```
5152
52- This creates several subdirectories like ` src ` and ` test ` , with some sample contracts in them.
53-
54- 3 . Verify the setup by running the sample test:
55-
56- ``` bash
57- forge test
58- ```
59-
60- The output should look similar to this:
61-
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:
53+ 3 . You might need to modify ` remappings.txt ` so ` /src ` paths are read correctly, e.g.:
9254
9355 ``` plaintext title="remappings.txt"
94- @flarenetwork/flare-periphery-contracts/=node_modules/@flarenetwork/flare-periphery-contracts/
95- @openzeppelin/contracts/=node_modules/@openzeppelin/contracts
56+ @openzeppelin-contracts/=dependencies/@openzeppelin-contracts-5.2.0-rc.1/
57+ flare-periphery/=dependencies/flare-periphery-0.0.1/
58+ forge-std/=dependencies/forge-std-1.9.5/src/
59+ forge-std/=dependencies/forge-std-1.9.5/
60+ surl/=dependencies/surl-0.0.0/src/
61+ surl/=dependencies/surl-0.0.0/
9662 ```
9763
9864## Create and compile a contract
0 commit comments