Skip to content

Commit 8442e61

Browse files
authored
feat: sepolia script (#577)
* feat: sepolia script * fix: dev profile for sepolia * dev: addressing review
1 parent cf14145 commit 8442e61

17 files changed

+816
-47
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,27 @@ To run Opus locally, you'll need to install [starknet-devnet-rs](https://github.
1212

1313
In one shell, run `scarb run devnet` to boot up a Devnet instance. You can use the `http://localhost:5050` as the RPC address.
1414

15-
In another shell, from the `scripts` directory, run `scarb run deploy`. That will compile and deploy the contracts on the local Devnet and do the initial required setup.
15+
In another shell, from the `scripts` directory, run `scarb run deploy_devnet`. That will compile and deploy the contracts on the local Devnet and do the initial required setup.
1616

1717
Note that Devnet deployments are ephemeral. Once you kill your Devnet instance, the state is lost. After restarting, you will have to deploy the contracts again, using the script mentioned above.
18+
19+
### Addresses
20+
21+
#### Sepolia
22+
23+
| Module | Address |
24+
| ------ | --------|
25+
| Abbot | `0x6352de997a7fde3bc733675180e843b5fe585b7ef464a2987a76fae454af78d` |
26+
| Absorber | `0x48deaee30965a88184619f8b3b30b805727654468ae9b42b483a84831b9e5ea` |
27+
| Allocator | `0xa7b142b8937cb31507fe598252d44a516f2bc64eb285f1807163461d6c208e` |
28+
| Caretaker | `0xeab066a1083f32ff92e3ac9696dc847928fa0f4035bda93dacc34df1cef604` |
29+
| Controller | `0x3297c2080d6c565055ca1c7695b9b6e458600515ebd76101ec4221bcea877ce` |
30+
| Equalizer | `0x43d5cd32847304e168fca09feef5620aaf7c3a0e6fa1689416541be95d8d183` |
31+
| Flash Mint | `0x2c6c7acedfbb6607ecc33cd6b2134f3dea2f16998b44219067063ae4ccb6e42` |
32+
| Gate[ETH] | `0x20ee25588aa6225c58a55110fc5f5b983d074d4ed5b1d98788825a9d3305ac0` |
33+
| Gate[STRK] | `0x594f653061a2181514fad04dc005f7eb8210786a45b577f416029e0ffb01cd7` |
34+
| Pragma | `0x71415935245134eaa125de2df12772443726d5a149a4995f60208c28653a54f` |
35+
| Purger | `0x67f57eec3ce8ba9781985cafcb774283d6450662906691b65d882e13dc59934` |
36+
| Seer | `0x14dac867b21b5b6645cc046e0125cca8e81e8dd9d95ca5dd8e756fa053a2984` |
37+
| Sentinel | `0x2f1778912ef186e2434dfe0957e00ed2122dd48f3aa2e8bc46173fd67bdd065` |
38+
| Shrine | `0x4b3bfe81472b5a01dc3c1fba3456bb0979852deaca43da49d406189371d09e6` |

Scarb.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ access_control = { git = "https://github.com/lindy-labs/access_control.git", tag
2525
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.21.0" }
2626

2727
[scripts]
28-
devnet = "starknet-devnet --seed 1087810753"
28+
devnet = "starknet-devnet --seed 1087810753 --gas-price 1000"
2929
test = "snforge test"
3030

3131
[tool.fmt]
File renamed without changes.

scripts/Scarb.toml renamed to scripts/deploy/Scarb.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ edition = "2023_11"
88
[dependencies]
99
sncast_std = { git = "https://github.com/foundry-rs/starknet-foundry", tag = "v0.21.0" }
1010
starknet = ">=2.6.3"
11-
opus = { path = "../" }
11+
opus = { path = "../../" }
1212

1313
[lib]
1414
sierra = true
@@ -30,14 +30,24 @@ build-external-contracts = [
3030
"opus::core::seer::seer",
3131
"opus::core::sentinel::sentinel",
3232
"opus::core::shrine::shrine",
33+
"opus::external::pragma::pragma",
34+
"opus::external::switchboard::switchboard",
3335
"opus::mock::erc20_mintable::erc20_mintable",
3436
"opus::mock::mock_pragma::mock_pragma",
3537
"opus::mock::mock_switchboard::mock_switchboard",
3638
]
3739

3840
[scripts]
39-
deploy = "sncast --profile devnet script run deploy"
40-
reset = "rm deploy_alpha-goerli_state.json"
41+
deploy_devnet = "rm deploy_devnet_alpha-goerli_state.json 2> /dev/null; sncast --profile devnet script run deploy_devnet"
42+
deploy_sepolia = "sncast --profile sepolia script run deploy_sepolia"
4143

4244
[profile.devnet]
4345
inherits = "dev"
46+
47+
# temporarily commenting out until a bug in the toolchain
48+
# is fixed https://github.com/foundry-rs/starknet-foundry/issues/2042
49+
# for more context:
50+
# https://github.com/milancermak/snfoundry-script-poc
51+
# https://t.me/starknet_foundry_support/2894
52+
# [profile.sepolia]
53+
# inherits = "release"

0 commit comments

Comments
 (0)