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

Migrate to use templating: Value #95

Closed
Tracked by #34
fadeev opened this issue Aug 6, 2023 · 12 comments
Closed
Tracked by #34

Migrate to use templating: Value #95

fadeev opened this issue Aug 6, 2023 · 12 comments
Assignees

Comments

@fadeev
Copy link
Member

fadeev commented Aug 6, 2023

No description provided.

@1337-ishaan
Copy link
Contributor

@fadeev, can you assign this to me?

@fadeev
Copy link
Member Author

fadeev commented Sep 12, 2023

@1337-ishaan I recommend the following process:

  • Identify the templating command to use. In this case it's probably going to be npx hardhat messaging MultiChainValue.
  • Start from a clean template, run the command
  • Make a commit
  • Manually copy the custom logic from the existing tutorial.
  • Run git diff to see the changes
  • Add highlighting comments
  • Make sure to take care of Hardhat tasks
  • Deploy the contract and interact with it to ensure it's working

Thanks on working on this!

@1337-ishaan
Copy link
Contributor

1337-ishaan commented Sep 13, 2023

@fadeev, can you just have a look at https://github.com/1337-ishaan/template, for unknown reason the transaction keeps failing.

Goerli Transaction hash: 0xb549ef8f2a5f013dae702c2d7bdb33573a0ef82672033a45379538a3e5c1a874

@fadeev
Copy link
Member Author

fadeev commented Sep 14, 2023

@1337-ishaan can you, please, verify the contract? If this is cross-chain messaging (Value) you need to set the interactors.

@1337-ishaan
Copy link
Contributor

I have already set the interactors, due to some reason it doesn't seem to work, I'll just verify the contract once!

@fadeev
Copy link
Member Author

fadeev commented Sep 29, 2023

@1337-ishaan are you working on this, or should I unassign this issue?

@1337-ishaan
Copy link
Contributor

@fadeev, was stuck into something else, I'll surely get this done in a week.

Apologies for the inconvenience caused.

@fadeev
Copy link
Member Author

fadeev commented Sep 29, 2023

@1337-ishaan no worries, just wanted to make sure the status of the issue is updated.

The value tutorial in its current state uses ZETA for fees, which is one of the ways to pay for cross-chain gas fees.

I propose we switch to using native gas token for fees, similar to all other tutorials. So, instead of something like this:

https://github.com/zeta-chain/example-contracts/blob/abb7a57deea783ab17f4c8295ececdf4a239bfc2/messaging/value/contracts/MultiChainValue.sol#L72-L85

You would have something like this:

https://github.com/zeta-chain/example-contracts/blob/abb7a57deea783ab17f4c8295ececdf4a239bfc2/messaging/message/contracts/CrossChainMessage.sol#L43-L47

This is the default behavior of the npx hardhat messaging command, so it should be rather straightforward.

@fadeev
Copy link
Member Author

fadeev commented Sep 29, 2023

The reason I mentioned this is that in the next version of the toolkit you would be able to customize the messaging command and choose which method you want to use for code generation (ZETA or native gas token):

zeta-chain/toolkit#63

I want the existing tutorial to keep using native tokens (the default behavior), and I'll write a separate tutorial that shows how to use this new functionality.

@1337-ishaan
Copy link
Contributor

1337-ishaan commented Sep 29, 2023

Works totally! Will get this done.

@fadeev

@fadeev
Copy link
Member Author

fadeev commented Oct 9, 2023

@1337-ishaan I needed to update tutorials pretty asap, so I had to do it myself in the following PRs:

#173
zeta-chain/example-contracts#74

Sorry it couldn't wait longer. If you have any suggestions, feel free to leave them in the PRs above. Thank you!

@fadeev fadeev assigned fadeev and unassigned 1337-ishaan Oct 9, 2023
@1337-ishaan
Copy link
Contributor

@fadeev, apologies for the inconvinience cause, was just busy understanding the zetachain technical stacks & code respectively.

Will surely go through this.

@fadeev fadeev closed this as completed Oct 23, 2023
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

No branches or pull requests

2 participants