Skip to content

Fix WeightInfo trait ambiguity in pallet-wrapped-asset#485

Closed
Copilot wants to merge 2 commits intorelease/4.1from
copilot/sub-pr-424-again
Closed

Fix WeightInfo trait ambiguity in pallet-wrapped-asset#485
Copilot wants to merge 2 commits intorelease/4.1from
copilot/sub-pr-424-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Compilation failed because pallet_wrapped_asset::Config extends pallet_xcm::Config, both defining a WeightInfo associated type, causing trait resolution ambiguity.

Changes

  • frame/wrapped-asset/src/lib.rs: Import crate::weights::WeightInfo in pallet module, use fully-qualified path in trait bound, and explicit type resolution in weight attributes
  • runtime/robonomics/src/lib.rs: Add WeightInfo implementation for pallet_wrapped_asset::Config
  • runtime/robonomics/src/xcm_config.rs: Add WeightInfo implementation for pallet_xcm_info::Config
// Before - ambiguous WeightInfo reference
type WeightInfo: WeightInfo;
#[pallet::weight(T::WeightInfo::wrap_and_send())]

// After - explicit disambiguation
type WeightInfo: crate::weights::WeightInfo;
#[pallet::weight(<T as Config>::WeightInfo::wrap_and_send())]

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

… configs

Co-authored-by: akru <786394+akru@users.noreply.github.com>
Copilot AI changed the title [WIP] Add basic XCM support and zombienet test suites Fix WeightInfo trait ambiguity in pallet-wrapped-asset Jan 30, 2026
Copilot AI requested a review from akru January 30, 2026 09:18
@akru akru closed this Feb 2, 2026
@akru akru deleted the copilot/sub-pr-424-again branch February 2, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants