Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions e2e/tests-dfx/sns.bash
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ SNS_CONFIG_FILE_NAME="sns.yml"

@test "sns deploy fails without config file" {
dfx_new
dfx nns import
rm -f sns.yml # Is not expected to be present anyway
assert_command_fail dfx sns deploy
assert_match "Error encountered when generating the SnsInitPayload: Couldn't open initial parameters file"
Expand All @@ -78,6 +79,7 @@ SNS_CONFIG_FILE_NAME="sns.yml"
dfx sns deploy
# SNS canister IDs should be saved
dfx canister id sns_governance
dfx canister id sns_index
dfx canister id sns_ledger
dfx canister id sns_root
dfx canister id sns_swap
Expand Down
2 changes: 1 addition & 1 deletion src/dfx/src/lib/nns/install_nns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ pub fn set_cmc_authorized_subnets(
}

/// Uploads wasms to the nns-sns-wasm canister.
#[context("Failed to upload wasm fils to the nns-sns-wasm canister; it may not be possible to create an SNS.")]
#[context("Failed to upload wasm files to the nns-sns-wasm canister; it may not be possible to create an SNS.")]
pub fn upload_nns_sns_wasms_canister_wasms(env: &dyn Environment) -> anyhow::Result<()> {
for SnsCanisterInstallation {
upload_name,
Expand Down
9 changes: 8 additions & 1 deletion src/dfx/src/lib/nns/install_nns/canisters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,24 @@ pub const SNS_LEDGER_ARCHIVE: SnsCanisterInstallation = SnsCanisterInstallation
upload_name: "archive",
wasm_name: "ic-icrc1-archive.wasm",
};
/// Indexes ledger data.
pub const SNS_INDEX: SnsCanisterInstallation = SnsCanisterInstallation {
canister_name: "sns-index",
upload_name: "index",
wasm_name: "ic-icrc1-index.wasm",
};
/// SNS wasm files hosted by the nns-sns-wasms canister.
///
/// Note: Sets of these canisters are deployed on request, so one network will
/// typically have many sets of these canisters, one per project decentralized
/// with the SNS toolchain.
pub const SNS_CANISTERS: [&SnsCanisterInstallation; 5] = [
pub const SNS_CANISTERS: [&SnsCanisterInstallation; 6] = [
&SNS_ROOT,
&SNS_GOVERNANCE,
&SNS_SWAP,
&SNS_LEDGER,
&SNS_LEDGER_ARCHIVE,
&SNS_INDEX,
];

/// Test account with well known public & private keys, used in NNS_LEDGER, NNS_DAPP and third party projects.
Expand Down