Open fadeev opened 11 months ago
@andresaiello wdyt?
Also, to simplify the template I'm thinking about removing message type from the default template and associated type checks:
bytes32 public constant CROSS_CHAIN_MESSAGE_MESSAGE_TYPE =
keccak256("CROSS_CHAIN_CROSS_CHAIN_MESSAGE");
I think having a message type doesn't make sense when the template generates a contract that supports only one message type.
Right now we have two introductory CCM tutorials:
npx hardhat messaging CrossChainMessage message:string
npx hardhat messaging Value --fees zeta
, then we remove about 50% of the codeThe problem with this setup is that a more complex tutorial (First Cross-Chain Message) is presented first, and a simpler one is presented next. And we're asking users to manually delete code, which is not cool.
Proposed solution
Replace these two tutorials with these two:
Value Transfer
Generates:
Super simple, user doesn't need to delete anything. Requires changes to the toolkit: when now arguments are supplied, assume they just want value transfer.
Value and Data Transfer
The same as the current tutorial.
Summary
I propose to: