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

Configure statemine bridge on e2e startup #829

Merged
merged 13 commits into from
May 15, 2023
Merged

Conversation

alistair-singh
Copy link
Contributor

@alistair-singh alistair-singh commented May 11, 2023

Cumulus companion: Snowfork/cumulus#24

Adds scripts that will set up the ethereum bridge in the statemine pallet.

Resolves: SNO-433, SNO-493

Some scripts are copied over from the cumulus repo and edited.

@alistair-singh alistair-singh requested review from yrong, vgeddes and doubledup and removed request for yrong and vgeddes May 12, 2023 09:13
console.log(`Generating addExporterConfig from RPC endpoint: ${endpoint} to outputFile: ${outputFile} based on bridgedNetwork: ${bridgedNetwork}, bridgeConfig: ${bridgeConfig}`);
connect(endpoint)
.then((api) => {
const call = api.tx.bridgeTransfer.addExporterConfig(JSON.parse(bridgedNetwork), JSON.parse(bridgeConfig));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Taken from cumulus repo but edited here to treat bridgedNetwork as JSON as it can be a complex type such as { "Ethereum": { "chainId": 1 } } as opposed to a simple string like "Wococo".

echo ""
echo "--------------------------------------------------"

npx polkadot-js-api \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adapted from cumulus repo scripts. Uses npx to launch node applications instead of expecting it to be in the PATH as a global tool.

Copy link
Collaborator

@vgeddes vgeddes left a comment

Choose a reason for hiding this comment

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

+1

Copy link
Contributor

@yrong yrong left a comment

Choose a reason for hiding this comment

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

LGTM!

@alistair-singh alistair-singh merged commit 1218377 into main May 15, 2023
@alistair-singh alistair-singh deleted the alistair/add-statemine branch May 15, 2023 08:54
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.

3 participants