[Solved] How to propertly call createContract?

Hi @fedecaccia

I see your question is more regarding the JS SDK than it is regarding channels themselves.
The channels off-chain protocol regarding updates tends to follow the on-chain one. This is to reduce confusion. For example off-chain transfers closely resemble on-chain spend transaction with their set of arguments. Same stands true for off-chain contract create and call events: they take the same arguments as on-chain contract_create_tx and contract_call_tx would use, including the call data. You can read about those here.

To answer your question:

  • code is the encoded contract bytecode
  • callData is the encoded contract initial call
  • deposit is the amount the contract owner dedicates to the contract itself
  • vmVersion and abiVersion are the VM and ABI being used (tautology, but not sure how elaborate this further :D)
2 Likes