forked from omni/omnibridge
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.solcover.js
More file actions
34 lines (33 loc) · 851 Bytes
/
.solcover.js
File metadata and controls
34 lines (33 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const Web3 = require('web3')
module.exports = {
mocha: {
timeout: 30000
},
forceBackupServer: true,
providerOptions: {
port: 8545,
seed: 'TestRPC is awesome!'
},
onServerReady: async (config) => {
const web3 = new Web3(config.provider)
const abi = [{
inputs: [{ name: "", type: "address"}],
outputs: [{ name: "", type: "uint256" }],
name: "balanceOf",
stateMutability: "view",
type: "function"
}]
const cDai = new web3.eth.Contract(abi, '0x615cba17EE82De39162BB87dBA9BcfD6E8BcF298')
const faucet = (await web3.eth.getAccounts())[6]
while (true) {
try {
if (await cDai.methods.balanceOf(faucet).call() !== '0') {
break
}
} catch (e) {
await new Promise(res => setTimeout(res, 1000))
}
}
},
skipFiles: ['mocks']
}