Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ethereum/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
10 changes: 5 additions & 5 deletions ethereum/scripts/deployer.js
Original file line number Diff line number Diff line change
@@ -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);
12 changes: 6 additions & 6 deletions ethereum/scripts/deployerImplementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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);

Expand Down