GithubHelp home page GithubHelp logo

pedrobergamini / flashloaner-contract Goto Github PK

View Code? Open in Web Editor NEW
527.0 527.0 309.0 11 KB

This repo introduces a simple example of how to arbitrage trade on-chain using flash loans.

Solidity 98.92% TypeScript 1.08%

flashloaner-contract's People

Contributors

cleanunicorn avatar pedrobergamini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flashloaner-contract's Issues

Contracts missing openzeppelin SafeMath dependency definition

project:/contracts/UniswapV2Library.sol:5:1: ParserError: Source "@openzeppelin/contracts/math/SafeMath.sol" not found import "@openzeppelin/contracts/math/SafeMath.sol"; ^-------------------------------------------------^

nothing in the package.json for openzeppelin

Unauthorized after deployment

Hey, I'm pretty new to the smart contract world - a lot of take in for sure. I've deployed your contract to mainnet and I'm trying to execute it but receiving a "execution reverted: Unauthorized" error. It looks like it might be from this line:

  require(msg.sender == UniswapV2Library.pairFor(factory, token0, token1), "Unauthorized"); 

Any ideas what I could be missing? My wallet private key is correct and matches the account that deployed the flash contract.

did not see the code of follow

provider.on('block', async (blockNumber) => {
try {
console.log(blockNumber);
const sushiReserves = await sushiEthDai.getReserves();
const uniswapReserves = await uniswapEthDai.getReserves();
[...]
}
}

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.