How to use the truffle/lib/migrate.run function in truffle

To help you get started, we’ve selected a few truffle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ConsenSys / truffle-solidity-loader / index.js View on Github external
TruffleContractCompiler.compile( compilerOpts, function(err, contracts){
        var migrationOpts = {}
        migrationOpts.migrations_directory      = buildOpts.migrations_directory
        migrationOpts.contracts_build_directory = dirPath
        migrationOpts.provider                  = provisionOpts.provider
        migrationOpts.network                   = compilerOpts.network
        migrationOpts.network_id                = compilerOpts.network_id
        migrationOpts.logger                    = Logger

        TruffleContractMigrator.run( migrationOpts, function( err, result ) {
          if(err) {
            Logger.error(err);
            return compilationFinished(err, null);
          }

          fs.readFile( path.resolve(dirPath, contractFileName+'.js'), 'utf8', function(err, solJsFile) {
            if(err) {
              Logger.error(err);
              return compilationFinished(err, null);
            }

            compilationFinished(err, solJsFile)
          })
        })
      })
    }

truffle

Truffle - Simple development framework for Ethereum

MIT
Latest version published 1 year ago

Package Health Score

55 / 100
Full package analysis