Skip to content

Instabridge#294

Closed
mrq1911 wants to merge 12 commits intomasterfrom
instabridge
Closed

Instabridge#294
mrq1911 wants to merge 12 commits intomasterfrom
instabridge

Conversation

@mrq1911
Copy link
Copy Markdown
Member

@mrq1911 mrq1911 commented Mar 10, 2026

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 10, 2026

🦋 Changeset detected

Latest commit: e720946

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@galacticcouncil/xc-core Minor
@galacticcouncil/xc-cfg Minor
@galacticcouncil/xc-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nohaapav nohaapav requested a deployment to upgrade-ui-master March 10, 2026 22:24 — with GitHub Actions Waiting
@nohaapav nohaapav temporarily deployed to upgrade-ui-next March 10, 2026 22:24 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

🧚 Live preview: galacticcouncil/hydration-ui#3599

@mrq1911 mrq1911 temporarily deployed to upgrade-ui-master March 11, 2026 14:12 — with GitHub Actions Inactive
@mrq1911 mrq1911 temporarily deployed to upgrade-ui-next March 11, 2026 14:12 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

🧚 Live preview: galacticcouncil/hydration-ui#3603

@mrq1911 mrq1911 temporarily deployed to upgrade-ui-next March 11, 2026 15:14 — with GitHub Actions Inactive
@mrq1911 mrq1911 temporarily deployed to upgrade-ui-master March 11, 2026 15:14 — with GitHub Actions Inactive
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds initial InstaBridge support to the xc stack, wiring a new EVM contract ABI + contract builder and exposing a Base→Hydration EURC route tagged as InstaBridge.

Changes:

  • Add InstaBridge ABI to @galacticcouncil/xc-core and expose it via the central ABI registry.
  • Extend EVM chain configuration to optionally include an InstaBridge contract address and add the Base mainnet address.
  • Add an InstaBridge contract builder and a Base→Hydration EURC route template/config tagged with Tag.InstaBridge.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/xc-core/src/evm/abi/index.ts Registers the new InstaBridge ABI in the core ABI map.
packages/xc-core/src/evm/abi/InstaBridge.ts Adds the InstaBridge contract ABI definition.
packages/xc-core/src/chain/EvmChain.ts Adds optional instaBridge config and accessor on EvmChain.
packages/xc-cfg/src/tags.ts Introduces Tag.InstaBridge for route tagging.
packages/xc-cfg/src/configs/evm/base/templates.ts Adds a Base→Hydration InstaBridge route template.
packages/xc-cfg/src/configs/evm/base/index.ts Adds the new InstaBridge route to the Base route list.
packages/xc-cfg/src/chains/evm/base.ts Configures the InstaBridge contract address for Base.
packages/xc-cfg/src/builders/contracts/InstaBridge.ts Implements the InstaBridge contract call builder.
packages/xc-cfg/src/builders/ContractBuilder.ts Exposes InstaBridge() from the top-level ContractBuilder.
.github/workflows/snapshot.yml Adjusts snapshot workflow (removes npm cache config).
.changeset/olive-worms-cut.md Adds a changeset bumping xc-core/xc-cfg (minor) and xc-sdk (patch).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

amount,
rcvWh.getWormholeId(),
toHydrationPrecompile(destAssetId as number),
toBytes32(H160.fromAccount(address) as `0x${string}`),
Comment on lines +38 to +41
type BridgeViaWormholeOpts = {
destChain: EvmParachain;
destAsset: Asset;
};
Comment on lines +43 to +73
const bridgeViaWormhole = (opts: BridgeViaWormholeOpts): ContractConfigBuilder => ({
build: async (params) => {
const { address, amount, asset, source, destination } = params;
const ctx = source.chain as EvmChain;
const rcv = destination.chain as EvmParachain;

const rcvWh = Wh.fromChain(opts.destChain);

const assetId = ctx.getAssetId(asset);
const destAssetId = rcv.getAssetId(opts.destAsset);

const instaBridgeAddress = ctx.getInstaBridge();
if (!instaBridgeAddress) {
throw new Error(`InstaBridge not configured for ${ctx.name}`);
}

return new ContractConfig({
abi: Abi.InstaBridge,
address: instaBridgeAddress,
args: [
parseAssetId(assetId),
amount,
rcvWh.getWormholeId(),
toHydrationPrecompile(destAssetId as number),
toBytes32(H160.fromAccount(address) as `0x${string}`),
],
func: 'bridgeViaWormhole',
module: 'InstaBridge',
});
},
});
export const baseConfig = new ChainRoutes({
chain: base,
routes: [...toHydrationViaWormhole],
routes: [...toHydrationViaWormhole, ...toHydrationViaInstaBridge],
@mrq1911
Copy link
Copy Markdown
Member Author

mrq1911 commented Mar 31, 2026

replaced by #304

@mrq1911 mrq1911 closed this Mar 31, 2026
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