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

(feat) Add a chain type, wallet and plugin for the Zilliqa blockchain #171

Conversation

rrw-zilliqa
Copy link
Contributor

@rrw-zilliqa rrw-zilliqa commented Jan 3, 2025

Relates to: #169

Background

What does this PR do?

This PR adds a wallet and plugin for the Zilliqa blockchain which can cope with both Zilliqa and EVM native addresses; once the approach is validated, we can start to add native (ZRC-2) token transactions and support for DEXes , etc.

Testing

  • Instantiate the wallet
  • Try invoking the actions.

There's a fork of Eliza which (with suitable pnpm link'ing) can do this at https://github.com/rrw-zilliqa/eliza/tree/rrw , but I can't submit that upstream until this is merged.

Detailed testing results

(below is with Eliza via the code at https://github.com/rrw-zilliqa/eliza/tree/rrw )

Method Prompt Screenshot Transaction Link
get Zilliqa address what's your zilliqa address? image n/a
get EVM address what is your evm address ? image n/a
convertToBech32 convert 0xCb57eC3f064A16CAdb36c7c712f4c9FA62b77415 to bech32 image n/a
convertFromBech32 convert zil1edt7c0cxfgtv4kekclr39axflf3twaq4z0qqqe to hex format image n/a
transferFromEvmAddress transfer 7 zil from your evm address to your zilliqa address image https://otterscan.zilstg.dev/tx/0x8680ed4d7e2c1185a80b226ca6591880cc94c069683ecfacca76a70e029a0f14
transferFromZilAddress transfer 7 zil from your zilliqa address to your evm address image https://otterscan.zilstg.dev/tx/0x3d0859853e212da0cb6c80cfcaec12536c8d2b7ae2e5e1182d922fcf182b7a1f
zilliqaAddressBalance what is the balance of the zilliqa address zil1sl6q6c59a3s3wg5eftzl4w9egw50z00fut36f2 ? image n/a

Docs

I have updated the documentation accordingly.

For plugins

  • [X ] I have tested this change locally with key pair wallets
  • I have tested this change locally with hosted wallets (e.g. Crossmint Smart Wallets, etc.)
  • Package exists in the goat workspace file

Discord username

_naranek

Copy link

changeset-bot bot commented Jan 3, 2025

⚠️ No Changeset found

Latest commit: 48e2964

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.

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
Contributor

@0xaguspunk 0xaguspunk left a comment

Choose a reason for hiding this comment

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

Neat!! :) Made some comments, let me know if they make sense! Happy to merge also and keep iterating over time.

Also let me know if you'd like to co-announce this, we can amplify from the GOAT and Crossmint twitters :)

typescript/packages/plugins/zilliqa/src/zilliqa.service.ts Outdated Show resolved Hide resolved
typescript/packages/plugins/zilliqa/src/zilliqa.service.ts Outdated Show resolved Hide resolved
typescript/packages/plugins/zilliqa/src/zilliqa.service.ts Outdated Show resolved Hide resolved
typescript/packages/plugins/zilliqa/src/parameters.ts Outdated Show resolved Hide resolved
typescript/packages/plugins/zilliqa/src/types.ts Outdated Show resolved Hide resolved
@rrw-zilliqa
Copy link
Contributor Author

rrw-zilliqa commented Jan 3, 2025

Thank you very much for the fast & very helpful feedback! Will address and push an update shortly.
(oh, and I'm sure we'd like to co-announce - will put you in touch with our publicity folks - thank you!)

@rrw-zilliqa rrw-zilliqa force-pushed the 169--add-first-version-of-zilliqa-plugin-and-wallet branch from 1bcf5e2 to 78f1f5a Compare January 6, 2025 13:57
@rrw-zilliqa rrw-zilliqa closed this Jan 6, 2025
@rrw-zilliqa rrw-zilliqa force-pushed the 169--add-first-version-of-zilliqa-plugin-and-wallet branch from 78f1f5a to 9ff4e4a Compare January 6, 2025 14:06
@rrw-zilliqa rrw-zilliqa reopened this Jan 6, 2025
Copy link
Contributor

@0xaguspunk 0xaguspunk left a comment

Choose a reason for hiding this comment

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

Cool! Interesting approach!

I made a comment on updating the viem wallet client, it shouldn't be needed.

Otherwise we can just merge and iterate from there :)

@rrw-zilliqa rrw-zilliqa requested a review from 0xaguspunk January 8, 2025 12:23
@0xaguspunk 0xaguspunk merged commit b9af25b into goat-sdk:main Jan 8, 2025
2 checks passed
MahmoudMohajer pushed a commit to MahmoudMohajer/goat that referenced this pull request Feb 3, 2025
…goat-sdk#171)

* (feat) Add a chain type, wallet and plugin for the Zilliqa blockchain

* (fix) Remove outdated comment

* (fix) Imperative descriptions for convert*Bech32 functions

* (fix) Remove spurious accessors

* Remove changes from viem package

* update pnpm-lock

* Add changeset

---------

Co-authored-by: Agustin Armellini Fischer <[email protected]>
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