@@ -7,10 +7,11 @@ title: "Custom Deployments"
7
7
import Link from " @docusaurus/Link" ;
8
8
import { links } from " @site/src/constants" ;
9
9
10
- :::info
10
+ :::info[ Reach Out ]
11
11
12
- Due to limited bandwidth, we are not able to deploy the Sablier Protocol on every EVM chain. However, we are happy to
13
- consider your project if you fill out this <Link href = { links .forms .chain } >form</Link > and meet the requirements below.
12
+ Due to budget constraints, we are not able to deploy the Sablier Protocol on every EVM chain. However, we would be happy
13
+ to consider your project if you fill out this <Link href = { links .forms .chains } >form</Link > and meet the requirements
14
+ below.
14
15
15
16
:::
16
17
@@ -21,3 +22,157 @@ consider your project if you fill out this <Link href={links.forms.chain}>form</
21
22
- Bridge, with step-by-step instructions for how to bridge ETH and ERC-20 tokens to the target chain
22
23
- GraphQL solution, e.g., a deployment of [ The Graph] ( https://thegraph.com/ )
23
24
- Functional JSON-RPC endpoint, ideally listed on [ ChainList] ( https://chainlist.org/ )
25
+
26
+ ## Deployment Guide
27
+
28
+ The following guidelines apply to you only if you have you been granted a
29
+ [ BUSL license] ( https://app.ens.domains/lockup-license-grants.sablier.eth?tab=records ) to deploy the Sablier Protocol.
30
+
31
+ ### Pre Requisities
32
+
33
+ - Check if the deployment is not already made on [ your chain] ( /contracts/v2/deployments )
34
+ - Follow the [ contributing guide] ( https://github.com/sablier-labs/v2-core/blob/main/CONTRIBUTING.md )
35
+ - RPC endpoint, e.g., a paid Infura account
36
+ - Enough ETH in your deployer account
37
+ - Etherscan API key (for source code verification)
38
+
39
+ ### Steps for deploying Core contracts
40
+
41
+ #### Step 1: Clone the [ v2-core repo] ( https://github.com/sablier-labs/v2-core ) and checkout to the latest release tag
42
+
43
+ At the time of writing, the latest release tag is ` v1.2.0 ` :
44
+
45
+ ``` bash
46
+ git checkout v1.2.0
47
+ ```
48
+
49
+ #### Step 2: Create an ` .env ` file
50
+
51
+ ``` bash
52
+ touch .env
53
+ ```
54
+
55
+ Add the following variables to ` .env ` file:
56
+
57
+ ```
58
+ EOA="DEPLOYER ADDRESS"
59
+ ETHERSCAN_API_KEY="EXPLORER API KEY"
60
+ PRIVATE_KEY="PRIVATE KEY OF DEPLOYER ADDRESS"
61
+ RPC_URL="RPC ENDPOINT URL"
62
+ VERIFIER_URL="EXPLORER VERIFICATION URL"
63
+ ```
64
+
65
+ Load the environment variables into your shell:
66
+
67
+ ``` bash
68
+ source .env
69
+ ```
70
+
71
+ #### Step 3: Run the following deployment command
72
+
73
+ :::warning[ Important]
74
+
75
+ You must set the protocol admin to the Sablier-controlled address 0xD427d37B5F6d33f7D42C4125979361E011FFbfD9. Failure to
76
+ do so will result in your deployment not being acknowledged as official.
77
+
78
+ :::
79
+
80
+ For ** deterministic** deployment:
81
+
82
+ ``` bash
83
+ FOUNDRY_PROFILE=optimized \
84
+ forge script script/DeployDeterministicCore.s.sol \
85
+ --broadcast \
86
+ --etherscan-api-key $ETHERSCAN_API_KEY \
87
+ --rpc-url $RPC_URL \
88
+ --private-key $PRIVATE_KEY \
89
+ --sig " run(address)" 0xD427d37B5F6d33f7D42C4125979361E011FFbfD9 \
90
+ --verifier-url $VERIFIER_URL \
91
+ --verify \
92
+ -vvv
93
+ ```
94
+
95
+ For ** non-deterministic** deployment:
96
+
97
+ ``` bash
98
+ FOUNDRY_PROFILE=optimized \
99
+ forge script script/DeployCore.s.sol \
100
+ --broadcast \
101
+ --etherscan-api-key $ETHERSCAN_API_KEY \
102
+ --private-key $PRIVATE_KEY \
103
+ --rpc-url $RPC_URL \
104
+ --sig " run(address)" 0xD427d37B5F6d33f7D42C4125979361E011FFbfD9 \
105
+ --verifier-url $VERIFIER_URL \
106
+ --verify \
107
+ -vvv
108
+ ```
109
+
110
+ If you are using a mnemonic or a hardware device for your deployer address, refer to ` forge-script ` page from
111
+ [ foundry book] ( https://book.getfoundry.sh/reference/forge/forge-script#forge-script ) for different wallet options.
112
+
113
+ ### Steps for deploying Periphery contracts
114
+
115
+ #### Step 1: Clone the [ v2-periphery] ( https://github.com/sablier-labs/v2-periphery ) and checkout to the latest release tag
116
+
117
+ At the time of writing, the latest release tag is ` v1.2.0 ` :
118
+
119
+ ``` bash
120
+ git checkout v1.2.0
121
+ ```
122
+
123
+ #### Step 2: Create an ` .env ` file
124
+
125
+ ``` bash
126
+ touch .env
127
+ ```
128
+
129
+ Add the following variables to ` .env ` file:
130
+
131
+ ```
132
+ EOA="DEPLOYER ADDRESS"
133
+ ETHERSCAN_API_KEY="EXPLORER API KEY"
134
+ PRIVATE_KEY="PRIVATE KEY OF DEPLOYER ADDRESS"
135
+ RPC_URL="RPC ENDPOINT URL"
136
+ VERIFIER_URL="EXPLORER VERIFICATION URL"
137
+ ```
138
+
139
+ Load the environment variables into shell:
140
+
141
+ ``` bash
142
+ source .env
143
+ ```
144
+
145
+ #### Step 3: Run the following command to deploy all periphery contracts
146
+
147
+ For ** deterministic** deployments, meaning that CREATE2 is used:
148
+
149
+ ``` bash
150
+ FOUNDRY_PROFILE=optimized \
151
+ forge script script/DeployDeterministicPeriphery.s.sol \
152
+ --broadcast \
153
+ --etherscan-api-key $ETHERSCAN_API_KEY \
154
+ --private-key $PRIVATE_KEY \
155
+ --rpc-url $RPC_URL \
156
+ --sig " run()" \
157
+ --verifier-url $VERIFIER_URL \
158
+ --verify \
159
+ -vvv
160
+ ```
161
+
162
+ For ** non-deterministic** deployments:
163
+
164
+ ``` bash
165
+ FOUNDRY_PROFILE=optimized \
166
+ forge script script/DeployPeriphery.s.sol \
167
+ --broadcast \
168
+ --etherscan-api-key $ETHERSCAN_API_KEY \
169
+ --private-key $PRIVATE_KEY \
170
+ --rpc-url $RPC_URL \
171
+ --sig " run()" \
172
+ --verifier-url $VERIFIER_URL \
173
+ --verify \
174
+ -vvv
175
+ ```
176
+
177
+ If you are using a mnemonic or a hardware device for your deployer address, refer to ` forge-script ` page from the
178
+ [ Foundry Book] ( https://book.getfoundry.sh/reference/forge/forge-script#forge-script ) for different wallet options.
0 commit comments