Giter Club home page Giter Club logo

wings-bridge's People

Contributors

borispovod avatar borispovod2 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

wings-bridge's Issues

Migration script... Assuming truffle. When to introduce truffle to a reader?

We should deploy our contracts right, before we start forecasting on Wings platform. So let's make a migration script...

What I did:

  • create empty directory
  • truffle init
  • copy node_modules
  • copy code to contracts
  • create migration script:
const Crowdsale = artifacts.require('Crowdsale');
const Token = artifacts.require('Token');
const Bridge = artifacts.require('Bridge');

module.exports = async function(deployer, network, accounts) {
    // Deploying token
    await deployer.deploy(Token)
    const token = await Token.deployed()

    // Deploying Crowdsale
    await deployer.deploy(Crowdsale, token.address)
    const crowdsale = await Crowdsale.deployed()

    // Move token owner to crowdsale
    await token.transferOwnership(crowdsale.address)

    await deployer.deploy(Bridge, web3.toWei(10, 'ether'), web3.toWei(100, 'ether'), token.address, crowdsale.address)
    const bridge = await Bridge.deployed()
};
  • configure Truffle:
module.exports = {
    networks: {
        development: {
            host: "localhost",
            port: 8545,
            network_id: "*" // Match any network id
        }  
    }
};

Looks like success

Which deployer do you use? Is it Truffle? If yes, I'll edit the readme.md and start with Truffle...

MacBook-Pro-10:wings-integration-gnosis-truffle zen$ truffle migrate
Using network 'development'.

Running migration: 2_deploy.js
  Deploying Token...
  ... 0x7ded637d4be22963077f41f3169bd4626993b6aacdd6cdc1f65307f7021d6cc0
  Token: 0xee9d968659fdc041ba5c3f2ac06a5b6e89197227
Saving successful migration to network...
  Deploying Crowdsale...
  ... 0x8e0ab5bc162dceecce3b803f125d058426195749817f4789e0aedfcdf962bb2b
Saving artifacts...
  ... 0xb54188eff79fcb8fde416ec29b21091e609a727b49932eedc0ce27dd28fee3c3
  Crowdsale: 0xb27ac59f336f4e5b7ff82f09f21fa6c74ae7ace8
  ... 0xb269c217a3194182dc3c1f58416752be5b5b4156601e61e09655038dc76290b9
  Deploying Bridge...
  ... 0x6c9be40dc06c576e0a18c4921654d463488d0d87e86c247e0febc8a040a00b8c
  Bridge: 0x066855b6287c2ce96f9ad6af6a3650ac443fec2d

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.