Skip to content

Commit aa6a8f3

Browse files
zoeyTMkanej
authored andcommitted
update create2 guide for salt config
1 parent c4d8b72 commit aa6a8f3

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

docs/src/content/ignition/docs/guides/create2.md

+46
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,52 @@ This guide assumes you are using the contracts and Ignition module from the [qui
9090

9191
:::
9292

93+
Our last step before deploying is to add a custom salt for the deployment. This step is optional, but it's recommended to avoid any potential collisions with other deployments. You can add a custom salt via your Hardhat config:
94+
95+
::::tabsgroup{options=TypeScript,JavaScript}
96+
97+
:::tab{value=TypeScript}
98+
99+
```ts
100+
export default {
101+
// ...rest of your config...
102+
ignition: {
103+
strategyConfig: {
104+
create2: {
105+
salt: "custom-salt",
106+
},
107+
},
108+
},
109+
};
110+
```
111+
112+
:::
113+
114+
:::tab{value=JavaScript}
115+
116+
```js
117+
module.exports = {
118+
// ...rest of your config...
119+
ignition: {
120+
strategyConfig: {
121+
create2: {
122+
salt: "custom-salt",
123+
},
124+
},
125+
},
126+
};
127+
```
128+
129+
:::
130+
131+
::::
132+
133+
:::tip
134+
135+
To learn more about salts and how they work, as well as additional security considerations, please see the [CreateX documentation](https://github.com/pcaversaccio/createx?tab=readme-ov-file#permissioned-deploy-protection-and-cross-chain-redeploy-protection).
136+
137+
:::
138+
93139
You can now run the deployment with `create2` using the newly added Sepolia network:
94140

95141
::::tabsgroup{options="TypeScript,JavaScript"}

0 commit comments

Comments
 (0)