pedrobergamini / flashloaner-contract Goto Github PK
View Code? Open in Web Editor NEWThis repo introduces a simple example of how to arbitrage trade on-chain using flash loans.
This repo introduces a simple example of how to arbitrage trade on-chain using flash loans.
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
I successfully run this code in remix and I was confused about what type of value I can pass here to get the flash loan. I need an explanation about this contract.
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.
provider.on('block', async (blockNumber) => {
try {
console.log(blockNumber);
const sushiReserves = await sushiEthDai.getReserves();
const uniswapReserves = await uniswapEthDai.getReserves();
[...]
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.