-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement solidity codecs on xcm::latest #1614
Implement solidity codecs on xcm::latest #1614
Conversation
This was changed in paritytech/polkadot-sdk#5390
Something like: use xcm::latest::ROCOCO_GENESIS_HASH;
pub const NonBridgedRelayNetwork: NetworkId = NetworkId::ByGenesis(ROCOCO_GENESIS_HASH); Instead of commenting the affected lines, we should replace them with the new approach. |
@@ -76,6 +76,7 @@ pub(crate) fn network_id_to_bytes(network_id: Option<NetworkId>) -> Vec<u8> { | |||
encoded.append(&mut block_hash.into()); | |||
encoded | |||
} | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code commented can be removed entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 1217ef1
@@ -152,9 +154,11 @@ pub(crate) fn network_id_from_bytes(encoded_bytes: Vec<u8>) -> MayRevert<Option< | |||
block_hash, | |||
})) | |||
} | |||
/* | |||
5 => Ok(Some(NetworkId::Westend)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 => Ok(Some(NetworkId::Westend)), | |
5 => Ok(Some(NetworkId::ByGenesis(WESTEND_GENESIS_HASH))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 7f7d587
@@ -152,9 +154,11 @@ pub(crate) fn network_id_from_bytes(encoded_bytes: Vec<u8>) -> MayRevert<Option< | |||
block_hash, | |||
})) | |||
} | |||
/* | |||
5 => Ok(Some(NetworkId::Westend)), | |||
6 => Ok(Some(NetworkId::Rococo)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 => Ok(Some(NetworkId::Rococo)), | |
6 => Ok(Some(NetworkId::ByGenesis(ROCOCO_GENESIS_HASH))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 7f7d587
@@ -152,9 +154,11 @@ pub(crate) fn network_id_from_bytes(encoded_bytes: Vec<u8>) -> MayRevert<Option< | |||
block_hash, | |||
})) | |||
} | |||
/* | |||
5 => Ok(Some(NetworkId::Westend)), | |||
6 => Ok(Some(NetworkId::Rococo)), | |||
7 => Ok(Some(NetworkId::Wococo)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we can return an error
7 => Ok(Some(NetworkId::Wococo)), | |
7 => Err(RevertReason::custom("Wococo Network is no longer supported").into()), |
or
7 => Ok(Some(NetworkId::Wococo)), | |
7 => Ok(Some(NetworkId::ByGenesis(DUMMY_GENESIS_HASH))), |
As done here: paritytech/polkadot-sdk@81c420d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 7f7d587
Motivation
moonkit
) depend on this behavior./primitives/account/src/lib.rs
already targetsxcm::latest
.Suggested Solution
xcm::latest
.Alternative Solution
xcm::lts
andxcm::latest
.