You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Solidity](https://docs.soliditylang.org/) version 0.8.25
96
-
- Access to a Filecoin network (Devnet/Calibnet/Mainnet)
97
-
- DataCap allocation for the contract account
98
-
- Environment file (.env) with appropriate configuration
99
-
100
103
## Demo
101
104
102
105
You can view and try out the Round Robin Allocator on the Filecoin Calibration network using the Louper explorer.
106
+
103
107
Direct link for the deployed contract: [https://louper.dev/diamond/0x71B65138aceBe6c010C366586B58BB01D5D97f4E?network=filecoinCalibration](https://louper.dev/diamond/0x71B65138aceBe6c010C366586B58BB01D5D97f4E?network=filecoinCalibration)
-**Data Size**: The padded size of the data in bytes
135
+
- Example: `2048`
136
+
137
+
To prepare HEX format of CommP, you can use the following docker image: `mmach/car-processor:0.1.0`
138
+
139
+
This image will require directory with your CAR files to be mounted as a volume.
140
+
141
+
Output will be created in form of CSV file in the same directory named `output.csv` with the following columns: `CommPCID_InHex,DataSizeInBytes` without header.
142
+
143
+
Example docker image usage:
144
+
```bash
145
+
docker run --rm -it -v $(pwd)/cars:/data mmach/car-processor:0.1.0
146
+
```
147
+
148
+
### Prepare ETH wallet with sufficient balance
149
+
150
+
To interact with the Round Robin AutoAllocator contract, you need an Ethereum wallet with sufficient balance to cover gas fees and collateral. You can use tools like [MetaMask](https://metamask.io/) (frontend) or [Foundry](https://book.getfoundry.sh/getting-started/installation) (CLI) to manage your wallet.
151
+
152
+
### Getting current collateral value per CID
153
+
154
+
The Easiest way to get current collateral value per CID is to use contract Frontend app where this information is displayed.
155
+
156
+
Alternatively, you can use the Louper explorer app (or CLI) to invoke the `getAppConfig` function of the contract (in read tab, choose ViewFacet [here](https://louper.dev/diamond/0x71B65138aceBe6c010C366586B58BB01D5D97f4E?network=filecoinCalibration#read)). This function returns current contract config including the collateral value per CID.
157
+
158
+
### Create Allocation Package (Transfer Data Cap for multiple files)
159
+
160
+
To create allocation package and transfer Data Cap, you can either:
161
+
- Upload the CSV directly in the frontend demo application (refer to the video in demo section)
162
+
- Use the CSV content and invoke `allocate` function through command line e.g. using [Foundry](https://book.getfoundry.sh/getting-started/installation)`cast` command to interact with the contract
163
+
164
+
#### Example of using the Frontend app
165
+
166
+
1. Open the [Round Robin Allocator Frontend](https://round-robin.staging.allocator.tech).
167
+
2. Connect your Ethereum wallet (e.g. MetaMask).
168
+
3. Upload CSV file with your prepared data.
169
+
4. Specify the number of replicas you want to allocate.
170
+
5. Click "Allocate" to send the transaction to the contract.
171
+
172
+
173
+
#### Example of using the CSV file with `cast` command
174
+
175
+
1. Format CSV content into the required format for the `allocate` function.
The Easiest way to monitor your allocation packages is through the Frontend app, where you can connect your wallet and view your allocations.
188
+
189
+
Alternatively, you can use the Louper explorer to check your allocation packages by invoking the `getClientPackagesWithClaimStatus` function (in read tab, choose ViewFacet [here](https://louper.dev/diamond/0x71B65138aceBe6c010C366586B58BB01D5D97f4E?network=filecoinCalibration#read)). This function will return all allocation packages associated with your wallet address, along with their claim status.
190
+
191
+
### Retrieving Collateral
192
+
193
+
Collateral can be retrieved after all storage providers have successfully claimed their allocations.
194
+
195
+
You can view the status of your allocation packages and their claims using the Louper explorer or the Frontend app.
196
+
197
+
The Frontend app will let you call `retrieveCollateral` function directly when conditions are met.
198
+
199
+
In the Louper explorer, you can invoke the `retrieveCollateral` function (in write tab, choose RetrieveCollateralFacet [here](https://louper.dev/diamond/0x71B65138aceBe6c010C366586B58BB01D5D97f4E?network=filecoinCalibration#write)) to retrieve your collateral.
0 commit comments