Skip to content

Commit fc3b669

Browse files
committed
πŸ“ update deployment docs
1 parent 0f7bada commit fc3b669

File tree

4 files changed

+40
-23
lines changed

4 files changed

+40
-23
lines changed

β€ŽREADME.md

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# how to
22

3+
## deploy an oracle adapter
4+
5+
```sh
6+
QUESTION_TIMEOUT=3600 \
7+
MIN_BOND=100000000000000 \
8+
forge script script/DeployFlatCFMRealityAdapter.s.sol \
9+
--rpc-url $RPC_URL \
10+
--broadcast \
11+
--sender $ADDRESS \
12+
--private-key $PRIVATE_KEY
13+
```
14+
315
## deploy a factory
416

517
```sh
@@ -8,20 +20,22 @@ export CONDITIONAL_TOKENS=0xabcd...
820
export WRAPPED1155_FACTORY=0x9999...
921
forge script script/DeployFlatCFMFactory.s.sol:DeployFlatCFMFactory \
1022
--rpc-url $RPC_URL \
11-
--private-key $PRIVATE_KEY \
12-
--broadcast
23+
--broadcast \
24+
--sender $ADDRESS \
25+
--private-key $PRIVATE_KEY
1326
```
1427

1528
## deploy a new Flat CFM
1629

1730
### using a block explorer
1831

19-
1. Locate the FlatCFMFactory page on the block explorer.
20-
2. Connect your wallet.
21-
3. Enter fileds.
22-
4. Submit and send transaction.
32+
First deploy the Flat CFM instance:
33+
34+
![create-flatcfm](img/create-flatcfm.png)
35+
36+
Then deploy each Conditional Scalar Market, one per outcome:
2337

24-
![factory-create.png](img/factory-create.png.png)
38+
![create-csm](img/create-csm.png)
2539

2640

2741
### using a config file
@@ -31,28 +45,31 @@ First, define a config file (by default, use `./flatcfm.config.json`), like
3145
```json
3246
{
3347
"factoryAddress": "0x1234567890abcdef1234567890abcdef12345678",
34-
"roundName": "Demo Round",
35-
"outcomeNames": ["Project A", "Project B"],
36-
"openingTimeDecision": 1680000000,
37-
"metricName": "Rainfall (mm)",
38-
"startDate": "2024-05-01",
39-
"endDate": "2024-05-15",
48+
"oracleAdapterAddress": "0x1234567890abcdef1234567890abcdef12345678",
49+
"decisionTemplateId": 24,
50+
"metricTemplateId": 42,
51+
"collateralToken": "0x1234567890abcdef1234567890abcdef12345678",
52+
"outcomeNames": [
53+
"Project A",
54+
"Project B",
55+
"Project C",
56+
"Project D"
57+
],
58+
"openingTimeDecision": 1737111600,
4059
"minValue": 0,
41-
"maxValue": 200,
42-
"openingTimeMetric": 1681000000,
43-
"collateralToken": "0x1234567890abcdef1234567890abcdef12345678"
44-
}
60+
"maxValue": 100,
61+
"openingTimeMetric": 1737457200,
62+
"metadataUri": "ipfs://1234"
4563
```
4664

4765
then run
4866

4967
```sh
50-
export FACTORY_ADDRESS=0x1234…
51-
export MARKET_CONFIG_FILE=./somewhere/flatcfm.config.json
52-
forge script script/CreateFlatCFMFromConfig.s.sol:CreateFlatCFMFromConfig \
68+
forge script script/CreateFlatCFMFromConfig.s.sol \
5369
--rpc-url $RPC_URL \
54-
--private-key $PRIVATE_KEY \
55-
--broadcast
70+
--broadcast \
71+
--sender $ADDRESS \
72+
--private-key $PRIVATE_KEY
5673
```
5774

5875
# conditional funding markets (CFM)
@@ -65,7 +82,7 @@ The mechanism implemented here is a simplified version of
6582

6683
## design
6784

68-
`FlatCFM` represents the condition of funding. It's a market but it won't
85+
`FlatCFM` represents the condition of funding. It is a market but it won't
6986
be traded. It creates a `ConditionalScalarMarket` for each outcome it has (apart
7087
from the special "Invalid" outcome, see below). It prepares an oracle question
7188
and condition (as in `ConditionalTokens`) during construction.

β€Žimg/create-csm.png

55.8 KB
Loading

β€Žimg/create-flatcfm.png

210 KB
Loading

β€Žimg/factory-create.png.png

-534 KB
Binary file not shown.

0 commit comments

Comments
Β (0)