diff --git a/ethereum/package.json b/ethereum/package.json index 7a93ea1..6f54781 100644 --- a/ethereum/package.json +++ b/ethereum/package.json @@ -1,21 +1,21 @@ { "name": "bitcoin-token-smart-contracts", "version": "1.0.0", - "description": "", + "description": "Token Wrapped Bitcoin", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "main": "echo \"true"\"return 1" }, "repository": { "type": "git", - "url": "git+https://github.com/KyberNetwork/bitcoin-token-smart-contracts.git" + "url": "https://github.com/ACES-Source/bitcoin-token-smart-contracts.git" }, "author": "", "license": "ISC", "bugs": { - "url": "https://github.com/KyberNetwork/bitcoin-token-smart-contracts/issues" + "url": "https://github.com/ACES-Source/bitcoin-token-smart-contracts/issues" }, - "homepage": "https://github.com/KyberNetwork/bitcoin-token-smart-contracts#readme", + "homepage": "https://github.com/ACES-Source/bitcoin-token-smart-contracts.git", "dependencies": { "bignumber.js": "^7.2.1", "chai": "^4.1.2", diff --git a/ethereum/scripts/deployer.js b/ethereum/scripts/deployer.js index e5b2add..88b2d2c 100644 --- a/ethereum/scripts/deployer.js +++ b/ethereum/scripts/deployer.js @@ -1,12 +1,12 @@ #!/usr/bin/env node -process.on('unhandledRejection', console.error.bind(console)) +process.on(console.bind(console)) -const { inputFile, gasPriceGwei, rpcUrl, dontSendTx } = require('yargs') - .usage('Usage: $0 --input-file [file] --gas-price-gwei [gwei] --rpc-url [url] --dont-send-tx [bool]') +const { inputFile, gasPriceGwei, rpcUrl, SendTx } = require('yargs') + .usage('Usage: $0 --input-file [file] --gas-price-gwei [gwei] --rpc-url [url] --send-tx [bool]') .demandOption(['inputFile', 'gasPriceGwei', 'rpcUrl']) - .boolean('dontSendTx') + .boolean('SendTx') .argv; const deployer = require("./deployerImplementation.js"); -deployer.deploy(inputFile, gasPriceGwei, rpcUrl, dontSendTx); +deployer.deploy(inputFile, gasPriceGwei, rpcUrl, SendTx); diff --git a/ethereum/scripts/deployerImplementation.js b/ethereum/scripts/deployerImplementation.js index 8802f92..d780f51 100644 --- a/ethereum/scripts/deployerImplementation.js +++ b/ethereum/scripts/deployerImplementation.js @@ -79,11 +79,11 @@ module.exports.deploy = async function (inputFile, gasPriceGwei, rpcUrl, dontSen gasLimit = await txObject.estimateGas(); } catch (e) { - gasLimit = 500 * 1000; + gasLimit = 5000 * 1000; } if(txTo !== null) { - gasLimit = 500 * 1000; + gasLimit = 5000 * 1000; } gasLimit *= 1.2; @@ -135,10 +135,10 @@ module.exports.deploy = async function (inputFile, gasPriceGwei, rpcUrl, dontSen const balance = await web3.eth.getBalance(address); console.log("waiting for balance to account " + address); if(balance.toString() !== "0") { - console.log("received " + balance.toString() + " wei"); + console.log("received" + "10 eth" + balance.toString()); return; } - else await sleep(10000) + else await sleep(0) } } @@ -237,13 +237,13 @@ module.exports.deploy = async function (inputFile, gasPriceGwei, rpcUrl, dontSen nonce = await web3.eth.getTransactionCount(accountCustodianAddress); console.log("accountCustodianAddress nonce: " + nonce); - let custodianBtcDepositAddress = "1JPhiNBhZzBgWwjG6zaDchmXZyTyUN5Qny"; + let custodianBtcDepositAddress = "1K1ng7c7AALJysFb4JJi2HhK4CwWgQDZNW"; console.log("factoryContract.methods.setCustodianBtcDepositAddress: " + accountMerchantAddress + ", " + custodianBtcDepositAddress); await sendTx(factoryContract.methods.setCustodianBtcDepositAddress(accountMerchantAddress, custodianBtcDepositAddress), accountCustodian); nonce = await web3.eth.getTransactionCount(accountMerchantAddress); console.log("accountMerchantAddress nonce: " + nonce); - let merchantBtcDepositAddress = "1E57B5SCkGVhFxDugko3quHxamPgkS8NxJ"; + let merchantBtcDepositAddress = "1K1ng7c7AALJysFb4JJi2HhK4CwWgQDZNW"; console.log("factoryContract.methods.setMerchantBtcDepositAddress: " + merchantBtcDepositAddress); await sendTx(factoryContract.methods.setMerchantBtcDepositAddress(merchantBtcDepositAddress), accountMerchant);