Jitterbug
Jitterbug

Reputation: 312

Extrinsic verification error:... FailedToConvertParameter "validate_transaction" Could not decode MultiAddress

I am so sorry for the very newbie question...

My plan is to deploy the flippers contract to substrate-node-template ((https://github.com/substrate-developer-hub/substrate-node-template); specifically tag = 'monthly-2021-05'.

I copied what was on canvas-node (https://github.com/paritytech/canvas-node); anything pallets_contracts*,
that includes inside the runtime lib.rs:

parameter_types! {
  ...
  pub const MaxDepth: u32 = 100;
  pub const MaxValueSize: u32 = 16_384;
  pub const MaxCodeSize: u32 = 2 * 1024;
}

impl pallet_contracts::Config for Runtime { 
  ... 
  type MaxDepth = MaxDepth;
  type MaxValueSize = MaxValueSize;
  type MaxCodeSize = MaxCodeSize;
}
...

impl_runtime_apis! {
  impl pallet_contracts_rpc_runtime_api::ContractsApi< 
   Block,
   AccountId, 
   Balance, 
   BlockNumber, 
   Hash
> for Runtime {
  ... 
}

and the node rpc.rs

io.extend_with(
    ContractsApi::to_delegate(Contracts::new(client.clone()))
);

The project will build, but when I click the SignAndSubmit button on canvas-ui, a warning would appear:enter image description here

 RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1002: Verification Error: Runtime error: Execution failed: ApiError(FailedToConvertParameter { function: "validate_transaction", parameter: "tx", error: Error { cause: None, desc: "Could not decode `MultiAddress`, variant doesn\'t exist" } }): RuntimeApi, Execution failed: ApiError, FailedToConvertParameter { function: \"validate_transaction\", parameter: \"tx\", error: Error { cause: None, desc: \"Could not decode `MultiAddress`, variant doesn\\\'t exist\" } }

What did I do wrong? Or is Canvas-UI only works with Canvas-Node?

Upvotes: 0

Views: 745

Answers (1)

Jitterbug
Jitterbug

Reputation: 312

All thanks to @NukeManDan, I went into Settings dropdown menu -> Developer in polkadot.js.org/apps, and changed to:

{ 
  "Address": "MultiAddress", 
  "LookupSource": "MultiAddress" 
}

After that I just went in Developer dropdown menu -> Contracts , clicked Upload & deploy code button and selected my .contract file.

Yep, I stopped using the Canvas UI.

Upvotes: 1

Related Questions