Skip to content
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

Fix PHA resource id computation #59

Merged
merged 5 commits into from
Jan 20, 2022
Merged

Fix PHA resource id computation #59

merged 5 commits into from
Jan 20, 2022

Conversation

tolak
Copy link
Contributor

@tolak tolak commented Jan 19, 2022

  • Remove resource id store in pallet-bridge

Previously we set a constant resource id for PHA, that because it just need match the rid configed in Ethereum,
now different solo chain have different resource id, even though they are both indicate PHA. So there is no need
store resource id in pallet-bridge any more, instead we compute it dynamically during transfer.

Dispatch set_resource and other resource setting relevant methods are removed too, including ChainBridge relayer side.

  • Fix PHA resource id computation

Fix PHA resource id computation in BridgeTransfer.transfer and XcmTransactor.deposit_asset which would case PHA transfer with other solo chains except Ethereum(with chain id 0) failure.

@@ -273,14 +271,14 @@ function dumpResourceId(khalaApi, soloChainId) {

async function main() {
// create khala api
const khalaEndpoint = process.env.ENDPOINT || 'ws://localhost:9944';
const khalaEndpoint = process.env.ENDPOINT || 'ws://35.215.162.102:9944';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, don't submit the real IP to the repo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@tolak tolak merged commit 0911026 into main Jan 20, 2022
@h4x3rotab h4x3rotab deleted the bridge-update branch February 24, 2022 07:52
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