Comments (4)
@wenpanfeng Hi I guessed that you hadn't deployed a flash swap contract yet?? If you deployed a contract in a network then json file must have abi & networks with id in it. Please reopen this issue if needed. Thanks.
const Flashswap = require('./build/contracts/Flashswap.json');
const flashswap = new web3.eth.Contract(
Flashswap.abi,
Flashswap.networks[networkId].address
);
from pancake-bakery-arbitrage.
Encountered the same issue. truffle migrate --network mainnet
deploys contracts in two steps (1_initial_migration.js and 2_deploy_contracts.js) and generates corresponding JSON files. Flashswap.json includes data in networks property but Swapcontract doesn't. Investigated it and figured out that only Flashswap is part of migration two. So Swapcontract
doesn't get migrated. That's why it doesn't have any network information. Just for ya information if anyone is facing the same issue one day. Btw, thanks @yuyasugano for the great post and example!
from pancake-bakery-arbitrage.
@bart Please confirm the revised code and let me know if it works. I did some online research and updated the contract and the script. Swapcontract is just a testing purpose and excluded it from migration target now.
from pancake-bakery-arbitrage.
Sorry @yuyasugano I'm not working on that anymore.
from pancake-bakery-arbitrage.
Related Issues (20)
- Warning! Error encountered during contract execution [execution reverted] HOT 4
- Getting 'header not found' Error on truffle migrate --network mainnet HOT 1
- Flashswap HOT 5
- Error deploy Smartcontract HOT 1
- Warning! Error encountered during contract execution [execution reverted] HOT 14
- "Migrations" -- invalid sender. HOT 2
- Full setup HOT 3
- somebody can help? HOT 1
- Start Arbitrage Transaction Fail HOT 2
- BOT only checks one way arbitrage HOT 1
- About the bot HOT 1
- truffle migrate --network mainnet HOT 1
- Unnecessary 0 condition [flashswap.sol] HOT 1
- UnhandledPromiseRejectionWarning: Error: Returned error: execution reverted: PancakeLibrary: INSUFFICIENT_LIQUIDITY HOT 2
- how to start?
- not eht file of dotenv HOT 2
- Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'address') HOT 3
- Cannot read property address of undefined HOT 2
- Import error when trying to execute truffle compile HOT 1
- error when running indes.js
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pancake-bakery-arbitrage.