Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wormhole-foundation/example-cross-chain-borrow-lend
https://github.com/wormhole-foundation/example-cross-chain-borrow-lend
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wormhole-foundation/example-cross-chain-borrow-lend
- Owner: wormhole-foundation
- License: other
- Created: 2023-06-22T20:04:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-26T00:53:04.000Z (9 months ago)
- Last Synced: 2024-04-01T16:10:16.291Z (9 months ago)
- Language: Solidity
- Size: 579 KB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Building A Cross-Chain Borrow Lend Application
This repository contains solidity contracts (Hub.sol and Spoke.sol) that - if the Hub contract is deployed onto one chain and the Spoke contract is deployed onto many chains - form a fully working cross-chain borrow lending application!
caveat: Demo/example purposes only - there are many things missing from this implementation that would be crucial for a real borrow lending protocol
## Getting Started
Included in this repository is:
- Example Solidity Code
- Example Forge local testing setup
- Testnet Deploy Scripts
- Example Testnet testing setup### Environment Setup
- Node 16.14.1 or later, npm 8.5.0 or later: [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- forge 0.2.0 or later: [https://book.getfoundry.sh/getting-started/installation](https://book.getfoundry.sh/getting-started/installation)### Testing Locally
```bash
npm run build
forge test
```### Deploying to Testnet
You will need a wallet with some testnet AVAX and testnet CELO.
- [Obtain testnet AVAX here](https://core.app/tools/testnet-faucet/?token=C)
- [Obtain testnet CELO here](https://faucet.celo.org/alfajores)```bash
EVM_PRIVATE_KEY=your_wallet_private_key npm run deploy
```### Testing on Testnet
You will need a wallet with some testnet AVAX and testnet CELO - see above section for links to obtain this.
You must have also deployed contracts onto testnet (as described in the above section).
To test the cross chain borrow lending application, execute the test as such:
```bash
EVM_PRIVATE_KEY=your_wallet_private_key npm run test
```**WARNING**: This repository has not been audited, so it may contain bugs and should be used for example purposes only. If you intend to use or build on this example to perform actual lending, it's highly recommended that you have the final code commit audited by a smart contract auditing firm.