# Failing to deploy contract on ICP mainnet

**URL:** <https://forum.dfinity.org/t/failing-to-deploy-contract-on-icp-mainnet/30004>\
**Category:** Developers\
**Tags:** rust\
**Created:** [April 25, 2024, 9:32am UTC](https://forum.dfinity.org/t/failing-to-deploy-contract-on-icp-mainnet/30004 "2024-04-25T09:32:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![skeremidchiev](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@skeremidchiev](https://forum.dfinity.org/u/skeremidchiev)\
**Post date:** [April 25, 2024, 9:32am UTC](https://forum.dfinity.org/t/failing-to-deploy-contract-on-icp-mainnet/30004/1 "2024-04-25T09:32:02Z")

</div>

Hello,

I’m facing an issue related to deployment of a canister.

My canister deployment script:

```bash
dfx deploy minter --argument "
      (variant {
        Init = record {
          ecdsa_key_name = \"...\";
          solana_initial_signature = \"...\";
          ledger_id = principal \"$(dfx canister id ledger --network=ic)\";
          solana_contract_address = \"...\";
          solana_rpc_url = \"https://...\";
          minimum_withdrawal_amount = 10_000;
        }
      })
    " --network=ic --identity=MyIdentity --upgrade-unchanged --mode reinstall

```

Result:

```bash
Reinstalling code for canister minter, with canister ID qxeki-kyaaa-aaaak-aknxa-cai
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed while trying to install all canisters.
    Failed to install wasm module to canister 'minter'.
      Failed during wasm installation call: Candid returned an error: input: 4449444c036d016c01cedfa0a804026d7b010002_2052741aacfc8f7f3e75dae3647b08cf27b8a35284c210cd8caed5bb40067056342067338023bfc795fa88b29808763b0faa60da8d66399ba7fb84a9d4ff2b883562
table: type table0 = vec table1
type table1 = record { 1_158_164_430 : table2 }
type table2 = vec nat8
wire_type: record { 1_158_164_430 : table2 }, expect_type: vec nat8

```

Can you help me decipher the error message?  
I don’t have issue with deployment on my local network!  
I’m facing this issue only on IC network!

---

<div class="post-metadata">

**Author:** ![zohaib29](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/zohaib29/32/29625_2.png) [@zohaib29](https://forum.dfinity.org/u/zohaib29)\
**Post date:** [April 25, 2024, 9:44am UTC](https://forum.dfinity.org/t/failing-to-deploy-contract-on-icp-mainnet/30004/2 "2024-04-25T09:44:52Z")

</div>

Try again without `--upgrade-unchanged --mode reinstall`

---

<div class="post-metadata">

**Author:** ![skeremidchiev](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@skeremidchiev](https://forum.dfinity.org/u/skeremidchiev)\
**Post date:** [April 25, 2024, 9:48am UTC](https://forum.dfinity.org/t/failing-to-deploy-contract-on-icp-mainnet/30004/3 "2024-04-25T09:48:43Z")

</div>

I get the same error regardless of whether I provide flags or not.

---

<div class="post-metadata">

**Author:** ![zohaib29](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/zohaib29/32/29625_2.png) [@zohaib29](https://forum.dfinity.org/u/zohaib29)\
**Post date:** [April 25, 2024, 10:23am UTC](https://forum.dfinity.org/t/failing-to-deploy-contract-on-icp-mainnet/30004/4 "2024-04-25T10:23:31Z")

</div>

Run `dfx deploy minter --network=ic --identity=MyIdentity` on a terminal. I think there is an error in the argument. You can provide an argument later

---

<div class="post-metadata">

**Author:** ![skeremidchiev](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@skeremidchiev](https://forum.dfinity.org/u/skeremidchiev)\
**Post date:** [April 25, 2024, 11:25am UTC](https://forum.dfinity.org/t/failing-to-deploy-contract-on-icp-mainnet/30004/5 "2024-04-25T11:25:26Z")

</div>

Ok:

```bash
dfx deploy minter --network=ic --identity=MyIndetity

Installing canisters...
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed while trying to install all canisters.
    Failed to install wasm module to canister 'minter'.
      Failed to create argument blob.
        Invalid data: Expected arguments but found none.

```

It seems like its mandatory to provide init arguments to the canister.

When I run script on local network:

```auto
dfx deploy minter --argument "
      (variant {
        Init = record {
          ecdsa_key_name = \"...\";
          solana_initial_signature = \"5HsCtz953R6DcGxjPAAUEsfJhjNQi7frt5aETR7Vej7YeY1HZ74ooMbztVCRrQfezUdGAXNERpZ47iQhh7rmXf1b\";
          ledger_id = principal \"$(dfx canister id ledger)\";
          solana_contract_address = \"AAJL4DeXnWBNRowWjvpkAgwtAACpz6NfaA1T2p8Hrpy\";
          solana_rpc_url = \"https://solana-mainnet.g.alchemy.com/\";
          minimum_withdrawal_amount = 10_000;
        }
      })
    " --identity=MyIndetity

Installing canisters...
Creating UI canister on the local network.
The UI canister on the "local" network is "bd3sg-teaaa-aaaaa-qaaba-cai"
Installing code for canister minter, with canister ID bkyz2-fmaaa-aaaaa-qaaaq-cai
Deployed canisters.
URLs:
  Backend canister via Candid interface:
    minter: http://127.0.0.1:4943/?canisterId=bd3sg-teaaa-aaaaa-qaaba-cai&id=bkyz2-fmaaa-aaaaa-qaaaq-cai

```

When I run it on IC:

```bash
dfx deploy minter --argument "
      (variant {
        Init = record {
          ecdsa_key_name = \"...\";
          solana_initial_signature = \"5HsCtz953R6DcGxjPAAUEsfJhjNQi7frt5aETR7Vej7YeY1HZ74ooMbztVCRrQfezUdGAXNERpZ47iQhh7rmXf1b\";
          ledger_id = principal \"$(dfx canister id ledger --network=ic)\";
          solana_contract_address = \"AAJL4DeXnWBNRowWjvpkAgwtAACpz6NfaA1T2p8Hrpy\";
          solana_rpc_url = \"https://solana-mainnet.g.alchemy.com/\";
          minimum_withdrawal_amount = 10_000;
        }
      })
    " --network=ic --identity=MyIdentity

Installing canisters...
Installing code for canister minter, with canister ID qxeki-kyaaa-aaaak-aknxa-cai
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed while trying to install all canisters.
    Failed to install wasm module to canister 'minter'.
      Failed during wasm installation call: Candid returned an error: input: 4449444c036d016c01cedfa0a804026d7b010002_2052741aacfc8f7f3e75dae3647b08cf27b8a35284c210cd8caed5bb40067056342067338023bfc795fa88b29808763b0faa60da8d66399ba7fb84a9d4ff2b883562
table: type table0 = vec table1
type table1 = record { 1_158_164_430 : table2 }
type table2 = vec nat8
wire_type: record { 1_158_164_430 : table2 }, expect_type: vec nat8

```

---

<div class="post-metadata">

**Author:** ![skeremidchiev](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@skeremidchiev](https://forum.dfinity.org/u/skeremidchiev)\
**Post date:** [May 29, 2024, 1:00pm UTC](https://forum.dfinity.org/t/failing-to-deploy-contract-on-icp-mainnet/30004/6 "2024-05-29T13:00:15Z")

</div>

Issue is related to: [27916](https://forum.dfinity.org/t/embedding-wasm-dfx-0-17-0-crashing-where-previous-version-works/27916)
