Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zetachain/protocol-contracts

Package Overview
Dependencies
Maintainers
5
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@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.

  • 3.0.0
  • npm
  • Socket score

Version published
Weekly downloads
937
increased by2.07%
Maintainers
5
Weekly downloads
 
Created
Source

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!

FAQs

Package last updated on 02 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc