Skip to content

gluwa/usc-testnet-bridge-examples

 
 

Repository files navigation

🌉 USC Testnet Bridge Example 🌉

This repository is designed as a starting point for users and builders alike to explore the new Creditcoin cross-chain features brought forwards in the new USC Testnet update. Learn how to use the Creditcoin Decentralized Oracle through a series of guided tutorials where you get to set up and interact with your own decentralized bridge!

Before you start!

Before attempting any of the tutorials, make sure the following are installed and available in your system:

After that install the required dependencies to run the examples, to do so simply run the following command in the root of this repo:

yarn

You will also need to set up the right version of foundry with foundryup:

foundryup --version v1.2.3 # Skip this command if you are using nix!

Finally, source the .env file to load your configuration globally for all examples:

source .env

This ensures that all tutorial commands can access your wallet private key and RPC URLs without needing to manually substitute them.

Tutorials

Each tutorial is built to be as self-contained as possible. However, we still recommend you go through them in the following order:

  1. 📚 Hello Bridge
  2. 📚 Custom Contracts Bridging
  3. 📚 Bridge Offchain Worker
  4. 📚 Loan Flow

Content

Below is brief overview of each tutorial's content.

Hello Bridge

Learn how to use the Creditcoin Decentralized Oracle from the perspective of an end user. Hello Bridge makes use of pre-existing smart contracts on the Sepolia and Creditcoin Testnet so as to minimize the amount of setup needed.

Custom Contracts Bridging

Learn how to setup your own trustless cross-chain bridging logic by deploying your own contracts. Custom Contracts Bridging teaches you the perspective of a DApp builder by showing you how to set up custom logic across each chain you are deploying to.

Bridge Offchain Worker

Streamline UX by automating away most transactions in the bridging process. Bridge Offchain Worker shows you how offchain workers can be used to simplify the user flow of your cross-chain DApp.

Loan Flow

Building on top of what we learned with the Bridge Offchain Worker we take it a step further by implementing a loaning system using both a USC contract, a source chain helper and an offchain worker to seamlesly coordinate between the two, and of course making use of our Oracle proving capabilities to add the final touches of trust into the process.

External Resources

About

This repository contains a few scripts and instructions that demonstrate use of the USC Testnet decentralized bridge.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 48.0%
  • Solidity 45.4%
  • JavaScript 6.1%
  • Shell 0.5%