Code Monkey home page Code Monkey logo

cairo-flash-loan's Introduction

Cairo FlashLoan Starknet

Flash loan which Implements EIP-7399 interface in which borrower smart contract borrow some amount from Lender smart contract with a condition such that amount is returned to lender contract with an additional fee charged by the lender contract

Table of Contents

๐Ÿ“– About

A flash loan is a smart contract transaction in which a lender smart contract lends assets to a borrower smart contract with the condition that the assets are returned, plus an optional fee, before the end of the transaction.

This repository use the 0.8.0 version of openzepplin docs and uses EIP-7399 standard which is wrapper for EIP-3156 Flash loan

๐ŸŒ… Getting Started

Dependencies

Required

These are needed in order to compile and use the project.

Installing project dependencies

Cairo can be installed by simply downloading Scarb. Scarb bundles the Cairo compiler and the Cairo language server together in an easy-to-install package so that you can start writing Cairo code right away.

This will install the latest stable release of Scarb.

. curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh

We strongly recommend that you install Scarb via asdf, a CLI tool that can manage multiple language runtime versions on a per-project basis. This will ensure that the version of Scarb you use to work on a project always matches the one defined in the project settings, avoiding problems lead to version mismatch.

๐Ÿš€ Usage

Running the project

You can add the following to your Sacrb project's Scarb.toml:

openzeppelin = { git = "https://github.com/aerius-labs/cairo-flash-loan/" }
starknet = "2.3.1"
[[target.starknet-contract]]
casm = true

This will add the openzepplin documnetation in our scarb Project and [[target.starknet-contract]] is used to target the starknet contract.

Running Scarb from CLI

To run Project from the command line, first compile the repository using Scarb:

scarb build

This will create a target/dev folder which later use for deployment of the contracts

Testing

๐Ÿ“š Documentation

โš–๏ธ License

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.