Coder Social home page Coder Social logo

icon-project / xcall.dev Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 3.0 7.66 MB

Home Page: https://www.xcall.dev/

License: MIT License

CSS 1.07% TypeScript 2.82% JavaScript 5.40% MDX 90.71%
blockchain-technology cross-chain-communication cross-chain-communication-protocol xcall arbitrary-messaging documentation documentation-website xcall-documentation

xcall.dev's Introduction

Discord Twitter Follow Website

Issues Pull Requests

Welcome to XCALL.DEV

Welcome to the official documentation site for xCall!

xCall is a standardized interface designed to simplify cross-chain development by abstracting away the varying technical architectures of underlying protocols.

This documentation serves as a comprehensive guide to using and understanding all aspects of xCall, from setup to advanced features. Whether you're a new user starting your journey or an experienced professional seeking to delve deeper, we've got you covered. We continuously work towards making our documentation as clear and detailed as possible, so you can leverage the full power of xCall.

Thank you for choosing xCall, and we hope this documentation aids you in making the most of our interface.

Running xcall.dev locally with command line

Before you start, ensure that Git and Node.js are installed on your local machine.

Follow these steps to run the project locally:

  1. Fork the Repository: Navigate to the xcall.dev repository on GitHub. Click the 'Fork' button in the upper right corner of the repository page to create a copy of the repository in your own GitHub account.
  2. Clone the Repository: Open a terminal on your computer. Clone the repository to your local machine using the git clone command, like this: git clone https://github.com/<yourusername>/xcall.dev.git
  3. Navigate to the Repository: Use the cd command to navigate into the cloned repository: cd xcall.dev
  4. Install Dependencies: This project relies on Node.js and has dependencies that need to be installed. Use npm (Node Package Manager) to install these dependencies: npm install
  5. Run the Project Locally: You can now run the project on your machine. The command to run the project is: npm run dev

Running xcall.dev locally with VSCode

Before you start, ensure that Git and Node.js are installed on your local machine, and you have Visual Studio Code (VSCode) set up.

Follow these steps to run the project locally:

  1. Fork the Repository: Navigate to the xcall.dev repository on GitHub. Click the 'Fork' button in the upper right corner of the repository page to create a copy of the repository in your own GitHub account.
  2. Clone the Repository: Open VSCode, then open the Terminal (View > Terminal). Clone the repository to your local machine using the git clone command, like this: git clone https://github.com/<yourusername>/xcall.dev.git Replace <yourusername> with your GitHub username.
  3. Navigate to the Repository: Use the cd command in the terminal to navigate into the cloned repository: cd xcall.dev
  4. Install Dependencies: This project relies on Node.js and has dependencies that need to be installed. Use npm (Node Package Manager) to install these dependencies: npm install
  5. Run the Project Locally: You can now run the project on your machine. The command to run the project is: npm run dev

How to contribute to xcall.dev

Each documentation pages offers an opportunity for visitors to provide feedback, ask questions or contribute directly. Look for:

  • Feedback or questions about this page? Post them here →
  • Contribute directly to this page →

Pages

Pages are written in MDX, a markup language that is a blend of Markdown and JSX. In MDX, you can write standard Markdown as you usually would, but you also have the ability to import and use React components within your content.

The title and order of a page shown in the sidebar should be configured in the _meta.json file as key-value pairs. For example, if you have the following file structure:

Folder: Pages

  • _meta.json
  • about.mdx
  • contact.mdx
  • index.mdx

You can define how the pages are shown in the sidebar via the _meta.json file:

_meta.json
{
  "index": "My Homepage",
  "contact": "Contact Us",
  "about": "About Us"
}

If any routes are not listed in the _meta.json file, they will be appended to the end of the sidebar and sorted alphabetically, and the title will be formatted with UpperCamelCase

Folders

Folders can be configured in the same way as pages. For example:

Folder: Pages

Folder: Fruits

  • _meta.json
  • apple.mdx
  • banana.mdx
  • _meta.json
  • about.mdx
  • contact.mdx
  • index.mdx

The top-level _meta.json file contains the meta information for the top-level pages and folders:

pages/_meta.json
{
  "index": "My Homepage",
  "contact": "Contact Us",
  "fruits": "Delicious Fruits",
  "about": "About Us"
}

And the nested _meta.json file contains the meta information for pages in the same folder:

pages/fruits/_meta.json
{
  "apple": "Apple",
  "banana": "Banana"
}

This way, information for pages are grouped together in directories. You can move directories around without having to change the _meta.json file.

Nextra Docs Theme

This website is built with the Nextra Docs Theme. For further information on the documentation page and folder configuration visit Nextra Docs Theme


If you have any questions, please reach out to us on Discord.

xcall.dev's People

Contributors

abhiyana avatar cyrusvorwald avatar davidfbd avatar elsishin avatar fidelve avatar leeederek avatar shreyasbhat0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xcall.dev's Issues

Update the "Sending a message" tutorial to reference xcall-scaffolding repo

As xcall-scaffolding is the canonical sample repo for xcall, the "Sending a message" tutorial must reference this repository. Currently, the tutorial references the xcall-sample-dapp repo, which has been recently modified and now serves a different purpose

In order to send a message with the canonical sample dApp, the sections for "Sending a message" and "Sending a message with rollback" should be updated to reference the public functions that perform cross-chain messages (e.g. voteYes)

Alternatively, a new docs page may be put in to detail working with the canonical app, in which case the existing page should be edited to more clearly use the updated DAppProxySampleUtilityFunctions repository in conjunction with the e2edemo dapp sample

Also, the prerequisite link on this page does not work

XCall V2 changes

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.

  • Two new optional parameters are added in sendCallMessage: _sources and destinations.
    These parameters can be specified to choose the protocols to deliver the xCall message.
    If, for example, a dapp wanted to use BTP, they specify the address of BMC as the source and the address of BMC on a
    destination chain as destinations.

  • Rollback guarantees.
    In IIP52, xCall rollback executions can only be tried once before removed, which can cause loss of data in case of
    failure.
    In xCall multi protocol, it can be retried until successful.

  • Two-way message success verification.
    For all two-way messages, a response has to be relayed back since the fee has already been paid.
    This means that in most cases, a response with the result success is being relayed back.
    In xCall multi protocol, we store this success receipt so that it can be verified by dapps.

  • BTP address has been replaced completely by Network Address.
    A BTP address is a Network Address as defined here with a btp:// prefix.
    A Network Address in IIP52 refers to the Network ID in this document which might cause some confusion.

  • The source of truth for a Network ID is now in xCall and not BMC.

  • _nsn is removed from CallMessageSent event.

  • Error messages are no longer relayed across chains in a response.

  • _msg has been removed from ResponseMessage event. This is due to the removal of relaying the error messages.

  • A message can now only be success or failure (1 or 0).
    In IIP52 a message can have many different error codes but was not used by dapps and the same behavior is not
    necessarily supported by all chains.

  • MaxDataSize is defined on the whole payload rather than only user data
    This change was necessary to limit the size of the _sources and destinations parameters.

What this means for dapps using v1:

  • The use of BTP address needs to be changed to NetworkAddress.
    Example remove btp prefix from btp://${NETWORK_LABEL_DESTINATION}/${CONTRACT_DESTINATION};
    Network Address implmentation will work the same as BTP address and no extra changes should be needed.

  • If event listeners are used some parameters have changed.

Less priority:

  • Multi protocol
  • Success verification.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.