Extrinsic verification error:... FailedToConvertParameter "validate_transaction" Could not decode MultiAddress
Extrinsic verification error:... FailedToConvertParameter "validate_transaction" Could not decode MultiAddress
非常抱歉这个新手问题...
我的计划是将 flippers 合约部署到 substrate-node-template
((https://github.com/substrate-developer-hub/substrate-node-template);特别是 tag = 'monthly-2021-05'
.
我复制了 canvas-node
(https://github.com/paritytech/canvas-node) 上的内容;任何东西 pallets_contracts*
,
其中包括 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 {
...
}
和node
rpc.rs
io.extend_with(
ContractsApi::to_delegate(Contracts::new(client.clone()))
);
项目将生成,但是当我单击 canvas-ui, a warning would appear:
上的 SignAndSubmit
按钮时
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\" } }
我做错了什么?或者 Canvas-UI 仅适用于 Canvas-Node?
感谢@NukeManDan,我在 polkadot.js.org/apps 中进入设置下拉菜单 -> 开发人员,然后更改为:
{
"Address": "MultiAddress",
"LookupSource": "MultiAddress"
}
之后,我进入开发者下拉菜单 -> 合同,点击 上传和部署代码 按钮并选择我的 .contract 文件.
是的,我停止使用 Canvas UI。
非常抱歉这个新手问题...
我的计划是将 flippers 合约部署到 substrate-node-template
((https://github.com/substrate-developer-hub/substrate-node-template);特别是 tag = 'monthly-2021-05'
.
我复制了 canvas-node
(https://github.com/paritytech/canvas-node) 上的内容;任何东西 pallets_contracts*
,
其中包括 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 {
...
}
和node
rpc.rs
io.extend_with(
ContractsApi::to_delegate(Contracts::new(client.clone()))
);
项目将生成,但是当我单击 canvas-ui, a warning would appear:
SignAndSubmit
按钮时
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\" } }
我做错了什么?或者 Canvas-UI 仅适用于 Canvas-Node?
感谢@NukeManDan,我在 polkadot.js.org/apps 中进入设置下拉菜单 -> 开发人员,然后更改为:
{
"Address": "MultiAddress",
"LookupSource": "MultiAddress"
}
之后,我进入开发者下拉菜单 -> 合同,点击 上传和部署代码 按钮并选择我的 .contract 文件.
是的,我停止使用 Canvas UI。