smart-exchange
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -9,3 +9,3 @@ { | ||
"owner": "0xc0ef064dbc3b47cdbbd792d7c4dba7ab75471598", | ||
"namereg": "0x0f908da87b086a6d0789f40e98a4680a5db92b86" | ||
"namereg": "0x4fdaebe9eac15eb5bc0170f6a36f19eaed75d8ef" | ||
} |
var web3 = require('web3'); | ||
var abi = require('./contracts/FixedFeeRegistrar.json'); | ||
var abi = require('./contracts/ICAPRegistrar.json'); | ||
module.exports = web3.eth.contract(abi); | ||
@@ -98,3 +98,3 @@ /** | ||
var isEmptyAddress = function (address) { | ||
return address === '0x0000000000000000000000000000000000000000'; | ||
return address === '0x0000000000000000000000000000000000000000' || address === '0x'; | ||
}; | ||
@@ -101,0 +101,0 @@ |
{ | ||
"name": "smart-exchange", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/interface.js", |
@@ -19,12 +19,13 @@ var fs = require('fs'); | ||
clearInterval(interval); | ||
var file = fs.readFileSync(__dirname + '/contracts/FixedFeeRegistrar.sol'); | ||
var file = fs.readFileSync(__dirname + '/contracts/ICAPRegistrar.sol'); | ||
var compiled = web3.eth.compile.solidity(file.toString()); | ||
// TODO: make it configurable | ||
var code = compiled.FixedFeeRegistrar.code; | ||
var abi = compiled.FixedFeeRegistrar.info.abiDefinition; | ||
var code = compiled.ICAPRegistrar.code; | ||
var abi = compiled.ICAPRegistrar.info.abiDefinition; | ||
// create new contract and get it's transaction hash | ||
var transactionHash = web3.eth.contract(abi).new({data: code, from: owner, gas: 2500000}).transactionHash; | ||
// ICAPRegistrar costs 422659 | ||
var transactionHash = web3.eth.contract(abi).new({data: code, from: owner, gas: 423000}).transactionHash; | ||
@@ -31,0 +32,0 @@ // wait for contract to be mined for 120 seconds |
49403
1321