Giter Club home page Giter Club logo

Comments (4)

yuyasugano avatar yuyasugano commented on June 29, 2024

@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.

bart avatar bart commented on June 29, 2024

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.

yuyasugano avatar yuyasugano commented on June 29, 2024

@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.

bart avatar bart commented on June 29, 2024

Sorry @yuyasugano I'm not working on that anymore.

from pancake-bakery-arbitrage.

Related Issues (20)

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.