icon-project / xcall.dev

https://www.xcall.dev/
MIT License
8 stars 3 forks source link

XCall V2 changes #30

Open AntonAndell opened 10 months ago

AntonAndell commented 10 months ago

The library to be used now for xcall development is: xyz.venture23:xcall-lib:0.1.1' for java cw-xcall-lib={package="cw-xcall-lib", git="https://github.com/icon-project/xcall-multi.git", branch="main", features = ["library"]} for cosmwam Solidity lib: to be published?

Differences from IIP52 xCall

Multi protocol xCall is based on the initial spec defined in IIP52.

What this means for dapps using v1:

Less priority:

Example dapps: Solidity: https://github.com/icon-project/xcall-multi/blob/main/contracts/evm/contracts/mocks/dapp/DAppProxySample.sol https://github.com/icon-project/xcall-multi/blob/main/contracts/evm/contracts/mocks/multi-protocol-dapp/MultiProtocolSampleDapp.sol

Java: https://github.com/icon-project/xcall-multi/blob/main/contracts/javascore/example-dapps/dapp-multi-protocol/src/main/java/xcall/sample/dapp/MultiProtocolSampleDapp.java https://github.com/icon-project/xcall-multi/blob/main/contracts/javascore/example-dapps/dapp-simple/src/main/java/xcall/sample/dapp/SimpleDapp.java

Cosmwasm: https://github.com/icon-project/xcall-multi/tree/main/contracts/cosmwasm-vm/cw-mock-dapp-multi https://github.com/icon-project/xcall-multi/tree/main/contracts/cosmwasm-vm/cw-mock-dapp

@FidelVe Lets keep discussion and questions in this issue during the development

AntonAndell commented 10 months ago

https://github.com/icon-project/IBC-Integration/blob/main/docs/ibc-setup-using-dive-cli.md Can be used to setup test.

FidelVe commented 10 months ago

@AntonAndell thanks for the information, ill setup a local environment for testing, run some tests with the provided example dapps and ill contact you with any question before starting writing a draft for the new docs.

FidelVe commented 9 months ago

Hi @AntonAndell as I commented in previous calls here is the summary of things ive encountered during my tests of xcall v2

Differences between xcall v1 and xcall v2

Events

References V2, V1

Events descriptions

Event Name Signature V1 Signature V2 Params V1 Params V2
CallMessage CallMessage(str,str,int,int,bytes) CallMessage(str,str,int,int,bytes) (_from, _to, _sn, _reqId, _data) (_from, _to, _sn, _reqId, _data)
CallExecuted CallExecuted(int,int,str) CallExecuted(int,int,str) (_reqId, _code, _msg) (_reqId, _code, _msg)
ResponseMessage ResponseMessage(int,int,str) ResponseMessage(int,int) (_sn, _code, _msg) (_sn, _code)
RollbackMessage RollbackMessage(int) RollbackMessage(int) (_sn) (_sn)
RollbackExecuted RollbackExecuted(int,int,str) RollbackExecuted(int) (_sn, _code, _msg) (_sn)
CallMessageSent CallMessageSent(Address,str,int,int) CallMessageSent(Address,str,int) (_from, _to, _sn, _nsn) (_from, _to, _sn)

Main interface

The following section describes the differences in the main interfaces (contract methods) between xcall V1 and xcall V2.

sendCallMessage

executeCall

Same interface on both versions.

handleCallMessage

executeRollback

Same interface on both versions.

Topics to discuss for updating current documentation.

Taking into consideration the differences described in the previous points and the comment by @AntonAndell, I believe there are several items that are needed to fully document xcall-v2, each item has a different priority which I would like to discuss here before making changes to the documentation. The following is a list of the items with my personal assessment of the priority in each of them:

AntonAndell commented 9 months ago
FidelVe commented 9 months ago

PR #31 closes this issue