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

chore: regenerate hooks for its 2.1.0 #499

Merged
merged 11 commits into from
Feb 6, 2025

Conversation

npty
Copy link
Member

@npty npty commented Feb 6, 2025

Description

Regenerate abis and hooks for interchain-token-service v2.1.0

Changes

  • New generated hooks and abis for maestro app
  • New generated typescript files in the evm package
  • Add support for overloaded functions in smart contract where it appends a running number after duplicated function name.
  • Bonus: fix failed tests in setup-and-tests gh checks so we can start enabling enforcement gh checks before merging.
  • Bonus: fixed failed axelar-registry deployment so we can start seeing gh checks all green again.

Guide to Regenerate ABIs and Hooks for ITS Portal

  1. Navigate to packages/evm
cd packages/evm
  1. Install latest interchain-token-service npm package
pnpm i @axelar-network/interchain-token-service@latest
  1. Generate contract abi and args
pnpm codegen

Note: If that contract contains overloaded functions (same function name, but different signatures) the typescript file will show an error because the same variable names were generated. You have to either rename it or remove the one you didn't use.

The codegen will automatically handle overloaded functions by:

Keeping the first overload with original name (e.g., deployRemoteInterchainToken)
Adding numeric suffixes for subsequent overloads (e.g., deployRemoteInterchainToken2)
Using consistent naming across types, encoder functions, and encoder map

  1. Navigate to apps/maestro
cd ../../apps/maestro
  1. Update .env.local

Make sure the following env vars set to the latest contract addresses

NEXT_PUBLIC_INTERCHAIN_TOKEN_FACTORY_ADDRESS="0xdB7d6A5B8d37a4f34BC1e7ce0d0B8a9DDA124871"
NEXT_PUBLIC_INTERCHAIN_TOKEN_SERVICE_ADDRESS="0x2269B93c8D8D4AfcE9786d2940F5Fcd4386Db7ff"
  1. Regenerate ABIs

The ABIs will be generated based on the contracts in node_modules/@axelar-network/interchain-token-service folder

pnpm sync
  1. Regenerate hooks

Hooks will be generated based on generated ABIs in the previous step.

pnpm codegen

Done 🎉

Hooks and ABIs will be generated under apps/maestro/src/libs/contracts folder

Copy link

changeset-bot bot commented Feb 6, 2025

⚠️ No Changeset found

Latest commit: 1b9412e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

vercel bot commented Feb 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
axelar-maestro ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2025 8:32am
axelar-registry ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2025 8:32am
axelar-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2025 8:32am
axelarjs-maestro-devnet-amplifier ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2025 8:32am

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.

1 participant