Giter VIP home page Giter VIP logo

protocol-contracts's Introduction

ZetaChain Protocol Contracts

This repository contains the smart contracts for ZetaChain. The smart contracts are written in Solidity, and the repository includes scripts to compile the contracts and generate Go bindings.

Importing Protocol Contracts

As a dApp developer, you can install the protocol contracts package into your project:

yarn add --dev @zetachain/protocol-contracts

Importing ZetaInterfaces and ZetaInteractor for cross-chain messaging:

import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol";
import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol";

Importing ZRC20 and the system contract for omni-chain smart contracts:

import "@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol";
import "@zetachain/protocol-contracts/contracts/zevm/interfaces/zContract.sol";
import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol";

Prerequisites

Before you can contribute to this project, you must have the following installed:

Getting Started

To get started with this project, you should first clone the repository:

git clone https://github.com/zeta-chain/protocol-contracts

Once you have cloned the repository, you can navigate to the project directory and run the following command to install the project dependencies:

yarn

Compiling Contracts

To compile the contracts, run the following command:

yarn compile

This will compile the Solidity contracts and output the resulting JSON artifacts to the artifacts directory.

Generating Go Bindings

To generate Go bindings for the Solidity contracts, run the following command:

yarn generate

This will use abigen to generate Go bindings for the contracts and output the resulting Go files to the pkg directory.

Contributing

If you would like to contribute to this project, please fork the repository and submit a pull request. All contributions are welcome!

protocol-contracts's People

Contributors

andresaiello avatar brewmaster012 avatar charliemc0 avatar fadeev avatar

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.