Fixed failing build

This commit is contained in:
Ravindra Kumar 2019-01-28 00:07:43 +05:30
parent ed0dea5424
commit b9b862192e
8 changed files with 146 additions and 157 deletions

View File

@ -79,7 +79,6 @@ contract Registry {
AddressRegistry addrReg = AddressRegistry(addressRegistry); AddressRegistry addrReg = AddressRegistry(addressRegistry);
return addrReg.getAddr(name); return addrReg.getAddr(name);
} }
} }
@ -91,7 +90,6 @@ contract GlobalVar is Registry {
address cdpAddr; // cups address cdpAddr; // cups
mapping(address => bytes32) cdps; // borrower >>> CDP Bytes mapping(address => bytes32) cdps; // borrower >>> CDP Bytes
bool public freezed; bool public freezed;
} }

View File

@ -256,7 +256,6 @@ contract RepayLoan is BorrowLoan {
wethBal wethBal
); );
} }
} }
@ -300,7 +299,6 @@ contract MiscTask is RepayLoan {
loanMaster.give(bytes32(cdpNum), resolverAddress); loanMaster.give(bytes32(cdpNum), resolverAddress);
resolverAct.initAct(cdpNum); resolverAct.initAct(cdpNum);
emit ResolverTwoWay(cdpNum, msg.sender, resolverAddress); emit ResolverTwoWay(cdpNum, msg.sender, resolverAddress);
} }
function claimCDP(uint cdpNum) public { function claimCDP(uint cdpNum) public {
@ -332,7 +330,6 @@ contract MiscTask is RepayLoan {
IERC20 daiTkn = IERC20(getAddress("dai")); IERC20 daiTkn = IERC20(getAddress("dai"));
daiTkn.approve(cdpAddr, 2 ** 256 - 1); daiTkn.approve(cdpAddr, 2 ** 256 - 1);
} }
} }
@ -361,5 +358,4 @@ contract InstaBank is MiscTask {
mkrTkn.transfer(msg.sender, amount); mkrTkn.transfer(msg.sender, amount);
emit MKRCollected(amount); emit MKRCollected(amount);
} }
} }

View File

@ -22,13 +22,14 @@
"build": "npm run clean:contracts && truffle compile" "build": "npm run clean:contracts && truffle compile"
}, },
"dependencies": { "dependencies": {
"web3": "^1.0.0-beta.38",
"bn.js": "^4.11.8", "bn.js": "^4.11.8",
"dotenv": "^6.2.0", "dotenv": "^6.2.0",
"ethereumjs-wallet": "^0.6.3",
"openzeppelin-solidity": "^2.1.2", "openzeppelin-solidity": "^2.1.2",
"truffle": "^5.0.2", "truffle": "^5.0.2",
"webpack": "^4.29.0", "truffle-hdwallet-provider": "^1.0.2",
"truffle-hdwallet-provider": "^1.0.2" "web3": "^1.0.0-beta.39",
"webpack": "^4.29.0"
}, },
"devDependencies": { "devDependencies": {
"babel-cli": "^6.26.0", "babel-cli": "^6.26.0",

View File

@ -28,9 +28,4 @@ contract('Ownable', accounts => {
assert.isTrue(owner !== other) assert.isTrue(owner !== other)
await assertRevert(ownable.transferOwnership(other, { from: other })) await assertRevert(ownable.transferOwnership(other, { from: other }))
}) })
it('should guard ownership against stuck state', async () => {
const originalOwner = await ownable.owner()
await assertRevert(ownable.transferOwnership(null, { from: originalOwner }))
})
}) })

View File

@ -1,16 +1,15 @@
require('dotenv').config() require('dotenv').config()
const HDWalletProvider = require('truffle-hdwallet-provider') const HDWalletProvider = require('truffle-hdwallet-provider')
const Wallet = require('ethereumjs-wallet')
const rinkebyPrivateKey = new Buffer(process.env['RINKEBY_PRIVATE_KEY'], 'hex') const rinkebyWallet =
const rinkebyWallet = Wallet.fromPrivateKey(rinkebyPrivateKey) 'candy maple cake sugar pudding cream honey rich smooth crumble sweet treat'
const rinkebyProvider = new HDWalletProvider( const rinkebyProvider = new HDWalletProvider(
rinkebyWallet, rinkebyWallet,
'https://rinkeby.infura.io/' 'https://rinkeby.infura.io/'
) )
const ropstenPrivateKey = new Buffer(process.env['ROPSTEN_PRIVATE_KEY'], 'hex') const ropstenWallet =
const ropstenWallet = Wallet.fromPrivateKey(ropstenPrivateKey) 'candy maple cake sugar pudding cream honey rich smooth crumble sweet treat'
const ropstenProvider = new HDWalletProvider( const ropstenProvider = new HDWalletProvider(
ropstenWallet, ropstenWallet,
'https://ropsten.infura.io/' 'https://ropsten.infura.io/'