MCPcopy Create free account
hub / github.com/coder5876/simple-multisig / executeSendFailure

Function executeSendFailure

test/simplemultisig.js:139–164  ·  view source on GitHub ↗
(owners, threshold, signers, nonceOffset, executor, gasLimit, done)

Source from the content-addressed store, hash-verified

137 }
138
139 let executeSendFailure = async function(owners, threshold, signers, nonceOffset, executor, gasLimit, done) {
140
141 let multisig = await SimpleMultiSig.new(threshold, owners, CHAINID, {from: accounts[0]})
142
143 let nonce = await multisig.nonce.call()
144 assert.equal(nonce.toNumber(), 0)
145
146 // Receive funds
147 await web3SendTransaction({from: accounts[0], to: multisig.address, value: web3.toWei(web3.toBigNumber(2), 'ether')})
148
149 let randomAddr = web3.sha3(Math.random().toString()).slice(0,42)
150 let value = web3.toWei(web3.toBigNumber(0.1), 'ether')
151 let sigs = createSigs(signers, multisig.address, nonce + nonceOffset, randomAddr, value, '', executor, gasLimit)
152
153 let errMsg = ''
154 try {
155 await multisig.execute(sigs.sigV, sigs.sigR, sigs.sigS, randomAddr, value, '', executor, gasLimit, {from: executor, gasLimit: 1000000})
156 }
157 catch(error) {
158 errMsg = error.message
159 }
160
161 assert.equal(errMsg, 'VM Exception while processing transaction: revert', 'Test did not throw')
162
163 done()
164 }
165
166 let creationFailure = async function(owners, threshold, done) {
167

Callers 1

simplemultisig.jsFile · 0.85

Calls 1

createSigsFunction · 0.85

Tested by

no test coverage detected