-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: logic for parachain registration #410
base: feat/deploy-parachain
Are you sure you want to change the base?
Conversation
6c5a488
to
ba6e253
Compare
511e547
to
945a8ac
Compare
df55096
to
0a64db8
Compare
ba6e253
to
b55ddaa
Compare
b55ddaa
to
d360dba
Compare
|
||
// Generate chain spec. | ||
generate_plain_chain_spec(&binary_path, output_file, default_bootnode, chain)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored the logic for generating the chain spec and raw chain spec into the generate_chain_spec
function.
// Sign and submit an extrinsic using wallet integration. | ||
async fn submit_extrinsic_with_wallet( | ||
// Sign and submit an extrinsic using wallet integration, then returns the resulting events. | ||
pub(crate) async fn submit_extrinsic_with_wallet( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is now reused in pop up
, so it might make sense to move it to a common file. But I wasn’t sure about making additional changes.
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## feat/deploy-parachain #410 +/- ##
=========================================================
- Coverage 75.35% 75.05% -0.31%
=========================================================
Files 64 66 +2
Lines 13998 14269 +271
Branches 13998 14269 +271
=========================================================
+ Hits 10548 10709 +161
- Misses 2098 2167 +69
- Partials 1352 1393 +41
|
This is the first step in a larger PR: PR #404. It consolidates the existing logic for deploying a parachain into a relay chain when a user executes
pop up
in a parachain project.Changes included:
generate_genesis_artifacts
function in specs to build and return paths for the genesis and WASM files.submit_extrinsic_with_wallet
to return events.Reserved
event in theRegistrar
pallet to retrieve the parachain ID after reservation.pop up
command.How to test it
Start the Paseo parachain locally by running:
Run pop up in your parachain folder or specify the folder with the
path
flagNote: The account used for signing must have sufficient funds to cover both the reservation and signing process.
Notes:
cargo-contracts
: Reference. If we need to parse more events in the future, we can manually add them.--use-wallet
). If useful, I can add options for--suri
and specifying a private key via the command line, but not sure if makes sense.[sc-2756]