Giter VIP home page Giter VIP logo

ic-solana's Introduction

SOLANA RPC Canister  GitHub license

A canister for interaction between Solana and Internet Computer (ICP) blockchains.

Overview

The SOLANA RPC canister is an ICP canister for communicating with Solana using an on-chain API.

This canister sends API requests to JSON-RPC services using HTTPS outcalls. This enables functionality similar to traditional Solana dApps, including querying Solana smart contract states and submitting raw transactions.

The canister runs on the 28-node fiduciary subnet with the following principal: bkyz2-fmaaa-aaaaa-qaaaq-cai.

For information on how to verify a hash of a deployed WebAssembly module, please refer to the Reproducible Builds section.

Quick start

Add the following to your dfx.json config file (replace the ic principal with any option from the list of the available canisters above):

{
  "canisters": {
    "ic-solana-provider": {
      "type": "custom",
      "candid": "https://github.com/mfactory-lab/ic-solana/releases/latest/download/ic-solana-provider.did",
      "wasm": "https://github.com/mfactory-lab/ic-solana/releases/latest/download/ic-solana-provider.wasm.gz",
      "remote": {
        "id": {
          "ic": "bkyz2-fmaaa-aaaaa-qaaaq-cai",
          "playground": "bkyz2-fmaaa-aaaaa-qaaaq-cai"
        }
      }
    }
  }
}

Running the project locally

If you want to test your project locally, you can use the following commands:

# Starts the replica, which then runs in the background
dfx start --clean --background

# Build and deploy your canisters to the replica and generates your candid interface
make build

Once the job is completed, your application will be available at http://localhost:4943?canisterId={asset_canister_id}.

Testing

We use PocketIC for integration testing. Please make sure to have it installed and the POCKET_IC_BIN environment variable set to the path of the pocket-ic binary.

You can run the tests with the following command:

make test

Deployment on the Internet Computer

The canister is deployed to bkyz2-fmaaa-aaaaa-qaaaq-cai.

You can check the Candid UI at https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=bkyz2-fmaaa-aaaaa-qaaaq-cai.

Interaction with Blast Playground

You can interact with the canister using the Blast Playground.

To do

  • Versioned transactions.
  • Native support of threshold EdDSA.

Reproducible builds

The SOLANA RPC canister supports reproducible builds:

  1. Ensure Docker is installed on your machine.
  2. Run scripts/docker-build in your terminal.
  3. Run sha256sum ic-solana-provider.wasm.gz on the generated file to view the SHA-256 hash.

In order to verify the latest SOLANA RPC WASM file, please make sure to download the corresponding version of the source code from the latest GitHub release.

Learn More

Credits

Related projects

  • Schnorr Signature Schnorr Signature Canister
  • Solana Galactic Bridge: This program implements a secure deposit and withdrawal functionality for a Solana treasury account.
  • Bitcoin canister: interact with the Bitcoin blockchain from the Internet Computer.
  • ckETH: a canister-issued Ether twin token on the Internet Computer.
  • IC 🔗 ETH: a full-stack starter project for calling Ethereum smart contracts from an IC dApp.

ic-solana's People

Contributors

tiamo avatar

Stargazers

0xZensh avatar  avatar Jennifer K. Tran avatar Dominic Wörner avatar

Watchers

Alexander Ray avatar  avatar

Forkers

octopus-network

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.