Commit 4f71abbc authored by Iuri Matias's avatar Iuri Matias

point to latest remix packages; remove unnecessary logs

parent 8a0697dc
...@@ -11,12 +11,10 @@ contract MyTest { ...@@ -11,12 +11,10 @@ contract MyTest {
function initialValueShouldBe100() public constant returns (bool) { function initialValueShouldBe100() public constant returns (bool) {
return Assert.equal(foo.get(), 100, "initial value is not correct"); return Assert.equal(foo.get(), 100, "initial value is not correct");
//return foo.get() == 100;
} }
function initialValueShouldBe200() public constant returns (bool) { function initialValueShouldBe200() public constant returns (bool) {
return Assert.equal(foo.get(), 200, "initial value is not correct"); return Assert.equal(foo.get(), 200, "initial value is not correct");
//return foo.get() == 200;
} }
} }
......
...@@ -39,9 +39,8 @@ ...@@ -39,9 +39,8 @@
"colors": "^1.1.2", "colors": "^1.1.2",
"commander": "^2.13.0", "commander": "^2.13.0",
"ethereumjs-vm": "^2.3.2", "ethereumjs-vm": "^2.3.2",
"remix-lib": "^0.1.2", "remix-lib": "latest",
"remix-solidity": "../remix/remix-solidity", "remix-solidity": "latest",
"solc": "https://github.com/ethereum/solc-js",
"standard": "^10.0.3", "standard": "^10.0.3",
"web3": "^1.0.0-beta.27" "web3": "^1.0.0-beta.27"
} }
......
...@@ -55,7 +55,6 @@ function deployAll (compileResult, web3, callback) { ...@@ -55,7 +55,6 @@ function deployAll (compileResult, web3, callback) {
function deployContracts (contractsToDeploy, next) { function deployContracts (contractsToDeploy, next) {
async.eachOfLimit(contractsToDeploy, 1, function (contractName, index, nextEach) { async.eachOfLimit(contractsToDeploy, 1, function (contractName, index, nextEach) {
let contract = compiledObject[contractName]; let contract = compiledObject[contractName];
console.dir('deploying... ' + contractName);
let contractObject = new web3.eth.Contract(contract.abi) let contractObject = new web3.eth.Contract(contract.abi)
let contractCode = '0x' + contract.code let contractCode = '0x' + contract.code
...@@ -74,20 +73,15 @@ function deployAll (compileResult, web3, callback) { ...@@ -74,20 +73,15 @@ function deployAll (compileResult, web3, callback) {
throw new Error('linking not found for ' + name + ' when deploying ' + contractName) 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)) contractCode = contractCode.replace(new RegExp(toReplace, 'g'), contractObj.deployedAddress.slice(2))
} }
console.dir(contractCode);
let deployObject = contractObject.deploy({arguments: [], data: contractCode}); let deployObject = contractObject.deploy({arguments: [], data: contractCode});
console.dir("estimating gas...");
deployObject.estimateGas().then((gasValue) => { deployObject.estimateGas().then((gasValue) => {
console.dir("gas value is " + gasValue);
deployObject.send({ deployObject.send({
from: accounts[0], from: accounts[0],
gas: 5000 * 1000 gas: Math.ceil(gasValue * 1.1)
}).on('receipt', function (receipt) { }).on('receipt', function (receipt) {
contractObject.options.address = receipt.contractAddress contractObject.options.address = receipt.contractAddress
contractObject.options.from = accounts[0] contractObject.options.from = accounts[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment