Skip to content

Commit 4f4c1c0

Browse files
authored
script: add gate deployments (#606)
This commit adds the deployments for xSTRK and sSTRK gates.
1 parent a773746 commit 4f4c1c0

File tree

4 files changed

+51
-0
lines changed

4 files changed

+51
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Once you kill your Devnet instance, the state is lost unless the latest `devnet_
3434
| Gate[STRK] | `0x031a96fe18fe3fdab28822c82c81471f1802800723c8f3e209f1d9da53bc637d` |
3535
| Gate[WBTC] | `0x05bc1c8a78667fac3bf9617903dbf2c1bfe3937e1d37ada3d8b86bf70fb7926e` |
3636
| Gate[WSTETH] | `0x02d1e95661e7726022071c06a95cdae092595954096c373cde24a34bb3984cbf` |
37+
| Gate[xSTRK] | `0x04a3e7dffd8e74a706be9abe6474e07fbbcf41e1be71387514c4977d54dbc428` |
38+
| Gate[sSTRK] | `0x03b709f3ab9bc072a195b907fb2c27688723b6e4abb812a8941def819f929bd8` |
3739
| Pragma | `0x0734abeebd842926c860f3f82d23a7d2e0a24c8756d7f6b88a7456dc95a7e0fd` |
3840
| Purger | `0x0149c1539f39945ce1f63917ff6076845888ab40e9327640cb78dcaebfed42e4` |
3941
| Receptor | `0x059c159d9a87a34f17c4991e81b0d937aaf86a29f682ce0951536265bd6a1678` |

scripts/deployment/deploy_mainnet_alpha-mainnet_state.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,28 @@
10261026
"status": "Success",
10271027
"timestamp": 1730900237,
10281028
"misc": null
1029+
},
1030+
"204eaaf9f37541e98f6aa621bfae3804d58fca6184170227979be6a05af5bb8a": {
1031+
"name": "deploy",
1032+
"output": {
1033+
"type": "DeployResponse",
1034+
"contract_address": "0x4a3e7dffd8e74a706be9abe6474e07fbbcf41e1be71387514c4977d54dbc428",
1035+
"transaction_hash": "0x28205ab99459c04b908a6ffa04cf67a60f520d069227c659fe7935d381f8191"
1036+
},
1037+
"status": "Success",
1038+
"timestamp": 1733363267,
1039+
"misc": null
1040+
},
1041+
"1861967d07085e1bf5bd5e86075acdcb5103b1ed4e937d3bdeff2edf318b41af": {
1042+
"name": "deploy",
1043+
"output": {
1044+
"type": "DeployResponse",
1045+
"contract_address": "0x3b709f3ab9bc072a195b907fb2c27688723b6e4abb812a8941def819f929bd8",
1046+
"transaction_hash": "0x79f074dd2c69a8b58f013d5d920fda2ced22a52dc5f149fa581265d3c71c458"
1047+
},
1048+
"status": "Success",
1049+
"timestamp": 1733363485,
1050+
"misc": null
10291051
}
10301052
}
10311053
}

scripts/deployment/src/deploy_mainnet.cairo

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@ fn main() {
4545
let strk: ContractAddress = addresses::strk_addr();
4646
let wbtc: ContractAddress = addresses::mainnet::wbtc();
4747
let wsteth: ContractAddress = addresses::mainnet::wsteth();
48+
let xstrk: ContractAddress = addresses::mainnet::xstrk();
49+
let sstrk: ContractAddress = addresses::mainnet::sstrk();
4850

4951
let eth_gate: ContractAddress = core_deployment::deploy_gate(gate_class_hash, shrine, eth, sentinel, "ETH");
5052
let strk_gate: ContractAddress = core_deployment::deploy_gate(gate_class_hash, shrine, strk, sentinel, "STRK");
5153
let wbtc_gate: ContractAddress = core_deployment::deploy_gate(gate_class_hash, shrine, wbtc, sentinel, "WBTC");
5254
let wsteth_gate: ContractAddress = core_deployment::deploy_gate(
5355
gate_class_hash, shrine, wsteth, sentinel, "WSTETH"
5456
);
57+
let xstrk_gate: ContractAddress = core_deployment::deploy_gate(gate_class_hash, shrine, xstrk, sentinel, "xSTRK");
58+
let sstrk_gate: ContractAddress = core_deployment::deploy_gate(gate_class_hash, shrine, sstrk, sentinel, "sSTRK");
5559

5660
println!("Deploying oracles");
5761
let pragma: ContractAddress = core_deployment::deploy_pragma(
@@ -83,6 +87,8 @@ fn main() {
8387
utils::grant_role(shrine, usdc_transmuter_restricted, shrine_roles::transmuter(), "SHR -> TR[USDC]");
8488

8589
// Adding ETH, STRK, WBTC and WSTETH yangs
90+
// The admin role has been transferred to the multisig so any new collateral needs to
91+
// be added with the multisig.
8692
println!("Setting up Shrine");
8793

8894
utils::add_yang_to_sentinel(
@@ -165,6 +171,9 @@ fn main() {
165171
utils::set_yang_pair_id_for_oracle(pragma, wbtc, WBTC_USD_PAIR_ID);
166172
utils::set_yang_pair_id_for_oracle(pragma, wsteth, WSTETH_USD_PAIR_ID);
167173

174+
// The admin role has been transferred to the multisig so any new pair IDs
175+
// need to be added with the multisig.
176+
168177
// Set initial allocation
169178
let twenty_pct: felt252 = (20 * RAY_PERCENT).into();
170179
let eighty_pct: felt252 = (80 * RAY_PERCENT).into();
@@ -222,6 +231,8 @@ fn main() {
222231
println!("Gate[STRK]: {}", strk_gate);
223232
println!("Gate[WBTC]: {}", wbtc_gate);
224233
println!("Gate[WSTETH]: {}", wsteth_gate);
234+
println!("Gate[xSTRK]: {}", xstrk_gate);
235+
println!("Gate[sSTRK]: {}", sstrk_gate);
225236
println!("Pragma: {}", pragma);
226237
println!("Purger: {}", purger);
227238
println!("Receptor: {}", receptor);

scripts/src/addresses.cairo

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,14 @@ pub mod mainnet {
235235
0x042b8f0484674ca266ac5d08e4ac6a3fe65bd3129795def2dca5c34ecc5f96d2.try_into().expect('invalid WSTETH address')
236236
}
237237

238+
pub fn xstrk() -> ContractAddress {
239+
0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a.try_into().expect('invalid xSTRK address')
240+
}
241+
242+
pub fn sstrk() -> ContractAddress {
243+
0x0356f304b154d29d2a8fe22f1cb9107a9b564a733cf6b4cc47fd121ac1af90c9.try_into().expect('invalid sSTRK address')
244+
}
245+
238246
// External
239247

240248
// https://docs.ekubo.org/integration-guides/reference/contract-addresses
@@ -318,6 +326,10 @@ pub mod mainnet {
318326
0x0498edfaf50ca5855666a700c25dd629d577eb9afccdf3b5977aec79aee55ada.try_into().unwrap()
319327
}
320328

329+
pub fn sstrk_gate() -> ContractAddress {
330+
0x03b709f3ab9bc072a195b907fb2c27688723b6e4abb812a8941def819f929bd8.try_into().unwrap()
331+
}
332+
321333
pub fn strk_gate() -> ContractAddress {
322334
0x031a96fe18fe3fdab28822c82c81471f1802800723c8f3e209f1d9da53bc637d.try_into().unwrap()
323335
}
@@ -333,4 +345,8 @@ pub mod mainnet {
333345
pub fn wsteth_gate() -> ContractAddress {
334346
0x02d1e95661e7726022071c06a95cdae092595954096c373cde24a34bb3984cbf.try_into().unwrap()
335347
}
348+
349+
pub fn xstrk_gate() -> ContractAddress {
350+
0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a.try_into().unwrap()
351+
}
336352
}

0 commit comments

Comments
 (0)