Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{balance: '0xffffffffffffffffffffffffffffffff', secretKey: '0xf000000000000000000000000000000000000000000000000000000000000005'},
{balance: '0xffffffffffffffffffffffffffffffff', secretKey: '0xf000000000000000000000000000000000000000000000000000000000000006'},
{balance: '0xffffffffffffffffffffffffffffffff', secretKey: '0xf000000000000000000000000000000000000000000000000000000000000007'},
{balance: '0xffffffffffffffffffffffffffffffff', secretKey: '0xf000000000000000000000000000000000000000000000000000000000000008'},
{balance: '0xffffffffffffffffffffffffffffffff', secretKey: '0xf000000000000000000000000000000000000000000000000000000000000009'},
{balance: '0xffffffffffffffffffffffffffffffff', secretKey: '0xf00000000000000000000000000000000000000000000000000000000000000a'},
{balance: '0xffffffffffffffffffffffffffffffff', secretKey: '0xf00000000000000000000000000000000000000000000000000000000000000b'},
{balance: '0xffffffffffffffffffffffffffffffff', secretKey: '0xf00000000000000000000000000000000000000000000000000000000000000c'},
],
// gasLimit: 100000000000,
logger: { log: () => {} }
// logger: console
});
global.provider = server.provider;
var config = Truffle.config.detect({
test_files: [
'test/TokenSale_spec.js',
'test/SmartOracle_spec.js',
],
provider: provider
})
server.listen(6323, () => {
Truffle.test.run(config, process.exit);
});
server.listen(6323, () => {
Truffle.test.run(config, process.exit);
});
normalize: function(buildOpts, query) {
var truffleConfig = TruffleConfigLocator.find()
if(truffleConfig) {
var config = TruffleConfig.load(truffleConfig)
config = merge(buildOpts, config)
}
if (query !== "undefined") {
var config = QueryStringParser.parse(query)
merge(buildOpts, config)
}
if(!buildOpts.network) {
buildOpts.network = "default"
Logger.log("Setting network to 'default' for compilation and contract provisioning")
}
if(!buildOpts.network_id) {
buildOpts.network_id = "default"
Logger.log("Setting network_id to 'default' for compilation and contract provisioning")
temp.mkdir('webpack-truffle', function(err, dirPath){
if(!err) {
var compilerOpts = {};
compilerOpts.contracts_directory = contractPath
compilerOpts.contracts_build_directory = dirPath
compilerOpts.network = buildOpts.network
compilerOpts.network_id = buildOpts.network_id
compilerOpts.logger = Logger
var provisionOpts = {}
provisionOpts.provider = new Web3.providers.HttpProvider(buildOpts.web3_rpc_uri)
provisionOpts.contracts_build_directory = dirPath
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) {
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)
})
})
})
}