point to latest remix packages; remove unnecessary logs

pull/7/head
Iuri Matias 7 years ago
parent 8a0697dc73
commit 4f71abbccd
  1. 2
      examples/simple_storage_test.sol
  2. 5
      package.json
  3. 8
      src/deployer.js

@ -11,12 +11,10 @@ contract MyTest {
function initialValueShouldBe100() public constant returns (bool) {
return Assert.equal(foo.get(), 100, "initial value is not correct");
//return foo.get() == 100;
}
function initialValueShouldBe200() public constant returns (bool) {
return Assert.equal(foo.get(), 200, "initial value is not correct");
//return foo.get() == 200;
}
}

@ -39,9 +39,8 @@
"colors": "^1.1.2",
"commander": "^2.13.0",
"ethereumjs-vm": "^2.3.2",
"remix-lib": "^0.1.2",
"remix-solidity": "../remix/remix-solidity",
"solc": "https://github.com/ethereum/solc-js",
"remix-lib": "latest",
"remix-solidity": "latest",
"standard": "^10.0.3",
"web3": "^1.0.0-beta.27"
}

@ -55,7 +55,6 @@ function deployAll (compileResult, web3, callback) {
function deployContracts (contractsToDeploy, next) {
async.eachOfLimit(contractsToDeploy, 1, function (contractName, index, nextEach) {
let contract = compiledObject[contractName];
console.dir('deploying... ' + contractName);
let contractObject = new web3.eth.Contract(contract.abi)
let contractCode = '0x' + contract.code
@ -74,20 +73,15 @@ function deployAll (compileResult, web3, callback) {
throw new Error('linking not found for ' + name + ' when deploying ' + contractName)
}
console.dir("replacing " + toReplace + " with " + contractObj.deployedAddress);
contractCode = contractCode.replace(new RegExp(toReplace, 'g'), contractObj.deployedAddress.slice(2))
}
console.dir(contractCode);
let deployObject = contractObject.deploy({arguments: [], data: contractCode});
console.dir("estimating gas...");
deployObject.estimateGas().then((gasValue) => {
console.dir("gas value is " + gasValue);
deployObject.send({
from: accounts[0],
gas: 5000 * 1000
gas: Math.ceil(gasValue * 1.1)
}).on('receipt', function (receipt) {
contractObject.options.address = receipt.contractAddress
contractObject.options.from = accounts[0]

Loading…
Cancel
Save